data_source
stringclasses
1 value
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"6\\n`abbca\", \"6\\nb`^dca\", \"6\\nacbba`\", \"6\\n`abbda\", \"6\\nadbba`\", \"6\\nadbbb`\", \"6\\nadbcb`\", \"6\\n`bbbda\"], \"outputs\": [\"2\\n\", \"0\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"1\\n\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2900" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n2 3\\n1 4\\n\", \"2\\n2 0\\n1 6\\n\", \"2\\n2 1\\n1 6\\n\", \"2\\n2 1\\n0 6\\n\", \"2\\n5 6\\n1 10\\n\", \"2\\n5 9\\n1 10\\n\", \"2\\n3 9\\n1 10\\n\", \"2\\n3 9\\n1 12\\n\"], \"outputs\": [\"1\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\", \"1\\n\", \"1\\n\", \"1\\n...
{ "index": "code_r1_train_2901" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 2 1 2 1 2\\n\", \"0 3 5 6 1 2\\n\", \"7 2 27 4 9 1\\n\", \"7 2 27 5 9 1\\n\", \"46 7 18 6 3 1\\n\", \"0 7 30 50 3 4\\n\", \"6 2 11 1 11 1\\n\", \"2 5 29 36 5 6\\n\"], \"outputs\": [\"YES\\n\", \"YES\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"YES\\n\", \"NO\\n\", ...
{ "index": "code_r1_train_2902" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2 4 7 -6 4\\n9\\n9 7 -4 -2 2 -3 9 -4 -5\\n9\\n-4 1 9 4 8 9 5 1 -9\\n\", \"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2 4 7 -6 4\\n9\\n9 7 -4 -2 1 -3 9 -4 -5\\n9\\n-4 1 9 3 8 9 5 1 -9\\n\", \"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2...
{ "index": "code_r1_train_2903" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\nwsw\\nsws\\nwsw\\n\", \"3\\nxpx\\npxp\\nxpe\\n\", \"3\\naaa\\naaa\\naaa\\n\", \"3\\naca\\noec\\nzba\\n\", \"3\\nxxx\\naxa\\nxax\\n\", \"3\\nxax\\naxx\\nxax\\n\", \"3\\nxax\\naxa\\nxxx\\n\", \"3\\nxax\\nxxa\\nxax\\n\"], \"outputs\": [\"YES\\n\", \"NO\\n\", \"N...
{ "index": "code_r1_train_2904" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n1\\n1\\n\", \"1\\n1\\n1\\n1\\n\", \"1\\n1\\n0\\n1\\n\", \"1\\n3\\n1 2 1\\n2 1 2\\n\", \"1\\n3\\n8 9 8\\n9 8 9\\n\", \"1\\n3\\n4 5 4\\n5 4 5\\n\", \"1\\n3\\n3 7 3\\n7 3 7\\n\", \"1\\n3\\n1 2 1\\n1 1 2\\n\"], \"outputs\": [\"Yes\\n\", \"Yes\\n\", \"No\\n\",...
{ "index": "code_r1_train_2905" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3 2\\n1 2 3\\n1 3 2\\n\", \"3 2\\n3 1 2\\n3 2 1\\n\", \"3 2\\n3 1 2\\n3 2 1\\n\", \"3 3\\n3 1 2\\n3 2 1\\n\", \"3 4\\n1 2 3\\n1 3 2\\n\", \"3 6\\n3 1 2\\n3 2 1\\n\", \"3 6\\n3 1 2\\n3 1 2\\n\", \"3 7\\n3 1 2\\n3 2 1\\n\"], \"outputs\": [\"YES\\nabb\\n\", \"YES\\n...
{ "index": "code_r1_train_2906" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"a\\n\", \"z\\n\", \"a\\n\", \"z\\n\", \"ab\\n\", \"ob\\n\", \"zx\\n\", \"xx\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\", \"1\", \"2\\n\", \"2\\n\", \"2\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2907" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"a\\n\", \"z\\n\", \"a\\n\", \"z\\n\", \"ee\\n\", \"iq\\n\", \"iq\\n\", \"ee\\n\"], \"outputs\": [\"aa\\n\", \"zz\\n\", \"aa\\n\", \"zz\\n\", \"eee\\n\", \"qiq\\n\", \"qiq\\n\", \"eee\"]}" }
{ "index": "code_r1_train_2908" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"0 0\\n5 0\\n1 0 2 0\\n3 0 4 0\\n\", \"0 0\\n2 0\\n0 2 2 2\\n1 1 1 0\\n\", \"0 0\\n3 0\\n0 2 2 2\\n1 0 2 0\\n\", \"0 0\\n3 0\\n1 0 2 0\\n0 2 2 2\\n\", \"0 1\\n5 0\\n1 0 2 0\\n3 0 4 0\\n\", \"0 0\\n3 0\\n0 2 2 2\\n1 1 1 0\\n\", \"0 0\\n4 0\\n0 2 2 2\\n1 0 2 0\\n\",...
{ "index": "code_r1_train_2909" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1\\n\", \"1 1\\n0\\n\", \"1 2\\n3\\n\", \"1 2\\n3\\n\", \"1 1\\n1\\n\", \"1 1\\n0\\n\", \"1 2\\n4\\n\", \"1 2\\n0\\n\"], \"outputs\": [\"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2910" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2005 6 3\\n53 5 1\\n581 9 2\", \"2447 6 3\\n53 5 1\\n581 9 2\", \"2297 5 3\\n411 5 1\\n581 9 2\", \"2005 9 3\\n1868 9 3\\n359 9 7\", \"2965 9 3\\n1868 9 3\\n359 9 7\", \"4983 9 3\\n1868 9 3\\n359 9 7\", \"2005 4 3\\n1868 9 3\\n359 9 7\", \"3378 9 3\\n373 10 3\\n3...
{ "index": "code_r1_train_2911" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 3\\n1\\n1 2\\n1\\n\", \"1 3\\n1\\n1 2\\n1\\n\", \"1 2\\n1\\n1 40\\n1\\n\", \"1 9\\n2\\n1 10\\n2\\n\", \"1 2\\n1\\n1 40\\n1\\n\", \"1 9\\n2\\n1 10\\n2\\n\", \"1 8\\n2\\n1 10\\n2\\n\", \"2 2\\n1 0\\n1 3\\n1\\n\"], \"outputs\": [\"=\\n\", \"=\", \"=\\n\", \"=\\n\"...
{ "index": "code_r1_train_2912" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n5\\n\", \"1\\n5\\n\", \"1\\n1\\n\", \"1\\n3\\n\", \"1\\n2\\n\", \"1\\n4\\n\", \"1\\n6\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2913" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"123\\n0\\n0\\n\", \"123\\n0\\n0\\n\", \"123\\n0\\n1\\n\", \"135\\n2\\n4\\n\", \"135\\n4\\n4\\n\", \"135\\n6\\n4\\n\", \"135\\n6\\n2\\n\", \"135\\n6\\n5\\n\"], \"outputs\": [\"0\\n\", \"0\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2914" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n200000 1 1 1\\n\", \"1\\n200000 9 9 9\\n\", \"1\\n200000 8 8 8\\n\", \"1\\n200000 7 7 7\\n\", \"1\\n200000 10 10 10\\n\", \"1\\n1000 100 200 300\\n\", \"1\\n2000 100 200 300\\n\", \"1\\n3000 100 200 300\\n\"], \"outputs\": [\"100000\\n\", \"900000\\n\", \"800...
{ "index": "code_r1_train_2915" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n15\\n1 2 3 4 5 1 2 3 4 5 1 2 3 4 5\\n\", \"1\\n15\\n1 2 3 4 5 1 2 3 4 5 1 2 3 4 5\\n\", \"1\\n15\\n1 2 3 4 5 1 2 3 4 5 2 2 3 4 5\\n\", \"1\\n15\\n1 2 3 4 5 1 2 3 4 5 2 1 3 4 5\\n\", \"1\\n15\\n2 2 3 4 5 1 2 3 4 5 2 2 3 4 5\\n\", \"1\\n15\\n1 2 3 7 5 1 2 3 4 5...
{ "index": "code_r1_train_2916" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n5 4 3 2 1 2 3 4 5\\n\", \"0\\n1 1 1 1 1 1 1 1 1\\n\", \"5\\n5 4 3 2 1 4 3 4 5\\n\", \"0\\n1 1 1 1 1 1 1 1 1\\n\", \"5\\n5 4 3 2 1 2 3 4 5\\n\", \"50\\n5 3 10 2 2 4 3 6 5\\n\", \"50\\n5 3 10 2 2 4 3 6 5\\n\", \"50\\n5 3 10 2 2 5 3 6 5\\n\"], \"outputs\": [\"55...
{ "index": "code_r1_train_2917" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 5 5 5 6\\nE\\n\", \"1 5 5 5 6\\nE\\n\", \"1 5 3 5 6\\nE\\n\", \"1 5 8 5 6\\nE\\n\", \"1 0 0 0 -1\\nS\\n\", \"1 0 0 0 -1\\nS\\n\", \"1 5 3 5 12\\nE\\n\", \"1 -2 0 0 0\\nS\\n\"], \"outputs\": [\"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"1\\n\", \"1\\n\", \"-1\\...
{ "index": "code_r1_train_2918" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1\\n\", \"1 0\\n1\\n\", \"1 1\\n0\\n\", \"1 0\\n0\\n\", \"1 0\\n7\\n\", \"1 1\\n9\\n\", \"1 1\\n5\\n\", \"1 1\\n2\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"0\\n\", \"0\\n\", \"7\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2919" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n3 89\\n\", \"1 97\\n1 91\\n\", \"1 108\\n1 91\\n\", \"2 2\\n1 2\\n1 3\\n\", \"1 100\\n1 100\\n\", \"1 100\\n1 110\\n\", \"2 9\\n1 5\\n2 4\\n\", \"1 100\\n0 110\\n\"], \"outputs\": [\"29\", \"91\", \"91\\n\", \"1\", \"100\", \"110\\n\", \"2\\n\", \"0\\n\"]}"...
{ "index": "code_r1_train_2920" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n14 1\\n+--++---++-++-\\n1 8\\n14 3\\n+--++---+++---\\n1 14\\n3 9\\n3 5\\n4 2\\n+-+-\\n1 1\\n1 4\\n2 1\\n1 4\\n1 2\\n0 3\\n2 4\\n3 3\\n1 4\\n5 3\\n\", \"3\\n14 1\\n+--++---++-++-\\n1 8\\n14 3\\n+--++---+++---\\n1 14\\n2 12\\n3 5\\n4 1\\n+-+-\\n1 1\\n1 4\\n1 3\...
{ "index": "code_r1_train_2921" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4\\nL\\nLUUDR\\nLLUU\\nDDDUUUUU\\n\", \"4\\nL\\nUURDL\\nLLUU\\nDDDUUUUU\\n\", \"4\\nL\\nUURDL\\nLLUU\\nUUUUUDDD\\n\", \"4\\nL\\nLUUDR\\nLLUU\\nUUUUUDDD\\n\", \"4\\nL\\nRUUDL\\nLLUU\\nUUUUUDDD\\n\", \"4\\nL\\nUULDR\\nLLUU\\nUDUUUDDU\\n\", \"4\\nL\\nRDUUL\\nUULL\\n...
{ "index": "code_r1_train_2922" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n5 3\\n1 2 4 5 6\\n5 3\\n1 2 4 5 7\", \"2\\n5 3\\n1 2 4 4 6\\n5 3\\n1 2 4 5 7\", \"2\\n1 3\\n0 2 6 4 6\\n5 3\\n1 2 0 1 2\", \"2\\n5 3\\n1 2 5 4 6\\n5 3\\n1 2 4 5 8\", \"2\\n5 3\\n1 2 4 4 6\\n5 3\\n1 2 0 5 7\", \"2\\n5 3\\n1 2 4 4 6\\n5 3\\n0 2 0 5 7\", \"2\\n1...
{ "index": "code_r1_train_2923" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4\\nhello\\nhello\\nhello\\nhelloo\\nhello\\nhlllloo\\nhello\\nhelo\\n\", \"4\\nhello\\nhello\\nhello\\nhelloo\\nhemlo\\nhlllloo\\nhello\\nhelo\\n\", \"4\\nhello\\nhello\\nolleh\\nhelloo\\nhemlo\\nhlllloo\\nhello\\nhelo\\n\", \"4\\nhello\\nhdllo\\nolkeh\\nhelmoo\...
{ "index": "code_r1_train_2924" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n6\\n1 1 1 2 2 3\\n\", \"1\\n6\\n1 1 1 2 2 3\\n\", \"1\\n6\\n1 1 1 2 3 3\\n\", \"1\\n3\\n21 78868 80000\\n\", \"1\\n3\\n21 78868 80000\\n\", \"1\\n3\\n39 78868 80000\\n\", \"1\\n3\\n41 78868 80000\\n\", \"1\\n3\\n11 78868 80000\\n\"], \"outputs\": [\"1 2 6\\n\...
{ "index": "code_r1_train_2925" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 0 2\\n\", \"2 2 2\\n\", \"3 2 2\\n\", \"2 1 2\\n\", \"3 3 2\\n\", \"2 2 3\\n\", \"3 3 3\\n\", \"6 3 2\\n\"], \"outputs\": [\" 0\", \" 4\"...
{ "index": "code_r1_train_2926" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n1\\n\", \"1\\n2\\n\", \"1\\n4\\n\", \"1\\n3\\n\", \"1\\n8\\n\", \"1\\n6\\n\", \"1\\n9\\n\"], \"outputs\": [\"0\\n\", \"0\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2927" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"6\\n5\\n1 2\\n1 3\\n3 4\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n4 5\\n5 6\\n2 6\\n0\\n0\", \"6\\n5\\n1 2\\n1 3\\n3 4\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n1 5\\n5 6\\n2 6\\n0\\n0\", \"6\\n5\\n1 2\\n1 3\\n3 5\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n1 5\\n6 6\\n2 6\\n0\\n0\", \"6\...
{ "index": "code_r1_train_2928" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n\", \"8\\n\", \"1\\n\", \"30\\n\", \"27\\n\", \"87\\n\", \"22\\n\", \"76\\n\"], \"outputs\": [\"4\\n\", \"64\\n\", \"1\\n\", \"900\\n\", \"729\\n\", \"7569\\n\", \"484\\n\", \"5776\\n\"]}" }
{ "index": "code_r1_train_2929" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5 5\\n%#... ...#%\\n.#.#. .#.#.\\n.#.#. .#.#.\\n.#.#. .#.#.\\n...#L R#...\\n3 2\\n.L. .R#\\n%.. .&.\\n4 1\\nL.%. %..R\\n0 0\", \"5 5\\n%#... .%.#.\\n.#.#. .#.#.\\n.#.#. .#.#.\\n.#.#. .#.#.\\n...#L R#...\\n3 2\\n.L. .R#\\n%.. .&.\\n4 1\\nL.%. %..R\\n0 0\", \"5 5\\...
{ "index": "code_r1_train_2930" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n1\\n1\\n5\\n2 3 5 7 8\\n2\\n2 4\\n\", \"3\\n1\\n1\\n5\\n2 4 5 7 8\\n2\\n1 2\\n\", \"3\\n1\\n1\\n5\\n2 4 5 6 8\\n2\\n1 2\\n\", \"3\\n1\\n2\\n5\\n3 4 5 7 9\\n2\\n2 4\\n\", \"3\\n1\\n1\\n5\\n2 4 5 7 9\\n2\\n1 4\\n\", \"3\\n1\\n1\\n5\\n1 4 5 7 8\\n2\\n1 2\\n\", \...
{ "index": "code_r1_train_2931" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n4 1 2\\n\", \"3\\n2 2 3\\n\", \"3\\n2 3 4\\n\", \"3\\n5 6 7\\n\", \"3\\n2 4 5\\n\", \"3\\n1 1 1\\n\", \"3\\n1 1 1\\n\", \"3\\n5 6 7\\n\"], \"outputs\": [\"NO\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\"]}" }
{ "index": "code_r1_train_2932" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n2\\n6\\n011\", \"3\\n0\\n6\\n010\", \"3\\n0\\n3\\n010\", \"3\\n1\\n3\\n010\", \"3\\n1\\n1\\n010\", \"3\\n2\\n1\\n010\", \"3\\n2\\n1\\n011\", \"3\\n2\\n1\\n111\"], \"outputs\": [\"3\\n9\\n39\\n\", \"0\\n9\\n31\\n\", \"0\\n6\\n31\\n\", \"1\\n6\\n31\\n\", \"1\\n...
{ "index": "code_r1_train_2933" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 4 1 1\", \"3 4 1 1\", \"9 8 1 6\", \"2 3 1 1\", \"10 7 6 4\", \"10 8 6 4\", \"17 8 6 4\", \"17 8 6 6\"], \"outputs\": [\"3\\n\", \"9\\n\", \"5148\\n\", \"2\", \"1155\\n\", \"3760\\n\", \"186615\\n\", \"67496\\n\"]}" }
{ "index": "code_r1_train_2934" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"8 5\\n\", \"1 1\\n\", \"1 2\\n\", \"1 3\\n\", \"1 4\\n\", \"1 5\\n\", \"1 6\\n\", \"1 7\\n\"], \"outputs\": [\"2\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2935" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n0\\n\", \"1\\n2\\n\", \"1\\n4\\n\", \"1\\n8\\n\", \"1\\n14\\n\", \"2\\n1 0\\n\", \"2\\n0 1\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"0\", \"0\", \"0\", \"0\", \"2\\n\", \"2\\n\"]}" }
{ "index": "code_r1_train_2936" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 1 1\\n1 2 1\\n2 1000000000\\n\", \"2 1 1\\n1 2 1\\n2 1100000000\\n\", \"2 1 1\\n1 2 1\\n2 1100000100\\n\", \"3 2 2\\n1 2 4\\n2 3 4\\n2 2\\n3 6\\n\", \"3 2 2\\n1 3 4\\n2 3 4\\n2 2\\n3 2\\n\", \"3 2 2\\n1 3 4\\n2 3 4\\n2 2\\n3 6\\n\", \"3 2 2\\n1 2 100\\n2 3 1\\n...
{ "index": "code_r1_train_2937" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"(\\n\", \")\\n\", \"(\\n\", \")\\n\", \"((\\n\", \"))\\n\", \"()\\n\", \")(\\n\"], \"outputs\": [\"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"1\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2938" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n4\\n\", \"1 1\\n4\\n\", \"2 2\\n1 2\\n\", \"2 1\\n5 1\\n\", \"2 2\\n1 4\\n\", \"2 3\\n6 7\\n\", \"2 3\\n6 7\\n\", \"2 1\\n5 1\\n\"], \"outputs\": [\"4\\n\", \"4\", \"1\\n\", \"5\\n\", \"1\\n\", \"7\\n\", \"7\", \"5\"]}" }
{ "index": "code_r1_train_2939" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n0\\n\", \"1 1\\n1\\n\", \"3 1\\n1\\n1\\n0\\n\", \"3 1\\n0\\n0\\n0\\n\", \"3 1\\n1\\n2\\n0\\n\", \"2 3\\n111\\n010\\n\", \"2 3\\n110\\n010\\n\", \"2 3\\n111\\n000\\n\"], \"outputs\": [\"-1\", \"0\", \"-1\", \"-1\", \"-1\\n\", \"0\\n\", \"0\\n\", \"-1\"]}" }
{ "index": "code_r1_train_2940" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\na\\n1 1 a b\\n\", \"1 1\\na\\n1 1 a b\\n\", \"3 1\\nioi\\n1 1 i n\\n\", \"3 1\\nioi\\n1 1 i n\\n\", \"2 2\\naa\\n1 2 a b\\n1 2 b c\\n\", \"2 2\\naa\\n2 2 a b\\n1 1 a b\\n\", \"2 2\\naa\\n1 2 a b\\n1 2 b c\\n\", \"2 2\\naa\\n2 2 a b\\n1 1 a b\\n\"], \"output...
{ "index": "code_r1_train_2941" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"11\\n\", \"??\\n\", \"00\\n\", \"10?\\n\", \"01?\\n\", \"1?1\\n\", \"0101\\n\", \"000?\\n\"], \"outputs\": [\"11\\n\", \"00\\n01\\n10\\n11\\n\", \"00\\n\", \"00\\n01\\n\", \"00\\n01\\n\", \"01\\n11\\n\", \"01\\n\", \"00\\n\"]}" }
{ "index": "code_r1_train_2942" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4\\n7\\nab bb ba aa ba\\n7\\nab ba aa ab ba\\n3\\naa\\n5\\nbb ab bb\\n\", \"4\\n7\\nab bb ba aa ba\\n7\\nab ba aa ab ba\\n3\\naa\\n5\\nbb ab bb\\n\", \"4\\n7\\nab bb ba aa ba\\n7\\nab ba aa ab ab\\n3\\naa\\n5\\nbb ab bb\\n\", \"4\\n7\\nab bb ba aa ba\\n7\\nab ba ...
{ "index": "code_r1_train_2943" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n3\\n1 1 1\\n\", \"1\\n3\\n3 3 3\\n\", \"1\\n3\\n2 2 2\\n\", \"1\\n3\\n2 2 1\\n\", \"1\\n3\\n2 3 1\\n\", \"1\\n3\\n2 1 1\\n\", \"1\\n3\\n1 2 2\\n\", \"1\\n3\\n1 2 3\\n\"], \"outputs\": [\"YES\\n\", \"YES\\n\", \"YES\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\...
{ "index": "code_r1_train_2944" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1902 3 5\\n\", \"1\\n2001 1 2\\n\", \"1\\n2001 1 3\\n\", \"1\\n5086 1 2\\n\", \"1\\n2002 1 2\\n\", \"1\\n2003 3 2\\n\", \"1\\n2002 2 3\\n\", \"1\\n5086 5607 4560\\n\"], \"outputs\": [\"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"1\\n...
{ "index": "code_r1_train_2945" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"7\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n\", \"7\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n\", \"7\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 2\\n1\\n1 1\\n\", \"7\\n1\\n1 2\\n1\\n1 2\\...
{ "index": "code_r1_train_2946" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n1 1 1 1 1\\n1\\n+ 1\\n\", \"5\\n1 1 1 2 1\\n1\\n+ 1\\n\", \"5\\n1 1 1 4 1\\n1\\n+ 1\\n\", \"5\\n1 1 1 8 1\\n1\\n+ 1\\n\", \"10\\n1 1 1 1 1 1 1 1 1 1\\n1\\n+ 1\\n\", \"10\\n1 1 1 1 1 1 1 1 1 1\\n1\\n+ 1\\n\", \"10\\n1 1 1 1 0 1 1 1 1 1\\n1\\n+ 1\\n\", \"10\\n1...
{ "index": "code_r1_train_2947" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5 0\\n\", \"1 0\\n\", \"200000 0\\n\", \"3 3\\n1 2\\n2 3\\n1 3\\n\", \"200000 1\\n156580 138381\\n\", \"5 6\\n3 2\\n2 1\\n1 4\\n4 5\\n3 1\\n1 5\\n\", \"8 7\\n1 2\\n1 3\\n3 4\\n8 4\\n3 7\\n4 5\\n4 6\\n\", \"6 7\\n1 2\\n1 3\\n3 2\\n2 4\\n2 5\\n5 4\\n6 1\\n\"], \"ou...
{ "index": "code_r1_train_2948" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n0\\n\", \"1 1\\n0\\n\", \"2 1\\n0 0\\n\", \"2 1\\n0 0\\n\", \"1 3\\n5\\n3\\n2\\n\", \"3 1\\n1 2 3\\n\", \"3 1\\n0 0 0\\n\", \"3 1\\n1 2 3\\n\"], \"outputs\": [\"1\", \"1\\n\", \"1\", \"1\\n\", \"1\", \"3\", \"1\", \"3\\n\"]}" }
{ "index": "code_r1_train_2949" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n0\\n\", \"2\\n0\\n17\\n\", \"2\\n2\\nGIN\\n\", \"2\\n4\\nGHN\\n\", \"2\\n4\\nGIN\\n\", \"2\\n2\\nGHN\\n\", \"2\\n2\\nHIN\\n\", \"2\\n2\\nHNI\\n\"], \"outputs\": [\"1\\n\", \"2\\n\", \"2\\n\", \"1\\n\", \"2\\n\", \"1\\n\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2950" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n100\\nO\\n\", \"1 1\\n780\\nO\\n\", \"1 1\\n100\\nO\\n\", \"1 1\\n780\\nO\\n\", \"1 1\\n486\\nO\\n\", \"1 1\\n107\\nO\\n\", \"1 1\\n1059\\nO\\n\", \"1 1\\n6750\\nW\\n\"], \"outputs\": [\"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\...
{ "index": "code_r1_train_2951" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"180\\n3\\n60 120 180\\n3\\n30 16\\n61 1\\n7 282\", \"180\\n3\\n85 120 180\\n3\\n2 9\\n74 1\\n238 180\", \"180\\n3\\n60 74 180\\n3\\n30 16\\n61 1\\n180 180\", \"180\\n3\\n60 74 173\\n3\\n30 16\\n61 1\\n180 316\", \"180\\n3\\n60 140 180\\n3\\n30 16\\n61 1\\n74 316\...
{ "index": "code_r1_train_2952" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\nba\\n\", \"2\\naa\\n\", \"2\\nba\\n\", \"2\\naa\\n\", \"2\\nab\\n\", \"2\\nb`\\n\", \"2\\nb_\\n\", \"2\\nac\\n\"], \"outputs\": [\"YES\\n1 2\\n\", \"NO\\n\", \"YES\\n1 2\\n\", \"NO\\n\", \"NO\\n\", \"YES\\n1 2\\n\", \"YES\\n1 2\\n\", \"NO\\n\"]}" }
{ "index": "code_r1_train_2953" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\nact dog\\nfish fish\\nlion tiger\", \"3\\nact god\\nfish fith\\nlion tiger\", \"3\\nuea goe\\ndirh giuh\\nnojk tiger\", \"3\\nvea hpg\\njrie giug\\nnpjk rhget\", \"3\\nv`f ggn\\njrhd jgug\\njnok ehrug\", \"3\\nact god\\nfish fish\\nlion tiger\", \"3\\nact god...
{ "index": "code_r1_train_2954" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n4\\n1 2 3 4\\n7\\n4 3 3 8 4 5 2\\n3\\n1 1 1\\n7\\n1 3 1 4 5 3 2\\n5\\n5 4 3 2 3\\n\", \"5\\n4\\n1 2 3 4\\n7\\n4 3 3 8 4 5 2\\n3\\n1 1 1\\n7\\n1 3 1 7 5 3 2\\n5\\n5 4 3 2 3\\n\", \"5\\n4\\n1 2 3 4\\n7\\n4 3 3 8 4 5 2\\n3\\n1 1 1\\n7\\n1 3 1 0 5 3 2\\n5\\n5 4 3...
{ "index": "code_r1_train_2955" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4\\n\", \"5\\n\", \"3\\n\", \"2\\n\", \"8\\n\", \"6\\n\", \"1\\n\", \"24\\n\"], \"outputs\": [\"Rajesh\", \"Howard\", \"Penny\", \"Leonard\", \"Leonard\\n\", \"Sheldon\", \"Sheldon\", \"Penny\"]}" }
{ "index": "code_r1_train_2956" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3 0\\n1 2\", \"6 0\\n1 2\", \"2 0\\n1 2\", \"2 0\\n1 2\\n\", \"3 3\\n1 2\\n2 3\\n2 1\\n1 2\", \"3 1\\n1 1\\n3 3\\n3 1\\n1 2\", \"3 3\\n1 1\\n2 3\\n3 1\\n1 2\", \"3 3\\n1 2\\n2 1\\n2 1\\n1 2\"], \"outputs\": [\"-1\\n\", \"-1\\n\", \"-1\", \"-1\\n\", \"1\\n\", \"0\...
{ "index": "code_r1_train_2957" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\nE\\n\", \"1 1\\nD\\n\", \"1 1\\nF\\n\", \"2 2\\nAA\\nBB\\n\", \"2 2\\nNS\\nPD\\n\", \"2 2\\nNS\\nDP\\n\", \"2 2\\nSN\\nDP\\n\", \"2 2\\nSN\\nCP\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\\n\", \"4\\n\", \"4\\n\", \"4\\n\", \"4\\n\", \"4\\n\"]}" }
{ "index": "code_r1_train_2958" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 2 5\\n10\\n11\\n1 1 8 8\\n2 4 5 6\\n1 2 7 8\\n3 3 6 8\\n4 6 7 8\\n\", \"2 2 5\\n10\\n11\\n1 1 8 3\\n2 4 5 6\\n1 2 7 8\\n3 3 6 8\\n4 6 7 8\\n\", \"2 2 5\\n10\\n11\\n1 1 8 3\\n2 4 5 6\\n1 2 7 8\\n1 3 6 8\\n4 6 7 8\\n\", \"2 2 5\\n10\\n11\\n1 2 8 8\\n2 4 5 6\\n1 2...
{ "index": "code_r1_train_2959" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n1 1 3 5 6\\n3\\n7 8 9\\n0\", \"5\\n1 1 6 5 6\\n3\\n7 8 9\\n0\", \"5\\n1 1 6 4 6\\n3\\n7 8 9\\n0\", \"5\\n1 1 6 4 9\\n3\\n7 8 9\\n0\", \"5\\n1 1 2 4 9\\n3\\n7 8 9\\n0\", \"5\\n1 2 2 4 9\\n3\\n7 8 9\\n0\", \"5\\n1 2 3 5 6\\n3\\n3 8 9\\n0\", \"5\\n1 1 3 5 6\\n3\...
{ "index": "code_r1_train_2960" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n2\\n\", \"1\\n2\\n\", \"1\\n4\\n\", \"1\\n5\\n\", \"1\\n1\\n\", \"1\\n7\\n\", \"1\\n3\\n\", \"1\\n6\\n\"], \"outputs\": [\"98\\n\", \"98\\n\", \"9998\\n\", \"99988\\n\", \"8\\n\", \"9999988\\n\", \"998\\n\", \"999988\\n\"]}" }
{ "index": "code_r1_train_2961" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n1 2 3 4\\n\", \"2\\n1 2 3 2\\n\", \"2\\n1 2 3 1\\n\", \"2\\n1 2 5 1\\n\", \"2\\n1 2 5 2\\n\", \"2\\n2 2 5 2\\n\", \"2\\n1 2 3 4\\n\", \"2\\n55 5 3 51\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"1\\n\", \"2\\n\"]}" }
{ "index": "code_r1_train_2962" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3 2 2 2\\n* * +\\n\", \"1 2 3 4\\n* + *\\n\", \"2 2 2 2\\n* * +\\n\", \"1 1 1 1\\n+ + *\\n\", \"1 2 3 4\\n* + +\\n\", \"15 1 3 1\\n* * +\\n\", \"8 1 7 14\\n+ + +\\n\", \"7 0 8 15\\n+ + *\\n\"], \"outputs\": [\"10\\n\", \"10\\n\", \"8\\n\", \"3\\n\", \"9\\n\", \"1...
{ "index": "code_r1_train_2963" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 1\\n10 1\\n1 2\\n\", \"2 1\\n10 2\\n1 2\\n\", \"2 1\\n10 10\\n1 2\\n\", \"2 1\\n10 10\\n1 2\\n\", \"2 1\\n10 19\\n1 2\\n\", \"3 2\\n8 3 8\\n1 2\\n2 3\\n\", \"3 2\\n8 6 8\\n1 2\\n2 3\\n\", \"3 2\\n2 6 8\\n1 2\\n2 3\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"2\\n...
{ "index": "code_r1_train_2964" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"6\\n1\\n14\\n2\\n1 -1\\n4\\n5 5 5 1\\n3\\n3 2 1\\n2\\n0 1\\n5\\n-239 -2 -100 -3 -11\\n\", \"6\\n1\\n14\\n2\\n1 -1\\n4\\n5 5 3 1\\n3\\n3 2 1\\n2\\n0 1\\n5\\n-239 -2 -100 -3 -11\\n\", \"6\\n1\\n14\\n2\\n1 -1\\n4\\n5 5 3 1\\n3\\n3 2 1\\n2\\n0 1\\n5\\n-313 -2 -100 -3...
{ "index": "code_r1_train_2965" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n10\", \"4\\n3 1 3 2\\n6 6 0 7\", \"4\\n3 1 4 2\\n15 6 2 64\", \"4\\n3 1 4 2\\n18 5 0 24\", \"4\\n3 1 3 2\\n20 6 0 37\", \"4\\n3 1 4 2\\n18 5 0 35\", \"4\\n3 1 3 2\\n6 12 0 37\", \"4\\n3 1 3 2\\n5 22 2 37\"], \"outputs\": [\"10\", \"13\\n\", \"70\\n\", \"2...
{ "index": "code_r1_train_2966" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n1\", \"3\\n2\", \"3\\n4\", \"3\\n8\", \"3\\n3\", \"3\\n6\", \"3\\n0\", \"3\\n0\\n\"], \"outputs\": [\"5\\n\", \"5\\n\", \"5\\n\", \"5\\n\", \"5\\n\", \"5\\n\", \"5\", \"5\\n\"]}" }
{ "index": "code_r1_train_2967" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1\\n\", \"1 1\\n1\\n\", \"1 1\\n2\\n\", \"1 1\\n3\\n\", \"1 2\\n3\\n\", \"1 4\\n3\\n\", \"1 2\\n5\\n\", \"1 4\\n5\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2968" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n4 2 5 3 0\", \"5\\n4 2 3 3 0\", \"5\\n6 2 3 3 0\", \"5\\n6 3 0 3 0\", \"5\\n6 3 0 2 0\", \"5\\n8 3 0 2 0\", \"5\\n9 3 0 2 0\", \"5\\n9 3 0 4 0\"], \"outputs\": [\"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"3\\n\"]}" }
{ "index": "code_r1_train_2969" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1 5 6\\n1\\n\", \"1 1 5 6\\n1\\n\", \"1 1 7 6\\n1\\n\", \"1 1 5 2\\n1\\n\", \"1 1 7 0\\n1\\n\", \"2 1 5 2\\n1\\n\", \"1 1 7 -1\\n1\\n\", \"1 1 7 -2\\n2\\n\"], \"outputs\": [\"11\\n\", \"11\", \"12\\n\", \"4\\n\", \"0\\n\", \"8\\n\", \"-2\\n\", \"-4\\n\"]}" }
{ "index": "code_r1_train_2970" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n0 0\\n\", \"1\\n0 0\\n\", \"4\\n0 0\\n0 1\\n0 2\\n1 0\\n\", \"4\\n0 0\\n0 1\\n1 0\\n1 1\\n\", \"4\\n1 1\\n1 2\\n2 3\\n3 3\\n\", \"4\\n0 0\\n0 1\\n1 1\\n1 1\\n\", \"4\\n1 1\\n1 2\\n2 3\\n4 3\\n\", \"4\\n0 0\\n0 1\\n0 3\\n1 0\\n\"], \"outputs\": [\"1\\n\", \"1\...
{ "index": "code_r1_train_2971" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"dre`merer\", \"dre`meqer\", \"reqem`erd\", \"reqem`erc\", \"cre`meqer\", \"bre`meqer\", \"cre`mdqer\", \"cre`mdqeq\"], \"outputs\": [\"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\"]}" }
{ "index": "code_r1_train_2972" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n2\\n\", \"1\\n4\\n\", \"1\\n0\\n\", \"1\\n-3\\n\", \"2\\n0 3\\n\", \"2\\n0 0\\n\", \"1\\n7500\\n\", \"1\\n5507\\n\"], \"outputs\": [\"2\\n\", \"4\\n\", \"0\\n\", \"3\\n\", \"3\\n\", \"0\\n\", \"7500\\n\", \"5507\\n\"]}" }
{ "index": "code_r1_train_2973" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 1 1\\n5 57\\n\", \"1 2 1\\n5 57\\n\", \"1 2 1\\n5 38\\n\", \"1 2 2\\n5 38\\n\", \"1 2 2\\n5 57\\n\", \"1 1 2\\n5 57\\n\", \"1 8 1\\n18 20\\n\", \"1 1 1\\n18 20\\n\"], \"outputs\": [\"53\\n\", \"54\\n\", \"35\\n\", \"68\\n\", \"106\\n\", \"105\\n\", \"10\\n\", \...
{ "index": "code_r1_train_2974" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4 2\", \"4 1\", \"1 1\", \"3 1\", \"5 2\", \"5 1\", \"9 2\", \"9 1\"], \"outputs\": [\"6\", \"4\", \"1\", \"2\", \"16\", \"8\", \"512\", \"128\"]}" }
{ "index": "code_r1_train_2975" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n2\\n3\\n\", \"2\\n2\\n3\\n\", \"1\\n649580447\\n\", \"1\\n649580447\\n\", \"1\\n642996383\\n\", \"1\\n577046292\\n\", \"1\\n564149555\\n\", \"1\\n512056728\\n\"], \"outputs\": [\"1/6\\n7/30\\n\", \"1/6\\n7/30\\n\", \"421954771415489597/843909545429301074\\n\"...
{ "index": "code_r1_train_2976" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n3 3 1\", \"3\\n3 1 3\", \"3\\n3 3 2\", \"3\\n6 1 3\", \"3\\n3 5 2\", \"3\\n0 5 2\", \"3\\n6 1 4\", \"3\\n6 1 6\"], \"outputs\": [\"3 1 3\\n3 3 1\\n\", \"1 3 3\\n3 1 3\\n3 3 1\\n\", \"3 2 3\\n3 3 2\\n\", \"3 6 1\\n6 1 3\\n6 3 1\\n\", \"3 2 5\\n3 5 2\\n5 2 3\\n...
{ "index": "code_r1_train_2977" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5 4 1 1 5 4\\n\", \"1 2 1 1 1 2\\n\", \"5 5 1 1 5 5\\n\", \"5 5 1 1 5 3\\n\", \"3 5 1 1 3 5\\n\", \"5 4 1 4 5 1\\n\", \"5 5 1 1 4 5\\n\", \"4 4 1 4 4 1\\n\"], \"outputs\": [\"Second\\n\", \"First\\n\", \"Second\\n\", \"First\\n\", \"First\\n\", \"Second\\n\", \"S...
{ "index": "code_r1_train_2978" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n1 2\\n\", \"2\\n1 1\\n\", \"2\\n4 5\\n\", \"2\\n4 2\\n\", \"2\\n0 0\\n\", \"2\\n0 2\\n\", \"2\\n1 0\\n\", \"2\\n7 5\\n\"], \"outputs\": [\"0\\n\\n\", \"2\\n1 2\\n\", \"0\\n\\n\", \"0\\n\\n\", \"2\\n1 2\\n\", \"0\\n\\n\", \"0\\n\\n\", \"0\\n\\n\"]}" }
{ "index": "code_r1_train_2979" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\na\\nA\\na\\nA\\nb\\n\", \"3\\na\\nA\\na\\nA\\na\\n\", \"3\\na\\nA\\nb\\nA\\nb\\n\", \"3\\na\\nA\\nb\\nB\\na\\n\", \"3\\na\\nA\\na\\nB\\na\\n\", \"3\\nb\\nA\\nb\\nA\\nb\\n\", \"3\\nab\\nBa\\naB\\nABBA\\nl\\n\", \"3\\nab\\nBa\\naB\\nABBA\\na\\n\"], \"outputs\":...
{ "index": "code_r1_train_2980" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 1\\n1\\n\", \"2 1\\n1\\n\", \"2 2\\n1 1\\n\", \"2 2\\n1 2\\n\", \"2 2\\n1 2\\n\", \"2 2\\n1 2\\n\", \"2 2\\n1 1\\n\", \"2 2\\n2 2\\n\"], \"outputs\": [\"0\\n\", \"0\\n\", \"0\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"0\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2981" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"462 866\\n197 946\\n2001 2010\\n0 0\", \"2520 2076\\n197 946\\n2001 701\\n0 0\", \"2063 681\\n197 607\\n2001 2010\\n0 0\", \"2063 681\\n197 607\\n2001 1397\\n0 0\", \"2520 2076\\n217 946\\n983 2010\\n0 0\", \"2063 681\\n197 297\\n2001 1397\\n0 0\", \"5858 866\\n2...
{ "index": "code_r1_train_2982" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"hiedi\\n\", \"ihied\\n\", \"diehi\\n\", \"deiih\\n\", \"iheid\\n\", \"eihdi\\n\", \"ehdii\\n\", \"edhii\\n\"], \"outputs\": [\"NO\", \"NO\", \"NO\", \"NO\", \"NO\", \"NO\", \"NO\", \"NO\"]}" }
{ "index": "code_r1_train_2983" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"?\\n\", \"5\\n\", \"3\\n\", \"??\\n\", \"74?\", \"54?\", \"64?\", \"?46\"], \"outputs\": [\"1\\n\", \"1\\n\", \"0\\n\", \"8\\n\", \"1\\n\", \"0\\n\", \"1\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2984" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n1\\n2\", \"2\\n1\\n4\", \"2\\n1\\n8\", \"2\\n1\\n0\", \"2\\n0\\n0\", \"2\\n1\\n6\", \"2\\n1\\n1\", \"2\\n2\\n0\"], \"outputs\": [\"1\\n3\", \"1\\n15\\n\", \"1\\n255\\n\", \"1\\n0\\n\", \"0\\n0\\n\", \"1\\n63\\n\", \"1\\n1\\n\", \"3\\n0\\n\"]}" }
{ "index": "code_r1_train_2985" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n1 1 1\\n3 1\\n\", \"3\\n1 1 1\\n2 1\\n\", \"3\\n1 1 1\\n3 1\\n\", \"4\\n2 3 4 9\\n1 3\\n\", \"3\\n4 37 33\\n3 3\\n\", \"4\\n1 1 1 1\\n2 4\\n\", \"4\\n1 1 2 1\\n2 4\\n\", \"3\\n4 37 33\\n3 3\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\\n\", \"5\\n\", \"0\\n\"...
{ "index": "code_r1_train_2986" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3 3\\n1 2 5 L\\n1 2 7 S\\n2 3 6 S\\n3\\n1 2 3\\n7 5\\n1 2 15 L\\n2 3 2 L\\n4 5 7 L\\n1 3 30 S\\n3 4 000 S\\n5\\n1 3 5 4 1\\n0 0\", \"3 3\\n1 2 5 L\\n1 2 7 S\\n2 3 6 S\\n3\\n1 2 3\\n7 5\\n1 2 15 L\\n2 6 2 L\\n4 5 7 L\\n1 3 30 S\\n3 4 000 S\\n5\\n1 3 5 4 1\\n0 0\",...
{ "index": "code_r1_train_2987" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"7 3\\n4 2 2\", \"6 2\\n1 4 1\", \"100 2\\n100\", \"110 2\\n110\", \"7 3\\n2 2 2\", \"7 3\\n2 1 2\", \"7 3\\n0 1 2\", \"7 3\\n0 1 1\"], \"outputs\": [\"0\\n\", \"1\\n\", \"99\\n\", \"109\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "index": "code_r1_train_2988" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n1 2\\n\", \"2\\n2 1\\n\", \"2\\n1 2\\n\", \"2\\n2 1\\n\", \"3\\n1 1 2\\n\", \"3\\n2 1 1\\n\", \"3\\n1 1 2\\n\", \"3\\n2 1 1\\n\"], \"outputs\": [\"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\"]}" }
{ "index": "code_r1_train_2989" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"5\\n0 0\\n0 0\\n5 0\\n0 0\\n0 1\", \"5\\n0 0\\n0 0\\n5 1\\n0 0\\n0 0\", \"5\\n-2 0\\n1 0\\n0 0\\n0 2\\n-1 1\", \"5\\n-2 0\\n1 0\\n0 -2\\n0 2\\n-1 1\", \"5\\n0 0\\n2 0\\n0 -1\\n-2 6\\n-4 2\", \"5\\n0 1\\n2 1\\n0 -1\\n-2 4\\n-4 1\", \"5\\n-2 0\\n1 0\\n0 -1\\n0 2\\n...
{ "index": "code_r1_train_2990" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"10 1 1\\n0 9\\n0 5\\n\", \"10 1 1\\n0 9\\n1 5\\n\", \"11 1 1\\n0 9\\n0 5\\n\", \"19 1 1\\n0 9\\n0 1\\n\", \"10 1 1\\n0 4\\n0 5\\n\", \"19 1 1\\n0 9\\n1 5\\n\", \"10 1 1\\n0 9\\n1 1\\n\", \"10 1 1\\n0 9\\n1 2\\n\"], \"outputs\": [\"45\\n\", \"-1\\n\", \"45\\n\", \...
{ "index": "code_r1_train_2991" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"3\\n\", \"5\\n\", \"6\\n\", \"1\\n\", \"2\\n\", \"4\\n\", \"4\\n\", \"2\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"0\\n\", \"0\\n\", \"1\\n\"]}" }
{ "index": "code_r1_train_2992" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n3\", \"1\\n1\", \"1\\n2\", \"1\\n7\", \"1\\n6\", \"1\\n4\", \"1\\n8\", \"1\\n5\"], \"outputs\": [\"1\", \"2\\n\", \"-1\\n\", \"3\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\"]}" }
{ "index": "code_r1_train_2993" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"y\\n0\\n1 1 x\", \"x\\n0\\n1 1 x\", \"y\\n1\\n2 1 y\", \"x\\n1\\n2 1 x\", \"y\\n1\\n2 1 z\", \"|\\n0\\n1 1 u\", \"x\\n1\\n2 1 y\", \"w\\n0\\n1 1 w\"], \"outputs\": [\"y\\n\", \"x\\n\", \"yy\\n\", \"xx\\n\", \"zy\\n\", \"|\\n\", \"yx\\n\", \"w\\n\"]}" }
{ "index": "code_r1_train_2994" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"4\\n00011101\\n000\\n000001\\n11110\", \"4\\n00011101\\n100\\n000001\\n11110\", \"4\\n00010101\\n100\\n000101\\n11110\", \"4\\n00010101\\n100\\n010101\\n11110\", \"4\\n00010101\\n000\\n011111\\n11110\", \"4\\n00010101\\n000\\n011111\\n11100\", \"4\\n00000101\\n00...
{ "index": "code_r1_train_2995" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1 2\\n1 2 10\\n\", \"1 10\\n1 10 23\\n\", \"4 10\\n6 10 4\\n1 5 7\\n2 6 5\\n5 9 8\\n\", \"4 10\\n6 10 4\\n1 5 7\\n2 9 5\\n5 9 8\\n\", \"4 10\\n6 10 4\\n1 5 2\\n2 9 5\\n5 9 4\\n\", \"4 10\\n6 10 4\\n1 5 7\\n1 9 5\\n5 9 8\\n\", \"4 10\\n6 10 4\\n1 5 7\\n2 9 5\\n6 9...
{ "index": "code_r1_train_2996" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2 2\\n..\\n..\\n\", \"2 2\\n..\\n..\\n\", \"3 3\\n...\\n..#\\n...\\n\", \"4 2\\n..\\n..\\n..\\n..\\n\", \"4 2\\n..\\n..\\n..\\n..\\n\", \"3 3\\n...\\n..#\\n...\\n\", \"4 5\\n#...#\\n#...#\\n###.#\\n###.#\\n\", \"4 5\\n#...#\\n#...#\\n#.###\\n###.#\\n\"], \"output...
{ "index": "code_r1_train_2997" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"2\\n\", \"1\\n\", \"3\\n\", \"5\\n\", \"7\\n\", \"37\\n\", \"19\\n\", \"30\\n\"], \"outputs\": [\"2\", \"1\", \"3\\n\", \"5\\n\", \"7\\n\", \"37\", \"19\\n\", \"30\\n\"]}" }
{ "index": "code_r1_train_2998" }
code_r1
[ { "role": "system", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\nRead the inputs from stdin solve the problem and write the answer to stdout (do not direc...
code
{ "method": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n1\\n\", \"2\\n1 1\\n\", \"1\\n998\\n\", \"1\\n998\\n\", \"2\\n1 1\\n\", \"2\\n2 1\\n\", \"2\\n2 2\\n\"], \"outputs\": [\"1\", \"1\", \"1\", \"-1\", \"-1\", \"1\", \"1\\n\", \"2\\n\"]}" }
{ "index": "code_r1_train_2999" }