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
t,w = raw_input().split(" ") | |
T,W = int(t),int(w) | |
apple_data = [] | |
for i in range(int(T)): | |
apple_data.append(input()-1) | |
note= [[-1 for j in range(T) ] for i in range(W + 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
n = input() | |
note = [[-1 for i in range(n)] for j in range(n)] | |
data = [] | |
for i in range(n): | |
data.append(raw_input().split(" ")) | |
print data | |
def Foo(x,y): |
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
n = input() | |
cow_list = [] | |
def eated_flower(list,time,cnt=0): | |
num = 0 | |
for l in list: | |
num += l[1 + cnt] * time | |
return num | |
c2 = [] |
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
while True: | |
to_dic = {} | |
path_dic = {} | |
N = input() | |
if N==0: | |
break | |
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
def Search_friend(fr,pos,cl): | |
if pos[0] > W - 1 or pos[1] > H - 1 or pos[0] < 0 or pos[1] < 0: | |
return [] | |
if note[pos[0]][pos[1]] == id: | |
return [] | |
temp = [] | |
if pos in fr : |
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<iostream> | |
#include<string> | |
#include<algorithm> | |
#include<vector> | |
using namespace std; | |
int main(void){ | |
int nest,len; | |
string S; |
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
(define (caar x) (car (car x ))) | |
(define (cadr x) (car (cdr x ))) | |
(define (cdar x) (cdr (car x ))) | |
(define (cddr x) (cdr (cdr x ))) | |
(define (caaar x) (car (caar x))) | |
(define (cdaar x) (cdr (caar x))) | |
(define (caadr x) (car (cadr x))) | |
(define (cdadr x) (cdr (cadr x))) | |
(define (cadar x) (car (cdar x))) | |
(define (cddar x) (cdr (cdar 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
(define decorate #f) | |
(let ((pos-seed 1) | |
(shape-seed 1)) | |
(set! decorate | |
(lambda (leaves) | |
(for-each | |
(lambda (_) | |
(set! pos-seed (modulo (+ (* pos-seed 3) 7) 26)) | |
(set! shape-seed (modulo (+ shape-seed 1) 3)) | |
(if (< pos-seed (string-length leaves)) |
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
;雑にグラフを生成する | |
(import (scheme base)(scheme write)(srfi 1)(srfi 27)) | |
(random-source-randomize! default-random-source) | |
;乱数のリストを生成する | |
(define (generate-random-integer-list len max-number) | |
(let loop ((i len)) |
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
(import (scheme base)(scheme write)(scheme cxr)(srfi 1)) | |
(define sample-input | |
'((x = a * b) | |
(y = x + c) | |
(d = a * b) | |
(e = d - c) | |
(e = d + c))) | |
OlderNewer