This file contains hidden or 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
| Case #1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
| Case #2: 1 2 7 3 9 10 4 12 14 5 11 15 6 8 13 | |
| Case #3: 1 2 3 4 5 | |
| Case #4: 2 1 3 7 6 12 4 5 8 13 9 10 11 14 15 16 17 18 19 20 | |
| Case #5: 2 1 | |
| Case #6: 1 | |
| Case #7: IMPOSSIBLE | |
| Case #8: IMPOSSIBLE | |
| Case #9: 1 2 3 4 5 | |
| Case #10: 1 2 5 3 7 8 9 10 11 12 4 13 14 16 17 18 19 6 20 15 |
This file contains hidden or 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
| Case #1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
| Case #2: 1 2 7 3 4 9 10 5 11 12 14 6 8 13 15 | |
| Case #3: 1 2 3 4 5 | |
| Case #4: 2 1 3 6 7 4 5 8 12 9 10 11 13 14 15 16 17 18 19 20 | |
| Case #5: 2 1 | |
| Case #6: 1 | |
| Case #7: 1 2 3 4 5 6 9 11 12 7 8 13 10 | |
| Case #8: IMPOSSIBLE | |
| Case #9: 1 2 3 4 5 | |
| Case #10: 1 2 5 7 11 12 14 17 19 20 3 4 6 8 9 10 13 15 16 18 |
This file contains hidden or 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
| 25 | |
| 20 15 | |
| 2 4 4 5 1 1 5 5 5 3 5 3 4 4 2 4 1 3 2 1 | |
| 4 1 1 | |
| 1 2 5 3 | |
| 1 4 4 3 2 4 | |
| 4 1 3 | |
| 5 0 | |
| 5 0 | |
| 1 1 1 |
This file contains hidden or 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 collections | |
| # set to False if any of the chest contains no keys at all | |
| could_check_deadlock = False | |
| def treasure(): | |
| """ | |
| used to solve google code jam 2013 - Problem D | |
| """ | |
| in_f = open('D-small-attempt4.in', 'r') |
This file contains hidden or 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 math | |
| def fair_and_square(): | |
| """ | |
| used to solve google code jam 2013 - Problem C | |
| """ | |
| in_f = open('C-large-1.in', 'r') | |
| out_f = open('C-large-1.in_output.txt', 'w') | |
| num_of_case = int(in_f.readline().rstrip('\n')) | |
| print "num of cases:{}".format(num_of_case) |
This file contains hidden or 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 lawnmower(): | |
| """ | |
| used to solve google code jam 2013 - Problem B | |
| """ | |
| in_f = open('B-large.in', 'r') | |
| out_f = open('B-large_output.txt', 'w') | |
| num_of_case = int(in_f.readline().rstrip('\n')) | |
| print "num of cases:{}".format(num_of_case) | |
| for i in range(1, num_of_case+1): |
This file contains hidden or 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
| win_patterns = ["XXXX", "OOOO", "XXX", "OOO"] | |
| def tttt(): | |
| """ | |
| name is short for "Tic-Tac-Toe-Tomek" | |
| """ | |
| in_f = open('A-large.in', 'r') | |
| out_f = open('A-large_output.txt', 'w') |
NewerOlder