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 sys | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
tests = int(lines[0]) | |
def getNext(c): | |
for step in range(index, 2 * steps, 2): | |
if ca[step] == c: | |
return int(ca[step+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
/* Solution: Magicka (Google Code Jam 2011 Qualification Round) | |
* created by: [email protected] | |
* on: 05/11/2011 | |
* run: node Bs.js infile outfile | |
*/ | |
var fs = require('fs'); | |
/* argv test | |
console.log('ok'); |
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 sys | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
tests = int(lines[0]) | |
candys0 = [map(int, line.split()) for line in lines] | |
def test0(a): return not (len(a) == 1) | |
candys = filter(test0, candys0) | |
data = [] |
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 sys | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
goros0 = [map(int, line.split()) for line in lines] | |
goros = [] | |
tests = goros0.pop(0) | |
for i in range(1, len(goros0), 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
import string, sys | |
import re | |
""" | |
ab = {"a":1,"b":2,"c":3,"d":4,"e":5, | |
"f":6,"g":7,"h":8,"i":9,"j":10, | |
"k":11,"l":12,"m":13,"n":14,"o":15, | |
"p":16,"q":17,"r":18,"s":19,"t":20, | |
"u":21,"v":22,"w":23,"x":24,"y":25,"z":26} | |
""" |
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 sys | |
import math | |
# files | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
tests = int(lines[0]) | |
def possible(pg, pd): |
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 sys | |
from string import ascii_lowercase | |
# files | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
tests = int(lines[0]) | |
# parse |
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 sys | |
# files | |
fin = file(sys.argv[1]) | |
fout = open(sys.argv[2], 'w') | |
lines = fin.readlines() | |
tests = int(lines[0]) | |
# parse | |
indexes = [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
""" | |
"" Solution: Runs (Google Code Jam 2011 World Finals Problem A) | |
"" by: [email protected] | |
"" run: python A.py infile outfile | |
""" | |
import string | |
import sys | |
from datetime import datetime | |
from itertools import permutations |
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
""" | |
"" Solution: Google Royale (Google Code Jam 2011 World Finals Problem E) | |
"" by: [email protected] | |
"" run: python E.py infile outfile | |
""" | |
import sys | |
# files | |
fin = file(sys.argv[1]) |
OlderNewer