This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define UPPER 0 | |
#define RIGHT 1 | |
#define YES 0 | |
#define NO 1 | |
int main(){ | |
int m,n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
def preprocessor(orders): | |
import re | |
x = re.compile(r"(うん|たん)").findall(orders) | |
l = "".join(x) | |
orders = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <list> | |
using namespace std; | |
typedef struct { | |
int *ks; | |
int length; | |
} node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use file.util) | |
(let ((x (file->string-list "input.txt"))) | |
(display (apply - (map string->number x)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use file.util) | |
(use srfi-1) | |
(letrec ((input (file->string-list "input.txt")) | |
(n-m (map string->number (string-split (car input) #\Space))) | |
(n (car n-m)) | |
(m (cdr n-m)) | |
(dat (map string->number (cdr input))) | |
(mass (take dat n)) | |
(dise (drop dat n))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use file.util) | |
(use util.combinations) | |
(use srfi-1) | |
(define (flatten-number xs) | |
(string->number (apply string-append (map number->string xs)))) | |
(let* ((input (map string->number (file->string-list "input.txt"))) | |
(k (second input)) | |
(nums (drop input 2))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#include<cstring> | |
#define S_MAX 3001 | |
#define M_MAX 2001 | |
int dp[S_MAX][M_MAX]; | |
main(){ | |
while(1){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int stk[2<<14]; | |
int ps=0; | |
void push(int n){stk[ps++]=n;} | |
int pop(){return stk[--ps];} | |
int len(char a[]){ | |
int i; | |
for(i=0;1;i++){ | |
if(a[i] == '\0') return i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
うんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんたんうんうんたんうんうんたんうんたんたんたんたんたんうんうんうんたんうんうんうんうんうんうんたんうんうんたんうんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんたんうんうんうんたんうんうんたんうんうんたんうんたんうんうんうんうんうんうんたんたんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんうんたんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんうんうんうんたんうんたんうんうん |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int stk[2<<14]; | |
int ps=0; | |
int kofi(){ | |
char a[2<<15]; | |
int c[2<<15]; | |
int n; | |
int s; | |
unsigned char d[2<<14]; | |
int p; |
OlderNewer