Dataset Viewer
Auto-converted to Parquet Duplicate
source
string
code
string
inputs
string
outputs
string
metadata
string
google_code_jam
def build_initial(string): vals = [] for num in string: vals.append( "(" * int(num) + num + ")" * int(num)) return "".join(vals) def replace_parentheses(string, n): for i in range(n, 0, -1): string = string.replace(")" * n + "(" * i, ")"*(n-i)) return string if __name__ == '__main_...
['4\n0000\n101\n111000\n1\n', '100\n111001010110010101001110111100101000000101010101111100000110110110100011000011111111101011010011110\n010100001100100110001100110000110000001011101001010010010101011111111111001010100111010\n10101011110111010110110011110\n0100001110101\n101000101011010101111101011100101111100100001010...
['Case #1: 0000\nCase #2: (1)0(1)\nCase #3: (111)000\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(11)00(1)0(1)0(1)00(111)0(1111)00(1)0(1)000000(1)0(1)0(1)0(1)0(11111)00000(11)0(11)0(11)0(1)000(11)0000(111111111)0(1)0(11)0(1)00(1111)0\nCase #2: 0(1)0(1)0000(11)00(1)00(11)000(11)00(11)0000(11)000000(1)0(111)0(1)00(1)0(1)00(...
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
l=[] def output(cases): global sol sol="" if len(cases)==1: sol="("*int(cases)+cases+")"*int(cases) else: for i in range(len(cases)-1): if i==0: #def basecase sol+="("*int(cases[i]) if int(cases[i])>int(cases[i+1]): ...
['4\n0000\n101\n111000\n1\n', '100\n111001010110010101001110111100101000000101010101111100000110110110100011000011111111101011010011110\n010100001100100110001100110000110000001011101001010010010101011111111111001010100111010\n10101011110111010110110011110\n0100001110101\n101000101011010101111101011100101111100100001010...
['Case #1: 0000\nCase #2: (1)0(1)\nCase #3: (111)000\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(11)00(1)0(1)0(1)00(111)0(1111)00(1)0(1)000000(1)0(1)0(1)0(1)0(11111)00000(11)0(11)0(11)0(1)000(11)0000(111111111)0(1)0(11)0(1)00(1111)0\nCase #2: 0(1)0(1)0000(11)00(1)00(11)000(11)00(11)0000(11)000000(1)0(111)0(1)00(1)0(1)00(...
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
n = int(input()) for case_num in range(1, n+1): data = map(int, input()) depth = 0 output = [] for i in data: while i < depth: output.append(")") depth -= 1 while i > depth: output.append("(") depth += 1 output.append(str(i)) wh...
['4\n0000\n101\n111000\n1\n', '100\n111001010110010101001110111100101000000101010101111100000110110110100011000011111111101011010011110\n010100001100100110001100110000110000001011101001010010010101011111111111001010100111010\n10101011110111010110110011110\n0100001110101\n101000101011010101111101011100101111100100001010...
['Case #1: 0000\nCase #2: (1)0(1)\nCase #3: (111)000\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(11)00(1)0(1)0(1)00(111)0(1111)00(1)0(1)000000(1)0(1)0(1)0(1)0(11111)00000(11)0(11)0(11)0(1)000(11)0000(111111111)0(1)0(11)0(1)00(1111)0\nCase #2: 0(1)0(1)0000(11)00(1)00(11)000(11)00(11)0000(11)000000(1)0(111)0(1)00(1)0(1)00(...
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
printn = lambda x: print(x,end='') inn = lambda : int(input()) inl = lambda: list(map(int, input().split())) inm = lambda: map(int, input().split()) ins = lambda : input().strip() DBG = True # and False BIG = 10**18 R = 10**9 + 7 def ddprint(x): if DBG: print(x) def dfs(s,k): #ddprint(f"dfs s {s} k...
['4\n0000\n101\n111000\n1\n', '100\n111001010110010101001110111100101000000101010101111100000110110110100011000011111111101011010011110\n010100001100100110001100110000110000001011101001010010010101011111111111001010100111010\n10101011110111010110110011110\n0100001110101\n101000101011010101111101011100101111100100001010...
['Case #1: 0000\nCase #2: (1)0(1)\nCase #3: (111)000\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(11)00(1)0(1)0(1)00(111)0(1111)00(1)0(1)000000(1)0(1)0(1)0(1)0(11111)00000(11)0(11)0(11)0(1)000(11)0000(111111111)0(1)0(11)0(1)00(1111)0\nCase #2: 0(1)0(1)0000(11)00(1)00(11)000(11)00(11)0000(11)000000(1)0(111)0(1)00(1)0(1)00(...
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"caseCount = input()\nfor i in range(int(caseCount)):\n parenCount = 0\n out = ''\n line = (...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"def solve(t,result,prev):\n if prev != '' and t != '':\n if int(prev) > int(t[0]):\n (...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"T = int(input())\nfor t in range(1, T+1):\n numbers = [int(s) for s in input()]\n ret = \"\"\(...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"def insertX (source_str, insert_str, pos, x):\n answer = source_str\n for i in range(0, x):\n(...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"t = int(input())\n\ndef solve():\n solution = \"\"\n string = [int(d) for d in input()]\n (...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
google_code_jam
"def dfs(s,v):\n r = \"\"\n i = 0\n n = len(s)\n for j in range(n):\n if int(s[j](...TRUNCATED)
"['4\\n0000\\n101\\n111000\\n1\\n', '100\\n111001010110010101001110111100101000000101010101111100000(...TRUNCATED)
"['Case #1: 0000\\nCase #2: (1)0(1)\\nCase #3: (111)000\\nCase #4: (1)', 'Case #1: (111)00(1)0(1)0(1(...TRUNCATED)
{"contest": "2020qr", "problem_folder": "B"}
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
61