{"similarity_score": 0.9985764591293924, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $c[count($c)] = $x;\n if(count($c) == 2)\n {\n break;\n }\n }\n }\n if(count($c) == 2)\n {\n $d += (strlen($a) - 1) - $c[0];\n $d += (strlen($a) - 2) - $c[1];\n $b[count($b)] = $d;\n }\n $e = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $e++;\n $f = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $e++;\n $g = $x;\n break;\n }\n }\n if($e == 2)\n {\n if($f < $g)\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - ($g - 1);\n }\n else\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - $g;\n if($g == 0)\n {\n $i = 0;\n for($x = 1; $x < $f; $x++)\n {\n if($a[$x] == 0)\n {\n $i++;\n }\n else\n {\n break;\n }\n }\n }\n $h += $i;\n }\n $b[count($b)] = $h;\n }\n $i2 = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 2)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n $i2 = 0;\n $m = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 7)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n if(count($b) == 0)\n {\n print \"-1\";\n }\n else\n {\n print min($b);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "6b91d6b8b79bdfb5ad26c20465d090a7", "src_uid": "ea1c737956f88be94107f2565ca8bbfd", "apr_id": "06547076fb6b024fadda7fc14919c5aa", "difficulty": 2100, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6693822131704006, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $a += $g;\n $b += $h;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang": "PHP", "bug_code_uid": "1c893b319058baacfad37493ac3d9655", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "apr_id": "bf79d31f04a9f176fae6f5b0b534f0fe", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9946062567421791, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "list($a, $b) = explode(\":\", trim(fgets(STDIN)));\nlist($c, $d) = explode(\":\", trim(fgets(STDIN)));\n$e = (($c * 60 + $d) - ($a * 60 + $b)) / 2;\nif($e >= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $h = $b + $f;\n if($h >= 60)\n {\n $i = $h % 60;\n $j = floor($h / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n else\n {\n $a += $g;\n $b += $f;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($b >= 60)\n {\n $i = $b % 60;\n $j = floor($b / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}", "lang": "PHP", "bug_code_uid": "7eebcaf6efd6a65e7793f49e3bbb2ebf", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "apr_id": "bf79d31f04a9f176fae6f5b0b534f0fe", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9923664122137404, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 0 && $x[$i - 1] == 1) continue;\n\t\t\t\tif ($i - 1 > 0 && $x[$i - 1] == 4 && $x[$i - 2] == 1) continue;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\n\n\t$input = fgets(STDIN);\n\tif (check($input)) echo \"YES\";\n\telse echo \"NO\";\n\techo \"\\n\";\n\n\t\n\t\n?>\n", "lang": "PHP", "bug_code_uid": "73e9089e0603186585641092891af117", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "4a4210d794a3ba5343e83e49a6edaa70", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9223300970873787, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "';\n?>", "lang": "PHP", "bug_code_uid": "e08e3d0a3d6a0298715b4ebffc6f456d", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "b0fb1bfdcf821ff466e421ad5134f2b6", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9320388349514563, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "';\n?>", "lang": "PHP", "bug_code_uid": "b99ae6e04ec2393fdff7c9d5cc7df2d5", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "b0fb1bfdcf821ff466e421ad5134f2b6", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9828926905132193, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1d1daa123003b0af55a90b0cf5787c29", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "ab12e7a1010204fbbfd776ec1fbad505", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9803921568627451, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2679dba3be666d2ac6292c14ccb0ed08", "src_uid": "a4b3da4cb9b6a7ed0a33a862e940cafa", "apr_id": "ff6d24df0d7d8fda383feafa106a8e6a", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7506607929515419, "equal_cnt": 13, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 12, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e65d5b7ab5b10afa4ef9c27bb1f3c923", "src_uid": "ec3d15ff198d1e4ab9fd04dd3b12e6c0", "apr_id": "ba3f27f2c559c5f204374f97990f46bf", "difficulty": 1000, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5652892561983471, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "48b4e6b2fe145b316cfc6834d28762f0", "src_uid": "ec3d15ff198d1e4ab9fd04dd3b12e6c0", "apr_id": "8f2adc2746ea530d603338c7e0daee7f", "difficulty": 1000, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6467931345980127, "equal_cnt": 13, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 8, "fix_ops_cnt": 13, "bug_source_code": "\"vaporeon\",\n\t\t 1=>\"jolteon\",\n\t\t 2=>\"flareon\", \n\t\t 3=>\"espeon\", \n\t\t 4=>\"umbreon\",\n\t\t 5=>\"leafeon\", \n\t\t 6=>\"glaceon\", \n\t\t 7=>\"sylveon\"\n ];\n \n \n $flag=0;\n $max=0;\nfor ($i=0; $i =$max)\n {\n \t$max=$count;\n \t$str3=$eve[$i];\n }\n //echo \"$max\\n\";\n\n if($flag==1)\n \tbreak;\n \n}\t\necho \"$str3\\n\";\n", "lang": "PHP", "bug_code_uid": "86be276e978877aa862d7b2b06ba8291", "src_uid": "ec3d15ff198d1e4ab9fd04dd3b12e6c0", "apr_id": "3dd334b30516a8045e9d39fb2522953c", "difficulty": 1000, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9995772266065389, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "\")\n{\n $k = $i[0] > $i[2];\n}\nelse\n{\n $k = $i[0] < $i[2];\n}\nif($i[4] == \">\")\n{\n $l = $i[3] > $i[5];\n}\nelse\n{\n $l = $i[3] < $i[5];\n}\nif($i[7] == \">\")\n{\n $m = $i[6] > $i[8];\n}\nelse\n{\n $m = $i[6] < $i[8];\n}\nif(($k) && ($l) && ($m))\n{\n print \"ABC\"; //////////////////////////////////////////////////\n}\nelse\n{\n for($x = 1; $x <= 3; $x++)\n {\n $f = array_search(\"A\", $e1);\n $g = array_search(\"B\", $e1);\n $h = array_search(\"C\", $e1);\n if($f == TRUE)\n {\n $e1[$f] = 2;\n }\n if($g == TRUE)\n {\n $e1[$g] = 3;\n }\n if($h == TRUE)\n {\n $e1[$h] = 1;\n } \n }\n $i = implode($e1);\n if($i[1] == \">\")\n {\n $k = $i[0] > $i[2];\n }\n else\n {\n $k = $i[0] < $i[2];\n }\n if($i[4] == \">\")\n {\n $l = $i[3] > $i[5];\n }\n else\n {\n $l = $i[3] < $i[5];\n }\n if($i[7] == \">\")\n {\n $m = $i[6] > $i[8];\n }\n else\n {\n $m = $i[6] < $i[8];\n }\n if(($k) && ($l) && ($m))\n {\n print \"CAB\"; //////////////////////////////////////////////////\n }\n else\n {\n for($x = 1; $x <= 3; $x++)\n {\n $f = array_search(\"A\", $e2);\n $g = array_search(\"B\", $e2);\n $h = array_search(\"C\", $e2);\n if($f == TRUE)\n {\n $e2[$f] = 3;\n }\n if($g == TRUE)\n {\n $e2[$g] = 1;\n }\n if($h == TRUE)\n {\n $e2[$h] = 2;\n } \n }\n $i = implode($e2);\n if($i[1] == \">\")\n {\n $k = $i[0] > $i[2];\n }\n else\n {\n $k = $i[0] < $i[2];\n }\n if($i[4] == \">\")\n {\n $l = $i[3] > $i[5];\n }\n else\n {\n $l = $i[3] < $i[5];\n }\n if($i[7] == \">\")\n {\n $m = $i[6] > $i[8];\n }\n else\n {\n $m = $i[6] < $i[8];\n }\n if(($k) && ($l) && ($m))\n {\n print \"BCA\"; //////////////////////////////////////////////////\n }\n else\n {\n for($x = 1; $x <= 3; $x++)\n {\n $f = array_search(\"A\", $e3);\n $g = array_search(\"B\", $e3);\n $h = array_search(\"C\", $e3);\n if($f == TRUE)\n {\n $e3[$f] = 3;\n }\n if($g == TRUE)\n {\n $e3[$g] = 2;\n }\n if($h == TRUE)\n {\n $e3[$h] = 1;\n } \n }\n $i = implode($e3);\n if($i[1] == \">\")\n {\n $k = $i[0] > $i[2];\n }\n else\n {\n $k = $i[0] < $i[2];\n }\n if($i[4] == \">\")\n {\n $l = $i[3] > $i[5];\n }\n else\n {\n $l = $i[3] < $i[5];\n }\n if($i[7] == \">\")\n {\n $m = $i[6] > $i[8];\n }\n else\n {\n $m = $i[6] < $i[8];\n }\n if(($k) && ($l) && ($m))\n {\n print \"CBA\"; //////////////////////////////////////////////////\n }\n else\n {\n for($x = 1; $x <= 3; $x++)\n {\n $f = array_search(\"A\", $e4);\n $g = array_search(\"B\", $e4);\n $h = array_search(\"C\", $e4);\n if($f == TRUE)\n {\n $e4[$f] = 1;\n }\n if($g == TRUE)\n {\n $e4[$g] = 3;\n }\n if($h == TRUE)\n {\n $e4[$h] = 2;\n } \n }\n $i = implode($e4);\n if($i[1] == \">\")\n {\n $k = $i[0] > $i[2];\n }\n else\n {\n $k = $i[0] < $i[2];\n }\n if($i[4] == \">\")\n {\n $l = $i[3] > $i[5];\n }\n else\n {\n $l = $i[3] < $i[5];\n }\n if($i[7] == \">\")\n {\n $m = $i[6] > $i[8];\n }\n else\n {\n $m = $i[6] < $i[8];\n }\n if(($k) && ($l) && ($m))\n {\n print \"ACB\"; //////////////////////////////////////////////\n }\n else\n {\n for($x = 1; $x <= 3; $x++)\n {\n $f = array_search(\"A\", $e5);\n $g = array_search(\"B\", $e5);\n $h = array_search(\"C\", $e5);\n if($f == TRUE)\n {\n $e5[$f] = 3;\n }\n if($g == TRUE)\n {\n $e5[$g] = 2;\n }\n if($h == TRUE)\n {\n $e5[$h] = 1;\n } \n }\n $i = implode($e5);\n if($i[1] == \">\")\n {\n $k = $i[0] > $i[2];\n }\n else\n {\n $k = $i[0] < $i[2];\n }\n if($i[4] == \">\")\n {\n $l = $i[3] > $i[5];\n }\n else\n {\n $l = $i[3] < $i[5];\n }\n if($i[7] == \">\")\n {\n $m = $i[6] > $i[8];\n }\n else\n {\n $m = $i[6] < $i[8];\n }\n if(($k) && ($l) && ($m))\n {\n print \"BAC\"; ///////////////////////////////////////\n }\n else\n {\n print \"Impossible\";\n }\n }\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "f991d096c9e1d028e2b2e1e17ec20e33", "src_uid": "97fd9123d0fb511da165b900afbde5dc", "apr_id": "590457b490d5a3fb85c89a85aa822fc0", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1909256311121219, "equal_cnt": 30, "replace_cnt": 29, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 29, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4f6909d0af2c4fb0177bdc7dae9089ae", "src_uid": "7a66fae63d9b27e444d84447012e484c", "apr_id": "54975846f4537345f76be7862e452248", "difficulty": 1600, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7996340347666971, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "26e23d56a98dd91027757980c25868d7", "src_uid": "eab5c84c9658eb32f5614cd2497541cf", "apr_id": "377f4e207be0984f7f9611e2da879791", "difficulty": 1400, "tags": ["graphs", "brute force", "dfs and similar", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9963768115942029, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "^' || $t == '>^\" && $vert[count($vert)-1]==\"v\") {\n echo \"NO\";exit();\n}\n\nif($horiz[0]==\">\" && $vert[count($vert)-1]==\"^\") {\n echo \"NO\";exit();\n}\nif($horiz[count($horiz)-1]==\"<\" && $vert[0]==\"v\") {\n echo \"NO\";exit();\n}\n\necho \"YES\";\n?>", "lang": "PHP", "bug_code_uid": "80962c40f1f716e32b00f9fd9fc83569", "src_uid": "eab5c84c9658eb32f5614cd2497541cf", "apr_id": "b49ebae927215a253de7cc7628a97bf7", "difficulty": 1400, "tags": ["graphs", "brute force", "dfs and similar", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6225563909774436, "equal_cnt": 11, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": " 1000)\n{\n print $c - 1000;\n}\n?>", "lang": "PHP", "bug_code_uid": "707794dab1f3b782ad38b5dcad066e47", "src_uid": "a593016e4992f695be7c7cd3c920d1ed", "apr_id": "0908401a90a3672ba5063fc7e6744a56", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5845070422535211, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "336815dc8230319f42906d953ad97785", "src_uid": "a593016e4992f695be7c7cd3c920d1ed", "apr_id": "cebbbd4bf44a19eda6f5f6276a761334", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.723404255319149, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c7ac5ef6010de83db7210452406c8c03", "src_uid": "a593016e4992f695be7c7cd3c920d1ed", "apr_id": "f17b65110b0505aad495f097d87e4fca", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8968253968253969, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": " $h[$x + 1])\n {\n $i = 1;\n }\n}\nif($e != count($d))\n{\n print \"need tree\";\n}\nelseif(($e == count($d)) && ($e != count($c)) && ($i != 0))\n{\n print \"both\";\n}\nelseif(($e == count($d)) && ($i != 0))\n{\n print \"array\";\n}\nelseif(($e == count($d)) && ($i == 0))\n{\n print \"automaton\";\n}\n?>", "lang": "PHP", "bug_code_uid": "03f0f0cbdd2c2c9c1cb8fc38a00bc3ef", "src_uid": "edb9d51e009a59a340d7d589bb335c14", "apr_id": "f37c2f268718be35ec05ec390bc81449", "difficulty": 1400, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9809004092769441, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " $value) {\n array_push($arr, $value);\n}\n\n// var_dump($arr,$n,$d);\n// echo stream_get_contents($dir);\n\nfunction devu($n,$d,$arr){\n $t = 0;\n $jok = -2;\n foreach ($arr as $key => $value) {\n $t += $value;\n $jok += 2;\n }\n $count = count($arr);\n $t = ($count-1)*10 + $t;\n if($d < $t)\n return -1;\n\n\n $l = intval(($d-$t)/5);\n\n $jok += $l;\n\n return $jok;\n}\n\n\n\n\n\n\n?>", "lang": "PHP", "bug_code_uid": "509f07c14189192213f0041f1b4fb2fc", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea", "apr_id": "b7efdfb8a0293b797b93c1cec65c0253", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9866962305986696, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $times){\n print \"-1\" ;\n \n}\nelse{\n print ($times - array_sum($t))/5 ;\n}\n\n\n\n?>", "lang": "PHP", "bug_code_uid": "3d3020f841cac6def251bb5fdd871c77", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea", "apr_id": "e4f62d38e28953b5d9b2f3a76434826d", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9814432989690721, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "$d){\n echo \"-1\";\n}else{\n $j = ($d-$s)/5 + ($n-1)*2;\n echo \"$j\";\n}\n", "lang": "PHP", "bug_code_uid": "b8c713301c3b1b7d9382193e214e9203", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea", "apr_id": "6c617850b039e94baec80a089d0f2543", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7410772225827384, "equal_cnt": 13, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 12, "bug_source_code": " $d or $free_time % 5 != 0) {\n return -1;\n }\n\n $churu_jokes += $free_time / 5;\n\n return $churu_jokes;\n}\n\n\nlist($n, $d) = getIntList(2);\n$minutes = getIntList($n);\n\necho task($minutes, $d) . PHP_EOL;\n?>", "lang": "PHP", "bug_code_uid": "b857a8af56f342000fc05953e71d95f8", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea", "apr_id": "f0b0a35115bf4a00e667e7f2af8ac1c1", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9985228951255539, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6ebadf80bd69570c8f57dec964e6f8cf", "src_uid": "bda4b15827c94b526643dfefc4bc36e7", "apr_id": "f237d5a47476e6ded2b46e1076af5030", "difficulty": 1400, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7618421052631579, "equal_cnt": 20, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 19, "bug_source_code": "= 10) {\n fprintf($fileOUT, \"YES\\n\");\n} else {\n fprintf($fileOUT, \"NO\\n\");\n}\n\nfclose($fileIN);\nfclose($fileOUT);\n\n?>\n", "lang": "PHP", "bug_code_uid": "3e8e19a50d85d4e42e47833ff550d3ed", "src_uid": "bda4b15827c94b526643dfefc4bc36e7", "apr_id": "3b3eee791ae1cb43a90fd0d2f3fdc30a", "difficulty": 1400, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5198019801980198, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d89942e5a3b85846e9d8282b9c3e4c98", "src_uid": "bda4b15827c94b526643dfefc4bc36e7", "apr_id": "27cb84de39e9e945c7323d73e0e4d8c7", "difficulty": 1400, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4377249820014399, "equal_cnt": 15, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 15, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bc023314e990c3eb44c2279d1e76c449", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "aa4015a2d30cbd3697020af64b3324b0", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9965986394557823, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "=1 && $len<=100){\n\t$vowels = \"AOYEUIaoyeui\";\n\tif(preg_match('/[a-zA-Z]+/', $str)){\n\t\t$str = preg_replace('/[^AOYEUIaoyeui\\\\s]/', '.$0', $str);\n\t\t$str = preg_replace('/[AOYEUIaoyeui]/i', '', $str);\n\t\techo strtolower($str);\t\n\t}\n}\n\n?>", "lang": "PHP", "bug_code_uid": "871ad0d15f7f0bb3c122d3eda0b253b7", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "70b9424c0c982417ad9d49b5c09ac523", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9015317286652079, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "aec3fcf2250ea9b57a5c1d5c1d4b426a", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "d0772d7f7fceef8da695fb8bf8ca022d", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9873417721518988, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a6eaf46996ed508420a819e688867751", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "d2b70821273adc5202f17cab7c9924d7", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9927007299270073, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ff50bd588c0a9a92074efd1ad73a937b", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "998eed40b4ff39a630748bbce82c4470", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9690721649484536, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cfd35fc3e2a83147d50e3331b079f268", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "99feb845b51dcdcae474e07a313a8f95", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9967373572593801, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c76f90f0d06dcaa11ad42208b879076f", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "99feb845b51dcdcae474e07a313a8f95", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.39267015706806285, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "$handle = fopen (\"php://stdin\",\"r\");\n$line = fgets($handle);\nif(trim($line) != 'yes'){\n echo \"ABORTING!\\n\";\n exit;\n}\necho $line;", "lang": "PHP", "bug_code_uid": "6357d9398deb014f1e65be0d4852dc85", "src_uid": "587d4775dbd6a41fc9e4b81f71da7301", "apr_id": "644c16b0216781b28f3cbb3df6371162", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9475890985324947, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3bfe70b67fdf15444b1bf0d0093d1a20", "src_uid": "fa4b1de79708329bb85437e1413e13df", "apr_id": "c3202284eb737dd89d8b5ec0fad6c663", "difficulty": 1400, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.994475138121547, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "dc7cac52a7afcef0b3e718c8029bb3e9", "src_uid": "3b520c15ea9a11b16129da30dcfb5161", "apr_id": "0dbdee03b3c7cfa901ff2c86870f4fce", "difficulty": 800, "tags": ["sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8120567375886525, "equal_cnt": 15, "replace_cnt": 2, "delete_cnt": 8, "insert_cnt": 4, "fix_ops_cnt": 14, "bug_source_code": " $v) {\n if ($v == 0) {\n unset($a[$k]);\n }\n }\n \n funcMax($a, array());\n function funcMax($arr, $count) {\n $max = max($arr);\n $count[$max] = $max;\n foreach ($arr AS $key => $val) {\n if ($val == $max) {\n unset($arr[$key]);\n }\n }\n \n if (count($arr)) { \n funcMax($arr, $count);\n } else {\n echo count($count);\n }\n }\n \n?>", "lang": "PHP", "bug_code_uid": "6854529cc580baec68b197a1b8bb4b18", "src_uid": "3b520c15ea9a11b16129da30dcfb5161", "apr_id": "058775bb85d33102751832aa0075daf7", "difficulty": 800, "tags": ["sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8389380530973451, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "77074fe8556190cc78b0f92a6d0a4088", "src_uid": "90b9ef939a13cf29715bc5bce26c9896", "apr_id": "d80168c59ea86ef8983ce34fb6b8043c", "difficulty": 1600, "tags": ["math", "games", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9348958333333334, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "15bd6ef35176b48e6407b64f81305aca", "src_uid": "90b9ef939a13cf29715bc5bce26c9896", "apr_id": "f195d2fb9266c2c436d84fd25daed402", "difficulty": 1600, "tags": ["math", "games", "constructive algorithms"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.953125, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d9ab8d262fd48f4d414ac33c20d4fa53", "src_uid": "90b9ef939a13cf29715bc5bce26c9896", "apr_id": "f195d2fb9266c2c436d84fd25daed402", "difficulty": 1600, "tags": ["math", "games", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9959183673469387, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= min($a, $b)) print 'Second'; else print 'First';\n?>", "lang": "PHP", "bug_code_uid": "41dee135b8c0a60cb1152133f75af90a", "src_uid": "90b9ef939a13cf29715bc5bce26c9896", "apr_id": "3de153d58e6cbfecdf15c9226f4cff10", "difficulty": 1600, "tags": ["math", "games", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9977046671767407, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 5, "bug_source_code": "= min($c[$x], $i[$x])) && ($a <= max($c[$x], $i[$x])) && ($b >= min($f[$x], $l[$x])) && ($b <= max($f[$x], $l[$x])))\n {\n break;\n }\n}\nprint $x;\n?>", "lang": "PHP", "bug_code_uid": "74b8eec60a54766be0344331fbf992a8", "src_uid": "2fb2a129e01efc03cfc3ad91dac88382", "apr_id": "9a4db321cba0c9a24ed299725eec539d", "difficulty": 1400, "tags": ["geometry", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9857369255150554, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "=abs($x))\n{\n if ($y>0)\n $result = 2+(abs($y)-1)*4 - 1 + (($x == abs($y))?0:1);\n else\n $result = 4+(abs($y)-1)*4 - 1 + ($x==-abs($y)&&$x!=0?0:1);\n} else\n{\n if ($x>0)\n $result = 1+(abs($x)-1)*4 - 1 + ($y==abs($x)||$y==0&&$x==1?0:1);\n else\n $result = 3+(abs($x)-1)*4 - 1 + (($y == abs($x))?0:1);\n \n}\n\n//output\n$stdout = fopen('php://stdout', 'w');\nfputs ($stdout, $result);\n\n?>", "lang": "PHP", "bug_code_uid": "501d8ba151906814602756e83d8c382c", "src_uid": "2fb2a129e01efc03cfc3ad91dac88382", "apr_id": "2a641cf8d832b30e522f7b458f66ea42", "difficulty": 1400, "tags": ["geometry", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5707865168539326, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " 240) {\n \n echo 0;\n}\n\n$turbo=240 - $min;\n\nfor ($i=1; $i <= $prob; $i++) {\n \n $num += $i * 5;\n \n if ($i == $prob and $num < $turbo) {\n \n echo $i;\n }elseif ($num == $turbo) {\n echo $i;\n }elseif ($num > $turbo) {\n \n echo $i - 1;\n break;\n }\n \n }\n?>", "lang": "PHP", "bug_code_uid": "e06d0580f2077ce30899071264d5c097", "src_uid": "41e554bc323857be7b8483ee358a35e2", "apr_id": "55d0f9fc182fe98eeeddfe13848286f8", "difficulty": 800, "tags": ["math", "brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8504672897196262, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": " 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "91aeb023968df73476fc829897411cec", "src_uid": "dea7eb04e086a4c1b3924eff255b9648", "apr_id": "cbd4df0f7ebd297ca7837c099d8ae8a3", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9789029535864979, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "$valor) {\n if ($valor == $inputArray[$sizeArray-2]) {\n $ban = true;\n break;\n }\n }\n if ($ban) {\n echo \"YES\";\n }else{\n echo \"NO\";\n }\n?>", "lang": "PHP", "bug_code_uid": "be667622d7a7862dab60ce61662e9e03", "src_uid": "dea7eb04e086a4c1b3924eff255b9648", "apr_id": "47414fe093ad744a8b962fd943f60f86", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9325396825396826, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "0){echo'Impossible';return;}\n$min=$Parent;\nif($Childs>$Parent)$min=$Childs;\n$max=$Parent;\nif($Childs>0)$max+=$Childs-1;\necho $min.' '.$max;", "lang": "PHP", "bug_code_uid": "c4a335337d3e1379d919cbb5489694a6", "src_uid": "1e865eda33afe09302bda9077d613763", "apr_id": "a02d4d4976bffbff3b3f9e347efe2c33", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7845804988662132, "equal_cnt": 25, "replace_cnt": 12, "delete_cnt": 11, "insert_cnt": 1, "fix_ops_cnt": 24, "bug_source_code": "0){echo'Impossible';return;}\n$min=$Parent;\nif($Childs>$Parent)$min=$Childs\n$max=$Parent;\nif($Childs>0)$max+=$Childs-1;\necho $min.' '.$max;", "lang": "PHP", "bug_code_uid": "58bc0be9b03836b7a1f2e6c6476f2780", "src_uid": "1e865eda33afe09302bda9077d613763", "apr_id": "a02d4d4976bffbff3b3f9e347efe2c33", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9835164835164835, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "0){echo'Impossible';return;}\nif($b!=0)$d=$a+$b-1;else$d=$a;echo max($a,$b).' '.$d;", "lang": "PHP", "bug_code_uid": "401b8ad790b17e33a639b6d87f61822c", "src_uid": "1e865eda33afe09302bda9077d613763", "apr_id": "a02d4d4976bffbff3b3f9e347efe2c33", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9813084112149533, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $childs )\n $min = $grownups;\n else\n $min = $grownups + abs( $grownups - $childs );\n\n $max = $grownups + ( $childs > 0 ? $childs - 1 : 0 );\n\n echo $min, ' ', $max;\n", "lang": "PHP", "bug_code_uid": "68f026c6f93cd3d65a56ebe3e90e05f7", "src_uid": "1e865eda33afe09302bda9077d613763", "apr_id": "f10a48628eae25c1415ffc211e759cb8", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9970326409495549, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $input[$x+1]){\n $z = $input[$x];\n $input[$x] = $input[$x+1];\n $input[$x+1] = $z;\n }\n }\n}\n\n$output = implode(\" \", $input);\n\nprint $output;\n\n?>", "lang": "PHP", "bug_code_uid": "716c589dcf721c164f4892564fdc9ce5", "src_uid": "ae20712265d4adf293e75d016b4b82d8", "apr_id": "77f716fca1d43e2d4e9ee773296b9a4a", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.983739837398374, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\n ", "lang": "PHP", "bug_code_uid": "99bd37068d81c297e749f3738552e8a0", "src_uid": "ae20712265d4adf293e75d016b4b82d8", "apr_id": "bf17b08dd574bf52ad87a36fccc36622", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8776119402985074, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " $b[1])\n {\n $b[0] = $b[0] - $b[1];\n rsort($b);\n }\n else\n {\n break;\n }\n}\nprint array_sum($b);\n?>", "lang": "PHP", "bug_code_uid": "ef190b299a782dec67f8e2917bda486a", "src_uid": "042cf938dc4a0f46ff33d47b97dc6ad4", "apr_id": "dd9da0ef24611844b77ea983ec0ee80f", "difficulty": 1000, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.796221322537112, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "#!/usr/bin/env php\n 0 || $g > 0 || $b > 0) {\n if ($r > 0) {\n $r -= $nk[1];\n $cnt++;\n }\n if ($g > 0) {\n $g -= $nk[1];\n $cnt++;\n }\n if ($b > 0) {\n $b -= $nk[1];\n $cnt++;\n }\n}\n\necho $cnt;\n", "lang": "PHP", "bug_code_uid": "ad4584d537f73c80abeab83d1d6755ea", "src_uid": "d259a3a5c38af34b2a15d61157cc0a39", "apr_id": "c61e81fe95ecc5f133c966c9d10b4e76", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9939320388349514, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $c = $a % $x;\n array_push($m, $c);\n ($c >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $d = $a % $x;\n array_push($m, $d);\n ($d >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $e = $a % $x;\n array_push($m, $e);\n ($e >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $f = $a % $x;\n array_push($m, $f);\n ($f >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $g = $a % $x;\n array_push($m, $g);\n ($g >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $h = $a % $x;\n array_push($m, $h);;\n ($h >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $i = $a % $x;\n array_push($m, $i);\n ($i >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $j = $a % $x;\n array_push($m, $j);\n ($j >= 1) ? ($a = ($a - 1) / $x) : ($a = $a / $x);\n if($a >= $x)\n { \n $k = $a % $x;\n array_push($m, $k);\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n }\n else\n {\n array_push($m, floor($a));\n }\n $m2 = array_sum($m);\n }\n}\nfor($y = 100; $y > 1; $y--)\n{\n if((($m2 % $y) == 0) && ((($a1 - 2) % $y) == 0))\n {\n $m2 = $m2 / $y;\n $a2 = ($a1 - 2) / $y;\n }\n else\n {\n $xx++;\n }\n}\nif($xx == 100)\n{\n echo $m2, \"/\", $a1 - 2;\n}\nelse\n{\n echo $m2, \"/\", $a2;\n}\n?>", "lang": "PHP", "bug_code_uid": "1a9c836743648869de7b98169c7327f9", "src_uid": "1366732dddecba26db232d6ca8f35fdc", "apr_id": "9c0e589d9d452bbaa1ea868b9b31eb2c", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9922480620155039, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= 2; $i--) {\n\t$ac = $a;\n\twhile ($ac > 0) {\n\t\t$sum += ($m = $ac % $i);\n\t\t$ac = ($ac - $m) / $i;\n\t}\n}\n\n$z = $a - 2;\n\n$i = 2;\nwhile ($i <= $z) {\n\twhile (($sum % $i == 0) && ($z % $i == 0)) {\n\t\t$sum /= $i;\n\t\t$z /= $i;\n\t}\n\t$i++;\n}\n\n$output = \"$sum/$z\";\n\necho $output;\n", "lang": "PHP", "bug_code_uid": "5bc404fc1366fab06438df7ec7c50af6", "src_uid": "1366732dddecba26db232d6ca8f35fdc", "apr_id": "a4f82cd52f2655dc30298b92b9c2ac1c", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.992936427850656, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 0; $i--) {\n if ($summ % $i == 0 && $count % $i == 0) {\n $summ /= $i;\n $count /= $i;\n }\n}\n\necho $summ . '/' . $count;\n\nfunction get_summ($num, $base) {\n $result = 0;\n while ($num) {\n $result += $num % $base;\n $num = floor($num / $base);\n }\n return $result;\n}\n", "lang": "PHP", "bug_code_uid": "e386c5410ad61785758b9fd2a7afe6e3", "src_uid": "1366732dddecba26db232d6ca8f35fdc", "apr_id": "085ac22695516a80587cc88cc87a1987", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7873303167420814, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e67a381e3365aa82754c8d1c6390b5e5", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "f9ec3538b5b7e392f619fc0c56abcd95", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5425101214574899, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "0) {\n $x = $x+1;\n}\nif ($m % $a>0) {\n $y = $y+1;\n}\nfprintf($x*$y);\n?>", "lang": "PHP", "bug_code_uid": "702fbc3e0596a2eaa40b90cc37334ed9", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "d65738e6f7af78113a2b347b64f2b9b3", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9947089947089947, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d6777170998ec293ffc3eee1b192ee8a", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "e4e326d2565d31692f6194eee1291122", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7798165137614679, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6963b3c68a616649fa362c040ad1d1b0", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "e4e326d2565d31692f6194eee1291122", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6585365853658537, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "36c2af17b46e4f6339c2aa5716031c32", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "e36b9513e2e7ec36e0ef4bd8954f039c", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.974496644295302, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "= 0 && $board[$y - $turn][$x] == 'S') return false;\n if ($turn >= 8) return true;\n for ($vy = -1; $vy <= 1; $vy++)\n {\n for ($vx = -1; $vx <= 1; $vx++)\n {\n $ny = $y + $vy;\n $nx = $x + $vx;\n if ($ny < 0 || $ny >= 8 || $nx < 0 || $ny >= 8) continue;\n if ($ny - $turn >= 0 && $board[$ny - $turn][$nx] == 'S') continue;\n if (dfs($ny, $nx, $turn + 1)) return true;\n\n }\n }\n return false;\n}\n\ncalc();\n?>\n", "lang": "PHP", "bug_code_uid": "ccdaba9be928f3b059dd34648d137922", "src_uid": "f47e4ab041288ba9567c19930eb9a090", "apr_id": "66546cf090cd7c547bf1da56270b589d", "difficulty": 1500, "tags": ["graphs", "dfs and similar", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.21453692848769051, "equal_cnt": 23, "replace_cnt": 17, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 23, "bug_source_code": "=0;$y--) {\n if(in_array($area[$y][$x], array('S'))) {\n $area[$y][$x] = '.';\n if($y+1 <= 7) {\n if(in_array($area[$y+1][$x], array('M'))) {\n die('LOSE');\n }\n $area[$y+1][$x] = 'S';\n }\n }\n }\n }\n}\n\nfunction is_free_point($x,$y, $area) {\n if(valid_point($x, $y)) {\n if(in_array($area[$y][$x], array('.','A','M'))) {\n return TRUE;\n }\n }\n return FALSE;\n}\n\nfunction is_danger_point($x,$y,$area) {\n if( valid_point($x,($y-1) ) === FALSE || is_free_point($x, ($y-1) , $area) ) {\n return FALSE;\n }\n return TRUE;\n}\n\nfunction valid_point($x,$y) {\n if($x > 7 || $y > 7 || $x < 0 || $y < 0) {\n return FALSE;\n }\n return TRUE;\n}", "lang": "PHP", "bug_code_uid": "eec8f59c3fd6fb8fe37a1edd268acdbd", "src_uid": "f47e4ab041288ba9567c19930eb9a090", "apr_id": "eb62d00201f4d959ddee49708f42e30f", "difficulty": 1500, "tags": ["graphs", "dfs and similar", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.992867332382311, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= 13) {\n $actualStepsCount = count(CHARACTER_LIST) - $stepsCount;\n $steps += $actualStepsCount;\n\n $prevPosition = $letterNumber;\n } else {\n $actualStepsCount = $stepsCount;\n $steps += $actualStepsCount;\n\n $prevPosition = $letterNumber;\n }\n}\n\necho $steps;\n", "lang": "PHP", "bug_code_uid": "3afcbfe1cfa9d2bbea4e1145ceee9dcc", "src_uid": "ecc890b3bdb9456441a2a265c60722dd", "apr_id": "a9842b6279a2e7847afb0e3b32e6b71d", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9635467980295567, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " ord($b)){\n $tmp = $a;\n $a = $b;\n $b = $tmp;\n }\n $i = abs(intval(ord($a) - ord($b)));\n $j = abs(intval(ord($a) - ord('a'))) + abs(intval(ord('z')) - ord($b));\n// echo \"a: $a b: $b\" . PHP_EOL;\n// echo \"i: $i j: $j \" . PHP_EOL;\n return min($i,$j);\n}\n$current = 'a';\n$sum = 0;\nforeach(str_split($line) as $c){\n $sum += dis($c,$current);\n $current = $c;\n}\necho $sum . PHP_EOL;\nexit;", "lang": "PHP", "bug_code_uid": "672b6e3c3e1d5279fdc1969291e17c3f", "src_uid": "ecc890b3bdb9456441a2a265c60722dd", "apr_id": "89e52eec254896bb5ac48edb117c59d5", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9879839786381842, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e',\n 6 => 'f', 7 => 'g', 8 => 'h', 9 => 'i', 10 => 'j',\n 11 => 'k', 12 => 'l', 13 => 'm', 14 => 'n', 15 => 'o',\n 16 => 'p', 17 => 'q', 18 => 'r', 19 => 's', 20 => 't',\n 21 => 'u', 22 => 'v', 23 => 'w', 24 => 'x', 25 => 'y',\n 26 => 'z'];\n$stdin = fopen('php://stdin', 'r');\n$string = trim(fgets($stdin));\n$pos = 1;\n$count = 0;\nfor ($i = 0; $i < strlen($string); $i++) {\n $newPos = array_search($string[$i], $alphabet);\n if ($newPos > $pos) {\n if ($newPos - $pos > 13) {\n\n $count+= $pos + (26 - $newPos);\n }\n if ($newPos - $pos < 13) {\n\n $count+= $newPos - $pos;\n }\n if ($newPos - $pos == 13) {\n $count+=13;\n }\n $pos = $newPos;\n }\n if ($newPos < $pos) {\n if ($pos - $newPos < 13) {\n $count += $pos - $newPos;\n }\n if ($pos - $newPos > 13) {\n $count+= $newPos + (26 - $pos);\n }\n if ($newPos - $pos == 13) {\n $count+=13;\n }\n $pos = $newPos;\n $count;\n }\n}\necho $count;\n", "lang": "PHP", "bug_code_uid": "511f2ae192ee8b7dc1771cddb9939809", "src_uid": "ecc890b3bdb9456441a2a265c60722dd", "apr_id": "4449256058445be6ff25437538ab4ae6", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9385290889132821, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8fada1e6971cf8aa71a04c7f04f120fd", "src_uid": "0bd6fbb6b0a2e7e5f080a70553149ac2", "apr_id": "ac7871a0bb3da9fa227daae341e0b0c8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9961089494163424, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "$b)\n $a -= $b;\n else\n $b -= $a;\n return $a;\n}\nfunction lite($a,$b,$n){\n $f=nod($a,$n);\n if (($n-$f)==0) return 0;\n $f1=nod($b,$n);\n if (($n-$f-$f1)==0) return 1;\n return lite($a,$b,$n-=($f+$f1));\n} \nprint lite($a, $b, $n);\n?>", "lang": "PHP", "bug_code_uid": "14dc90c94dabf09a36a2cbb3d01a2c84", "src_uid": "0bd6fbb6b0a2e7e5f080a70553149ac2", "apr_id": "990beb696ee3fd757fd18d88d76d5730", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7672955974842768, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": " 0)\n{\n while ($k != $n)\n {\n if ($k > $n)\n $k -= $n;\n else\n $n -= $k;\n }\n \n if ($sem)\n {\n $sem = false;\n $k = $b;\n $m++;\n }\n else\n {\n $sem = true;\n $k = $a;\n $l++;\n } \n \n $n = $nn - $n; \n $nn = $n; \n}\nif ($k == max($k, $l))\n echo \"0\";\nelse\n echo \"1\";\n?>", "lang": "PHP", "bug_code_uid": "77a4d21e5030134df740efbd967cd8fd", "src_uid": "0bd6fbb6b0a2e7e5f080a70553149ac2", "apr_id": "b64decce402b9a4d26babc19abdaa033", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.927521540800811, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": ">\";\n$t = implode(\" \", range($b - $c, $b - 1));\n$u = implode(\" \", range($b + 1, $b + $c));\n$v = $j . \" \" . $t . \" \" . \"(\" . $b . \")\" . \" \" . $u . \" \" . $k;\n$l = explode(\" \", $v);\nfor($x = 0; $x < strlen($v); $x++)\n{\n if(($l[$x] == \"<<\") || ($l[$x] == \">>\") || ($l[$x] == \"(\" . $b . \")\"))\n {\n continue;\n }\n else\n {\n if(($l[$x] < 1) || ($l[$x] > $a))\n {\n unset($l[$x]);\n }\n }\n}\n$m = array_unique($l);\n$r = array_search(\"0\", $m);\nif($r == TRUE)\n{\n unset($m[$r]);\n}\n$n = array_search(\"1\", $m);\n$o = array_search(\"(1)\", $m);\nif(($n == TRUE) || ($o == TRUE))\n{\n unset($m[0]);\n}\n$p = array_search($a, $m);\nif($p == TRUE)\n{\n $s = array_search($k, $m);\n if($s == TRUE)\n {\n unset($m[$s]);\n }\n}\nprint implode(\" \", $m);\n?>", "lang": "PHP", "bug_code_uid": "a7dc7959b9413aca6c008ecd4824aad0", "src_uid": "526e2cce272e42a3220e33149b1c9c84", "apr_id": "722465269edbcceb5f155c8ddfe55607", "difficulty": null, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9991673605328892, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1){\n array_push($result, '<<');\n for($i=$p-$k; $i<$p; $i++){\n array_push($result, $i);\n }\n}else{\n for($i=$p-$k; $i<$p; $i++){\n if($i > 0)\n array_push($result, $i);\n }\n}\narray_push($result, \"($p)\");\nif($p + $k < $n){\n for($i=$p+1; $i<=$p + $k; $i++){\n array_push($result, $i);\n }\n array_push($result, '>>');\n}else{\n for($i=$p+1; $i<$p + $k; $i++){\n if($i <=$n)\n array_push($result, $i);\n }\n}\n\nprint(implode(' ', $result));", "lang": "PHP", "bug_code_uid": "da417a66b489a425de60e1197ed2cefd", "src_uid": "526e2cce272e42a3220e33149b1c9c84", "apr_id": "3b6df367989c15baff9496f658f66abe", "difficulty": null, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3406662476429918, "equal_cnt": 13, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": " $f)\n {\n print \"1\";\n }\n else\n {\n $g = ceil($f / $e);\n if($e * $g == $f)\n {\n $g++;\n }\n else\n {\n $g = $f + $e;\n }\n print $g;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "d125d1f9c9184aca0b0c98be6bd8c243", "src_uid": "b62338bff0cbb4df4e5e27e1a3ffaa07", "apr_id": "5f9ddc62684150de3ce29124236ca552", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6009389671361502, "equal_cnt": 25, "replace_cnt": 9, "delete_cnt": 4, "insert_cnt": 11, "fix_ops_cnt": 24, "bug_source_code": " $d)\n {\n $g[$x] -= $d;\n }\n else\n {\n $g[$x] -= $h;\n break;\n }\n}\narray_push($g, $a);\narray_push($g, $b);\nprint array_sum($g);\n?>", "lang": "PHP", "bug_code_uid": "653241e58e9a36a15086e7afefcf8c05", "src_uid": "9246aa2f506fcbcb47ad24793d09f2cf", "apr_id": "139302358570c4e12e5a1edcaa38b9b4", "difficulty": 1400, "tags": ["dp", "math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9985185185185185, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "p=\".$p.\"
\";\nfor($i=-$d+1; $i<=$d; $i++){\n if($v+$i == $v2+($t-2-$p)*$d){\n $v = $v+$i;\n $ms += $v;\n// echo $v.'+';\n $p++;\n break;\n }\n}\n//echo \"
p=\".$p.\"
\";\nwhile($p < $t-1){\n $v -= $d;\n $ms += $v;\n// echo $v.'+';\n $p++;\n}\n//echo '
';\necho $ms;\n \n\n\n\n \n\n", "lang": "PHP", "bug_code_uid": "0a3c3806ed7baeaa85bed6e396dddbff", "src_uid": "9246aa2f506fcbcb47ad24793d09f2cf", "apr_id": "1c867d8291027efeafe21ac6199f1c62", "difficulty": 1400, "tags": ["dp", "math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9183098591549296, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " $bb) {\n $totalLength = $bb*2+1+$cc*2;\n}\nif ($aa < $bb) {\n $totalLength = $aa*2+1+$cc*2;\n}\nif ($aa == $bb){\n $totalLength = $aa+$bb+$cc*2;\n}\necho \"$string\".PHP_EOL;\necho($totalLength . PHP_EOL);", "lang": "PHP", "bug_code_uid": "1dc3c9025e5c410f115a99090eeac363", "src_uid": "609f131325c13213aedcf8d55fc3ed77", "apr_id": "579c7cebc1151c0634dc5dcafbd34b4c", "difficulty": 800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.29874572405929306, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": " $a))\n {\n print $x;\n break;\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "fe5a134e603205281b964081774285c1", "src_uid": "18644c9df41b9960594fdca27f1d2fec", "apr_id": "ac42ff80bd960aea0052b99a00375b7c", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9448529411764706, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "\n\n ", "lang": "PHP", "bug_code_uid": "21fda0cd2199c06efda16d19052f3616", "src_uid": "18644c9df41b9960594fdca27f1d2fec", "apr_id": "5ed559ba5e10b9db2a221a14a8c48b4a", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.483971044467425, "equal_cnt": 12, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": " 0)\n {\n $d++;\n }\n else\n {\n $d++;\n break;\n }\n}\nprint $d;\n?>", "lang": "PHP", "bug_code_uid": "68827ab1b44eeb4db8c651bb81bf3887", "src_uid": "7c710ae68f27f140e7e03564492f7214", "apr_id": "78e1d47c9579692d4b78511878e4e112", "difficulty": 1400, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.29354207436399216, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6e754e8ffd6a3fe8311fa3fd9d06249b", "src_uid": "5d4f38ffd1849862623325fdbe06cd00", "apr_id": "bacc917a65196d1fecc0c3154e2b13dd", "difficulty": 1400, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3730834752981261, "equal_cnt": 15, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 15, "bug_source_code": "'. s_mult_ent(2 , 10) . '
';\n\techo (9999*10).'
'. s_mult_ent(9999 , 10). '
';\n\techo (99*99).'
'. s_mult_ent(99 , 99). '
';\n\techo (99*22).'
'. s_mult_ent(99 , 22). '
';\n\t*/\n\n\t$f = s_mult_ent( ceil( $n / $a ) , ceil( $m / $a ) );\n\tprintf( \"%s\" , $f );\n\n\tfunction s_mult_ent( $a , $b ){\n\t\t$r = 0;\n\t\tfor( $i = 0; $i < $a ; $i ++ ) {\n\t\t\t$r = s_sum_ent( $r , $b );\n\t\t}\n\t\treturn $r;\n\t}\n\n\tfunction s_sum_ent( $a , $b ){\n\t\t$a = array_reverse( str_split( ''.$a ) );\n\t\t$b = array_reverse( str_split( ''.$b ) );\n\n\n\t\tif (count($a) < count($b) ){\n\t\t\t$tmp = $a;\n\t\t\t$a = $b;\n\t\t\t$b = $tmp;\n\t\t}\n\n\t\tfor ( $i = count($b) ; $i < count($a) ; $i ++ ){\n\t\t\t$b[$i] = '0';\n\t\t}\n\n\t\t$c = array();\n\t\t$r = array();\n\n\t\tfor ($i = 0; $i < count($a) ; $i++) {\n\t\t\t$tmp = intval( $a[$i] ) + intval( $b[$i] );\n\t\t\tif ( isset( $c[ $i ] ) )\n\t\t\t\t$tmp += $c[ $i ];\n\n\t\t\t$r[$i] = ( $tmp % 10 );\n\t\t\t$c[$i + 1 ] = ( $tmp - $r[$i] ) / 10;\n\t\t}\n\t\tif (isset( $c[ count($a) ] ) )\n\t\t\t$r[ count($a) ] = $c[ count($a) ];\n\n\t\t$r = array_reverse( $r );\n\t\tforeach ($r as $key => &$value) {\n\t\t\tif ($value == '0')\n\t\t\t\t$value = '';\n\t\t\telseif( $value != '' )\n\t\t\t\tbreak;\n\n\t\t}\n\t\t$r = implode( '', $r );\n\n\t\treturn $r;\n\t}", "lang": "PHP", "bug_code_uid": "60576b6d9d826cd11c846c69b2c3d1da", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "d00aef52925a6ab2581c6ff795ccbf9f", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7424749163879598, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "997869ce593e76b4b9e840a305af4159", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "6467e40d56e10431a4e095f276e11dc4", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.35398230088495575, "equal_cnt": 16, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 15, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "66b5b90b1e4152ed95f79d5aab208f5b", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "02cdb095c9e0bd4e1e3c249839200f06", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8671023965141612, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d1f9d2f15d4470425b6eeea84e950074", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "21fe5e6f390be26448df9f27e794747e", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8733905579399142, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7dacdfb2ee4c21215219720f4da728c6", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "06555c582d5340915b9ce22edf252157", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4276315789473684, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a82e7a205142581f511501000fdb9a57", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "af729136d729649ed8e9acd6a88fd624", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9795221843003413, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n $n -= $a[$i];\n $i++;\n $count++;\n if ($n == 0) {\n break;\n }\n}\n\necho $count;\n", "lang": "PHP", "bug_code_uid": "70530447d8dc80c028a25718135e49fb", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "apr_id": "40bb71516a42fd89d90e86b35e58d651", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8170974155069582, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": " 7)\n{\n $b = floor($a / 7) * 2;\n $c = $a - floor($a / 7) * 7;\n if($c == 1)\n {\n print $b . \" \" . ($b + 1);\n }\n elseif($c == 2)\n {\n print $b . \" \" . ($b + 2);\n }\n else\n {\n print $b . \" \" . $b;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "453e75faded9f919b10639a990b907f8", "src_uid": "8152daefb04dfa3e1a53f0a501544c35", "apr_id": "cd3f32e7d3e390b77431a10a677c6552", "difficulty": 900, "tags": ["brute force", "math", "constructive algorithms", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.34265734265734266, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "= 9) {\n $max = floor($n / 9) * 4;\n $r = $n % 9;\n if ($r == 6) {\n $max += 1;\n } else if ($r >= 7) {\n $max += 2;\n }\n $min = floor($n / 7) * 2;\n $r = $n % 7;\n if ($r == 6) {\n $min += 1;\n }\n} else if ($n == 8) {\n $max = 3;\n $min = 2;\n} else if ($n < 8) {\n $max = 2;\n if ($n <= 5) {\n $min = 0;\n }\n}\nprint $min . \" \" . $max;\n?>\n\n", "lang": "PHP", "bug_code_uid": "9e421e6ec0abc21707d75cc2db56c58b", "src_uid": "8152daefb04dfa3e1a53f0a501544c35", "apr_id": "305c2b27c749fcbf2390a4417960327d", "difficulty": 900, "tags": ["brute force", "math", "constructive algorithms", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9959839357429718, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "41a05c5f36575a17967434d26dd686fe", "src_uid": "8152daefb04dfa3e1a53f0a501544c35", "apr_id": "1c845818036edd3680c24999801230cc", "difficulty": 900, "tags": ["brute force", "math", "constructive algorithms", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6285266457680251, "equal_cnt": 11, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 10, "bug_source_code": " 1 && $n <= 7) {\n $min = 0;\n $max = 2;\n } else {\n if(fmod($n, 7) == 0) {\n $min = $n/7*2;\n $max = $n/7*2;\n } else if(fmod($n, 7) == 1) {\n $min = ($n - fmod($n, 7))/7*2;\n $max = ($n - fmod($n, 7))/7*2 + 1;\n } else {\n $min = ($n - fmod($n, 7))/7*2;\n $max = ($n - fmod($n, 7))/7*2 + 2;\n }\n }\n \n echo $min. ' ' . $max;\n?>", "lang": "PHP", "bug_code_uid": "20b4cccd34811857649583b421224d10", "src_uid": "8152daefb04dfa3e1a53f0a501544c35", "apr_id": "897617d8f296838a70d9298ba9a0cd69", "difficulty": 900, "tags": ["brute force", "math", "constructive algorithms", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5100563153660499, "equal_cnt": 15, "replace_cnt": 8, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": "= 1 && $n <= 1000000 && $n === int($n)) {\n if($n <= 7) {\n $min = 0;\n $max = 2;\n } else {\n if(fmod($n, 7) == 0) {\n $min = $n/7*2;\n $max = $n/7*2;\n } else if(fmod($n, 7) == 1) {\n $min = ($n - fmod($n, 7))/7*2;\n $max = ($n - fmod($n, 7))/7*2 + 1;\n } else {\n $min = ($n - fmod($n, 7))/7*2;\n $max = ($n - fmod($n, 7))/7*2 + 2;\n }\n }}\n \n echo $min. ' ' . $max;\n?>", "lang": "PHP", "bug_code_uid": "e5573d4ee05fd0e7aa2d9eb7e105690b", "src_uid": "8152daefb04dfa3e1a53f0a501544c35", "apr_id": "897617d8f296838a70d9298ba9a0cd69", "difficulty": 900, "tags": ["brute force", "math", "constructive algorithms", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.869195751138088, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5b060d9512f9bb34b82cf0481e228595", "src_uid": "9a40e9b122962a1f83b74ddee6246a40", "apr_id": "2ec10d01a0eb05990a8ecdb816b83107", "difficulty": 800, "tags": ["bitmasks", "greedy", "implementation", "brute force", "strings", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7966101694915254, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": " $asc) {\n\t\t$asc = ord(substr($len, $x, 1));\n\t\t$count = 1;\n\t} else if (ord(substr($len, $x, 1)) = $asc) {\n\t\t$count++;\n\t}\n}\nreturn str_repeat(chr($asc), $count);\n}\n\n// End of submission file\n// Submission by chaotic_iak\n?>", "lang": "PHP", "bug_code_uid": "18d65f5f07f8db0b1c2d2a5b4e943512", "src_uid": "9a40e9b122962a1f83b74ddee6246a40", "apr_id": "1ffbc8979110f30ae8446f0c91dd3be6", "difficulty": 800, "tags": ["bitmasks", "greedy", "implementation", "brute force", "strings", "binary search"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9797297297297297, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " $asc) {\n\t\t$asc = ord(substr($len, $x, 1));\n\t\t$count = 1;\n\t} else if (ord(substr($len, $x, 1)) == $asc) {\n\t\t$count++;\n\t}\n}\nreturn str_repeat(chr($asc), $count);\n}\n\n// End of submission file\n// Submission by chaotic_iak\n?>", "lang": "PHP", "bug_code_uid": "32b40ef3e57fb97fcb5befca2ecbf156", "src_uid": "9a40e9b122962a1f83b74ddee6246a40", "apr_id": "1ffbc8979110f30ae8446f0c91dd3be6", "difficulty": 800, "tags": ["bitmasks", "greedy", "implementation", "brute force", "strings", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.48138297872340424, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= $b))\n{\n $e = $a - $c - 1;\n $f = 60 - ($d - $b);\n if(strlen($e) == 1)\n {\n $g = \"0\" . $e;\n }\n else\n {\n $g = $e;\n }\n if(strlen($f) == 1)\n {\n $h = \"0\" . $f;\n }\n else\n {\n $h = $f;\n }\n print $g . \":\" . $h;\n}\nelseif(($c >= $a) && ($d <= $b))\n{\n $e = 24 + $a - $c;\n $f = $b - $d;\n if(strlen($e) == 1)\n {\n $g = \"0\" . $e;\n }\n else\n {\n $g = $e;\n }\n if(strlen($f) == 1)\n {\n $h = \"0\" . $f;\n }\n else\n {\n $h = $f;\n }\n print $g . \":\" . $h;\n}\nelseif(($c >= $a) && ($d >= $b))\n{\n $e = 24 + $a - $c - 1;\n $f = 60 - ($d - $b);\n if(strlen($e) == 1)\n {\n $g = \"0\" . $e;\n }\n else\n {\n $g = $e;\n }\n if(strlen($f) == 1)\n {\n $h = \"0\" . $f;\n }\n else\n {\n $h = $f;\n }\n print $g . \":\" . $h;\n}\n?>", "lang": "PHP", "bug_code_uid": "20746b3b85bb4c5c305b43fca2aa532c", "src_uid": "595c4a628c261104c8eedad767e85775", "apr_id": "1446188ceea9f88236385cc07ff48c1e", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9975825946817083, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "=0 && $split_text[1]>=0){\n\t\t$result = $split_text[0] + $split_text[1];\n\t\techo '0 '.$result.' '.$result.' 0';\n\t}\n\telseif ($split_text[0]<0 && $split_text[1]>=0) {\n\t\t$result = abs($split_text[0]) + $split_text[1];\n\t\techo '-'.$result.' 0 0'.$result;\n\t}elseif ($split_text[0]<0 && $split_text[1]<0) {\n\t\t$result = $split_text[0] + $split_text[1];\n\t\techo $result.' 0 0 '.$result;\n\t}else{\n\t\t$result = $split_text[0] + abs($split_text[1]);\n\t\techo '0 -'.$result.' '.$result.' 0';\n\t}\n\t\t", "lang": "PHP", "bug_code_uid": "e169a657f1a4d7a534dd7b3068c4079a", "src_uid": "e2f15a9d9593eec2e19be3140a847712", "apr_id": "6d2ee43335d5e465c8694e73554bbf44", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6029411764705882, "equal_cnt": 10, "replace_cnt": 0, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b22e53920e4e1bd31e31e8fafe26dbb7", "src_uid": "e2f15a9d9593eec2e19be3140a847712", "apr_id": "0d816e365019bafb0c338f2e1f13c0a6", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.5885167464114832, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4250f041370b23d8e8c9a1fc4d25c2b1", "src_uid": "ff6b3fd358c758324c19a26283ab96a4", "apr_id": "4f0597c0ee24a1284ed629f12da0236a", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8387909319899244, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c31fa23b3bce8f5922e6112af2ff44d5", "src_uid": "ff6b3fd358c758324c19a26283ab96a4", "apr_id": "4f0597c0ee24a1284ed629f12da0236a", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2769028871391076, "equal_cnt": 19, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 18, "bug_source_code": "= $a)\n{\n $f = floor($c / $e);\n $g = $c % $e;\n $h = 0;\n $i = 0;\n $k = 0;\n for($x = 1; $x <= $f; $x++)\n {\n $h += $a * $d;\n if($b <= 0)\n {\n $i = 1;\n break;\n }\n else\n {\n $b -= $h;\n $k++;\n }\n }\n if($i == 1)\n {\n print $k;\n }\n else\n {\n if($g == 1)\n {\n $h += 2 * $d;\n $b -= $h;\n }\n if($b <= 0)\n {\n print $k + 1;\n }\n else\n {\n $b -= $h;\n $j = ceil($b / $d);\n print $k + 1 + $j;\n }\n }\n}\nelse\n{\n $f = ($c + 1) * $d;\n $b -= $f;\n if($b <= 0)\n {\n print \"1\";\n }\n else\n {\n $g = ceil($b / $d);\n print 1 + $g;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "76140174c910e22d7766f24775f4a795", "src_uid": "7cff20b1c63a694baca69bdf4bdb2652", "apr_id": "6efb05515dcdad0342e49d2031587b8d", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9716312056737588, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " 0)\n{\n\tif($nuts < $sectionCapacity)\n\t{\n\t\t++$nuts;\n\t\t--$numberOfNuts;\n\t\tcontinue;\n\t}\n\t\n\tif($sections < $numberOfDivisors && $sections < $maxSections)\n\t{\n\t\t$nuts = 0;\n\t\t\n\t\t++$sections;\n\t\t--$numberOfDivisors;\n\t\tcontinue;\n\t}\n\t++$numberOfBoxes;\n\t$sections = 0;\n\t$nuts = 0;\n}\n\necho $numberOfBoxes . PHP_EOL;", "lang": "PHP", "bug_code_uid": "cb146800d729a2bea4e1321aae8213c1", "src_uid": "7cff20b1c63a694baca69bdf4bdb2652", "apr_id": "717348d8c0988a162ea0d2e6758a8503", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8984375, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "=0;$i--){\n $r+=$i*$n[0];\n}\n$s=$r-$n[1];\necho $s;\n", "lang": "PHP", "bug_code_uid": "194817946bf52a4739b2d10ca9cda996", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "81ae7f5da5bb502936e40b27040839b6", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.845679012345679, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "$harga_pisang)?\"0\":($harga_pisang - $val[1]);\n?>", "lang": "PHP", "bug_code_uid": "5dc744c0113be73f3a721bfe0c8d9371", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "2f5060195028c8b2fca951d7db263b32", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9662337662337662, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " $sum) fwrite($stdout, 0);\n \nfwrite($stdout,$sum - $n);\n \nfclose($stdin);\nfclose($stdout);\n \n ?>", "lang": "PHP", "bug_code_uid": "754ad51bc74b1b346ecfbeb63f8d76fd", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "58df48022f654b1a6e5ff0ddf5f67428", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.927007299270073, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "346e589399625ce4636b3b0e99906597", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "86991b4443cacf9d896a3b2b6402a0d3", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8668941979522184, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6b22836ab56b4faa8c74c14078ab00d6", "src_uid": "4b51b99d1dea367bf37dc5ead08ca48f", "apr_id": "7a7f74dbc11b5baadf1146eee998ebaa", "difficulty": 1000, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9969325153374233, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "da2a1b611e9d21a723309b33a6986243", "src_uid": "4b51b99d1dea367bf37dc5ead08ca48f", "apr_id": "7a7f74dbc11b5baadf1146eee998ebaa", "difficulty": 1000, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.24489795918367346, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2cc871e2e86ccd2b964bbab8954d6c91", "src_uid": "4b51b99d1dea367bf37dc5ead08ca48f", "apr_id": "45f3c2cd31f251b79ee06b6568e363d2", "difficulty": 1000, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7565656565656566, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= $b)\n {\n $d = $x;\n break;\n }\n array_splice($e, 0, $x);\n if(count($e) == 0)\n {\n break;\n }\n }\n if($d != 0)\n {\n break;\n }\n}\nif($d == 0)\n{\n print \"-1\";\n}\nelse\n{\n print $d;\n}\n?>", "lang": "PHP", "bug_code_uid": "c9ad187f8c571e40befa1fa10f1c718c", "src_uid": "acb8a57c8cfdb849a55fa65aff86628d", "apr_id": "5c5fc34c9a222c3135f609a5fe7ec568", "difficulty": 1700, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9922480620155039, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "($s[1]*2))){\n break;\n }\n $s[0]=$s[0]*3;\n $s[1]=$s[1]*2;\n $years++;\n}\necho $years;\n?>", "lang": "PHP", "bug_code_uid": "370357d4f1d591591007a05d150be78e", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "32ef1d4cdec3e20f42061ee2f692d5e6", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9921875, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= $b) {\n $a *= 3;\n $b *= 2;\n \n $year++;\n}\n\necho $year;", "lang": "PHP", "bug_code_uid": "9c02c1c9ab3671dda808712942adb0c7", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "b2e1161c6da1061c20521f27af27b6e7", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.98125, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "$Bob)\n\t{\n\t\techo \"$i\";\n\t\tbreak;\n\t}\n}", "lang": "PHP", "bug_code_uid": "c05006780297b0273a16598ad85b7dc5", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "4677037b2d0eaf546863a247302ebae5", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7482517482517482, "equal_cnt": 13, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 12, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e057a7dfe516c0ea589ece96aaa3ab34", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "a59d68ec259fbcb276d8658b4eee4366", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9985228951255539, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "dcd4732607ecd2aa74ee2fc9220a6c07", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "a59d68ec259fbcb276d8658b4eee4366", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6519823788546255, "equal_cnt": 4, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " $b)\n\t\t{\n\t\t\techo $counter;\n\t\t\tbreak;\n\t\t}\n\t}\n\n?>", "lang": "PHP", "bug_code_uid": "ae12711da5f2e5995837ce85581f7fcd", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "470a131260cb9587b31a908e63d3f841", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.935672514619883, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": " $n2*2){\n\t\techo $i;\n\t\tbreak;\n\t}\n\telse{\n\t\t$n1 *= 3;\n\t\t$n2 *= 2;\n\t}\n}\n?>", "lang": "PHP", "bug_code_uid": "c2f5e8298cb26103ada1b1113f0d721f", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "apr_id": "446b860b6973361dd84a09d4c3180898", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9590909090909091, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bda26e7bd70649553b941b216eeaf25c", "src_uid": "9a955ce0775018ff4e5825700c13ed36", "apr_id": "ba2dc364cccf6b5eb4b4639cce731434", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9662576687116564, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5460fe1727a6a7cd58da9ce4df0e9228", "src_uid": "9a955ce0775018ff4e5825700c13ed36", "apr_id": "c18bbafe3a6660f36e339422a9474c89", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9808429118773946, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": " -1 && $iS % 2 == 0 ? 'Yes' : 'No';", "lang": "PHP", "bug_code_uid": "b44a3dddee9795a4dedce70300b1573d", "src_uid": "9a955ce0775018ff4e5825700c13ed36", "apr_id": "223187747f5e920980a1fc5a0b4bf434", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.582901554404145, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f834698491d49ac252b2d5d9d2b59564", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "ec55b0bd41abd1a38ea4e90b7084464e", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9903846153846154, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $item) {\n if ($item == 1) {\n $answer = $a[$i][$j];\n\n break;\n }\n }\n\n return $answer;\n}\n\n$r = 0;\n$a = [\n [4, 3, 2, 3, 4],\n [3, 2, 1, 2, 3],\n [2, 1, 0, 1, 2],\n [3, 2, 1, 2, 3],\n [4, 3, 2, 3, 4],\n];\n\nfor ($i = 0; $i < 5; $i++) {\n $s = fscanf($input, \"%d %d %d %d %d\\n\");\n\n $r = foo($s, $i, $a);\n\n if ($r) {\n break;\n }\n}\n\nfwrite($output, $r);\n", "lang": "PHP", "bug_code_uid": "7f930a6fca162d51c6b3be5ba369152f", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "809cccf3461c89570118a04fe7fb7f85", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5267080745341615, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "878e18a0709f30a534c6a17a1e34c96d", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "97bca32162c473401ebe01ccfb460328", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9858585858585859, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "57458d2a026a7b9628218062f7495f05", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "f88501f1a6bdf349806720df681f3c00", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.967741935483871, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5a16ab2e1c8d601ac591853e35e3cf02", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "d276dabf9607839697eef85ae320da62", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8447729672650475, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f65631cbb49d6aff270665ce2598de46", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "apr_id": "c8a4fcae5199f67cff713c363c1ea8e6", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.998998998998999, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ce8f1f4fb7254573ed32cf340fb2ad08", "src_uid": "fe74313abcf381f6c5b7b2057adaaa52", "apr_id": "1c893eed90eed15726f13c75b05ba064", "difficulty": 1000, "tags": ["brute force", "constructive algorithms", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9459815546772069, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "dd57b0484cbfbb6e336e81c44ba1e447", "src_uid": "fe74313abcf381f6c5b7b2057adaaa52", "apr_id": "af69e7e4d172cc6e17ca226b4a14d8a9", "difficulty": 1000, "tags": ["brute force", "constructive algorithms", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8082489146164978, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2c8fcbb39adeec4071545bfa4a6258e0", "src_uid": "8b6ae2190413b23f47e2958a7d4e7bc0", "apr_id": "248c179cba6a8aa93739f9594b951e25", "difficulty": 1100, "tags": ["brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9938650306748467, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "9b466edc6439a5e87427f0f0dbdb4c45", "src_uid": "8b6ae2190413b23f47e2958a7d4e7bc0", "apr_id": "8c8410ee71438b1eb72d91112894625e", "difficulty": 1100, "tags": ["brute force", "constructive algorithms"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.998766954377312, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "7e3c186386165e3e0ddc77b9430facd4", "src_uid": "8b6ae2190413b23f47e2958a7d4e7bc0", "apr_id": "8c8410ee71438b1eb72d91112894625e", "difficulty": 1100, "tags": ["brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5754060324825986, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2792bfd6c74abb172febbb7d7648e7d3", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "6d69aae15384c0f27867d97b6f489d46", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3182711198428291, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "0);\ndo\n{\n++$count2;\n$n -=$a;\n} \nwhile ($n>0);\necho $count1*$count2;\n?>", "lang": "PHP", "bug_code_uid": "13e7a8d31a1be752f484097c0713ddc1", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "158a6b6d31ce1f08fa7e6a824a5b2709", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9984276729559748, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "abb9aa57ccac4824360f60b3c58ee55e", "src_uid": "0bc7bf67b96e2898cfd8d129ad486910", "apr_id": "246d5770dfb6b470027e5a05e1928ead", "difficulty": 1300, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9952904238618524, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "af2a4033464a5ccf01aa99e7e7150ee4", "src_uid": "0bc7bf67b96e2898cfd8d129ad486910", "apr_id": "246d5770dfb6b470027e5a05e1928ead", "difficulty": 1300, "tags": ["math", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7121771217712177, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": " 0) {\n $vars ++;\n }\n $tempVars = 0;\n $countMode = false;\n if ($nuts[$i+1] == '0') {\n $countMode = true;\n }\n }\n}\nif ($vars == 0) {\n echo '1';\n} else {\n echo $vars;\n}\n\n?>", "lang": "PHP", "bug_code_uid": "66f048cae6db2ee352500b19f381266b", "src_uid": "58242665476f1c4fa723848ff0ecda98", "apr_id": "2a417625db638f44e30618ff61a64924", "difficulty": 1300, "tags": ["combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9680851063829787, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "fscanf(STDIN, \"%s\", $str);\necho preg_match_all(\"/(C{1,5})|(P{1,5})/\", $str, $matchesarray);", "lang": "PHP", "bug_code_uid": "b160cb7265ceb8266eccade8879c279d", "src_uid": "5257f6b50f5a610a17c35a47b3a0da11", "apr_id": "5dc776d6a75c44f52f611d2dc8de95de", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.294234592445328, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7f828b849182ce9b3ce05e9f5a84db32", "src_uid": "75f3835c969c871a609b978e04476542", "apr_id": "bd07165c10b410ae5fc64a34ace4f48e", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8458781362007168, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $b)\n{\n $c = $a % $b;\n if($c == 0)\n {\n print $a + $b;\n }\n else\n {\n $d = $b - $c;\n print $a + $d;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "215237fbd564ed8e43467101713f40f1", "src_uid": "75f3835c969c871a609b978e04476542", "apr_id": "bd07165c10b410ae5fc64a34ace4f48e", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9990176817288802, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $e))\n {\n print \"-1\";\n }\n else\n {\n print \"1\";\n }\n}\nelseif($c > $a)\n{\n $e = floor($c / $a);\n $f = $e % 2;\n $g = ceil($e / 2);\n $h = $e + $g;\n $i = $a / 2;\n $j = ($e / 2) * 3;\n if($f == 0)\n {\n if(($b <= (0 - $a)) || ($b >= $a) || ($b == 0))\n {\n print \"-1\";\n }\n else\n {\n \n if(($b > (0 - $a)) && ($b < 0))\n {\n print $j;\n }\n elseif(($b > 0) && ($b < $a))\n {\n print $j + 1;\n }\n }\n }\n else\n {\n if(($b <= (0 - $i)) || ($b >= $i))\n {\n print \"-1\";\n }\n else\n {\n print $h;\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "d500912bdac7dc5d1308071e056ae9e3", "src_uid": "cf48ff6ba3e77ba5d4afccb8f775fb02", "apr_id": "419100d68f1430eb8c4af2de92a5f454", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9827338129496402, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": " $value) { \n\t\tif($value > $bigger){\n\t\t\t$bigger = $value;\n\t\t\t$bigger_key = $key;\n\t\t}\t\t\n\t}\n}\necho $bigger_key;", "lang": "PHP", "bug_code_uid": "13a524be8193955d82e0824adffeb92e", "src_uid": "639b8b8d0dc42df46b139f0aeb3a7a0a", "apr_id": "5ca2006e56c539a1c354f8a2cb729d84", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9917355371900827, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "98f3c852b452ab04874241ee57b42673", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "6c0ee6c871c8a05d9133f967c0583c14", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9987849331713244, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "dfd4cac80747b3c961e32282a37fb020", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "3cb1fdfbde048a7a92883909960554f8", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9767441860465116, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a8f4de5400d75d29e7ba8b3748d5d523", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "baacd62594fdf7122c031e8291829368", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9847185985836749, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8b07478a85143895b9fadb87355b2a9c", "src_uid": "f838fae7c98bf51cfa0b9bd158650b10", "apr_id": "3b20c5b89879206c60893469f3210ecc", "difficulty": 1400, "tags": ["dp", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.09370743666575865, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2312f6dfb20eacb3a04b005da28be386", "src_uid": "f838fae7c98bf51cfa0b9bd158650b10", "apr_id": "3b20c5b89879206c60893469f3210ecc", "difficulty": 1400, "tags": ["dp", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2822085889570552, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f9e0ba3b2884a0a3951c162603201695", "src_uid": "9d52ff51d747bb59aa463b6358258865", "apr_id": "7c3fc5bf68d766f5d4629c3184c17052", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.47549909255898365, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c2ddd14c792daa770b92e66c72380c20", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "2c7bb6a9442e1cde6665667d062cce69", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4772313296903461, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0664649fa5cc589d07b94cdcea381011", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "2c7bb6a9442e1cde6665667d062cce69", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9980806142034548, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $puzzles_sets[$j+1]) {\n $buf = $puzzles_sets[$j+1];\n $puzzles_sets[$j+1] = $puzzles_sets[$j];\n $puzzles_sets[$j] = $buf;\n }\n }\n}\n$arr_min = array();\nfor ($i = 0; $i < $m - $n + 1; $i++) {\n $arr_min[$i]['difference'] = $puzzles_sets[$i+$n-1] - $puzzles_sets[$i];\n $arr_min[$i]['first'] = $i;\n}\n$min = min($arr_min);\n$k = $min['first'];\nprint($k);", "lang": "PHP", "bug_code_uid": "b067e88dbdfacbd9de2ce416b0b83caa", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "094655d3d14f14e02c4791a4b0d00240", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5170068027210885, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d407856c16f185e943b842a356f7d0c1", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "89629c6aa5e3f8ae6fc76a1c6c9bec49", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9855769230769231, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0b264d9464103c30c282bfdb7128d80c", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "2710c8753e25740d84cf0b75d3bd4062", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.27938671209540034, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "= $m) return 1020;\n\t\n\t$r1 = f($i+1, $n-1, $m, max($maxi, $v[$i]), min($mini, $v[$i]), $v);\n\t$r2 = f($i+1, $n, $m, $maxi, $mini, $v);\n\treturn min($r1, $r2);\n}\n\nfscanf(STDIN, \"%d %d\", $a, $b);\n$v = explode(' ', trim(fgets(STDIN)));\nprintf(\"%d\",f(0, $a, $b, -1, 1020, $v));\n?>\n", "lang": "PHP", "bug_code_uid": "96ea496002a81666f2046fdc7d83db7d", "src_uid": "7830aabb0663e645d54004063746e47f", "apr_id": "2710c8753e25740d84cf0b75d3bd4062", "difficulty": 900, "tags": ["greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9814585908529048, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= max(1, $a - 1 - 100000); $x--)\n{\n $c = str_split($x);\n $d = array_sum($c);\n $e = $x + $d;\n if($a == $e)\n {\n $b[count($b)] = $x;\n }\n}\nif(count($b) == 0)\n{\n print \"0\";\n}\nelse\n{\n print count($b) . \"\\n\";\n for($x = 0; $x < count($b); $x++)\n {\n print $b[$x] . \"\\n\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "2f06159eca8429aade027a9cafb6de2a", "src_uid": "ae20ae2a16273a0d379932d6e973f878", "apr_id": "526f257f658e3cb4b871e5e399b08b66", "difficulty": 1200, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7808471454880295, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cae53804880912b4b3e4abe141698423", "src_uid": "c74537b7e2032c1d928717dfe15ccfb8", "apr_id": "9862a659d4c40148bc80f4351656358c", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.05982905982905983, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6d36bea62718eba9475cce410243c17b", "src_uid": "c74537b7e2032c1d928717dfe15ccfb8", "apr_id": "264363bfae4c1561d9affeb6866e51bf", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.966044142614601, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $c and $c < (3 * $a)) {\necho $c; \n}elseif ($b + $a < (3 * $a)) {\n \n echo $a + $b;\n}else echo 3 * $a;\n \n}elseif ($x == 2) {\n if ($b < (2 * $a) and $b < 2 * $c) {\n echo $b;\n }elseif (2 * $c < $x * $a) { echo 2 * $c; }else echo $x * $a ;\n}else echo $x * $a;\n\n?>", "lang": "PHP", "bug_code_uid": "3c6c1e3088dcf2e77484a7783cd1ae10", "src_uid": "c74537b7e2032c1d928717dfe15ccfb8", "apr_id": "a6910bea57a5ccbb115cf9f18c44c788", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.19899589228662712, "equal_cnt": 28, "replace_cnt": 21, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 27, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "90504d10336cf4ce8f577935248f80b9", "src_uid": "75d062cece5a2402920d6706c655cad7", "apr_id": "8432377d51bd1fd67ca26cdda039f4b8", "difficulty": 1400, "tags": ["dp", "greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9047619047619048, "equal_cnt": 10, "replace_cnt": 1, "delete_cnt": 6, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": " 31, 2 => 28, 3 => 31, 4 => 30, 5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31);\n$m_2 = array(1 => 31, 2 => 29, 3 => 31, 4 => 30, 5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31);\n$n = 0;\nif($c % 4 == 1)\n{\n if($g[1] <= 12)\n {\n if($g[0] <= $m[intval($g[1])])\n {\n if(($g[0] == 29) && ($g[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $g[0];\n $p = $g[1];\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($h[1] <= 12)\n {\n if($h[0] <= $m[intval($h[1])])\n {\n if(($h[0] == 29) && ($h[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $h[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $h[0];\n $p = $h[1];\n $r = $h[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($i[1] <= 12)\n {\n if($i[0] <= $m[intval($i[1])])\n {\n if(($i[0] == 29) && ($i[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $i[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $i[0];\n $p = $i[1];\n $r = $i[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($j[1] <= 12)\n {\n if($j[0] <= $m[intval($j[1])])\n {\n if(($j[0] == 29) && ($j[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $j[0];\n $p = $j[1];\n $r = $j[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($k[1] <= 12)\n {\n if($k[0] <= $m[intval($k[1])])\n {\n if(($k[0] == 29) && ($k[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $k[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $k[0];\n $p = $k[1];\n $r = $k[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($l[1] <= 12)\n {\n if($l[0] <= $m[intval($l[1])])\n {\n if(($l[0] == 29) && ($l[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $l[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $l[0];\n $p = $l[1];\n $r = $l[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($n == 1)\n {\n print \"YES\";\n }\n else\n {\n print \"NO\";\n }\n}\nelse\n{\n if($g[1] <= 12)\n {\n if($g[0] <= $m_2[intval($g[1])])\n {\n if(($g[0] == 29) && ($g[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $g[0];\n $p = $g[1];\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($h[1] <= 12)\n {\n if($h[0] <= $m_2[intval($h[1])])\n {\n if(($h[0] == 29) && ($h[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $h[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $h[0];\n $p = $h[1];\n $r = $h[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($i[1] <= 12)\n {\n if($i[0] <= $m_2[intval($i[1])])\n {\n if(($i[0] == 29) && ($i[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $i[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $i[0];\n $p = $i[1];\n $r = $i[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($j[1] <= 12)\n {\n if($j[0] <= $m_2[intval($j[1])])\n {\n if(($j[0] == 29) && ($j[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $g[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $j[0];\n $p = $j[1];\n $r = $j[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($k[1] <= 12)\n {\n if($k[0] <= $m_2[intval($k[1])])\n {\n if(($k[0] == 29) && ($k[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $k[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $k[0];\n $p = $k[1];\n $r = $k[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($l[1] <= 12)\n {\n if($l[0] <= $m_2[intval($l[1])])\n {\n if(($l[0] == 29) && ($l[1] == 2) && ($g[2] % 4 == 0))\n {\n $o = 1;\n $p = 3;\n $r = $l[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n else\n {\n $o = $l[0];\n $p = $l[1];\n $r = $l[2] + 18;\n if($c > $r)\n {\n $n = 1;\n }\n elseif($c == $r)\n {\n if($b > $p)\n {\n $n = 1;\n }\n elseif($b == $p)\n {\n if($a >= $o)\n {\n $n = 1;\n }\n }\n }\n }\n }\n }\n if($n == 1)\n {\n print \"YES\";\n }\n else\n {\n print \"NO\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "031be83f99b412d93d7daf0c654e255e", "src_uid": "5418c98fe362909f7b28f95225837d33", "apr_id": "cb55a4b01bea899c68365693370c1c4a", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.961038961038961, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "43451a7fdc3771f80646b5a96905080a", "src_uid": "9c5b6d8a20414d160069010b2965b896", "apr_id": "8ff67b8614652df3325ea884b1a88c4d", "difficulty": 800, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9461077844311377, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "=$b){\n\t$res+=$a;\n\t$c=floor(($a+$r)/$b);\n\t$r=($a+$r)%$b;\n\t$a=$c;\n}\necho $res+$a;\n?>", "lang": "PHP", "bug_code_uid": "ef1eb9f6db83888080f7f6613d065e23", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "8e6ae48e62a91ea967a5b708e9ea863a", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.753577106518283, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " 0);\n\nfunction make($a, $b) {\n return (int) ($a / $b);\n}\n\nfunction remain($a, $b) {\n return $a > $b ? $a % $b : 0;\n}\n\necho $hour;\n", "lang": "PHP", "bug_code_uid": "b87bb9868c12626164e1274b1a316a0d", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "61f1fe0b2e26c6ec205bd1bb331f514e", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5979899497487438, "equal_cnt": 17, "replace_cnt": 6, "delete_cnt": 7, "insert_cnt": 4, "fix_ops_cnt": 17, "bug_source_code": "= 1){\n $h += $nh;\n } else {\n echo $h;\n return;\n }\n\n}", "lang": "PHP", "bug_code_uid": "3836e50246ea095bf377c1e996b46ff0", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "8e40e759f4e0730438f4a8686d1c7498", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9552238805970149, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "=$nf){\n $t = floor($f/$nf);\n $r = $f%$nf;\n $h += $t;\n $a = $t + $r;\n}\necho $h;\n", "lang": "PHP", "bug_code_uid": "9a3bebd1e44bbaa4db1a86f1ec83f46b", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "8e40e759f4e0730438f4a8686d1c7498", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6280667320902846, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "= 1 ) {\necho \"a=$a b=$b col=$col end=$end \\n\";\n $col += $a;\n $end += $a % $b;\n $a = intval($a / $b);\n\n if (($end / $b) >= 1) {\n $a += ($end - ($end % $b)) / $b;\n $end = $end % $b;\n }\n}\n\necho $col;\n\n?>\n", "lang": "PHP", "bug_code_uid": "6cc5981e3d5bdbf0fad1eaeed97337d4", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "0264a123d46bf8377bde83eb8f4f60db", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8794326241134752, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " 0) {\n $a = intval($a / $b);\n $answer += $a;\n}\n\nprint $answer;\n", "lang": "PHP", "bug_code_uid": "eed8a9133b7b59815b2d014126d82f5a", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "572df047f5d30f0e00757fdc6ab705c2", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8817891373801917, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "= $step)\n return $count + RecCount((int) ($count / $step), $step);\n return $count;\n}\necho RecCount($a, $b);", "lang": "PHP", "bug_code_uid": "ffda8c1affae3604923ff5dc64db9ec6", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "134f6595b4848fde06a1098664a518e6", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6367924528301887, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "$b){\n $t = floor($a/$b);\n $r = $a%$b;\n $n += $t;\n $a = $t + $r;\n\n}\n\necho \"$n\\n\";\n", "lang": "PHP", "bug_code_uid": "7dcc70f13a5e5522f323ad753fafcd7a", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "8d0437f0010f867785728be9f938450f", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.35414725069897485, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5f169c34041e6649c4aea17967babc7c", "src_uid": "36b7478e162be6e985613b2dad0974dd", "apr_id": "695276e94386b4188479b6b0b16830f2", "difficulty": 1300, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9982638888888888, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= (ceil($m_boy_finger/2)-1) && $v_girl_finger <= ($m_boy_finger + 2) ) {\n\t\techo \"YES\";\n\t\texit(0);\n\t}\n}\n\necho \"NO\";\nexit(0);\n", "lang": "PHP", "bug_code_uid": "57a09697b1b305ad2d5a44adca7f9191", "src_uid": "36b7478e162be6e985613b2dad0974dd", "apr_id": "136b28248292fd3cd54537fe2b3ce1a3", "difficulty": 1300, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8488888888888889, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "070ab02b8445f3bd42dd7144ea270042", "src_uid": "36b7478e162be6e985613b2dad0974dd", "apr_id": "aaf443e2c9c68716741b797c5f092dbe", "difficulty": 1300, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.941738299904489, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " Change case, Ignore otherwise \n\nif(ctype_lower($arr[0])) {\n $cond1 = true;\n}\n\nif(ctype_upper($arr[0])) {\n $cond2 = true;\n}\n\n\nif($cond1) {\n for($i=1; $i 1) {\n $str = strtolower($str);\n echo ucwords($str).\"\\n\";\n} else if(ctype_upper($arr[0]) && $flag2 == strlen($str)) {\n $str = strtolower($str);\n echo $str.\"\\n\";\n} else {\n echo $str.\"\\n\";\n}\n", "lang": "PHP", "bug_code_uid": "66629c18628868c374ac89518e1e4aaf", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "e824f1ccff5da93def0a800164ed36c4", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9964982491245623, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " ord('a'),\n\t'A' => ord('A')\n\t);\n\t\n\t$decodesList = array();\n\t\n\t\nfunction code($char)\n{\n\treturn isset($codesList[$char]) ? $codesList[$char] : ($codesList[$char] = ord($char));\n}\n\nfunction opposite($char)\n{\n\tif(!isset($decodesList[$char]))\n\t{\n\t\t$base = code('a') - code('A');\n\t\t\n\t\t$charCode = code($char);\n\t\t$decodesList[$char] = chr($charCode >= code('a') ? $charCode - $base : $charCode + $base);\n\t}\n\t\n\treturn $decodesList[$char];\n}\n\n$stdin = fopen('php://stdin', 'r');\n\n$result = trim(fgets($stdin));\n$str = str_split($result);\n\n$isWrong = false;\n\n\n\nif((code($str[0]) >= code('a') && (!isset($str[1]) || code($str[1]) < code('a'))) || (code($str[0]) < code('a') && isset($str[1]) && code($str[1]) < code('a')))\n{\n\t$isWrong = true;\n\tfor($i = 2; $i < count($str); $i++)\n\t{\n\t\tif( code($str[$i]) >= code('a'))\n\t\t{\n\t\t\t$isWrong = false;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nif($isWrong )\n{\n\t$result = '';\n\t\t\n\tforeach($str as $char)\n\t{\t\t\n\t\t$result .= opposite($char);\n\t}\n}\n\necho $result;\n", "lang": "PHP", "bug_code_uid": "ac2ae9363bfa00b837d3c81abd137e7d", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "4c7c09cb7a647ac8354504d051393e2a", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8514056224899599, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "13b8d8e7d5a72b0182774a879f925d8c", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "25a921348f4816f2b955c30bdb18ce84", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.36472945891783565, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "734b50fb085a5aa082ff5f39b348aebc", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "25a921348f4816f2b955c30bdb18ce84", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8120805369127517, "equal_cnt": 12, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 11, "bug_source_code": " 0) $dH--;\n\tif ($gV % 2 > 0) $dH += (int) $dH / 2;\n\techo $dV + $dH . \"\\n\";\n?>", "lang": "PHP", "bug_code_uid": "c4b2563c08c32e7b3074d786483a147f", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "e9716862421e5b9fbfac4e0d91a9e806", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9840255591054313, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2c99a9f6fc7b45cce42b2a79c3010e71", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "d79d4704591fe5c29bca3bde4fa49082", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7489711934156379, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f715cd5c83dcfa20b170b4ef51e27880", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "2b80fddc283fe0c51d5b3810c5919ecf", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9674418604651163, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cd94660bb56715c2187e3febcdeec126", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "0094e88defb39332aabdbb8f0323c01f", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.921161825726141, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 1 )\n{\n echo intVal($s/2);\n}\n", "lang": "PHP", "bug_code_uid": "c14195a7551f291e22c8e5a483ef1081", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "b8f1d32c15297a7b345ea45c8c73a88d", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9333333333333333, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "85d173abed1c6105a70541531405102f", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "fbe5c41ab5c205debee4e70262f2dc2e", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9809523809523809, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "= 0; $x--)\n{\n if($a[$x] == $b[$f])\n {\n if($g == strlen($a))\n {\n if($h < $g - ($x + 1))\n {\n $h = $g - ($x + 1);\n }\n $g = $x + 1;\n }\n else\n {\n if($h < $g - ($x + 1) - 1)\n {\n $h = $g - ($x + 1) - 1;\n }\n $g = $x + 1;\n }\n $e[count($e)] = $x + 1;\n $f--;\n if($f < 0)\n {\n break;\n }\n }\n}\nif($h < $g - 1)\n{\n $h = $g - 1;\n}\n$e = array_reverse($e);\nfor($x = 0; $x < strlen($b) - 1; $x++)\n{\n if(($e[$x + 1] > $c[$x + 1]) && ($h < $e[$x + 1] - $c[$x] - 1))\n {\n $h = $e[$x + 1] - $c[$x] - 1;\n }\n}\nprint $h;\n?>", "lang": "PHP", "bug_code_uid": "e08312dca3496bc3045fba148bd0b349", "src_uid": "0fd33e1bdfd6c91feb3bf00a2461603f", "apr_id": "1c6b179a03c1026d7b67b7ca8cda6ca0", "difficulty": 1600, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9910714285714286, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $r2) $r = \"First\";\nif ($r2 > $r1) $r = \"Second\";\nif ($r1 == $r2) $r = \"Friendship\";\n\necho $r;\n?>\n", "lang": "PHP", "bug_code_uid": "26770af1eceb90a0962f539d94141ab9", "src_uid": "10226b8efe9e3c473239d747b911a1ef", "apr_id": "aa820826482806bd1e2c357e743419a1", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9953703703703703, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $b)\n echo \"First\";\nelse\n echo \"Second\";\n?>", "lang": "PHP", "bug_code_uid": "5eae0994e7370422e71acd685a8068bf", "src_uid": "10226b8efe9e3c473239d747b911a1ef", "apr_id": "15d2c76487d25368a3a231511dcb58d1", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9773299748110831, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " 0)\n{\n fwrite($stdout, \"LEFT\"); \n}\nelse if ($a < 0)\n{\n fwrite($stdout, \"RIGHT\");\n}\nelse\n{\n fwrite($stdout, \"TOWARDS\"); \n}", "lang": "PHP", "bug_code_uid": "a6bb0d8a9037c4676ab267aca4029fa7", "src_uid": "f6e132d1969863e9f28c87e5a44c2b69", "apr_id": "c9a51b47e9b0021418a514205ff84bdf", "difficulty": 1300, "tags": ["geometry"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8541666666666666, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "40231ebd7cb912b10023a47e0b7e1de6", "src_uid": "38c4864937e57b35d3cce272f655e20f", "apr_id": "1cd9a0ccd683e8273de3e627152972f5", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9893778452200304, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " ($b * 2)) && ($a > ($c * 2)) && ($a > ($d * 2))) || (($a <= ($b / 2)) && ($a <= ($c / 2)) && ($a <= ($d / 2))))\n{\n $e++;\n $f = \"A\";\n}\nif((($b > ($a * 2)) && ($b > ($c * 2)) && ($b > ($d * 2))) || (($b <= ($a / 2)) && ($b <= ($c / 2)) && ($b <= ($d / 2))))\n{\n $e++;\n $f = \"B\";\n}\nif((($c > ($a * 2)) && ($c > ($b * 2)) && ($c > ($d * 2))) || (($c <= ($a / 2)) && ($c <= ($b / 2)) && ($c <= ($d / 2))))\n{\n $e++;\n $f = \"C\";\n}\nif((($d > ($a * 2)) && ($d > ($b * 2)) && ($d > ($c * 2))) || (($d <= ($a / 2)) && ($d <= ($b / 2)) && ($d <= ($c / 2))))\n{\n $e++;\n $f = \"D\";\n}\nif($e == 1)\n{\n print $f;\n}\nelse\n{\n print \"C\n}\n?>", "lang": "PHP", "bug_code_uid": "d1c875ead432da0fd67d380922be81fa", "src_uid": "30725e340dc07f552f0cce359af226a4", "apr_id": "c9f279c03cbae857ccdce26c78debbc7", "difficulty": 1300, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.23877068557919623, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8ede95bd4e37e10de70cb67d8b39e355", "src_uid": "0af400ea8e25b1a36adec4cc08912b71", "apr_id": "89c885a285a33a6b01cca74e2deec394", "difficulty": 1200, "tags": ["implementation", "constructive algorithms", "bitmasks", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9930209371884346, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a3c3703fa46f9c1c2d74b98d1ae969f5", "src_uid": "0b51a8318c9ec0c80c0f4dc04fe0bfb3", "apr_id": "1f46d486a2b0039f0723d1101fc40508", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9969230769230769, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "61f450584776278441a92b2882184e5c", "src_uid": "0b51a8318c9ec0c80c0f4dc04fe0bfb3", "apr_id": "d9c5a60de24a532baf7920ccc05b1f17", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9938080495356038, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " 0) {\n $strout .= substr($strin, 0, 1);\n $strin = substr($strin, $i, $length - $i);\n $length -= $i;\n $i++;\n}\n\necho $strout;\n", "lang": "PHP", "bug_code_uid": "79b567a0d35ddef239ee96c672f7b2af", "src_uid": "08e8c0c37b223f6aae01d5609facdeaf", "apr_id": "9a53b3cf7fa046230b7749e3bdf4898b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8819875776397516, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ba09359e74f851517ddd39b0182530d9", "src_uid": "08e8c0c37b223f6aae01d5609facdeaf", "apr_id": "98200f39a0b67f28ded74ccb231cb04a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9214285714285714, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "14f94193fbe98fa90b3f3cc6ab51930b", "src_uid": "8e81ad7110552c20297f08ad3e5f8ddc", "apr_id": "0130f6154d5d837bd10ba3fff8c7c7c7", "difficulty": 800, "tags": ["dp", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9640831758034026, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1)\n {\n print \"15\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "a86dc2b6c66175fde2d3129bbd7fc3ac", "src_uid": "5802f52caff6015f21b80872274ab16c", "apr_id": "aca669841f98b3785033392661d8544d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.99375, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "d2787231ae7c4907907509fac3dee86b", "src_uid": "5802f52caff6015f21b80872274ab16c", "apr_id": "275b27181e98d1cabdf59339d2dd44b5", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9988328664799253, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 16))\n {\n print \"NO\";\n }\n else\n {\n array_splice($b, 0, $c);\n if(count($b) == 0)\n {\n print \"NO\";\n }\n else\n {\n array_unshift($b, \" \");\n unset($b[0]);\n $g = array_search(\"/\", $b);\n if($g == 0) ////////// \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0441\u043b\u0435\u0448\u0430 //////////\n {\n if((count($b) < 1) && (count($b) > 32))\n {\n print \"NO\";\n }\n else\n {\n for($x = 1; $x <= count($b); $x++)\n {\n if($f2 == 0)\n {\n break;\n }\n else\n {\n $f2 = 0;\n for($y = 0; $y < count($e2); $y++)\n {\n if($b[$x] == $e2[$y])\n {\n $f2 = 1;\n break;\n }\n }\n }\n }\n if($f2 == 0)\n {\n print \"NO\";\n }\n else\n {\n if(($b[count($b)] == \".\") || ($b[1] == \".\"))\n {\n print \"NO\";\n }\n else\n {\n array_push($b, \".\");\n $j = 0;\n for($x = 1; $x <= count($b); $x++)\n {\n if(($b[$x] == \".\") && ($b[$x + 1] == \".\"))\n {\n $j = 1;\n }\n elseif($b[$x] == \".\")\n {\n $h = array_slice($b, 0, $x - 1);\n array_splice($b, 0, $x);\n $x = 0;\n array_unshift($b, \" \");\n unset($b[0]);\n if((count($h) < 1) && (count($h) > 16))\n {\n $j = 1;\n }\n }\n }\n if($j == 1)\n {\n print \"NO\";\n }\n else\n {\n print \"YES\";\n }\n }\n }\n }\n }\n else ////////// \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0448 \u0435\u0441\u0442\u044c //////////\n {\n array_splice($b, $g - 1);\n array_unshift($b, \" \");\n unset($b[0]);\n if((count($b) < 1) && (count($b) > 32))\n {\n print \"NO\";\n }\n else\n {\n for($x = 1; $x <= count($b); $x++)\n {\n if($f2 == 0)\n {\n break;\n }\n else\n {\n $f2 = 0;\n for($y = 0; $y < count($e2); $y++)\n {\n if($b[$x] == $e2[$y])\n {\n $f2 = 1;\n break;\n }\n }\n }\n }\n if($f2 == 0)\n {\n print \"NO\";\n }\n else\n {\n if(($b[count($b)] == \".\") || ($b[1] == \".\"))\n {\n print \"NO\";\n }\n else\n {\n array_push($b, \".\");\n $j = 0;\n for($x = 1; $x <= count($b); $x++)\n {\n if(($b[$x] == \".\") && ($b[$x + 1] == \".\"))\n {\n $j = 1;\n }\n elseif($b[$x] == \".\")\n {\n $h = array_slice($b, 0, $x - 1);\n array_splice($b, 0, $x);\n $x = 0;\n array_unshift($b, \" \");\n unset($b[0]);\n if((count($h) < 1) && (count($h) > 16))\n {\n $j = 1;\n }\n }\n }\n if($j == 1)\n {\n print \"NO\";\n }\n else\n {\n $b = array_slice($b, 0, $g - 1);\n array_unshift($b, \" \");\n unset($b[0]);\n $m = array_search(\"/\", $k);\n $l = array_slice($k, $m);\n for($x = 0; $x < count($l); $x++)\n {\n if($f3 == 0)\n {\n break;\n }\n else\n {\n $f3 = 0;\n for($y = 0; $y < count($e); $y++)\n {\n if($l[$x] == $e[$y])\n {\n $f3 = 1;\n break;\n }\n }\n }\n }\n if(($f3 == 0) || (count($l) > 16))\n {\n print \"NO\";\n }\n else\n { \n print \"YES\";\n }\n }\n }\n }\n }\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "212221d4ddb65112d8eac53f8c0bbb42", "src_uid": "2a68157e327f92415067f127feb31e24", "apr_id": "866880306c0de59ee33a6317a1f7815c", "difficulty": 1900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9987577639751553, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "';\n\n if (is_array($data)) {\n print_r($data);\n } else {\n var_dump($data);\n }\n\n if ($die) {\n die();\n }\n\n echo '';\n}\n\nfunction stdin() {\n $stdin = @fopen('data.txt', 'r');\n if (!$stdin) {\n $stdin = fopen('php://stdin', 'r');\n }\n\n return $stdin;\n}\n\nfunction g() {\n global $stdin;\n return trim(fgets($stdin));\n}\n\n$stdin = stdin();\n/****************************************************** Solving block *****************************************************/\n$id = g();\n\n$word = \"[a-z0-9_]{1,16}\";\n$correct = preg_match(\"/^$word@(($word\\.)+$word)(\\/$word)?$/i\", $id, $matches);\n$correct = $correct && strlen($matches[1]) && strlen($matches[1]) < 33;\n\necho $correct ? 'YES' : 'NO';\n\n?>", "lang": "PHP", "bug_code_uid": "c420aca08456866934da8fdb69466d27", "src_uid": "2a68157e327f92415067f127feb31e24", "apr_id": "44a37e2bd392c66eb226e7c2bede2bfc", "difficulty": 1900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8435897435897436, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "54d8129685face943995f6f434f59c23", "src_uid": "7dd098ec3ad5b29ad681787173eba341", "apr_id": "0600bcc0789b8b46e439e8d9061e08da", "difficulty": 1000, "tags": ["math", "brute force", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5796178343949044, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "$k)\n\t{\n\t\t$pos1[$j++]=$i;\n\t\tif(count($pos1)==2)\n\t\t{\t\n echo $arrSize-1-($pos1[1]-$pos1[0]);\n $flag=1;\n\t\t\tbreak;\n }\n\t}\n\n}\nif($flag==0)\necho \"$arrSize\";\n", "lang": "PHP", "bug_code_uid": "40e4345d2d4a75478e52e93e02210ffb", "src_uid": "ecf0ead308d8a581dd233160a7e38173", "apr_id": "01554bcb29b9da66374f7ec4c235799c", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.932111142938986, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": " $solverSkill && $lastProblemDifficulty > $solverSkill)\n {\n return 0;\n }\n \n for($problemsCounter = 0; $problemsCounter < $problemsCount; $problemsCounter++)\n {\n if($problemDifficulty[$problemsCounter] <= $solverSkill)\n {\n $maximumSolvedProblems++;\n unset($problemDifficulty[$problemsCounter]);\n }\n \n if($problemDifficulty[$problemsCounter] > $solverSkill)\n {\n break;\n }\n }\n \n if(count($problemDifficulty) > 0) {\n $reversedArray = array_reverse($problemDifficulty);\n for($problemsCounter = 0; $problemsCounter < count($problemDifficulty); $problemsCounter++)\n {\n if($reversedArray[$problemsCounter] <= $solverSkill)\n {\n $maximumSolvedProblems++;\n unset($reversedArray[$problemsCounter]);\n }\n \n if($reversedArray[$problemsCounter] > $solverSkill)\n {\n break;\n }\n }\n }\n \n return $maximumSolvedProblems;\n}\n?>\n\n", "lang": "PHP", "bug_code_uid": "ce9e6431e0e81719be152cc7b16cd571", "src_uid": "ecf0ead308d8a581dd233160a7e38173", "apr_id": "7c9aa087b77601e3bd9dcfa31da0f40b", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8198019801980198, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "0):\n $a=substr($s, $n, 1);\nif (ord($a)<91) $a=chr(ord($a)+32);\nswitch ($a){\ncase \"a\": case'y':case'i':case'o':case'e':case'o': $a='.';}\nprint $a;\n$n++;\nendwhile; \n?>", "lang": "PHP", "bug_code_uid": "2a8f4d2f32c01af61b85461a737c6dc8", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "7e84e15ad6fb9b9cd4a5e76865d4cdcb", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9970501474926253, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "aec38c2a2c908c7bb0a50c032754337d", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "9e27e88405ba6c4c463821af86f56db5", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8675914249684742, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "d3ee70cbb485faaf0053374501b4d426", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "apr_id": "9705fca198baa35ca2e43a78b9b0df70", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9833333333333333, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a87890baf6514a665332f85bfeb99f22", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "apr_id": "4b48dc93abb1f7649f2a2cd4f164a9ad", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9941972920696325, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "42a5d49f61ae6d7a581871ad4bc2e4a7", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "apr_id": "55db5ae4dfb066501199079fc936dfcc", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4937833037300178, "equal_cnt": 13, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": "\ufeff", "lang": "PHP", "bug_code_uid": "17a47321af20205a43e2a15f93163417", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "apr_id": "bb319042afed6e3022c896d86f33a069", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6156583629893239, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ebdfb65dca939f897651c58e45c7334c", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "apr_id": "bb319042afed6e3022c896d86f33a069", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9923664122137404, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= $m){\n $result = $m - $n;\n}else{\n $result = 0;\n while($m != $n){\n if($m % 2 == 1 || $m < $n){\n $m++;\n }else{\n $m = $m/2;\n }\n $result++;\n }\n}\necho $result;", "lang": "PHP", "bug_code_uid": "3000d0a4a778a926b540e97626f0b138", "src_uid": "861f8edd2813d6d3a5ff7193a804486f", "apr_id": "5101eb1a741ef44753b678038687b549", "difficulty": 1400, "tags": ["dfs and similar", "greedy", "shortest paths", "math", "implementation", "graphs"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9987931450639633, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7da7601711532125677059da7640a9d0", "src_uid": "073023c6b72ce923df2afd6130719cfc", "apr_id": "1e2b8f289dc411af9a91e2c39b10c023", "difficulty": 1200, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9822222222222222, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0a3aed0b26989f8cc1f96efe72827d3a", "src_uid": "47c07e46517dbc937e2e779ec0d74eb3", "apr_id": "dcfeb02acc7443a519610792e71c5434", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8095238095238095, "equal_cnt": 7, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "= $distance\n && $numbers[1] - $numbers[2] >= $distance\n && $numbers[2] - $numbers[0] >= $distance) {\n echo 0;\n exit();\n}\n\n$left = min($numbers);\n$right = max($numbers);\nif ($right === $left) {\n $middle = $left;\n} else {\n\n $middle = false;\n\n foreach ($numbers as $number) {\n if ($number < $right && $number > $left) {\n $middle = $number;\n }\n }\n if ($middle === false) {\n $right_keys = array_keys($numbers, $right);\n if (count($right_keys) > 1) {\n $middle = $right;\n } else {\n $middle = $left;\n }\n }\n}\n\n$current_left_distance = $middle-$left;\n$current_right_distance = $right-$middle;\n\n$result = ($distance-$current_left_distance) + ($distance-$current_right_distance);\necho $result;\nexit;\n\n\n\n\n", "lang": "PHP", "bug_code_uid": "f6ff57045417f10798576d68cd31cf21", "src_uid": "47c07e46517dbc937e2e779ec0d74eb3", "apr_id": "a9cd45bc3ad2c428bf583c3ed6b17c26", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9003601440576231, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b8d8c227af15ce0495e06a53b8af0cdb", "src_uid": "bae7cbcde19114451b8712d6361d2b01", "apr_id": "d48407c46f6f704ddee6211cf88c7776", "difficulty": 1800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4015151515151515, "equal_cnt": 30, "replace_cnt": 16, "delete_cnt": 5, "insert_cnt": 8, "fix_ops_cnt": 29, "bug_source_code": "= 0) && ($a[1] >= 0))\n {\n $b++;\n }\n else\n {\n break;\n }\n}\nprint $b;\n?>", "lang": "PHP", "bug_code_uid": "b6ba11a6d2b65faa9f716be349d78bf8", "src_uid": "bae7cbcde19114451b8712d6361d2b01", "apr_id": "d48407c46f6f704ddee6211cf88c7776", "difficulty": 1800, "tags": ["greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.37706342311033886, "equal_cnt": 19, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 18, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "000f6a660b3770564f64315f6a45f3b6", "src_uid": "f9bc04aed2b84c7dd288749ac264bb43", "apr_id": "d008014a2afa13134736d7cde8f66b10", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8773333333333333, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "01a7ef9da05dca1d22852557f618de0e", "src_uid": "ad105c08f63e9761fe90f69630628027", "apr_id": "d741ef31a21f2fbd2d68e9e957b3cca4", "difficulty": 1700, "tags": ["geometry", "math", "implementation", "brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9991063449508489, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $maxx ? $x2 : $maxx) : $x2;\n\t$miny = isset($miny) ? ($y1 < $miny ? $y1 : $miny) : $y1;\n\t$maxy = isset($maxy) ? ($y2 > $maxy ? $y2 : $maxy) : $y2;\n\t$allpoints = array_merge($allpoints, array(\"$x1 $y1\", \"$x2 $y2\"));\n}\nif ($minx == $maxx || $miny == $maxy) {\n\tdie('NO');\n}\n\nif ($xx != 2 || $yy != 2) {\n\tdie('NO');\n}\n\n$counts = array_count_values($allpoints);\nif (count($counts) != 4) {\n\tdie('NO');\n}\nforeach ($counts as $val) {\n\tif ($val != 2) {\n\t\tdie('NO');\n\t}\n}\n\necho 'YES';\n//fclose($r);\n", "lang": "PHP", "bug_code_uid": "34f1fe659f98bb4d825509ace012916f", "src_uid": "ad105c08f63e9761fe90f69630628027", "apr_id": "333f5d9d38c41ae368eb60947c6adee0", "difficulty": 1700, "tags": ["geometry", "math", "implementation", "brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9553235908141963, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "a = $a;\n\t\telse\n\t\t\t$this->a = array($a[2], $a[3], $a[0], $a[1]);\n\t}\n\tpublic static function create($a, $b, $c, $d) {\n\t\treturn new Segment(array($a, $b, $c, $d));\n\t}\n\t// public function __is_equal($other) {\n\t// \treturn $this->a == $other->a;\n\t// }\n\tpublic function __toString() {\n\t\treturn implode(', ', $this->a);\n\t} \n}\n\n$sa = array();\n$M = 10**9;\n$min_x = $M; $max_x = -$M;\n$min_y = $M; $max_y = -$M;\nfor ($i = 0; $i < 4; $i++) {\n\t$a = array_map(\"intval\", explode(' ', fgets(STDIN)));\n\t$min_x = min($min_x, min($a[0], $a[2]));\n\t$max_x = max($max_x, max($a[0], $a[2]));\n\t$min_y = min($min_y, min($a[1], $a[3]));\n\t$max_y = max($max_y, max($a[1], $a[3]));\n\t$sa[$i] = new Segment($a);\n}\n$sb = array(\n\tSegment::create($min_x, $min_y, $max_x, $min_y),\n\tSegment::create($min_x, $min_y, $min_x, $max_y),\n\tSegment::create($max_x, $max_y, $max_x, $min_y),\n\tSegment::create($max_x, $max_y, $min_x, $max_y)\n);\n$equal = (array_diff($sa, $sb) == array());\nprint($equal && $min_x != $max_x && $min_y != $max_y ? \"YES\\n\" : \"NO\\n\");\n?>\n", "lang": "PHP", "bug_code_uid": "96f2d71b6bc38c31e54fc10921013083", "src_uid": "ad105c08f63e9761fe90f69630628027", "apr_id": "266c90ac4d64da676d51d76266643b92", "difficulty": 1700, "tags": ["geometry", "math", "implementation", "brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9794168096054888, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "ca14d79391ccc0e03c7f991cf9aff1e2", "src_uid": "64a842f9a41f85a83b7d65bfbe21b6cb", "apr_id": "eac50dd68135b679aa7df1bb45eeba63", "difficulty": 1200, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4168618266978923, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d2a4ca09ff65b1929dc4d55f27e88b9d", "src_uid": "64a842f9a41f85a83b7d65bfbe21b6cb", "apr_id": "80da453a8800ead68b04786352a6c19c", "difficulty": 1200, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8207547169811321, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": " $iFinalAns)\n\t\t\t$iFinalAns = $iSum[$i];\n\t}\n\n\techo $iFinalAns.\"\\n\";\n?>", "lang": "PHP", "bug_code_uid": "d526c7def7e1df72da908eccc58fe29a", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "apr_id": "4f47ae68e48e922ce1a5d303fa9b7477", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3914209115281501, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "\";\n?>", "lang": "PHP", "bug_code_uid": "9f8e6087b07941f74814052dd733ff66", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "apr_id": "4f47ae68e48e922ce1a5d303fa9b7477", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8988235294117647, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ac65414862f567139eecd53b81f83909", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "apr_id": "459ff7cd2acd6e16750f492f697bf1e9", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9014084507042254, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "67a5bb4f681f8923c477804bf25d5f3a", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "apr_id": "459ff7cd2acd6e16750f492f697bf1e9", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8592592592592593, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0952ef5601c7731d0e54576db34ca5d3", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "apr_id": "2af6f829047b16caf1a909b5a5c7ef03", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9967637540453075, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1bde654a70d594dfaf618244a5587100", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "apr_id": "4a5b20b9fc3e037dcb525af548f5640a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3288062902072909, "equal_cnt": 14, "replace_cnt": 8, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": "=1)&($n<=exp(5*log(10))))\n{\n\tfor($i=1; $i<=$n; $i++)\n\t{\n\t\t$s = trim(fgets($h));\n\t\t$user[$i]=$s;\n\t\t}\n\t\tfputs(STDOUT, \"Vihodnie dannie: \");\n\t\t$k[$user[1]]=0;\n\t\tfputs(STDOUT, \"OK \");\n\t\tfor ($i=2; $i<=$n; $i++)\n\t\t{\n\t\t\t$f=false;\n\t\t\tfor ($j=1; $j<=$i-1; $j++)\n\t\t\t{\n\t\t\t\tif ($user[$i]==$user[$j]) {$f=true; $k[$user[$i]]++; break;}\n\t\t\t\telse {$k[$user[$i]]=0;}\n\t\t\t\t}\n\t\t\t\tif ($f==false) \n\t\t\t\t\t{\n\t\t\t\t\t\tfputs(STDOUT, \"OK \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$s=$user[$i];\n\t\t\t\t\t\t\t$s.=$k[$user[$i]];\n\t\t\t\t\t\t\tfputs(STDOUT, \"$s\");\n\t\t\t\t\t\t\tfputs(STDOUT, \" \");\n\t\t\t\t\t\t\t}\n\t\t\t}\n\t}\n\telse\n\t{fputs(STDOUT, \"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd \ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd 1<=n<=10^5\");\n?>", "lang": "PHP", "bug_code_uid": "0247bea9f9b15e9d9ae9595d4ec1ed9a", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "apr_id": "4a5b20b9fc3e037dcb525af548f5640a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8041714947856315, "equal_cnt": 19, "replace_cnt": 7, "delete_cnt": 11, "insert_cnt": 1, "fix_ops_cnt": 19, "bug_source_code": "$fr = fopen(\"php://stdin\", \"r\");\n $fw = fopen(\"php://stdout\", \"w\");\n \n fscanf($fr, \"%s\", $r1);\n fscanf($fr, \"%s\", $r2);\n fscanf($fr, \"%s\", $r3); \n \n function chk()\n {\n global $r1, $r2, $r3;\n return ($r1[0] == $r3[2]) &&\n ($r1[1] == $r3[1]) &&\n ($r1[2] == $r3[0]) &&\n ($r2[0] == $r2[2]);\n }\n \n if (chk())\n {\n fprintf($fw, \"YES\");\n }\n else\n {\n fprintf($fw, \"NO\");\n }\n \n fclose($fr);\n fclose($fw);", "lang": "PHP", "bug_code_uid": "378c27e38a2e399602ba4a7418b42726", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "apr_id": "c228cf3c7a62c332d58e001052da0f25", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9902067464635473, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $fr = fopen(\"php://stdin\", \"r\");\n $fw = fopen(\"php://stdout\", \"w\");\n \n fscanf($fr, \"%s\", $r1);\n fscanf($fr, \"%s\", $r2);\n fscanf($fr, \"%s\", $r3); \n \n function chk()\n {\n global $r1, $r2, $r3;\n return ($r1[0] == $r3[2]) &&\n ($r1[1] == $r3[1]) &&\n ($r1[2] == $r3[0]) &&\n ($r2[0] == $r2[2]);\n }\n \n if (chk())\n {\n fprintf($fw, \"YES\");\n }\n else\n {\n fprintf($fw, \"NO\");\n }\n \n fclose($fr);\n fclose($fw);", "lang": "PHP", "bug_code_uid": "2b104bc79bb9c08dcd6ecf2f6f4786c4", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "apr_id": "68fcd2cd7fd63705f27bdf7491d15237", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6078028747433265, "equal_cnt": 2, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 0 && $iDiv > $z){\n echo '+';\n} elseif($iDiv > 0 && $iDiv < $z){\n echo '?';\n} elseif ($iDiv > 0 && $iDiv <= $z){\n echo '?';\n}\n\n\nelseif ($iDiv == 0 && $iDiv <= $z){\n echo '?';\n}\n\nelseif ($iDiv < 0 && $iDiv > $z){\n echo '-';\n} elseif($iDiv < 0 && $iDiv < $z){\n echo '?';\n} elseif($iDiv < 0 && $iDiv <= $z){\n echo '?';\n}\n\n elseif ($iDiv == 0 && $z == 0){\n echo '0';\n}\n\n\n\n\n\n", "lang": "PHP", "bug_code_uid": "ce87737e0ba793c37204384004735566", "src_uid": "66398694a4a142b4a4e709d059aca0fa", "apr_id": "9ec9489c6928b2234b2776560578545e", "difficulty": 800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9550173010380623, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 0 ? '+' : '0'));\n", "lang": "PHP", "bug_code_uid": "5aa8a7978eea97d5b7f80344c4899a5e", "src_uid": "66398694a4a142b4a4e709d059aca0fa", "apr_id": "a4e3b78c6ad9ed959b2effd96dc5dd61", "difficulty": 800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9497206703910615, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " $n2) {\n echo '+';\n} elseif ($n1 < $n2) {\n echo '-';\n} else {\n echo '?';\n}", "lang": "PHP", "bug_code_uid": "1a0256bfe9110e45037032fa6b20c94b", "src_uid": "66398694a4a142b4a4e709d059aca0fa", "apr_id": "6dea96ad3d7d87e09af93bde9bddbf7c", "difficulty": 800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9981323507142497, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $e)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a)\n {\n $h[$x] += 3;\n $i[$x] += $d;\n $j[$x] += $e;\n }\n if($g[$x] == $b)\n {\n $i[$x] += $e;\n $j[$x] += $d;\n }\n }\n}\nelseif($d == $e)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a)\n {\n $h[$x] += 1;\n $i[$x] += $d;\n $j[$x] += $e;\n }\n if($g[$x] == $b)\n {\n $h[$x] += 1;\n $i[$x] += $e;\n $j[$x] += $d;\n }\n }\n}\nelseif($d < $e)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a)\n {\n $i[$x] += $d;\n $j[$x] += $e;\n }\n if($g[$x] == $b)\n {\n $h[$x] += 3;\n $i[$x] += $e;\n $j[$x] += $d;\n }\n }\n}\nif($d2 > $e2)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a2)\n {\n $h[$x] += 3;\n $i[$x] += $d2;\n $j[$x] += $e2;\n }\n if($g[$x] == $b2)\n {\n $i[$x] += $e2;\n $j[$x] += $d2;\n }\n }\n}\nelseif($d2 == $e2)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a2)\n {\n $h[$x] += 1;\n $i[$x] += $d2;\n $j[$x] += $e2;\n }\n if($g[$x] == $b2)\n {\n $h[$x] += 1;\n $i[$x] += $e2;\n $j[$x] += $d2;\n }\n }\n}\nelseif($d2 < $e2)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a2)\n {\n $i[$x] += $d2;\n $j[$x] += $e2;\n }\n if($g[$x] == $b2)\n {\n $h[$x] += 3;\n $i[$x] += $e2;\n $j[$x] += $d2;\n }\n }\n}\nif($d3 > $e3)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a3)\n {\n $h[$x] += 3;\n $i[$x] += $d3;\n $j[$x] += $e3;\n }\n if($g[$x] == $b3)\n {\n $i[$x] += $e3;\n $j[$x] += $d3;\n }\n }\n}\nelseif($d3 == $e3)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a3)\n {\n $h[$x] += 1;\n $i[$x] += $d3;\n $j[$x] += $e3;\n }\n if($g[$x] == $b)\n {\n $h[$x] += 1;\n $i[$x] += $e3;\n $j[$x] += $d3;\n }\n }\n}\nelseif($d3 < $e3)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a3)\n {\n $i[$x] += $d3;\n $j[$x] += $e3;\n }\n if($g[$x] == $b3)\n {\n $h[$x] += 3;\n $i[$x] += $e3;\n $j[$x] += $d3;\n }\n }\n}\nif($d4 > $e4)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a4)\n {\n $h[$x] += 3;\n $i[$x] += $d4;\n $j[$x] += $e4;\n }\n if($g[$x] == $b4)\n {\n $i[$x] += $e4;\n $j[$x] += $d4;\n }\n }\n}\nelseif($d4 == $e4)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a4)\n {\n $h[$x] += 1;\n $i[$x] += $d4;\n $j[$x] += $e4;\n }\n if($g[$x] == $b4)\n {\n $h[$x] += 1;\n $i[$x] += $e4;\n $j[$x] += $d4;\n }\n }\n}\nelseif($d4 < $e4)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a4)\n {\n $i[$x] += $d4;\n $j[$x] += $e4;\n }\n if($g[$x] == $b4)\n {\n $h[$x] += 3;\n $i[$x] += $e4;\n $j[$x] += $d4;\n }\n }\n}\nif($d5 > $e5)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a5)\n {\n $h[$x] += 3;\n $i[$x] += $d5;\n $j[$x] += $e5;\n }\n if($g[$x] == $b5)\n {\n $i[$x] += $e5;\n $j[$x] += $d5;\n }\n }\n}\nelseif($d5 == $e5)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a5)\n {\n $h[$x] += 1;\n $i[$x] += $d5;\n $j[$x] += $e5;\n }\n if($g[$x] == $b5)\n {\n $h[$x] += 1;\n $i[$x] += $e5;\n $j[$x] += $d5;\n }\n }\n}\nelseif($d5 < $e5)\n{\n for($x = 0; $x < 4; $x++)\n {\n if($g[$x] == $a5)\n {\n $i[$x] += $d5;\n $j[$x] += $e5;\n }\n if($g[$x] == $b5)\n {\n $h[$x] += 3;\n $i[$x] += $e5;\n $j[$x] += $d5;\n }\n }\n}\nfor($x = 0; $x < 4; $x++)\n{\n if($g[$x] == \"BERLAND\")\n {\n break;\n }\n}\n$k = $h[$x] + 3;\n$l = $h;\nrsort($l);\nif($l[1] > $k)\n{\n print \"IMPOSSIBLE\";\n}\nelse\n{ \n $m = array();\n $n = array();\n $o = array();\n $h[$ber] += 3;\n for($w = 0; $w <= 50; $w++)\n {\n for($x = 0; $x < $w; $x++)\n {\n $g2 = $g;\n $h2 = $h;\n $i2 = $i;\n $j2 = $j;\n $i2[$ber] = $i[$ber] + $w;\n $i2[$reb] = $i[$reb] + $x;\n $j2[$ber] = $j[$ber] + $x;\n $j2[$reb] = $j[$reb] + $w;\n for($y = 0; $y < 4; $y++)\n {\n for($z = 0; $z < 4; $z++)\n {\n if(($i2[$y] > $i2[$z]) && ($y > $z))\n {\n $p = $g2[$y];\n $r = $g2[$z];\n array_splice($g2, $y, 1);\n array_splice($g2, $z, 1, array($p, $r));\n $p = $h2[$y];\n $r = $h2[$z];\n array_splice($h2, $y, 1);\n array_splice($h2, $z, 1, array($p, $r));\n $p = $i2[$y];\n $r = $i2[$z];\n array_splice($i2, $y, 1);\n array_splice($i2, $z, 1, array($p, $r));\n $p = $j2[$y];\n $r = $j2[$z];\n array_splice($j2, $y, 1);\n array_splice($j2, $z, 1, array($p, $r));\n }\n }\n }\n for($y = 0; $y < 4; $y++)\n {\n for($z = 0; $z < 4; $z++)\n {\n if((($i2[$y] - $j2[$y]) > ($i2[$z] - $j2[$z])) && ($y > $z))\n {\n $p = $g2[$y];\n $r = $g2[$z];\n array_splice($g2, $y, 1);\n array_splice($g2, $z, 1, array($p, $r));\n $p = $h2[$y];\n $r = $h2[$z];\n array_splice($h2, $y, 1);\n array_splice($h2, $z, 1, array($p, $r));\n $p = $i2[$y];\n $r = $i2[$z];\n array_splice($i2, $y, 1);\n array_splice($i2, $z, 1, array($p, $r));\n $p = $j2[$y];\n $r = $j2[$z];\n array_splice($j2, $y, 1);\n array_splice($j2, $z, 1, array($p, $r));\n }\n }\n }\n for($y = 0; $y < 4; $y++)\n {\n for($z = 0; $z < 4; $z++)\n {\n if(($h2[$y] > $h2[$z]) && ($y > $z))\n {\n $p = $g2[$y];\n $r = $g2[$z];\n array_splice($g2, $y, 1);\n array_splice($g2, $z, 1, array($p, $r));\n $p = $h2[$y];\n $r = $h2[$z];\n array_splice($h2, $y, 1);\n array_splice($h2, $z, 1, array($p, $r));\n $p = $i2[$y];\n $r = $i2[$z];\n array_splice($i2, $y, 1);\n array_splice($i2, $z, 1, array($p, $r));\n $p = $j2[$y];\n $r = $j2[$z];\n array_splice($j2, $y, 1);\n array_splice($j2, $z, 1, array($p, $r));\n }\n }\n }\n if(($g2[0] == \"BERLAND\") || ($g2[1] == \"BERLAND\"))\n {\n array_push($m, $w);\n array_push($n, $x);\n array_push($o, $w - $x);\n }\n }\n }\n $s = min($o);\n $t = array();\n $v = array();\n for($x = 0; $x < count($o); $x++)\n {\n if($o[$x] == $s)\n {\n $t[$x] = $n[$x];\n $v[$x] = 1;\n }\n }\n $u = min($t);\n for($x = 0; $x < count($o); $x++)\n {\n if(($n[$x] == $u) && ($v[$x] == TRUE))\n {\n break;\n }\n }\n print $m[$x] . \":\" . $n[$x];\n}\n?>", "lang": "PHP", "bug_code_uid": "8e1044d911854b4b37b4907584f98caa", "src_uid": "5033d51c67b7ae0b1a2d9fd292fdced1", "apr_id": "190ee5ecc0b86bb2c7da06c46a9b48df", "difficulty": 1800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6495176848874598, "equal_cnt": 15, "replace_cnt": 11, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 14, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7e75b2e1758206d2ecc78c23f913fbba", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "apr_id": "294ace1270fcfe49010676910e6fa526", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6015037593984962, "equal_cnt": 17, "replace_cnt": 12, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 16, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "76622ea64f82f7989664bb9f323a1cf5", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "apr_id": "bba565b08979b30c9374699444e3f110", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9448584202682563, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": " '',\n\t\t\"\\n\" => '',\n\t);\n\treturn strtr(fgets($f), $r);\n}\n\nfunction readNumString($f) {\n\treturn trim(fgets($f));\n}\n\nfunction stringToArray($str) {\n\treturn str_split($str);\n}\n\nfunction readNum($f, $is_int = false) {\n\t$v = readNumString($f);\n\treturn $is_int ? intval($v) : floatval($v);\n}\n\nfunction readStringExplode($f, $delimiter = ' ') {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = 'trim';\n\treturn array_map($callf, $return);\n}\n\nfunction readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = $is_int ? 'intval' : 'floatval';\n\treturn array_map($callf, $return);\n}\n\n###### /IO ######\n\nfunction getAnswer($is_test = false, $f = false) {\n\tif ($is_test === false) {\n\t\t$f = STDIN;\n\t}\n\t/* begin body */\n\t$n = readNum($f);\n\t$nums = array(1 => 1);\n\t$row = 1;\n\t$max = 1;\n\twhile (true) {\n\t\t$total = array_sum($nums);\n\t\t$row++;\n\t\t$nums[$row] = $total + $row;\n\t\tif($total+$row>$n){\n\t\t\tbreak;\n\t\t}\n\t\t$max++;\n\t}\n\techo $max;\n\t/* / end body */\n}\n\nif (empty($is_test))\n\tgetAnswer();", "lang": "PHP", "bug_code_uid": "44142863b9ac17b197e6ba1757da6ab3", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "apr_id": "cfc1fe0a75eac954f0c1463eb069d648", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.944206008583691, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 0; ++$i)\n{\n $cnt += $i;\n $n -= $cnt;\n}\n$i -= 2;\necho \"$i\\n\";", "lang": "PHP", "bug_code_uid": "f70296eb90aa784bab6495b2c12ae72e", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "apr_id": "df1848cf825d12c2a281162ca094ff39", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9969135802469136, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "85d84265a4cc4b9f86564fcf4767c87c", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "apr_id": "2cdc7c73efbab7618ef534cd43078087", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.33070866141732286, "equal_cnt": 15, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 8, "fix_ops_cnt": 15, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "566caa3a20d49450025ee01fdd84dce9", "src_uid": "6c85175d334f811617e7030e0403f706", "apr_id": "57f77e25536a1896dbaec720a250b13a", "difficulty": 900, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.1594792514239219, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b78a023adc00e11d055f4209016fccd6", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "apr_id": "f8d171139d4281ee354ab2accc209f7d", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9962546816479401, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $n1) {\n echo \"Second\\n\";\n} else {\n echo \"First\\n\";\n}", "lang": "PHP", "bug_code_uid": "b1a3a22f92f58e8189f364823671c6e3", "src_uid": "aed24ebab3ed9fd1741eea8e4200f86b", "apr_id": "e358af9db94b11ee0be3bc159e01ef0e", "difficulty": 800, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9940298507462687, "equal_cnt": 9, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ba32bce0445e195788327a8bd7e22be8", "src_uid": "af07223819aeb5bd6ded4340c472b2b6", "apr_id": "0b9c22d96e42b966eeed07766f7b541e", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9988262910798122, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "718856498c175027e176e8ccebfb2c73", "src_uid": "12d451eb1b401a8f426287c4c6909e4b", "apr_id": "8c57d9c3645f75b9ed9f4d21462ad611", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9724409448818898, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1b05a2ebcd10c76afa1271fbbe5bb79e", "src_uid": "12d451eb1b401a8f426287c4c6909e4b", "apr_id": "e32e63848d6ef5cf39bba424e34b7d49", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9477477477477477, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "\n\n\n \n \n \n \n \n = $m){\n $m = $arr[$i];\n $id = $i;\n }\n }\n return $id;\n }\n\n $x = $arr[0];\n $id = max_($n, $arr);\n while($id != 0){\n $arr[$id]--;\n $arr[0]++;\n $id = max_($n, $arr);\n \n }\n print $arr[$id]-$x;\n //print_r($arr);\n ?>\n \n\n", "lang": "PHP", "bug_code_uid": "f1f8112b0332a2207f12caade56de22e", "src_uid": "aa8fabf7c817dfd3d585b96a07bb7f58", "apr_id": "12b518b48b7f497bfe579ae186745325", "difficulty": 1200, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9824561403508771, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $d - $e) {\n echo -1;\n exit;\n}\n\n\nasort($exs);\n\n$schedule = [];\n\nfor ($i = 1; $i <= $d; $i++) {\n\n if (isset($req[$i])) {\n\n if ($req[$i] != 0) {\n echo -1;\n exit;\n }\n\n $schedule[] = $e + 1;\n } else {\n\n $needBrake = true;\n\n foreach ($exs as $ex => $p) {\n\n if ($req[$ex] != 0 && $open[$ex] <= $i) {\n\n $needBrake = false;\n\n $req[$ex]--;\n $schedule[] = $p + 1;\n break;\n }\n }\n\n if ($needBrake) {\n $schedule[] = 0;\n }\n }\n}\n\necho implode(' ', $schedule);\n", "lang": "PHP", "bug_code_uid": "35e8ec5e9e7169c71fef1fd1e37f93cc", "src_uid": "02d8d403eb60ae77756ff96f71b662d3", "apr_id": "7b45ea81faa5b30325107d377d510fa2", "difficulty": 1700, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9676077265973254, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " 1, 2 => 1, 3 => 0);\n$c = 0;\nfor($x = 1; $x <= $a; $x++)\n{\n $d = trim(fgets(STDIN));\n if($b[$d] == TRUE)\n {\n if($d == 1)\n {\n $b[1] = 1;\n if($b[2] == 0)\n {\n $b[2] = 1;\n }\n elseif($b[2] == 1)\n {\n $b[2] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 2)\n {\n $b[2] = 1;\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 3)\n {\n $b[3] = 1;\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n }\n else\n {\n $c = 1;\n break;\n }\n}\nif($c == 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "7162744066f5502de01016b8b13828ab", "src_uid": "6c7ab07abdf157c24be92f49fd1d8d87", "apr_id": "b918fdd21c1caa99b25270d0f240907b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8205989364679541, "equal_cnt": 64, "replace_cnt": 8, "delete_cnt": 54, "insert_cnt": 1, "fix_ops_cnt": 63, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "86870214571804dc038cfdb2aa7f4780", "src_uid": "062a171cc3ea717ea95ede9d7a1c3a43", "apr_id": "2bb7ade4a7e88894ae30b8d3dfe810cf", "difficulty": 1300, "tags": ["dp", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9884225759768451, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0b26aa3c1965e380404832d95ef42a64", "src_uid": "062a171cc3ea717ea95ede9d7a1c3a43", "apr_id": "00e6d30725e618015bb292ace61d6a7f", "difficulty": 1300, "tags": ["dp", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.714107365792759, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8d0c4e163955046f5c002432eabeb6e5", "src_uid": "062a171cc3ea717ea95ede9d7a1c3a43", "apr_id": "00e6d30725e618015bb292ace61d6a7f", "difficulty": 1300, "tags": ["dp", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9732824427480916, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5acd4c0bcf47897042fdfe4ebbc45721", "src_uid": "d1f88a97714d6c13309c88fcf7d86821", "apr_id": "cc8bc7b1689b7c37ae2e79355249c840", "difficulty": 1900, "tags": ["greedy", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9891107078039928, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $p; $n--) {\n $b = true;\n if ($n%2 == 0) {\n continue;\n }\n for ($i = 3; $i <= $p; $i = $i+2) {\n if ($n/$i <= 4) {\n break;\n } else if ($n%$i == 0) {\n $b = false;\n break;\n }\n }\n if ($n > $p && $b) {\n $k = $n;\n break;\n }\n }\n\n echo $k;\n \n?>", "lang": "PHP", "bug_code_uid": "cda8a7660a51e1f6f496adb92274dab7", "src_uid": "b533203f488fa4caf105f3f46dd5844d", "apr_id": "7318367783404a727ac229938d3afbf9", "difficulty": 1400, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5214785214785215, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": "= $p; $n--) {\n if (in_array($n, $arr)) {\n continue;\n } else {\n $k = $n;\n break;\n }\n }\n echo $k;\n \n?>", "lang": "PHP", "bug_code_uid": "345c4fe09124ff150b21a71eaa93cff0", "src_uid": "b533203f488fa4caf105f3f46dd5844d", "apr_id": "7318367783404a727ac229938d3afbf9", "difficulty": 1400, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9990982867448152, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $p; $n--) {\n $b = true;\n if ($n%2 == 0) {\n continue;\n }\n for ($i = 3; $i <= $p; $i = $i+2) {\n if ($n/$i <= sqrt($n)) {\n break;\n } else if ($n%$i == 0) {\n $b = false;\n break;\n }\n }\n if ($n > $p && $b) {\n $k = $n;\n break;\n }\n }\n\n echo $k;\n \n?>", "lang": "PHP", "bug_code_uid": "986dd35b1db51ad3f1580646085189c8", "src_uid": "b533203f488fa4caf105f3f46dd5844d", "apr_id": "7318367783404a727ac229938d3afbf9", "difficulty": 1400, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.45982404692082113, "equal_cnt": 20, "replace_cnt": 14, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 19, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cf990c8948c390e7c3c9285362c6ad60", "src_uid": "c05d0a9cabe04d8fb48c76d2ce033648", "apr_id": "fa99ab360aa07456ecb5edb8cc6ecde7", "difficulty": 900, "tags": ["math", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.681265206812652, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1661ddd80937f71af6360da367ceb776", "src_uid": "e5e4ea7a5bf785e059e10407b25d73fb", "apr_id": "f6b3c90ad2d4b1b870687d5804333fc6", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9769392033542977, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "0; --$j) {\n if ( $q[$j] == 'G' && $q[$j-1] == 'B') {\n $z = $q[$j-1];\n $q[$j-1] = $q[$j];\n $q[$j] = $z;\n }\n }\n }\n\n put($q);\n\n\n if (++$COUNT > 1) {\n break;\n }\n\n}\n", "lang": "PHP", "bug_code_uid": "757a72ceefaff5428f44bd78f3b65a30", "src_uid": "964ed316c6e6715120039b0219cc653a", "apr_id": "beeaf9bb2e19a851ce6de8b3079c3cf1", "difficulty": 800, "tags": ["shortest paths", "constructive algorithms", "implementation", "graph matchings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9893333333333333, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8c87e3d1e6a7fa5b72f8473833c839e6", "src_uid": "964ed316c6e6715120039b0219cc653a", "apr_id": "3a58f3db08d531cd8dddcb6f9f92e824", "difficulty": 800, "tags": ["shortest paths", "constructive algorithms", "implementation", "graph matchings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6403940886699507, "equal_cnt": 13, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "0;$y--) {\n\t\t\tif ($var[$y] == 'G' && $var[$y-1] == 'B') {\n\t\t\t\t$var[$y] = 'B';\n\t\t\t\t$var[$y-1] = 'G';\n\t\t\t}\n\t\t}\n\t}\n\techo implode('',$var);", "lang": "PHP", "bug_code_uid": "0141644cfc3948512c9afc881bea49ed", "src_uid": "964ed316c6e6715120039b0219cc653a", "apr_id": "2d89014db2797b9da758a7d614515400", "difficulty": 800, "tags": ["shortest paths", "constructive algorithms", "implementation", "graph matchings"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7596153846153846, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "43a9c60859c924f451371621f89c4c5f", "src_uid": "95cb79597443461085e62d974d67a9a0", "apr_id": "40bf0d3ced06b960422b99f276e3a213", "difficulty": 1300, "tags": ["math", "constructive algorithms", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9931662870159453, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "$b)\n echo $b-$a;\nelseif (($min>$a)&&($min<$b))\n echo $min - $a;\nelse \n echo 0;\n?>", "lang": "PHP", "bug_code_uid": "8d1569fdbc219f3a3eadb329a7c8e967", "src_uid": "63b9dc70e6ad83d89a487ffebe007b0a", "apr_id": "7f0ffa10e8203946f3af744b1c12774e", "difficulty": 1100, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9888888888888889, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0d9de249e5dcaf26d164cfc754f787cb", "src_uid": "63b9dc70e6ad83d89a487ffebe007b0a", "apr_id": "6c13c8c535299d88a61f4c4306fc5b79", "difficulty": 1100, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.23645320197044334, "equal_cnt": 13, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": " 0)\n\t{\n\t\tfor($i=0;$i<=$x;$i++)\n\t\t{\n\t\t\tif($a[$i] >= $score)\n\t\t\t{\n\t\t\t\t$jlh=$jlh+1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\techo $jlh;\n\t\n\t\n\t\n\t\n?>", "lang": "PHP", "bug_code_uid": "797576f7ae5bc86c5040919f61494947", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "2b9dbb4bc3fd3fd44fc59b8d7d11f23c", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.997093023255814, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= intval($nilai_pembanding)) && intval($value) != 0)\n\t\t\t$jumlah = $jumlah + 1;\n\t}\n\n\techo $jumlah;\n\n?>", "lang": "PHP", "bug_code_uid": "705773a283b1454f5e01a58de61ddeb7", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "2b9dbb4bc3fd3fd44fc59b8d7d11f23c", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.14516129032258066, "equal_cnt": 12, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": " 0 ? ($b[(int)$a[1]] >= $b[$a[1]-1] ? $a[1]+1 : $a[1]) : 0;\n?>\n", "lang": "PHP", "bug_code_uid": "25eec05864e7ca1f5d03acd15f0c7f33", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "9b21c0a0c3717c50b9c7a32fcfe7ac69", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.926829268292683, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": " 0) {\n\t\tif($points[$i] >= $points[$k]) {\n\t\t\tarray_push($result, $points[$i]);\n\t\t} \n\t}\n}\n\nprintf(count($result));", "lang": "PHP", "bug_code_uid": "44a67f2fafccfeac030ca9fde5c4441a", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "0d0aea3baac43b55909278466777b1b3", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9940627650551315, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= 1 && $n <= 50) && ($k <= $n && $k >= 1) && count($scores) >= $n) {\n $needle = (int)$scores[$k-1];\n} else {\n answer(0);\n}\n\nif($needle <= 0 || $needle > 100) {\n answer(0);\n}\n\n$passed = 0;\n\nfor($i=0; $i < count($scores); $i++) {\n $score = (int)$scores[$i];\n\n if($score >= $needle && $score > 0 && $score <= 100) {\n $passed++;\n }\n}\n\nanswer($passed);", "lang": "PHP", "bug_code_uid": "7db5840e376caf28041a956d682d4c21", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "582d7ba4cf16f1c340f9cf8b5512c225", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.05007153075822604, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $mxRes) {\n\t\t\t$mxRes = $a[$i];\n\t\t}\n\t}\n\t$res2 = $mxRes + $m;\n\t$res1 = $mxRes + (int)($m / $n) + ($m % $n != 0);\n\n\tfwrite($out, $res1.\" \".$res2);\n\t// echo $res1.\" \".$res2;\n\n\t// while(!feof($in)) {\n\t// \t$a[$cnt++] = fgets($in);\n // \t\t// echo fgets($in) . \"
\";\n\t// }\n\n\t// for ($i = 0; $i < $cnt; $i++) { \n\t// \t# code...\n\t// \techo $a[$i].\"
\";\n\t// }\n\t// while () {\n\t// \t$cnt++;\n\t// \t$text = fgets($in);\n\t// \tfwrite($out, $text);\n\t// }\n\n\t// $text = fgets($in);\n\t\n\t// fwrite($out, $text);\n\n\n\n\n\tfclose($in);\n\tfclose($out);\n ?>", "lang": "PHP", "bug_code_uid": "dacef6d4346218ecdacaded3c79e98ab", "src_uid": "78f696bd954c9f0f9bb502e515d85a8d", "apr_id": "5c9a89f791acea634c7f5fbbd0529e22", "difficulty": 1100, "tags": ["implementation", "binary search"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6117179741807348, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $mxRes) {\n\t\t\t$mxRes = $a[$i];\n\t\t}\n\t}\n\t$res2 = $mxRes + $m;\n\t$res1 = $mxRes + (int)($m / $n) + ($m % $n != 0);\n\n\t//fwrite($out, $res1.\" \".$res2);\n print $res1 . \" \" . $res2;\n\n\n\n\t//fclose($in);\n\t//fclose($out);\n ?>", "lang": "PHP", "bug_code_uid": "f6683bdf1f1ef4fe1e9badaf7684bef3", "src_uid": "78f696bd954c9f0f9bb502e515d85a8d", "apr_id": "5c9a89f791acea634c7f5fbbd0529e22", "difficulty": 1100, "tags": ["implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9384615384615385, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $b) list($a,$b) = array($b,$a);\n\t$ans = 0;\n\tfor ($i = $b; $a > 0 && $i > 0; $i -= 2) {\n\t\t$ans++;\n\t\t$a--;\n\t}\n\techo $ans;\n?> ", "lang": "PHP", "bug_code_uid": "d7f0e72d28b1b4621cfd4e31868aca2f", "src_uid": "0718c6afe52cd232a5e942052527f31b", "apr_id": "de08c3cf1ceb33017a950f0bac907bdc", "difficulty": 1300, "tags": ["number theory", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9949238578680203, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 0 && $value >= $a[$k])\n\t\t$c++;\n\telse\n\t\tbreak;\necho $c;\n", "lang": "PHP", "bug_code_uid": "0d3468071bf34bda02bb6079a0596897", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "be754f9e0399504384a0731074a7b3e8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3333333333333333, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": " 0 ? $ballsArray[$place-1] : 0;\nfor ($i = $place; ($i >= $pl) || ($ballsArray[$i] == $ballsArray[$place-1]); $i++) {\n if ($ballsArray[$i]) {\n $count++;\n }\n}\n\necho $count;", "lang": "PHP", "bug_code_uid": "d0df306851cc6d79cc0c92f5a6fb922b", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "77a32ba93603b03c1f2501ceb2b1e383", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5793010752688172, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "= 1)\n {\n array_push($e, strlen($c[$x]));\n }\n}\nrsort($e);\nif(count($e) == 0)\n{\n print 0;\n}\nelse\n{\n print $e[0];\n}\n?>", "lang": "PHP", "bug_code_uid": "16cd5d74f25e72bb7fde18781024eb43", "src_uid": "13b5cf94f2fabd053375a5ccf3fd44c7", "apr_id": "f98b5b4748867794cdd961684635b55f", "difficulty": 1200, "tags": ["brute force", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9947643979057592, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "=2)&&($curMaxLen\n ", "lang": "PHP", "bug_code_uid": "9f1fc7a5a94628b64d4eda23bcdc09fb", "src_uid": "13b5cf94f2fabd053375a5ccf3fd44c7", "apr_id": "34d87e4c35b32b3581efb442fe763e3b", "difficulty": 1200, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9970348406226834, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $maxLen) $maxLen = $len; \n }\n else\n {\n $hasSubstr[$substr] = true;\n echo \"Adding substr: \" . $substr . \"\\n\";\n }\n }\n}\n/*\nfunction findPairs($string) {\n for ($i = 0; $i < strlen($string); $i++) {\n for ($j = 1; $j < strlen($string) - $i; $j++) {\n if ($string[$i] == $string[$i + $j]) {\n $pairs[] = array($i, $i + $j); \n $len = 1;\n }\n }\n }\n return $pairs;\n}\n\nfunction findLength($array, $string) {\n foreach ($array as $value) {\n if (max($value) > $last) $last = max($value);\n }\n for ($i = 0; $i <= strlen($string) - $last; $i++) {\n for ($j = 1; $j < strlen($string); $j++) {\n $index0 = $array[$i][0];\n $index1 = $array[$i][1];\n if ($string[$index0 + $j] == $string[$index1 + $j]) $len = $j + 1;\n else break;\n }\n }\n return $len;\n}\n\n$length = findLength(findPairs($line), $line);\n*/\nprint($maxLen);\n\n?>", "lang": "PHP", "bug_code_uid": "d5c544c1e2164086c908cbb03715416e", "src_uid": "13b5cf94f2fabd053375a5ccf3fd44c7", "apr_id": "564e4d7496317e04bd7e2c0fd2a1308e", "difficulty": 1200, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9921259842519685, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "16fb5c530c5f0c25277d456058728c17", "src_uid": "5dd5ee90606d37cae5926eb8b8d250bb", "apr_id": "b1c8e042c995597ff20a2c52382f3b24", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9564750134336378, "equal_cnt": 73, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 72, "fix_ops_cnt": 72, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f06413dadd4a42fe381baa866651f004", "src_uid": "8f0fad22f629332868c39969492264d3", "apr_id": "71f3aae89f91f317ba35e8622161f8f0", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.21864951768488747, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": " $item) {\n if ($item == 1) {\n $answer = $a[$i][$j];\n\n break;\n }\n }\n\n return $answer;\n}\n\n$r = 0;\n$a = [\n [4, 3, 2, 3, 4],\n [3, 2, 1, 2, 3],\n [2, 1, 0, 1, 2],\n [3, 2, 1, 2, 3],\n [4, 3, 2, 3, 4],\n];\n\nfor ($i = 0; $i < 5; $i++) {\n $s = fscanf($input, \"%d %d %d %d %d\\n\");\n\n $r = foo($s, $i, $a);\n\n if (!is_null($r)) {\n break;\n }\n}\n\nfwrite($output, $r);\n", "lang": "PHP", "bug_code_uid": "1c0356d0075e44cf3e5c2c685da8caa9", "src_uid": "b6e3f9c9b124ec3ec20eb8fcea075add", "apr_id": "c342f860e6df83cdc4ba43e4bd47f75d", "difficulty": 1500, "tags": ["brute force", "constructive algorithms", "implementation", "dsu"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9481132075471698, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "acd6ca2337ecf1c14fd685111f3e6168", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "apr_id": "9d7deec6429176e0261dcab246777931", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2001906577693041, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "48465f4e297c602c35d17dc22c0b02da", "src_uid": "c2e3aced0bc76b6484360563355d23a7", "apr_id": "2847cf1c871e2914a2c4f6687eabdc5a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9308452250274424, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "035859dbdd8cb0561b4f5208b3316dc6", "src_uid": "c2e3aced0bc76b6484360563355d23a7", "apr_id": "2847cf1c871e2914a2c4f6687eabdc5a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9882352941176471, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 1000000000) {\n die('n must be <1000000000');\n}\n\n$n = array_reverse(array_map('intval', str_split($n)));\n\nforeach ($n as $srb) {\n echo soroban09($srb) . \"\\n\";\n}", "lang": "PHP", "bug_code_uid": "b838ae5ca2fe00edf24c80607ac00049", "src_uid": "c2e3aced0bc76b6484360563355d23a7", "apr_id": "b83ffdb85db65c711c7cd2f537c5f5ea", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7851959361393324, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": " $b)\n {\n $d -= 3;\n }\n }\n if($e == 0)\n {\n print \"NO\\n\";\n }\n else\n {\n print \"YES\\n\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "3c770b58704010af6449ef857b09c14a", "src_uid": "cfd1182be98fb5f0c426f8b68e48d452", "apr_id": "8d4b1812854ba8d4b6950b51d5976704", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9962121212121212, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $b[1] && $b[0] > $b[2]) echo \"chest\";\nelse if($b[1] > $b[0] && $b[1] > $b[2]) echo \"biceps\";\nelse echo \"back\";\n\t\n?>", "lang": "PHP", "bug_code_uid": "bf343690832d7f19f432440a6fdc8d6b", "src_uid": "579021de624c072f5e0393aae762117e", "apr_id": "98c77a9a73adace989e8afb2936dbdc8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9847094801223242, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": " $k) || (($n == 1) && ($o == 1)) || (($k > $l) && ($o == 1)) || (($k == $l) && ($n == 1)) || ((($k - $l) > 1) && ($n == 1)))\n{\n $p = 1;\n}\nif($m == 0)\n{\n $r = 1;\n}\nif($k == $l)\n{\n $s = 1;\n}\nif($k > $l)\n{\n $t = 1;\n}\nif($p == 1)\n{\n print \"illegal\";\n}\nelseif($n == 1)\n{\n print \"the first player won\";\n}\nelseif($o == 1)\n{\n print \"the second player won\";\n}\nelseif($r == 1)\n{\n print \"draw\";\n}\nelseif($s == 1)\n{\n print \"first\";\n}\nelseif($t == 1)\n{\n print \"second\";\n}\n?>", "lang": "PHP", "bug_code_uid": "a0b09f2b8c49ae2c38c0168fd573e0a2", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "33a5d321875b8a131a7f3574e4d047a7", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9112322791712105, "equal_cnt": 20, "replace_cnt": 13, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 19, "bug_source_code": "1 ||$yCount>$xCount){\n echo \"illegal\";\n $gotResult = true;\n}\n\nif(!$gotResult){\n // //horizon\n // $success1 = $board[0][0].$board[1][0].$board[2][0];\n // $success2 = $board[0][1].$board[1][1].$board[2][1];\n // $success3 = $board[0][2].$board[1][2].$board[2][2];\n\n // //vertical\n // $success4 = $board[0][0].$board[0][1].$board[0][2];\n // $success5 = $board[1][0].$board[1][1].$board[1][2];\n // $success6 = $board[2][0].$board[2][1].$board[2][2];\n\n // //diagonal\n // $success7 = $board[0][0].$board[1][1].$board[2][2];\n // $success8 = $board[0][2].$board[1][1].$board[2][0];\n\n $n =count($board[0]);\n\n $xWin = 0;\n $yWin = 0;\n //Vertical and Horizontal\n //O(n^2)???\n for($i=0;$i<$n;$i++){\n $hStr = \"\";\n $vStr = \"\";\n \n for($j=0;$j<$n;$j++){\n $hStr .= $board[$i][$j];\n $vStr .= $board[$j][$i];\n }\n if($hStr ===\"XXX\" || $vStr ===\"XXX\"){\n $xWin +=1;\n }else if($hStr ===\"000\" || $vStr ===\"000\"){\n $yWin +=1;\n }\n }\n\n //Diagonal\n //O(n^2)???\n $lDia = \"\";\n $rDia = \"\";\n for($i=0;$i<$n;$i++){\n $lDia .=$board[$i][$i];\n $rDia .=$board[$i][$n-1-$i];\n }\n if($lDia ===\"XXX\" || $rDia===\"XXX\"){\n $xWin +=1;\n }else if($lDia ===\"000\" ||$rDia ===\"000\"){\n $yWin +=1;\n }\n \n if($xWin>0 && $yWin>0){\n echo \"illegal\";\n }else if($yWin >0 && ($yCount+1)==$xCount ){\n echo \"illegal\";\n }else if($xWin >0){\n echo \"the first player won\";\n }else if($yWin >0){\n echo \"the second player won\";\n }else if($xCount >$yCount){\n echo \"second\";\n }else{\n echo \"first\";\n }\n}\n\n?>", "lang": "PHP", "bug_code_uid": "46f0b5e50d71ff788e90ccd771241156", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "4c94fda5cda0e2916407df44dc9e8308", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8632085795578901, "equal_cnt": 37, "replace_cnt": 19, "delete_cnt": 3, "insert_cnt": 14, "fix_ops_cnt": 36, "bug_source_code": "1 ||$yCount>$xCount){\n echo \"illegal\";\n $gotResult = 1;\n}\n\nif(!$gotResult){\n // //horizon\n // $success1 = $board[0][0].$board[1][0].$board[2][0];\n // $success2 = $board[0][1].$board[1][1].$board[2][1];\n // $success3 = $board[0][2].$board[1][2].$board[2][2];\n\n // //vertical\n // $success4 = $board[0][0].$board[0][1].$board[0][2];\n // $success5 = $board[1][0].$board[1][1].$board[1][2];\n // $success6 = $board[2][0].$board[2][1].$board[2][2];\n\n // //diagonal\n // $success7 = $board[0][0].$board[1][1].$board[2][2];\n // $success8 = $board[0][2].$board[1][1].$board[2][0];\n\n $n =count($board[0]);\n\n $xWin = 0;\n $yWin = 0;\n //Vertical and Horizontal\n //O(n^2)???\n for($i=0;$i<$n;$i++){\n $hStr = \"\";\n $vStr = \"\";\n \n for($j=0;$j<$n;$j++){\n $hStr .= $board[$i][$j];\n $vStr .= $board[$j][$i];\n }\n if($hStr ==\"XXX\" || $vStr ==\"XXX\"){\n $xWin +=1;\n }else if($hStr ==\"000\" || $vStr ==\"000\"){\n $yWin +=1;\n }\n }\n\n //Diagonal\n //O(n^2)???\n $lDia = \"\";\n $rDia = \"\";\n for($i=0;$i<$n;$i++){\n $lDia .=$board[$i][$i];\n $rDia .=$board[$i][$n-1-$i];\n }\n if($lDia ==\"XXX\" || $rDia==\"XXX\"){\n $xWin +=1;\n }else if($lDia ==\"000\" ||$rDia ==\"000\"){\n $yWin +=1;\n }\n\n if(($xWin+$yWin)>1){\n echo \"illegal\";\n }else if($xWin>0 && $yWin>0){\n echo \"illegal\";\n }else if($xCount >$yCount){\n echo \"second\";\n }else if($xCount ==$yCount{\n echo \"first\";\n }else if($xWin==1){\n echo \"the first player won\";\n }else if($yWin==1){\n echo \"the second player won\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "2811990eeeb46f97966ccbef13b9ee6b", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "4c94fda5cda0e2916407df44dc9e8308", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9257168661097314, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": " 8) {\n fputs($stdout, \"draw\");\n return;\n }\n \n if($crosses > $nulls) {\n fputs($stdout, \"second\");\n } else {\n fputs($stdout, \"first\");\n }\n?>\n", "lang": "PHP", "bug_code_uid": "26ddd4c9a73e8d0ae2ddfe86513e4bfc", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "9c76b60c3e27c59bb8273d724390962d", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.996, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 1 || $dem2 - $dem1 > 1) {\n\t\treturn \"illegal\";\n\t} else {\n\t\tif (checkwin2($a[0], $a[1], $a[2], 'X')) {\n\t\t\tif (checkwin2($a[0], $a[1], $a[2], '0')) {\n\t\t\t\treturn \"illegal\";\n\t\t\t} else {\n\t\t\t\tif ($dem1 > $dem2) {\n\t\t\t\t\treturn \"the first player won\";\n\t\t\t\t} else {\n\t\t\t\t\treturn \"illegal\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (checkwin2($a[0], $a[1], $a[2], '0')) {\n\t\t\t\tif ($dem1 == $dem2) {\n\t\t\t\t\treturn \"the second player won\";;\n\t\t\t\t} else {\n\t\t\t\t\treturn \"illegal\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($dem1 + $dem2 == 9) {\n\t\t\t\t\treturn \"draw\";\n\t\t\t\t} else {\n\t\t\t\t\tif ($dem1 > $dem2) {\n\t\t\t\t\t\treturn \"second\";\n\t\t\t\t\t} else if ($dem1 == $dem2) {\n\t\t\t\t\t\treturn \"first\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn \"illegal\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}\n\necho tinh($a);", "lang": "PHP", "bug_code_uid": "5678277d3157709dda1c87af8840dd43", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "5ff7f40a9873c08e2b75ac5594ef3e1e", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9751703992210321, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " 1 || $counts['0'] > $counts['X']) $illegal = true;\n\n// defining if someone won\n\nfunction fullRow($array, $rowNum, $sign) {\n $index = $rowNum * 3;\n \n if ($array[$index] == $sign && $array[$index + 1] == $sign && $array[$index + 2] == $sign) return true;\n else return false;\n}\n\nfunction fullCol($array, $colNum, $sign) {\n if ($array[$colNum] == $sign && $array[$colNum + 3] == $sign && $array[$colNum + 6] == $sign) return true;\n else return false;\n} \n\nfunction fullDiag1($array, $sign) {\n if ($array[0] == $sign && $array[4] == $sign && $array[8] == $sign) return true; \n else return false;\n} \n\nfunction fullDiag2($array, $sign) {\n if ($array[2] == $sign && $array[4] == $sign && $array[6] == $sign) return true; \n else return false;\n} \n\nfunction playerWon($array, $sign) {\n for ($i = 0; $i < 3; $i++)\n {\n if (fullCol($array, $i, $sign)) return true;\n if (fullRow($array, $i, $sign)) return true;\n }\n \n if (fullDiag1($array, $sign) || fullDiag2($array, $sign)) return true;\n else return false;\n}\n\n$xWon = playerWon($data, 'X');\n$oWon = playerWon($data, '0');\n\nif ($xWon and $oWon) $illegal = true;\n\n// draw\n\nif ($illegal) echo 'illegal';\nelse if ($xWon || $oWon)\n{\n if ($xWon) echo 'the first player won';\n else echo 'the second player won';\n}\nelse\n{\n if ($counts['X'] + $counts['0'] == 9)\n {\n echo 'draw';\n }\n else\n {\n if ($counts['X'] > $counts['0']) echo 'second';\n if ($counts['X'] <= $counts['0']) echo 'first';\n //else echo 'first';\n }\n}\n\n?>", "lang": "PHP", "bug_code_uid": "b584030c2d548e807293a6e3a43f17ed", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "33d326db7af266a9bd2dcfeac89a40ae", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9680772086117297, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 1) && ($g > 1) && ($i < 2))) || ((($m == 2) && (($e > 1) && ($i > 1) && ($g < 2))) || ((($m == 2) && (($g > 1) && ($i > 1) && ($e < 2))))))\n{\n $k += 1;\n}\nif(($a + $b + $c) == 4)\n{\n $k -= 1;\n}\n$d = min($a, $b, $c);\n$e = $a - $d;\n$f = $b - $d;\n$g = $c - $d;\n$h = floor($e / 3);\n$i = floor($f / 3);\n$j = floor($g / 3);\n$l = $d + $h + $i + $j;\nif($k >= $l)\n{\n print $k;\n}\nelse\n{\n print $l;\n}\n?>", "lang": "PHP", "bug_code_uid": "fc5ad3f3ce75638bd041f9c16762d27b", "src_uid": "acddc9b0db312b363910a84bd4f14d8e", "apr_id": "bce63d1110ace1386c3038f25e5f7c8a", "difficulty": 1600, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9951845906902087, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "bf3af30aa02c569cab3aa79bec13a464", "src_uid": "356666366625bc5358bc8b97c8d67bd5", "apr_id": "55fc937b836f809eb725defc4b41f416", "difficulty": 900, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9820359281437125, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "aa85c501ce3bd94a9f65237c02bf82b0", "src_uid": "76c8bfa6789db8364a8ece0574cd31f5", "apr_id": "bf07e768c421421c2d39665f9cb7793e", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9680651221039449, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " \"one\", 2 => \"two\", 3 => \"three\", 4 => \"four\", 5 => \"five\", 6 => \"six\", 7 => \"seven\", 8 => \"eight\", 9 => \"nine\", 10 => \"ten\", 11 => \"eleven\", 12 => \"twelve\", 13 => \"thirteen\", 14 => \"fourteen\", 15 => \"fifteen\", 16 => \"sixteen\", 17 => \"seventeen\", 18 => \"eighteen\", 19 => \"nineteen\", 20 => \"twenty\", 30 => \"thirty\", 40 => \"forty\", 50 => \"fifty\", 60 => \"sixty\", 70 => \"seventy\", 80 => \"eighty\", 90 => \"ninety\");\n$c = array(2 => \"twenty-\", 3 => \"thirty-\", 4 => \"forty-\", 5 => \"fifty-\", 6 => \"sixty-\", 7 => \"seventy-\", 8 => \"eighty-\", 9 => \"ninety-\");\nif(($a <= 20) || ($a == 30) || ($a == 40) || ($a == 50) || ($a == 60) || ($a == 70) || ($a == 80) || ($a == 90))\n{\n print $b[$a];\n}\nelseif($a == 0)\n{\n print \"zero\";\n}\nelse\n{\n print $c[$a[0]] . $b[$a[1]];\n}\n?>", "lang": "PHP", "bug_code_uid": "ed99913dc3dd58bacdf36b6f7ee424aa", "src_uid": "a49ca177b2f1f9d5341462a38a25d8b7", "apr_id": "fd61f4248dd6515ca612f7bbb85cd667", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9789251844046365, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 'one',\n 2 => 'two',\n 3 => 'three',\n 4 => 'four',\n 5 => 'five',\n 6 => 'six',\n 7 => 'seven',\n 8 => 'eight',\n 9 => 'nine',\n 10 => 'ten',\n 11 => 'eleven',\n 12 => 'twelve',\n 13 => 'thirteen',\n 15 => 'fifteen'\n);\n\n$stringFirstNumbers = array(\n 1 => '',\n 2 => 'twenty',\n 3 => 'thirty',\n 4 => 'forty',\n 5 => 'fifty',\n 6 => 'sixty',\n 7 => 'seventy',\n 8 => 'eighty',\n 9 => 'ninety',\n);\n\nif ($number <= 13 || $number == 15)\n echo $number == 0 ? 'zero' : $stringNumbers[$number];\n\nelse {\n $firstNumber = $number / 10;\n $secondNumber = $number % 10;\n\n if ((int)$firstNumber == 1) echo $stringNumbers[(int)$secondNumber].'teen';\n\n else echo $stringNumbers[(int)$secondNumber] ? $stringFirstNumbers[(int)$firstNumber].'-'.$stringNumbers[(int)$secondNumber] : $stringFirstNumbers[(int)$firstNumber];\n}", "lang": "PHP", "bug_code_uid": "b6132f4a065e412d437aec0238dbb076", "src_uid": "a49ca177b2f1f9d5341462a38a25d8b7", "apr_id": "1b9733279038f4b14a60776f5ca1af85", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9124050632911392, "equal_cnt": 48, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 43, "fix_ops_cnt": 47, "bug_source_code": " 'zero', '1' => 'one', 2 => 'two', 3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six', 7 => 'seven', '8' => 'eight', 9 => 'nine', 10 => 'ten', 11 => 'eleven', 12 => 'twelve', 13 => 'thirteen', 14 => 'fourteen', 15 => 'fifteen', 16 => 'sixteen', 17 => 'seventeen', 18 => 'eighteen', 19 => 'nineteen', 20 => 'twenty', 30 => 'thirty', 40 => 'forty', 50 => 'fifty', 60 => 'sixty', 70 => 'seventy', 80 => 'eighty', 90 => 'ninety');\n// \u0415\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e 19\nif ($s <= 19) {\n\t$result = $numbers[$s];\n} else {\n\t// \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\n\tif($s[1]==0) {\n\t\t// \u0415\u0441\u043b\u0438 0, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\n\t\t$result = $numbers[$s];\n\t} else {\n\t\t// \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e\n\t\t$first_number = $numbers[$s[0].'0'];\n\t\t$second_number = $numbers[$s[1]];\n\t\t$result = $first_number.'-'.$second_number;\n\t}\n}\nprintf($result);\n?>", "lang": "PHP", "bug_code_uid": "e2b965ba1dcce3e48a79adac2e0ffac8", "src_uid": "a49ca177b2f1f9d5341462a38a25d8b7", "apr_id": "4a795e7c2108c99b6d1c1a5fc04dfb00", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9455782312925171, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " 1) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$d && $n) {\n\t\t\t$n -= $powers[$i];\n\t\t} else {\n\t\t\t$n -= $d;\n\t\t}\n\t}\n\treturn true;\n}\n\n$fp = fopen('php://stdin', 'r');\nlist($n, $m) = array_map('intval', explode(' ', fgets($fp)));\n$dn = max(1, ceil(log($n, 7)));\n$dm = max(1, ceil(log($m, 7)));\nif ($dn + $dm > 7) {\n\tdie('0');\n}\n\n$zeros = array_fill(0, 7, 0);\n$result = 0;\nfor($i = 0; $i < $n; ++$i) {\n\t$bits = $zeros;\n\tif (!set_bits($i, $dn, $bits)) {\n\t\tcontinue;\n\t}\n\tfor($j = 0; $j < $m; ++$j) {\n\t\t$bits2 = $bits;\n\t\tif (set_bits($j, $dm, $bits2)) {\n\t\t\t++$result;\n\t\t}\n\t\t//echo \"$i:$j \".implode(' ', $bits2).\"\\n\";\n\t}\n}\necho $result;", "lang": "PHP", "bug_code_uid": "d7288a59d72ebc69c6c20f63bb7c0980", "src_uid": "0930c75f57dd88a858ba7bb0f11f1b1c", "apr_id": "2220a9c3302f79bfd75f5de3a35e365c", "difficulty": 1700, "tags": ["brute force", "math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9707792207792207, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ccfa9c1e463aee1f5be99ab7a831b375", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "5f1fcb3d861ab2b45e8dc5b3832d7fe7", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6824324324324325, "equal_cnt": 11, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e9043de3d894f6b223873d0dfb6a3a84", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "5f1fcb3d861ab2b45e8dc5b3832d7fe7", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8839779005524862, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c81d583f5c48ecca5b1f2134be4d225e", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "d5de8aa91cb01bcbac9cf88e22a334c4", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9709364908503767, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1) && ($f[0] == 0)) || ((strlen($g) > 1) && ($g[0] == 0)) || ((strlen($h) > 1) && ($h[0] == 0)))\n {\n continue;\n }\n else\n {\n $c = 1;\n $b = max($b, $f + $g + $h);\n }\n }\n }\n if($c == 0)\n {\n print \"-1\";\n }\n else\n {\n printf(\"%.0f\", $b);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "d0cadb3592d7f295bd14a1a079d2c422", "src_uid": "bf4e72636bd1998ad3d034ad72e63097", "apr_id": "7425637a2d08daf8d787325d80e9a7af", "difficulty": 1400, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9082774049217002, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " 21) {print '-1'; exit(0);}\n\n$max = -1;\nfor($i=1;$i<$l-1;$i++){\n for($j=$i+1;$j<$l;$j++){\n $a = substr($s,0,$i);\n $b = substr($s,$i,($j-$i));\n $c = substr($s,$j);\n if($a > 1000000 || $b > 1000000 || $c > 1000000) continue;\n if($a[0] == '0' || $b[0] == '0' || $c[0] == '0') continue;\n if($max < $a + $b + $c) $max = $a + $b + $c;\n }\n}\n\nprint $max;\n?>", "lang": "PHP", "bug_code_uid": "00c09b4c213f849e5c40ca0babb9353f", "src_uid": "bf4e72636bd1998ad3d034ad72e63097", "apr_id": "1db11560515ad6737196d4bc7ca2dd6f", "difficulty": 1400, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9883177570093458, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a486ccddba270a2eb6f4467afe469165", "src_uid": "0efe9afd8e6be9e00f7949be93f0ca1a", "apr_id": "f38ea06b531f9beec907aca03ee02aee", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9158805031446541, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": " $c) && ($d >= $b))\n {\n print \"Polycarp\";\n }\n elseif(($d > $c) && ($d < $b))\n {\n print \"Vasiliy\";\n }\n elseif(($d <= $c) && ($c >= $b))\n {\n print \"Polycarp\";\n }\n elseif(($d <= $c) && ($c < $b))\n {\n print \"Vasiliy\";\n }\n}\nelseif($b == 0)\n{\n if(($d > $c) && ($d >= $a))\n {\n print \"Polycarp\";\n }\n elseif(($d > $c) && ($d < $a))\n {\n print \"Vasiliy\";\n }\n elseif(($d <= $c) && ($c >= $a))\n {\n print \"Polycarp\";\n }\n elseif(($d <= $c) && ($c < $a))\n {\n print \"Vasiliy\";\n }\n}\nelseif($c == 0)\n{\n if(($a + $b) <= $d)\n {\n print \"Polycarp\";\n }\n else\n {\n print \"Vasiliy\";\n }\n}\nelseif($d == 0)\n{\n if(($a + $b) <= $c)\n {\n print \"Polycarp\";\n }\n else\n {\n print \"Vasiliy\";\n }\n}\nelseif(($a <= $c) && ($b <= $d))\n{\n print \"Polycarp\";\n}\nelseif(($a >= $c) && ($b >= $d))\n{\n print \"Vasiliy\";\n}\nelse\n{\n if(($a + $b) <= $c)\n {\n print \"Polycarp\";\n }\n else\n {\n print \"Vasiliy\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "7fa4a0850c369eea9f2c5d9d5494b223", "src_uid": "2637d57f7809ff8f922549c617709074", "apr_id": "a513cfc77f2368ffe540e5aa659c4b0e", "difficulty": 1700, "tags": ["math", "greedy", "games", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7795669072737368, "equal_cnt": 25, "replace_cnt": 13, "delete_cnt": 0, "insert_cnt": 11, "fix_ops_cnt": 24, "bug_source_code": " $c)\n {\n $e[count($e)] = 0;\n break;\n }\n }\n if(($d < $c) && ($d != 0))\n {\n $e[count($e)] = 0;\n }\n $f = array_unique($e);\n $g = array_sum($e);\n if((count($f) == 1) && ($g > 0))\n {\n $h = 1;\n break;\n }\n}\nif($h == 0)\n{\n print \"NO\";\n}\nelse\n{\n print \"YES\";\n}\n?>", "lang": "PHP", "bug_code_uid": "1ed8dd8453a0f2204bf114c6ee3dad23", "src_uid": "410296a01b97a0a39b6683569c84d56c", "apr_id": "898a479f13d877466025dec60c519d7c", "difficulty": 1300, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9226488592097941, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "096ca13c421a752c8bd09ea901a87c9a", "src_uid": "36fe960550e59b046202b5811343590d", "apr_id": "ac5889ea60f5525659a6fdf0adcacedc", "difficulty": 1700, "tags": ["constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9973103819257665, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "= max($aData[$i][$t],$aData[$j][$t])){\n echo 2;\n exit;\n }\n\n }\n }\n}\n\necho 3;\n#var_dump($aData);\n", "lang": "PHP", "bug_code_uid": "34e213ccc026cd3af0b3b8633ec018dc", "src_uid": "36fe960550e59b046202b5811343590d", "apr_id": "d665d11cf5ef8398e162b367b229963b", "difficulty": 1700, "tags": ["constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.45918367346938777, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e9b08f4cf5eed4a4f295997a4352c737", "src_uid": "bdccf34b5a5ae13238c89a60814b9f86", "apr_id": "5b9b07446a7c31c224752cf8d591fdea", "difficulty": 1200, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9496402877697842, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "10bfb2f14aa98d6540fc930097a8e438", "src_uid": "edede580da1395fe459a480f6a0a548d", "apr_id": "b36495e8b27b972aa963c540f02cc059", "difficulty": 900, "tags": ["strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9885057471264368, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8bcb82427eb36ae64043c8ec9d60f6ed", "src_uid": "edede580da1395fe459a480f6a0a548d", "apr_id": "89aa0de9b83fa8d7812bcc47fa797af3", "difficulty": 900, "tags": ["strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9897610921501706, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $s2) {\n return 1;\n } else {\n return 0;\n }\n}\n\n$a = trim(fgets(STDIN));\n$b = trim(fgets(STDIN));\n\necho solution($a, $b);\n", "lang": "PHP", "bug_code_uid": "e4d53d140b9beb8215213aa4e99a976e", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "9cb9d4356247b076e92a52339304c93f", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8406779661016949, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " $s2) {\n return 1;\n } else {\n return 0;\n }\n}\n\n$in = trim(fgets(STDIN));\nlist($a, $b) = explode(' ', $in);\n\necho solution($a, $b);\n", "lang": "PHP", "bug_code_uid": "937b1d55be72bdb64844f9e31e9565b6", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "9cb9d4356247b076e92a52339304c93f", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.958656330749354, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " ord($charB)){\n $result = 1 ;\n }elseif(ord($charA) < ord($charB)){\n $result = -1 ;\n }\n}\n\n\necho $result ;\n\n", "lang": "PHP", "bug_code_uid": "92311b6130937b0103a5926a79cf16f7", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "80d192e0440c3a1d7782ec9f4dfc7888", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7787610619469026, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": " $s ) echo 1 ;\n else echo 0;\n break;\n }\n}", "lang": "PHP", "bug_code_uid": "0d3f4dc51831f42b017c4a4845d113a8", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "47a519b395682cd58d22668d4f24a8cb", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3559322033898305, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "62e1db3ed2fcbbc2515559dfb489e931", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "5aded8f1dd3ece3f0238344c2b5b3a1a", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.15544041450777202, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": " $s2){\n echo \"1\";\n}else{\n if($s1 == $s2){\n echo \"0\";\n }else{\n echo \"-1\";\n }\n}\n\n?", "lang": "PHP", "bug_code_uid": "0f552891e1d12421517a1c002ccbbc1b", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "214f5c3a8b4670b63bc174b48d1c25cb", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9749303621169917, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "fscanf(STDIN, \"%s\", $s1);\nfscanf(STDIN, \"%s\", $s2);\n$s1= strtolower($s1);\n$s2= strtolower($s2);\nif ($s1==$s2) {\n\techo 0;\n}\nif ($s1>$s2) {\n\techo 1;\n}\nif ($s1<$s2) {\n\techo -1;\n}", "lang": "PHP", "bug_code_uid": "de76de76217dc4dc4280261121f7e6c9", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "9918742b7c2a0ff9b1d5c82a9534e452", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.422680412371134, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": " $bits)\n echo \"1\";\nelse\n echo \"0\";\n", "lang": "PHP", "bug_code_uid": "ee53fe692a41d029260885cfb423a8a1", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "f1cbe744fafbe766437bd5d90862e88a", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8140350877192982, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "$sum2) \n\techo \"1\";\n\nelse echo \"-1\";\n\n\n//print_r($str);", "lang": "PHP", "bug_code_uid": "ad7cc6c586aae7710dde5ec56aa9bd0b", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "7cbc7a9e845de0b44b80ea53e8eed488", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7282913165266106, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": " $str2;\n?>", "lang": "PHP", "bug_code_uid": "196c91aa03b64be26bdea08e4038dd0d", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "311126bc39105f3df671d642d619cedd", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9050691244239631, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "='a' && $ss[$i] <= 'z')){\n\t\t\t$dd = false;\n\t\t\twhile (!($ss[$i] >='a' && $ss[$i] <= 'z'))\n\t\t\t\t$i++;\n\t\t}\n\t}\n\t$rec = 0;\n\twhile ($s1[$i] == $s2[$i]){\n\t\t$i++;\n\t}\n\tif ($i==strlen($s1))\n\t\tprint '1';\n\telse if ($s1[$i]> $s2[$i])\n\t\tprint '1';\n\telse\n\t\tprint '-1';\n\n?>", "lang": "PHP", "bug_code_uid": "353fb3cf1215c8a006c80bbda8dd433a", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "79740d28c2112aaa5179e943b6c3c9ef", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9381327334083239, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $str2) {\n \n echo \"1\";\n \n}else {\n \n echo \"-1\";\n \n}\n\n?>", "lang": "PHP", "bug_code_uid": "78bcf9332b26f692872f351b07215180", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "7d2da7e359302f65688219a9e0622494", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.33377135348226017, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": " $d) {\n\techo \"1\";\n}\n\n?>", "lang": "PHP", "bug_code_uid": "9c94d65e914f5022a6eb8ec9c0c10073", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "5b9c9fb36c486c051de1a4b9a83e4896", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9926082365364308, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $d) {\n\t$banding = $c;\n}elseif ($c < $d) {\n\t$banding = $d;\n}elseif ($c==$d) {\n\t$banding = $c;\n}\n\nwhile ($i < $banding) {\n\tif ($a[$i] != $b[$i]) {\n\t\tif (ord($a[$i]) < ord($b[$i])) {\n\t\t\techo \"-1\";\n\t\t\t$ada=true;\n\t\t\tbreak;\n\t\t}elseif (ord($a[$i]) > ord($b[$i])) {\n\t\t\techo \"1\";\n\t\t\t$ada=false;\n\t\t\tbreak;\n\t\t}\n\t}\n\t$i++;\n}\nif (!$ada) {\n\techo \"0\";\n}\n\n?>", "lang": "PHP", "bug_code_uid": "60b245afb227d04b5ef64dc717409de6", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "5b9c9fb36c486c051de1a4b9a83e4896", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9400510204081632, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "70517223b10f537887f3cc9a014da3d0", "src_uid": "435b6d48f99d90caab828049a2c9e2a7", "apr_id": "b802b6830c33c14c61b9d98f1cb549b4", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9659863945578231, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $m || $n > $k) {\n echo 'Yes';\n} else {\n echo 'No';\n}", "lang": "PHP", "bug_code_uid": "1d0cec43be65ac402e9208c48f87c1df", "src_uid": "6cd07298b23cc6ce994bb1811b9629c4", "apr_id": "49b25d8f8455ac6d2de82c8549683ff7", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9818181818181818, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= $m && $n >= $k) {\n echo \"Yes\";\n}\nelse echo \"No\";\n?>", "lang": "PHP", "bug_code_uid": "638763878f2050eb46e3e4156851a739", "src_uid": "6cd07298b23cc6ce994bb1811b9629c4", "apr_id": "053768f61692bbff236ee3f0f52d0b56", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.951048951048951, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 0){\n \n $out .= \" \"; \n }\n \n \n }\n \n echo $out;", "lang": "PHP", "bug_code_uid": "2ebb630bf71f3fae1db5891881436986", "src_uid": "edede580da1395fe459a480f6a0a548d", "apr_id": "a3376032395518d2617b7fb0c0180260", "difficulty": 900, "tags": ["strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.6631299734748011, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "\n#include\n#include\n#include\n#include\n#include\n#include\n#define iint(x) (scanf(\"%d\",&(x)))\n#define oint(x) (printf(\"%d\",(x)))\n#define oln (printf(\"\\n\"))\n#define o_ (printf(\" \"))\n#define Max(a,b) (a>b?a:b)\n#define Min(a,b) (a0?x:-(x))\n\nint n,t,a,b,da,db,m,k;\nchar st[131072];\nint arr[131072];\n\nint main(){\n\tregister int i,j;\n\tgets(st);\n\tj = strlen(st);\n\tbool space = true;\n\tfor(i=0;i= 0) {\n echo $deposit;\n} else {\n if ($deposit >= 100) {\n $deposit_without_to = floor(abs($deposit) / 100);\n } else {\n $deposit_without_to = \"\";\n }\n $tens_ones = abs($deposit) % 100;\n $tens = floor($tens_ones / 10);\n $ones = $tens_ones % 10;\n if ($tens >= $ones) {\n $tens = \"\";\n } else {\n $ones = \"\";\n }\n if (\"-\" . $deposit_without_to . $tens . $ones == \"-0\")\n {\n echo \"0\";\n } else {\n echo \"-\" . $deposit_without_to . $tens . $ones;\n }\n}\n\n?>", "lang": "PHP", "bug_code_uid": "63ee764fcb4fa4415e96abd4a34b1260", "src_uid": "4b0a8798a6d53351226d4f06e3356b1e", "apr_id": "6b3ae7ce1c9c6263acba60a7c0a65e5f", "difficulty": 900, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8653366583541147, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= $input[$ch - 2]) {\n print(substr($input, 0, $ch - 1));\n } else {\n $res = str_split($input);\n if ($ch == 3) {\n $res[0] = \"\"; \n }\n $res[$ch - 2] = \"\";\n print(implode($res));\n }\n} else {\n print($input);\n}", "lang": "PHP", "bug_code_uid": "cd789cc59b3eb51c9dcf80f395404092", "src_uid": "4b0a8798a6d53351226d4f06e3356b1e", "apr_id": "629e93d499739a46e222b934f6923e79", "difficulty": 900, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9910350448247759, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 6, "bug_source_code": "$x && $y>$z) $x = $y;\n if ($z>$x && $z>$y) $x = $z;\n}\n\nif ($x!='-0')\necho $x;\nelse echo 0;", "lang": "PHP", "bug_code_uid": "eee0f83b377388f775e1b047473033e7", "src_uid": "4b0a8798a6d53351226d4f06e3356b1e", "apr_id": "acbb46f425c8515ca1c492ebf181ad37", "difficulty": 900, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9113355780022446, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": " $number) {\n $max = intval(substr($string, 0, strlen($string)-1));\n}\n$lastChar = $string[strlen($string)-1];\n$temp_string = substr($string, 0, strlen($string)-2);\nif (intval($temp_string.$lastChar) > $number) {\n $max = intval(substr($string, 0, strlen($string)-1));\n}\n\n\necho $max.\"\\n\";\n", "lang": "PHP", "bug_code_uid": "be7d29073674eb10f6f08f74a39f8009", "src_uid": "4b0a8798a6d53351226d4f06e3356b1e", "apr_id": "2b3c0188ab424b60030b2671bcea3834", "difficulty": 900, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.914572864321608, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ea43f7d00499438f73d468b2ecc9f515", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "7d4f206ff8d018e7415b5838a6606d5c", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9130434782608695, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "742247ea69cecaa6aac238320c8308c2", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "7d4f206ff8d018e7415b5838a6606d5c", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8972602739726028, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n if($s % 10 != 4 && $s % 10 != 7) \n return false;\n }\n return true;\n}\n\nfscanf(STDIN, \"%s\", $s);\necho islucky(substr_count($s, '4') + substr_count($s, '7')) ? \"YES\" : \"NO\";", "lang": "PHP", "bug_code_uid": "119f804d26da51cb38b473affc9e5cd8", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "f6d46bebe055da55326f3471180d4c0d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9511400651465798, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 0) {\n if($s % 10 != 4 && $s % 10 != 7) \n return false;\n $s = intval($s / 10);\n }\n return true;\n}\n\nfscanf(STDIN, \"%s\", $s);\necho islucky(substr_count($s, '4') + substr_count($s, '7')) ? \"YES\" : \"NO\";", "lang": "PHP", "bug_code_uid": "2f8a45f7d6be72c3833d5fd73697703b", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "f6d46bebe055da55326f3471180d4c0d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5129411764705882, "equal_cnt": 14, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": " 0) {\n echo \"YES\";\n}else{\n echo \"NO\";\n}\n\n\n", "lang": "PHP", "bug_code_uid": "52344f95ad2806d1696a9b955dd8407e", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "fd15274c12416f145226dc36bb36bd8c", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.847457627118644, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "075e9265e93525c6dcb8a398e6c77d6d", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "apr_id": "674e651284ece6dde2842ef1e7653de4", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4547563805104408, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "= 'A' && $v <= 'Z') $n++;\n\t}\n\tif ($var[0] >= 'a' && $var[0] <= 'z') {\n\t\tif ($n == 1 || $n == $m - 1) {\n\t\t\techo ucwords(strtolower($in));\t\n\t\t} else {\n\t\t\techo $in;\n\t\t}\n\t} else if ($n == $m) {\n\t\techo strtolower($in);\t \n\t} else {\n\t\techo $in;\n\t}", "lang": "PHP", "bug_code_uid": "abcc13a6188bd47667ab9ab9b73c7221", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "0719d2ae575c75b0b5aac38f6514f5d0", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.10837438423645321, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $d)\n {\n $e = $b - $d + 1;\n print $e;\n }\n}\nelseif($d == $a)\n{\n if($b < $c)\n {\n $e = $c - $b + 1;\n print $e;\n }\n elseif($b == $c)\n {\n print \"1\";\n }\n elseif($b > $c)\n {\n $e = $b - $c + 1;\n print $e;\n }\n}\nelseif($b <= $c)\n{\n $e = $c - $b + 1;\n $f = $d - $c + 1;\n print $e + $f;\n}\nelseif(($b > $c) && ($b < $d))\n{\n $e = $b - $c + 1;\n $f = $d - $c + 1;\n print $e + $f;\n}\nelseif($b >= $d)\n{\n $e = $b - $d + 1;\n $f = $d - $c + 1;\n print $e + $f;\n}\n?>", "lang": "PHP", "bug_code_uid": "b3db2dffa1cfa96fc7bc149d1ddb8526", "src_uid": "5deaac7bd3afedee9b10e61997940f78", "apr_id": "784cf2c66c31ba11bb2dac44487b5724", "difficulty": 1300, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4243369734789392, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "1) return true;\n\treturn false;\n}\nfunction calculate_min($k, $n){\n\t$allow = true;\n\t$c = 1;\n\t$num = $k-$n;\n\tif(dividable($num)) return $c;\n\tfor($i=0;$i<=10; $i++){\n\t\t$c++;\n\t\tif(dividable(($c-1)*$k)) return $c-1;\n\t\tif(dividable(($c-1)*$k - $n)) return $c-1;\n\t}\n\treturn \"undefined\";\n}\n$read = read();\n\nlist($k, $n) = explode(\" \", $read);\nput(calculate_min($k, $n));\n?>", "lang": "PHP", "bug_code_uid": "6a6047bae08439702ab73d2e229e0636", "src_uid": "18cd1cd809df4744bb7bcd7cad94e2d3", "apr_id": "e05d8b9fd06a1df163df33582d76a1c4", "difficulty": 800, "tags": ["brute force", "math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7954743255004352, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c1228cb297b2540d8581a50b3783554d", "src_uid": "18cd1cd809df4744bb7bcd7cad94e2d3", "apr_id": "e05d8b9fd06a1df163df33582d76a1c4", "difficulty": 800, "tags": ["brute force", "math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8720548762302416, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2ab89b46f9150f3ddbc2171215891c53", "src_uid": "685fe16c217b5b71eafdb4198822250e", "apr_id": "4bf0c3611c633d3d6923b2c5ca14add0", "difficulty": 1300, "tags": ["greedy", "dfs and similar", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.979381443298969, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "0 OR $k>0) echo \"\".($c+1);\n else\n echo \"\".$c;\n?>", "lang": "PHP", "bug_code_uid": "c9f917c4a850e00d51af90d58563d08a", "src_uid": "578bae0fe6634882227ac371ebb38fc9", "apr_id": "61d3678e03c3fee4fb621f9e2a868759", "difficulty": 1100, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9118589743589743, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "da0c10de574df2eee27c198eeccfae5b", "src_uid": "6a10bfe8b3da9c11167e136b3c6fb2a3", "apr_id": "7b24e32011f553a9340f9e2322956d8d", "difficulty": 1100, "tags": ["bitmasks", "brute force", "combinatorics", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9887640449438202, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "= 97){\n\t\t\t$index = $b - 97;\n\t\t}\n\t\telse {\n\t\t\t$index = $b - 65;\n\t\t}\n\t\t$list[$index] = 1;\n\t}\n\tif(count($list) == 26){\n\t\techo 'YES';\n\t}\n\telse{\n\t\techo 'NO';\n\t}\n\tbreak;\n}", "lang": "PHP", "bug_code_uid": "f9f8a29daf1d380cf86e288c7bee7c1b", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "63048a8404efa3b41143c8b8d6b4e9b8", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9935064935064936, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ea92fa90a7a319b19a4d8104bc8992ed", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "d29e2cabccf3e7b8626eaf9f7c94c6e7", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.09535452322738386, "equal_cnt": 10, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "=26) echo \"YES\";\nelse echo \"NO\";\n\n", "lang": "PHP", "bug_code_uid": "bbf31db9a47201477472ecdcd2060536", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "d7c7b3f5d2f8e9ea07d3ae409fe7c356", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9663299663299664, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= 26){\n\treturn \"YES\";\n} else {\n\treturn \"NO\";\n}", "lang": "PHP", "bug_code_uid": "2a317ca6388e0e48d13c8f2f824c7def", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "451f2e0a1f522338ffacd7fe754e74d7", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6661115736885929, "equal_cnt": 13, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": " \n ", "lang": "PHP", "bug_code_uid": "931c3d19ed72722d90bc2d2f53a3ccf5", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "a6c5f321fa85641e1fd7bb557e9b920c", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.35920177383592017, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "81296565e21a6a6050e5bc5aea4899ad", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "794a64e17ac7929f0e2a0d024f041f5e", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.974169741697417, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6554351be47a7975c4bcea55a77b474d", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "dbe2e0bbee5a1f299e3ada4b98eeb8db", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9523809523809523, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f547ca3ea54b706881472888149eadc4", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "6980480909fb57605d01e6c98218b95a", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8442906574394463, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ab1694c038bb08bef1f78d2f8e37abe8", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "0a2e5c7124de7c25a70edbd5dc9e3d04", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9594594594594594, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n $out = '1' . str_repeat('+1' , $c1 - 1);\n}\n\nif ($c2 > 0) {\n if (strlen($out) > 0) {\n $out .= str_repeat('+2' , $c2);\n } else {\n $out = '2' + str_repeat('+2' , $c2 - 1);\n }\n}\n\nif ($c3 > 0) {\n if (strlen($out) > 0) {\n $out .= str_repeat('+3' , $c3);\n } else {\n $out = '3' + str_repeat('+3' , $c3 - 1);\n }\n}\n\necho $out;\n\n?>", "lang": "PHP", "bug_code_uid": "dc4471ea6555ad72dad1cfdb3a93191d", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "14e9d1195db8d0bbdbaf46f5d732f595", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6028708133971292, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5f28912bb16c875a92b827c9c5399d76", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "8bca3a16a1623bf90b3fec33fb93a89f", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.36363636363636365, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b0af27785a427d9f4ffccffe3dd3a5ce", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "8bca3a16a1623bf90b3fec33fb93a89f", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9484536082474226, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "da4a8a306401e28d80755b64bcc5661a", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "8bca3a16a1623bf90b3fec33fb93a89f", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9984732824427481, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $value) {\n $result .= $value;\n if($cnt > $key) {\n $result .= '+';\n }\n}\necho $result;", "lang": "PHP", "bug_code_uid": "36a86be7208e0e4e3e2baf52b0095f50", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "apr_id": "49ad434b7603ad39ca1a1ce56123b6ef", "difficulty": 800, "tags": ["greedy", "strings", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9843114468332365, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0cde6847d3494a0717131227f986c85b", "src_uid": "c9c22e03c70a94a745b451fc79e112fd", "apr_id": "0bdf8ae696f45c537e67493f324ff1de", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9986468200270636, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $d)\n {\n array_push($e, $y - $x);\n break;\n }\n }\n}\nrsort($e);\nprint $e[0];\n?>", "lang": "PHP", "bug_code_uid": "16dc3691b8ede03d1a830ecb7a6367fe", "src_uid": "086d07bd6f9031df09bd6a6e8fe8f25c", "apr_id": "0eb56179fccd95d7282d5d43f9fb10f3", "difficulty": 1400, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8147239263803681, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "73a81af727b30a19b40bc36d64507816", "src_uid": "9679acef82356004e47b1118f8fc836a", "apr_id": "9fccd5caf3bf9e69789c9f85fbedaccb", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.680161943319838, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4678994216f7c81b0397de34eb56c93c", "src_uid": "dcaff75492eafaf61d598779d6202c9d", "apr_id": "ed479723fdabe2d06ea0f713772468d7", "difficulty": 800, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9248554913294798, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= $template && $item > 0) ? true : false;\n});\necho f($a, $n, $k);", "lang": "PHP", "bug_code_uid": "abf43b69ae01d65c5791d9d228100eca", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "ba38b7df227c3a95ca87cafebc9f09d8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8500881834215167, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "=$less_score)\n $winner++;\n}\n\necho $winner == $all?0:$winner;", "lang": "PHP", "bug_code_uid": "3ce6a8a977bed2c56dfb0d66310b92cb", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "e4f8c9832c954dbeb2b78a41420f347e", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.990234375, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " 0 || $m > 0){\n $n--;\n $m--;\n if(($n == 0 && $m > 0) || ($n > 0 && $m == 0)){\n $i++;\n break;\n } elseif($n == 0 && $m == 0){\n break;\n }\n if($n < $m){\n $m--;\n } else {\n $n--;\n }\n $i++;\n }\n \n fwrite(STDOUT, $i);\n ?>", "lang": "PHP", "bug_code_uid": "834cb3605434ad84ce3559fd5e800a16", "src_uid": "0718c6afe52cd232a5e942052527f31b", "apr_id": "b7a9de4c12b7c2760b2670d585e0c0a0", "difficulty": 1300, "tags": ["number theory", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7407407407407407, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "= $b)\n{\n $g = ($d + $e - $b) + $f;\n if($g >= $c)\n {\n print \"YES\";\n }\n else\n {\n print \"NO\";\n }\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "e2094c82d589d875229411a2c36d5a9d", "src_uid": "d54201591f7284da5e9ce18984439f4e", "apr_id": "4d5148b2fc6dfd731da6dc6ce266f38d", "difficulty": 800, "tags": ["greedy", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6813559322033899, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "$a ||\n ($y > ($a - $x + $b)) ||\n ($z > $c) || ($z > ($sAll - $x - $y))\n){\n echo 'NO';\n} else{\n echo 'YES';\n}", "lang": "PHP", "bug_code_uid": "d3469643045bf44df7644a841c1b1b8e", "src_uid": "d54201591f7284da5e9ce18984439f4e", "apr_id": "03d3824fcc923c86d5139b663467351f", "difficulty": 800, "tags": ["greedy", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9954198473282443, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "\".$a);\n\t\t\n\t\tif ($a >= $x) {\n\t\t\t$a -= $x;\n\n\t\t\tif ($a + $c >= $y) {\n\t\t\t\tif ($a + $c - $y + $b >= $z) {\n\t\t\t\t\techo (\"YES\");\n\t\t\t\t} else {\n\t\t\t\t\techo (\"NO\");\n\t\t\t\t}\t\n\n\t\t\t} else {\n\t\t\t\techo (\"NO\");\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\techo (\"NO\");\n\t\t}\n\t}\n\n\n\t#$in = fopen(\"input.txt\", \"r\");\n\t$in = STDIN;\n\tfscanf($in, \"%d%d%d\", $x, $y, $z);\n\tfscanf($in, \"%d%d%d\", $a, $b, $c);\n\n\tsolve($x, $y, $z, $a, $b, $c);\n\n\n\n\n\n\tfclose($in);\n##############################################################################\n?>\n", "lang": "PHP", "bug_code_uid": "44e8358ab0ecf435b8142a782642c3b2", "src_uid": "d54201591f7284da5e9ce18984439f4e", "apr_id": "0750325d09630fed3456fff8ccf84dd5", "difficulty": 800, "tags": ["greedy", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9978448275862069, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 1; $x--)\n{\n $g = 0;\n for($y = 0; $y < count($e); $y++)\n {\n $h = floor($e[$y] / $x);\n $g += $h;\n if($g >= $x)\n {\n $f = max($f, $x);\n break;\n }\n }\n}\nprint $f;\n?>", "lang": "PHP", "bug_code_uid": "540495d73b2b6f839a7ecd2c747cd32b", "src_uid": "b7ef696a11ff96f2e9c31becc2ff50fe", "apr_id": "9d03ca850c37fa21ae795329bdd23b67", "difficulty": 1200, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7292150487691593, "equal_cnt": 16, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 15, "bug_source_code": "= $e)\n {\n $i = $x;\n }\n}\n$b2 = $b;\n$b2 = array_reverse($b2);\n$g = 0;\n$h = 0;\nfor($x = 0; $x < count($b2); $x++)\n{\n if($b2[$x] == 0)\n {\n $h++;\n }\n else\n {\n $h--;\n }\n $g = max($g, $h);\n if($h >= $g)\n {\n $j = $x;\n }\n}\nif($e >= $g)\n{\n $k = array_slice($b, 0, $i + 1);\n $l = array_slice($b, $i + 1);\n for($x = 0; $x < count($k); $x++)\n {\n if($k[$x] == 1)\n {\n array_splice($k, 0, 1);\n $x--;\n }\n }\n for($x = 0; $x < count($l); $x++)\n {\n if($l[$x] == 0)\n {\n array_splice($l, 0, 1);\n $x--;\n }\n }\n $m = array_merge($k, $l);\n $n = count($m);\n print max($c, $d, $n);\n}\nelse\n{\n $k = array_slice($b2, 0, $j + 1);\n $l = array_slice($b2, $j + 1);\n for($x = 0; $x < count($k); $x++)\n {\n if($k[$x] == 1)\n {\n array_splice($k, 0, 1);\n $x--;\n }\n }\n for($x = 0; $x < count($l); $x++)\n {\n if($l[$x] == 0)\n {\n array_splice($l, 0, 1);\n $x--;\n }\n }\n $m = array_merge($k, $l);\n $n = count($m);\n print max($c, $d, $n);\n}\n?>", "lang": "PHP", "bug_code_uid": "b3575b9c1fa4bcac75b7cbc5f81ba381", "src_uid": "c7b1f0b40e310f99936d1c33e4816b95", "apr_id": "ea47b8382d35351fc18fccdd1736ee5e", "difficulty": 1500, "tags": ["brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9546654929577465, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "= $e)\n {\n $i = $x;\n }\n}\n$b2 = $b;\n$b2 = array_reverse($b2);\n$g = 0;\n$h = 0;\nfor($x = 0; $x < count($b2); $x++)\n{\n if($b2[$x] == 0)\n {\n $h++;\n }\n else\n {\n $h--;\n }\n $g = max($g, $h);\n if($h >= $g)\n {\n $j = $x;\n }\n}\nif($e >= $g)\n{\n $k = array_slice($b, 0, $i + 1);\n $l = array_slice($b, $i + 1);\n for($x = 0; $x < count($k); $x++)\n {\n if($k[$x] == 1)\n {\n array_splice($k, 0, 1);\n $x--;\n }\n }\n for($x = 0; $x < count($l); $x++)\n {\n if($l[$x] == 0)\n {\n array_splice($l, 0, 1);\n $x--;\n }\n }\n $m = array_merge($k, $l);\n $n = count($m);\n print max($c, $d, $n);\n}\nelse\n{\n $k = array_slice($b2, 0, $j + 1);\n $l = array_slice($b2, $j + 1);\n for($x = 0; $x < count($k); $x++)\n {\n if($k[$x] == 1)\n {\n array_splice($k, 0, 1);\n $x--;\n }\n }\n for($x = 0; $x < count($l); $x++)\n {\n if($l[$x] == 0)\n {\n array_splice($l, 0, 1);\n $x--;\n }\n }\n $m = array_merge($k, $l);\n $n = count($m);\n print max($c, $d, $n);\n}\n?>", "lang": "PHP", "bug_code_uid": "93c60f3b433c3047d925f2d259de552c", "src_uid": "c7b1f0b40e310f99936d1c33e4816b95", "apr_id": "ea47b8382d35351fc18fccdd1736ee5e", "difficulty": 1500, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.14120667522464697, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " 750000){\n\t\t$numb[$r]++;\n\t\t//echo $i . ' ' . round(memory_get_usage()/1048576,2).\" megabytes\\n\"; \n\t}\n\t$i++;\n}\n\n$count = 0;\n$min = min($numb);\nforeach( $numb as $val ){\n\t$count += round($val / $min);\n}\necho $count;\nfclose($fp);\n?>", "lang": "PHP", "bug_code_uid": "c94741eee0dbbc67594412c87463cc87", "src_uid": "9137197ee1b781cd5cc77c46f50b9012", "apr_id": "bcf7e133947c47420a2f64b8eef281bd", "difficulty": 1200, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9957716701902748, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 3750000){\n\t\t$numb[$r]++;\n\t\t//echo $i . ' ' . round(memory_get_usage()/1048576,2).\" megabytes\\n\"; \n\t}\n\t$i++;\n}\n\n$count = 0;\n$min = min($numb);\nforeach( $numb as $val ){\n\t$count += round($val / $min);\n}\necho $count;\nfclose($fp);\n?>", "lang": "PHP", "bug_code_uid": "6cc4bb4af457156f58f42709de4da9d5", "src_uid": "9137197ee1b781cd5cc77c46f50b9012", "apr_id": "bcf7e133947c47420a2f64b8eef281bd", "difficulty": 1200, "tags": ["number theory", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.996222851746931, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "=1&&$m<=100000) {\n if($a>=0){\n if($b<=1000){\n if($r[0]<=$m&&$r[0]>=0){ */ \n for($t=0;;$t++){\n if($res==1)break;\n if($r[$t]>$m||$r[$t]<0){break;}\n (int)$r[$t+1]=($r[$t]*$a+$b)%$m; \n \n if($t==1000){\n for($tx=1;$tx<$t;$tx++){\n // echo $r[$t-$tx].' == '.$r[$t].'-----|||';\n if($r[$t-$tx]==$r[$t]){echo ($tx);$res=1;break;}\n if($res==1)break;\n } \n }elseif($t>1000){echo 0;$res=1;}\n else{\n if($r[$t+1]==$r[$t]){echo 1;$res=1;break;}\n }\n }\n /* }\n }\n }\n}*/\n?>", "lang": "PHP", "bug_code_uid": "df0f12a492fee61de0f40615e7f883dc", "src_uid": "9137197ee1b781cd5cc77c46f50b9012", "apr_id": "05efda351dd22092fec6983515d3d5a4", "difficulty": 1200, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9137104506232023, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "=1&&$m<=100000) {\n if($a>=0){\n if($b<=1000){\n if($r[0]<=$m&&$r[0]>=0){ */ \n for($t=0;;$t++){\n if($res==1)break;\n if($r[$t]>$m||$r[$t]<0){break;}\n (int)$r[$t+1]=($r[$t]*$a+$b)%$m; \n \n if($t%1000){\n for($tx=1;$tx<$t;$tx++){\n // echo $r[$t-$tx].' == '.$r[$t].'-----|||';\n if($r[$t-$tx]==$r[$t]){echo ($tx);$res=1;break;}\n if($res==1)break;\n } \n }\n else{\n if($r[$t+1]==$r[$t]){echo 1;$res=1;break;}\n }\n }\n /* }\n }\n }\n}*/\n?>", "lang": "PHP", "bug_code_uid": "58aecfd54248c4009f200a2407577577", "src_uid": "9137197ee1b781cd5cc77c46f50b9012", "apr_id": "05efda351dd22092fec6983515d3d5a4", "difficulty": 1200, "tags": ["number theory", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8879168944778567, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "'; print_r($var); echo '';}\n function read_str(){return trim(fgets($GLOBALS['file']));}\n function read_array(){return explode(' ', read_str());}\n /***************************************************************/\n\n list($a, $b, $m, $r0) = read_array();\n $i=0;\n $r[$i] = $r0;\n do\n {\n $i++;\n $r[$i] = ($a*($r[$i-1])+$b)%$m;\n \n }\n while($i<100);\n \n function t($arr, $t)\n {\n for($i=1; $i<=$t; $i++)\n {\n if($arr[$i] != $arr[$t+$i]) return false;\n }\n return true;\n }\n $r = array_reverse($r);\n for ($k=1; $k<50; $k++)\n {\n \n \n if(t($r, $k))\n {\n echo $k;die();\n }\n }\n", "lang": "PHP", "bug_code_uid": "c00cf27bbfab33021ec9eef64801fba3", "src_uid": "9137197ee1b781cd5cc77c46f50b9012", "apr_id": "303250bd7973670fc6b7954b3116cf9c", "difficulty": 1200, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9980392156862745, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c9d4eddb33ae07b84a1e437ce50b1d60", "src_uid": "5ecd569e02e0164a5da9ff549fca3ceb", "apr_id": "0c9d8c48ef855d5a346b381f0a20ec27", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9849624060150376, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 7) {\n $cur_d = 1;\n }\n\n }\n}\nif ($word == \"month\") {\n for ($i = 0; $i < 12; $i++) {\n if ($n <= $m[$i]) {\n $s++;\n }\n }\n}\necho $s;\n?>", "lang": "PHP", "bug_code_uid": "2240985ee9755f4a527b96c3a1b32e5d", "src_uid": "9b8543c1ae3666e6c163d268fdbeef6b", "apr_id": "d668c09f69c7253d14efebbdaecbc893", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9963503649635036, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c77d5ab96b5f57d7f45a32c983e51a2f", "src_uid": "9b8543c1ae3666e6c163d268fdbeef6b", "apr_id": "34fd886617e0f87fccdca2b26254dcee", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9320652173913043, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1750497ac0cec9ea8ace8a8e5b1d9020", "src_uid": "fc5765b9bd18dc7555fa76e91530c036", "apr_id": "2d8a624d12b3396d31d423a97a84c47c", "difficulty": 1100, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7142857142857143, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a0b0978e0629e8484aece941f02c23dc", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "apr_id": "53145f255706949c783e4093bc25eddb", "difficulty": 800, "tags": ["constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8712998712998713, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": " $count1){\n $b=false;\n }else {\n $i++;\n }\n }\n echo $i;\n?>", "lang": "PHP", "bug_code_uid": "0151786e00336045cfe458848598870f", "src_uid": "d215b3541d6d728ad01b166aae64faa2", "apr_id": "fe1f7c6f87b88496c037d81a3f8ed559", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9935275080906149, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $count1){\n $b=false;\n }else {\n $imax++;\n }\n }\n echo $i;\n?>", "lang": "PHP", "bug_code_uid": "301ce71a1fc3a3b7bffdad9db73c8867", "src_uid": "d215b3541d6d728ad01b166aae64faa2", "apr_id": "fe1f7c6f87b88496c037d81a3f8ed559", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.993421052631579, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ac68131c5232b4986f75e86753d7b92d", "src_uid": "d215b3541d6d728ad01b166aae64faa2", "apr_id": "dcd8d0aa362a6a6cc5add15fcf3cfe82", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8410159924741298, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " 0) {\n $k = $max;\n } else {\n if (ceil(abs($r / $n)) == $max) {\n $k = ceil(abs($r / $n)) + $max + 1;\n } else {\n $k = ceil(abs($r / $n)) + $max;\n }\n }\n \n echo $k;\n?>", "lang": "PHP", "bug_code_uid": "2a572e6b5e0be794dc82f4e40855392a", "src_uid": "d215b3541d6d728ad01b166aae64faa2", "apr_id": "d2fbd17909a78dd06968968ff5146cd9", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9469964664310954, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f8c3cd2799ec8e1eba5aa5e1f71b80e8", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "7546a4f9c0278d11f81c496bc8fb3d46", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9753320683111955, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a3ed615bf3b80d24e159cf8c9b004bcb", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "cf716b4f110cdee7313aba140db84ac3", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8691525423728813, "equal_cnt": 13, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 12, "bug_source_code": " 0 ? gcd($n, $m % $n) : $m;\n}\n\nfscanf(STDIN, \"%d\", $k);\nfscanf(STDIN, \"%d\", $l);\nfscanf(STDIN, \"%d\", $m);\nfscanf(STDIN, \"%d\", $n);\nfscanf(STDIN, \"%d\", $d);\n$result = intval($d/$k) \n + intval($d/$l) \n + intval($d/$m) \n + intval($d/$n)\n - intval($d/gcd($k, $l))\n - intval($d/gcd($k, $m))\n - intval($d/gcd($k, $n))\n - intval($d/gcd($l, $m))\n - intval($d/gcd($l, $n))\n - intval($d/gcd($m, $n))\n + intval($d/gcd(gcd($k, $l), $m))\n + intval($d/gcd(gcd($k, $l), $n))\n + intval($d/gcd(gcd($k, $m), $n))\n + intval($d/gcd(gcd($l, $m), $n))\n - intval($d/gcd(gcd($k, $l), gcd($m, $n)));\necho $result.\"\\n\";", "lang": "PHP", "bug_code_uid": "ba7c52f0479d894c4a99259a0e9d45a4", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "0da4fc9dd75d2353231d2d6f31faaecd", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.14578587699316628, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "Dragons damaged : '.$s;\n?>\n", "lang": "PHP", "bug_code_uid": "5d1c1141556f08a07b0baf2e68d4d893", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "8262e9988c5cf09c1817473f8ea98afa", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6101694915254238, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "919af5afbc88436e456fbec31a0c2f82", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "8262e9988c5cf09c1817473f8ea98afa", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9924812030075187, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "439e53e42c91867d9903c52149bf839c", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "d72c9c484bea035d3953d4702afa51c9", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5263157894736842, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0a05c98ea92b8466709246833448ff84", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "aad316db61e08199a524a26f2956cf31", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9818731117824774, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "aaf175d550a66d3845ac014f8d4204f3", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "f6f9d5c658dcd0847af622ff0c5d343d", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9606986899563319, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "index($k, $l, $m, $n, $d);", "lang": "PHP", "bug_code_uid": "251a90c4b9bdcff735d0518115d6ea14", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "56f27f64241b7d22d187947815f73382", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9972948602344455, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6ff757d4fff17dea446e7695da1cb1f1", "src_uid": "a5002ddf9e792cb4b4685e630f1e1b8f", "apr_id": "94da41100dc1d3bf20a1c2717a1fe40b", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.31520764864057366, "equal_cnt": 35, "replace_cnt": 19, "delete_cnt": 2, "insert_cnt": 13, "fix_ops_cnt": 34, "bug_source_code": "= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 1; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 2; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 3; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 4; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 5; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 6; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 7; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 8; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $p9 = $e[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 9; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $p9 = $e[$n + 7];\n $p10 = $e[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 1; $m <= 10; $m++)\n{\n for($n = 0; $n < $b; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $r = array_sum(array_slice($p, $o, $m));\n if($r >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 1; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 2; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 3; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 4; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 5; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 6; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 7; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 8; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 6];\n $p9 = $i[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 9; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 6];\n $p9 = $i[$n + 7];\n $p10 = $i[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 1; $m <= 1; $m++)\n{\n for($n = 0; $n < $a; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $r = array_sum(array_slice($p, $o, $m));\n if($r >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 2; $m++)\n{\n for($n = 0; $n < $a - 1; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 3; $m++)\n{\n for($n = 0; $n < $a - 2; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 4; $m++)\n{\n for($n = 0; $n < $a - 3; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 5; $m++)\n{\n for($n = 0; $n < $a - 4; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 6; $m++)\n{\n for($n = 0; $n < $a - 5; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 7; $m++)\n{\n for($n = 0; $n < $a - 6; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 8; $m++)\n{\n for($n = 0; $n < $a - 7; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 9; $m++)\n{\n for($n = 0; $n < $a - 8; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $p9 = $e[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 9; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 6];\n $p9 = $e[$n + 7];\n $p10 = $e[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nprint $l;\n?>", "lang": "PHP", "bug_code_uid": "a6ac056b64cba8c606d2ba42d8043154", "src_uid": "9c766881f6415e2f53fb43b61f8f40b4", "apr_id": "edc5a0ebfb29df06963b4ec603641e75", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9503916449086162, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0c3855bc02e6ea9229095c33f7caa179", "src_uid": "43308fa25e8578fd9f25328e715d4dd6", "apr_id": "e29ee712e3f74ca0775499a82e9cf52d", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9978813559322034, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $el){\n\t\tif ($el >= 4){\n\t\t\t$hasFoot = true;\n\t\t\tif ($el == 5) $head = $k;\n\t\t\tif ($el == 6) $body = $k; \n\t\t}else{\n\t\t\tif ($el == 2){\n\t\t\t\t$head = $body = $k;\n\t\t\t}else{\n\t\t\t\tif ($head == 0) $head = $k;\n\t\t\t\telse $body = $k;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\techo $hasFoot ? $body == $head ? 'Elephant' : 'Bear' : 'Alien';\n?>", "lang": "PHP", "bug_code_uid": "5585149136be0b6c9c51db4d850eb6e1", "src_uid": "43308fa25e8578fd9f25328e715d4dd6", "apr_id": "fb067ee6510a253cb34d0655bb4101db", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9967320261437909, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "= 4) k++;\n\tif($a[$i] == 2) q++;\n}\nif($k && $q){\n\techo \"Elephant\";\n}else if($k)\n\techo \"Bear\";\nelse echo \"Alien\";\n?>", "lang": "PHP", "bug_code_uid": "155502b0c5e99f6e829c193f2f6d2fb9", "src_uid": "43308fa25e8578fd9f25328e715d4dd6", "apr_id": "11d91691fb15b4cdd43c5a6f6f50a505", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9933993399339934, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "289aa4d31594e5ef60fcaf7d853cf864", "src_uid": "26cd7954a21866dbb2824d725473673e", "apr_id": "df7dfbb384ff2cf495c4764c9bcd4d42", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.6227848101265823, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7c2a3bb6d4cb271e27df25c7b28e1051", "src_uid": "26cd7954a21866dbb2824d725473673e", "apr_id": "ef660e2667f3b1c0ce672a01b92e4f9f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9830866807610994, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "721b706cf45972b7900860b9348de8d1", "src_uid": "5b969b6f564df6f71e23d4adfb2ded74", "apr_id": "e8774b374f9d8b83475965a453f1a55b", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3258426966292135, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5402e625bcc66fb166f71a1718b155d9", "src_uid": "5b969b6f564df6f71e23d4adfb2ded74", "apr_id": "008c64dcafea4951d373a729b94b09f6", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8803905614320586, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3ebeec3d32f64977d8c1dcbb1d7b9821", "src_uid": "5b969b6f564df6f71e23d4adfb2ded74", "apr_id": "008c64dcafea4951d373a729b94b09f6", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7703703703703704, "equal_cnt": 13, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 5, "fix_ops_cnt": 12, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "686ee46f6ee83b25135887dded165adb", "src_uid": "54cb2e987f2cc06c02c7638ea879a1ab", "apr_id": "1c0844f64e0a016ff8dc6cfba8c32fca", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.993485342019544, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2c64847f997d67479ab2444f8cade6bc", "src_uid": "54cb2e987f2cc06c02c7638ea879a1ab", "apr_id": "f2b93b7cb44de7a004f4c2b82d1bbbd0", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9986357435197817, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $c[$x])\n {\n $e += $b[$x] - $c[$x];\n }\n}\nif($d < $e)\n{\n print \"Yes\";\n}\nelse\n{\n print \"No\";\n}\n?>", "lang": "PHP", "bug_code_uid": "b25f6301500837e823a7bb55c119a19a", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "apr_id": "e72f3bc73120885c8314123046e69a23", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9983471074380166, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " array_sum($second)) {\n echo 'Yes';\n} else {\n echo 'No';\n}", "lang": "PHP", "bug_code_uid": "d017c8dc25464c20b7270f5082bb0b2f", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "apr_id": "6162ac0a53e204b29f1abf4283476237", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8984126984126984, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f240c9bda28aa1d784578658aca4d237", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "c0c4304a1ef087553f72f2bba14c76d0", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.4276729559748428, "equal_cnt": 17, "replace_cnt": 9, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 17, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b987e5771b31fc4230515b421894013e", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "e3721241e0f162fff5219a36bdea251d", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9684908789386402, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 0){\n echo (\"YES\");\n }\n else \n echo (\"NO\");", "lang": "PHP", "bug_code_uid": "5b83835a7882c9eb0012748628ca6805", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "6da888c45701c2306bf4ac9a9772de50", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9891891891891892, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 0; $x--)\n {\n rsort($c);\n $j = 0;\n for($y = 0; $y < count($c); $y++)\n {\n if($c[$y] < $e[$x])\n {\n array_splice($c, $y, 1);\n $j = 1;\n break;\n }\n }\n if($j == 0)\n {\n $c[count($c)] = $e[$x];\n array_splice($e, $x, 1);\n }\n else\n {\n $c[count($c)] = $e[$x];\n array_splice($e, $x, 1);\n $e[count($e)] = $c[$y];\n break;\n }\n }\n rsort($c);\n $i = array_merge($e, $c);\n print implode($i);\n }\n else\n {\n rsort($c);\n $i = array_merge($e, $c);\n print implode($i);\n }\n }\n else\n {\n print implode($e);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "8cb49b424d7e07ca22c4e001e7bb8774", "src_uid": "bc31a1d4a02a0011eb9f5c754501cd44", "apr_id": "fe54030a3caaa2a9dff0c426a750b7ea", "difficulty": 1700, "tags": ["dp", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8786026200873363, "equal_cnt": 13, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 10, "fix_ops_cnt": 12, "bug_source_code": " $g)\n{\n print \"1\";\n}\nelse\n{\n print \"0\";\n}\n?>", "lang": "PHP", "bug_code_uid": "3eab8a368013ad5a3b068a28328c6536", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "6a2b85c972e64292a620f9429c643d48", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9929078014184397, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $b) echo '-1';\n\telseif ($a < $b) echo '1';\n\telse echo '0';\n?>", "lang": "PHP", "bug_code_uid": "82f86e55e1451df814d6f4fd812f9f42", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "0eaec4625f4f71797a12cbefe5565ae1", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7980049875311721, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "\n ", "lang": "PHP", "bug_code_uid": "7a94528205e61834089cf6e1ed121717", "src_uid": "6df251ac8bf27427a24bc23d64cb9884", "apr_id": "f66d53075ce0c90dd95b72b3f1733a4a", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9722222222222222, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "1;$i--){\n $summ += ($rinc*($i-1)+1);\n $rinc++;\n \n}\n\necho $summ+1;\n\n?>", "lang": "PHP", "bug_code_uid": "bdd8d45948f9d90a23839e8899567ff8", "src_uid": "6df251ac8bf27427a24bc23d64cb9884", "apr_id": "1559507627e84c081d241e6203417f61", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9321428571428572, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2582a30203ce63e283edb9ddc26c8789", "src_uid": "23f2c8cac07403899199abdcfd947a5a", "apr_id": "79b761dd5dcf7f3a2fff65ee991eade7", "difficulty": 1600, "tags": ["greedy", "math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8592592592592593, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= 0) {\n\t\tif ($d[$a] < 0) {\n\t\t\tarray_push($b, $d[$a]);\n\t\t} else {\n\t\t\tarray_push($c, $d[$a]);\n\t\t}\n\t\t$a--;\n\t}\n\techo (array_sum($b) + array_sum($c));\n?>", "lang": "PHP", "bug_code_uid": "cf8cd168588509c3fe87e7d7ef0e2915", "src_uid": "4b5d14833f9b51bfd336cc0e661243a5", "apr_id": "0f2303837802fd951c89784f322d6277", "difficulty": 800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9918433931484503, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= $a)\n{\n print $f;\n}\nelse\n{\n while(TRUE)\n {\n $g += min($c, $b + ($f * $d) - $e);\n $f++;\n if($g >= $a)\n {\n break;\n }\n }\n print $f;\n}\n?>", "lang": "PHP", "bug_code_uid": "c54382122b2ed1124094d01e46b52f43", "src_uid": "b743110117ce13e2090367fd038d3b50", "apr_id": "4860c15317edfc218ef39b109e5033c2", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9945652173913043, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "= $a[0]) {\n for ($i = 1; $i <= $n; $i++) {\n if (($i - 1) * $i * $a[3] + $i * ($a[1] + $a[3] - $a[4]) + $a[1] >= $a[0]) {\n echo $i + 1;\n break;\n }\n }\n} else {\n echo ceil(($a[0] - ($n - 1) * $n * $a[3] - $n * ($a[1] + $a[3] - $a[4]) - $a[1])/($a[2]-$a[4]))+ $n + 1;\n}\n?>", "lang": "PHP", "bug_code_uid": "1d39c8d2d90207c0c42499905eb6f59c", "src_uid": "b743110117ce13e2090367fd038d3b50", "apr_id": "d878584278ee60bad4d13959906519f8", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.689280868385346, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5d8e6e12805b31104fe260a54f1a0d5f", "src_uid": "745f81dcb4f23254bf6602f9f389771b", "apr_id": "60ae96a930e9d9a7aaef55331229829a", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.948892674616695, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "42d40232d8fa29a7ae10012e952dbad7", "src_uid": "8ffee18bbc4bb281027f91193002b7f5", "apr_id": "89cb646bf949926da6e794bca8b78384", "difficulty": 1200, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9995363931386184, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= 2 && $y >= 2) {\n $x-=2;\n $y-=2;\n return true;\n } else if ($x >= 1 && $y >= 12) {\n $x-=1;\n $y-=12;\n return true;\n } else if ($x >= 0 && $y >= 22) {\n $y-=22;\n return true;\n } else {\n return false;\n }\n}\n\nfunction doit2(& $x, & $y) {\n if ($x >= 0 && $y >= 22) {\n $y-=22;\n return true;\n } else if ($x >= 1 && $y >= 12) {\n $x-=1;\n $y-=12;\n return true;\n } else if ($x >= 2 && $y >= 2) {\n $x-=2;\n $y-=2;\n return true;\n } else {\n return false;\n }\n}\n\nfunction doit(){\n $var = fgets(STDIN);\n $i=0;\n $arr = explode(\" \", $var);\n\n for( ; ;){\n if($i===0){\n if(!doit1($arr[0],$arr[1])){\n print \"Hanko\\n\";\n return ;\n }\n }\n else{\n if(!doit2($arr[0],$arr[1])){\n print \"Ciel\\n\";\n return ;\n }\n }\n $i = ( $i==0 ? 1 : 0 );\n }\n}\n doit();\n?>\n", "lang": "PHP", "bug_code_uid": "44d91799666b2657d7b07b0c7f9f6edd", "src_uid": "8ffee18bbc4bb281027f91193002b7f5", "apr_id": "ab593ff1798201e73db8ba091e766193", "difficulty": 1200, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9846153846153847, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " \n ", "lang": "PHP", "bug_code_uid": "041f9f1d0f2aa7d909ad79c5d0fc3f94", "src_uid": "20c2d9da12d6b88f300977d74287a15d", "apr_id": "2bd16d6312846ea88f2135721e77abf6", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9886178861788618, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "29081c2cd0afff12554598ccf2897808", "src_uid": "2acf686862a34c337d1d2cbc0ac3fd11", "apr_id": "83653b1dddb89707abf029cd96e2a1af", "difficulty": 1000, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9724424311060778, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": " $val){\n echo \"Id: $i, Val: $val\\n\";\n}\n*/\nfor ($i = 1; $i <= sqrt($num); $i += 1) {\n if ($num % $i == 0) {\n $k = $num / $i;\n //echo \"probando $i $k \\n\";\n $f_i = 0;\n $f_j = 0;\n for ($j = 0; $j <= 9; $j += 1) {\n if (substr_count((string)$num, (string)$j) > 0){\n if (substr_count((string)$i, (string)$j) > 0 and $f_i == 0){\n echo \"$i\\n\";\n $f_i = 1;\n }\n if (substr_count((string)$k, (string)$j) > 0 and $f_j == 0 and $i != $k) {\n echo \"$k\\n\";\n $f_j = 1;\n }\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "2a674596641ca70acc73d48ef8ed0015", "src_uid": "ada94770281765f54ab264b4a1ef766e", "apr_id": "b7cfc761c10e37909f68b97a4bfe64cc", "difficulty": 1300, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8069948186528497, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "010b9cf18e25c8754a4f97c878c3d188", "src_uid": "cb4de190ae26127df6eeb7a1a1db8a6d", "apr_id": "9db34443196a046a08056b9046c9e6dc", "difficulty": 1900, "tags": ["brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9708222811671088, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "fscanf(STDIN, \"%d\", $n);\n\necho solution($n);\n\n// End of interface\n\n\nfunction solution($n){\n\t$res = 0;\n\tfor ($i=1; $i<$n; $i++){\n\t\tif ($n % $i === 0){\n\t\t\t$res++;\n\t\t}\n\t}\n\treturn $res;\n};", "lang": "PHP", "bug_code_uid": "c1f5a59deffb5626f562e3d3ffc1557b", "src_uid": "89f6c1659e5addbf909eddedb785d894", "apr_id": "51ee21159a8152f12a86b129ff874d31", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7453271028037384, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "main = new MainClass;\n\t\t\n\t\tfscanf(STDIN, \"%d\", $n);\n\t\t\n\t\t$solutionResult = $this->main->solution($n);\n\t\n\t\techo $solutionResult;\n\t}\n}\n\nclass MainClass {\n\tpublic $problemLink = 'https://codeforces.com/problemset/problem/935/A';\n\tpublic $submissionLink = 'https://codeforces.com/contest/935/submission/55562632';\n\n\tpublic function solution($n){\n\t\t$res = 0;\n\t\tfor ($i=1; $i<$n; $i++){\n\t\t\tif ($n % $i === 0){\n\t\t\t\t$res++;\n\t\t\t}\n\t\t}\n\treturn $res;\n\t}\n}", "lang": "PHP", "bug_code_uid": "ad837f035e8431e3936e3fbce67cc595", "src_uid": "89f6c1659e5addbf909eddedb785d894", "apr_id": "51ee21159a8152f12a86b129ff874d31", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9908256880733946, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9ca5c52f9edd1fa0d3ba49c3bbb797ff", "src_uid": "a8c14667b94b40da087501fd4bdd7818", "apr_id": "6eb8a3389b011ab3692648cfb9e02539", "difficulty": 800, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9962546816479401, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6568bc44471fe3cdad0233da83cae2a2", "src_uid": "a8c14667b94b40da087501fd4bdd7818", "apr_id": "a18382cb15aaf7c674d6386fabfdb4b4", "difficulty": 800, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7444933920704846, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b22f193ddc28f4f66ced7c35a016b95a", "src_uid": "a8c14667b94b40da087501fd4bdd7818", "apr_id": "ecf49888e911c64a10fa6f7ebb80a33d", "difficulty": 800, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8660436137071651, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " $value){\n\t\t$ans = max($value);\n\t}\n\t//$ans = max($array);\n\t//var_dump($ans);\n\techo $ans;\n\n ?>", "lang": "PHP", "bug_code_uid": "2855d24b9c0f5f1d7a43b39cd8a74d0d", "src_uid": "2f650aae9dfeb02533149ced402b60dc", "apr_id": "2e8ae52c279d566574e595b8fad2d70b", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.6666666666666666, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $d[$x + 1])\n {\n $e = 1;\n break;\n }\n}\nif($e == 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "966a852608108d684e57ebf41161e6ec", "src_uid": "c4551f66a781b174f95865fa254ca972", "apr_id": "eb7b874b90e2e1077fdd9698b90d25d8", "difficulty": 1100, "tags": ["greedy", "strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9864406779661017, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "#!/usr/bin/php\n", "lang": "PHP", "bug_code_uid": "7dcb20e16cfdddb2dc24d34e56e3e8d0", "src_uid": "c4551f66a781b174f95865fa254ca972", "apr_id": "3ff57732341a5cb4b550e527f3f651c5", "difficulty": 1100, "tags": ["greedy", "strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8900158478605388, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": " $c)\n {\n print implode($d);\n }\n else\n {\n print implode($b);\n }\n}\nelseif(strlen($a) > 2)\n{\n $b = str_split($a);\n $c = array_sum($b);\n $d[0] = $b[0] - 1;\n for($x = 1; $x < strlen($a); $x++)\n {\n $d[$x] = 9;\n }\n \n $e = array_sum($d);\n if($e > $c)\n {\n $f = $d;\n $f[0]++;\n $f[1]--;\n if(implode($f) < $a)\n {\n for($x = 1; $x < strlen($a) - 1; $x++)\n {\n $g = $f[$x];\n $h = $f[$x + 1];\n $f[$x] = $h;\n $f[$x + 1] = $g;\n if(implode($f) >= $a)\n {\n $f[$x] = $g;\n $f[$x + 1] = $h;\n print implode($f);\n break;\n }\n }\n }\n else\n {\n print implode($d);\n }\n }\n else\n {\n print implode($b);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "223108453adc1e8d80ec5cf23fc4a1bb", "src_uid": "e55b0debbf33c266091e6634494356b8", "apr_id": "b4425bd1f36d86a494f985fc072600ea", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9892969569779643, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1){\n if($x[0] > 1){\n if($x[1] == 9){\n $last9StreakPosition = findLast9StreakPosition($x);\n $xMax .= $x[0];\n $xMax .= str_repeat('9', $last9StreakPosition);\n\n $xMaxLen = strlen($xMax);\n if($xLen > $xMaxLen){\n $xMax[$last9StreakPosition] = $xMax[$last9StreakPosition] - 1;\n $xMax .= str_repeat('9', $xLen - $xMaxLen);\n }\n }else{\n $xMax = $x[0] - 1;\n $xMax .= str_repeat('9', $xLen - 1);\n }\n\n $xMaxSum = array_sum(str_split($xMax));\n $xSum = array_sum(str_split($x));\n\n if($xMaxSum > $xSum){\n $xResult = $xMax;\n }\n }else{\n if($x[1] > 0){\n if($x[1] < 8){\n $xMax = $x[0] - 1;\n $xMax .= str_repeat('9', $xLen - 1);\n $xMax = (string)intval($xMax);\n }\n else{\n if($x[1] == 9){\n $last9StreakPosition = findLast9StreakPosition($x);\n $xMax .= $x[0];\n $xMax .= str_repeat('9', $last9StreakPosition);\n\n $xMaxLen = strlen($xMax);\n if($xLen > $xMaxLen){\n $xMax[$last9StreakPosition] = $xMax[$last9StreakPosition] - 1;\n $xMax .= str_repeat('9', $xLen - $xMaxLen);\n }\n }else{\n $xMax = $x[0] - 1;\n $xMax .= str_repeat('9', $xLen - 1);\n }\n }\n\n $xMaxSum = array_sum(str_split($xMax));\n $xSum = array_sum(str_split($x));\n\n if($xMaxSum > $xSum){\n $xResult = $xMax;\n }\n }else{\n $xMax .= str_repeat('9', $xLen - 1);\n\n $xMaxSum = array_sum(str_split($xMax));\n $xSum = array_sum(str_split($x));\n\n if($xMaxSum > $xSum){\n $xResult = $xMax;\n }\n }\n }\n}\n\necho $xResult.PHP_EOL;\n", "lang": "PHP", "bug_code_uid": "18f935ee13be2a62f71aeb4ab801dd53", "src_uid": "e55b0debbf33c266091e6634494356b8", "apr_id": "eafb3dfcf799a9ab167e700375babe0b", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9671412924424972, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "';\n\n if (is_array($data)) {\n print_r($data);\n } else {\n var_dump($data);\n }\n\n if ($die) {\n die();\n }\n\n echo '';\n}\n\nfunction stdin() {\n $stdin = @fopen('data.txt', 'r');\n if (!$stdin) {\n $stdin = fopen('php://stdin', 'r');\n }\n\n return $stdin;\n}\n\nfunction g() {\n global $stdin;\n return trim(fgets($stdin));\n}\n\n$stdin = stdin();\n/****************************************************** Solving block *****************************************************/\nlist($x1, $y1, $x2, $y2, $x3, $y3) = explode(' ', g());\n\nfunction pifagor($x1, $y1, $x2, $y2, $x3, $y3) {\n $a = pow(abs($x1-$x2), 2) + pow(abs($y1-$y2), 2);\n $b = pow(abs($x1-$x3), 2) + pow(abs($y1-$y3), 2);\n $c = pow(abs($x3-$x2), 2) + pow(abs($y3-$y2), 2);\n\n $max = $a;\n if($b > $max) $max = $b;\n if($c > $max) $max = $c;\n\n return $max == $a + $b + $c - $max;\n}\n\n$pifagor = pifagor($x1, $y1, $x2, $y2, $x3, $y3);\n\n$almost =\n pifagor($x1+1, $y1, $x2, $y2, $x3, $y3) ||\n pifagor($x1-1, $y1, $x2, $y2, $x3, $y3) ||\n pifagor($x1, $y1+1, $x2, $y2, $x3, $y3) ||\n pifagor($x1, $y1-1, $x2, $y2, $x3, $y3) ||\n\n pifagor($x1, $y1, $x2+1, $y2, $x3, $y3) ||\n pifagor($x1, $y1, $x2-1, $y2, $x3, $y3) ||\n pifagor($x1, $y1, $x2, $y2+1, $x3, $y3) ||\n pifagor($x1, $y1, $x2, $y2-1, $x3, $y3) ||\n\n pifagor($x1, $y1, $x2, $y2, $x3+1, $y3) ||\n pifagor($x1, $y1, $x2, $y2, $x3-1, $y3) ||\n pifagor($x1, $y1, $x2, $y2, $x3, $y3+1) ||\n pifagor($x1, $y1, $x2, $y2, $x3, $y3-1) ||\n\n false;\n\nif($pifagor) {\n echo 'RIGHT';\n} else if($almost) {\n echo 'ALMOST';\n} else {\n echo 'NEITHER';\n}\n\n\n?>", "lang": "PHP", "bug_code_uid": "0fe2555006a8abe9f6d0988a8a922b83", "src_uid": "8324fa542297c21bda1a4aed0bd45a2d", "apr_id": "46ebf73bc98c1251b85a3157867eded3", "difficulty": 1500, "tags": ["geometry", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6270543615676359, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5b4f071558a1012c999de2989fc9ce1b", "src_uid": "4e57740be015963c190e0bfe1ab74cb9", "apr_id": "769e42e307de4aff5373827f3f30a32d", "difficulty": 1100, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9920844327176781, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 1)\n {\n $d = floor($c[$x] / 14);\n $e = $c[$x] % 14;\n $c[$x] = 0;\n $f = $x + 1;\n if($f == 14)\n {\n $f == 0;\n }\n $g = 1;\n while(TRUE)\n {\n if($f == 14)\n {\n $f = 0;\n }\n $c[$f] += $d;\n if($e > 0)\n {\n $c[$f]++;\n $e--;\n }\n $f++;\n if($g == 14)\n {\n break;\n }\n else\n {\n $g++;\n }\n }\n $h = 0;\n for($y = 0; $y < 14; $y++)\n {\n $i = $c[$y] % 2;\n if($i == 0)\n {\n $h += $c[$y];\n }\n }\n $b[count($b)] = $h;\n }\n}\nprint max($b);\n?>", "lang": "PHP", "bug_code_uid": "1c0960f04ca901f5f81dc0fb2c74f7c4", "src_uid": "1ac11153e35509e755ea15f1d57d156b", "apr_id": "7e161e802057810478ffcd5ab46451af", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9900514579759863, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "\".$ans[$i].\", \\n\";\n }\n}\n\nfunction GetSum(){\n global $prime;\n global $sum;\n global $p;\n $prime_len = count($prime);\n $cnt = 0;\n for($i = 0 ; $i < $prime_len ; $i++){\n if($p[$prime[$i] + $prime[$i+1] + 1]){ // \u548c\u4e5f\u8981\u662f\u7d20\u6570\n $sum[$cnt++] = $prime[$i] + $prime[$i+1] + 1;\n //echo \"sum = \".$sum[$cnt-1].\"\\n\";\n }\n }\n}\n\nfunction GetPrime(){\n global $prime; \n global $p;\n $end = 1e4;\n $p = memset($p,1 , $end);\n $p[1] = 0;\n for ($i = 2 ; $i < $end/2 ; $i ++){\n if($p[$i])\n for ($j = $i+$i ; $j < $end ; $j += $i){\n if($p[$j])\n $p[$j] = 0;\n }\n }\n $cnt = 0;\n for($i = 2 ; $i < $end ; $i++){\n if($p[$i]){\n $prime[$cnt++] = $i;\n //echo $i.\",\"; \n }\n } \n //echo \"count:\".count ($prime);\n}\n\n\n\nfunction memset($arr , $value , $length){\n for ($i = 0 ; $i < $length ; $i++){\n array_push($arr,$value);\n }\n return $arr;\n}\n?>", "lang": "PHP", "bug_code_uid": "a1781018ff8f4942861c38318319ff27", "src_uid": "afd2b818ed3e2a931da9d682f6ad660d", "apr_id": "bfbe5cb5eb4e6e875b4b8003fb096542", "difficulty": 1000, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.42248995983935744, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "=$explode[1]) $pos='YES'; else $pos='NO';\n\t $File = \"php://stdout\"; \n $Handle = fopen($File, 'w'); \n fwrite($Handle, $pos);\n?>", "lang": "PHP", "bug_code_uid": "37356becf4fdd779bd4c683bc9b9c692", "src_uid": "afd2b818ed3e2a931da9d682f6ad660d", "apr_id": "8ca5ddbc8e091efca25c98baddc9f16f", "difficulty": 1000, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3265940902021773, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": " 1)\n{\n $f = $a;\n while(TRUE)\n {\n $f += $c * 1000;\n if($b <= $f)\n {\n break;\n }\n }\n $g = 0;\n $h = $a;\n for($x = $f - ($c * 1000); $x <= $f; $x++)\n {\n $h += $c;\n if($h == $b)\n {\n $g = 1;\n break;\n }\n }\n if($g == 0)\n {\n print \"NO\";\n }\n else\n {\n print \"YES\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "eed20ce1820ab50c950fcb201cfe9a81", "src_uid": "9edf42c20ddf22a251b84553d7305a7d", "apr_id": "a82e7a838dfa09c2260d3f91eed9e1f4", "difficulty": 1100, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3926940639269406, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "d24cd1881d78b87a0fa1bd218cfe47d5", "src_uid": "9edf42c20ddf22a251b84553d7305a7d", "apr_id": "7077b605073e6e0b5c12ae9d6c56ccde", "difficulty": 1100, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3504043126684636, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "= 0) {\n while ($i < $b) {\n $i += $c;\n }\n} else {\n while ($i > $b) {\n $i += $c;\n }\n}\nif ($i == $b) {\n print \"YES\";\n} else {\n print \"NO\";\n}\n?>\n\n", "lang": "PHP", "bug_code_uid": "19a2ff60aec7d15ac68ec2939d5402d8", "src_uid": "9edf42c20ddf22a251b84553d7305a7d", "apr_id": "7077b605073e6e0b5c12ae9d6c56ccde", "difficulty": 1100, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9876106194690265, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a5ab225fa8a39409247aa77db7da5c7e", "src_uid": "cad8283914da16bc41680857bd20fe9f", "apr_id": "bc5ec65e48bbb139e1b18f311d6ba02b", "difficulty": 900, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9051094890510949, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "389f472be4866c0770b61db343a6df75", "src_uid": "cad8283914da16bc41680857bd20fe9f", "apr_id": "bec61e7d7d3816111834ecec6ff13b81", "difficulty": 900, "tags": ["strings", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8213977566867989, "equal_cnt": 13, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 12, "bug_source_code": " $value) {\n$total+=$value;\nif($total>=$du){\n$res = $key+1;\nbreak;\n}\n}\n\necho $res;", "lang": "PHP", "bug_code_uid": "a1ef5c3e8df3d291d738eff4c4ce58ce", "src_uid": "007a779d966e2e9219789d6d9da7002c", "apr_id": "59d8079ab25f640032e626fe2b8df4e9", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9507389162561576, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " 0)\n{\n $n -= $mas[$i];\n if ($i + 1 == count($mas))\n $i = -1;\n $i++;\n \n}\necho $i;\n?>", "lang": "PHP", "bug_code_uid": "efec9ceeed2f84c4cb489520a61d1e4c", "src_uid": "007a779d966e2e9219789d6d9da7002c", "apr_id": "3aea81e8d82257ebc68bcbe475a381b6", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9391941391941392, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0dc499884500c2b1ca93b544527995ee", "src_uid": "51155e9bfa90e0ff29d049cedc3e1862", "apr_id": "7778206fe681a5bf9c81d32c3d2defa9", "difficulty": 2000, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8963893249607535, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 9, "bug_source_code": " $value) {\n if ($value == \"G\") {\n $f=$key;\n }\n \n}\n\n\nwhile (TRUE) {\n$t= $f + $jump;\n$t1=$f - $jump;\n\n\n\nif ($str[$t1] == \"#\") {\n \n echo \"NO\";\n break;\n}elseif ($str[$t1] == \"T\") {\n \n echo \"YES\";\n break;\n}elseif ($str[$t] == \"#\") {\n \n echo \"NO\";\n break;\n}elseif ($str[$t] == \"T\") {\n \n echo \"YES\";\n break;\n}else $jump = $u + $jump;\n\n\n if ($jump > $len){\n \n echo \"NO\";\n break;\n } \n \n}\n\n \n\n?>", "lang": "PHP", "bug_code_uid": "391dc7f57525324aba05a3ea3ea85499", "src_uid": "189a9b5ce669bdb04b9d371d74a5dd41", "apr_id": "06c3dcf6580c2510370aaa018c9d30f5", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9521829521829522, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "$target)\n {\n\t$tmp=$start;\n\t$start=$target;\n\t$target=$tmp;\n}\n\n\n // $obstract=0;\n\t for ($i=$start-1; $i <=strlen($str) ; $i+=$k)\n\t { \n\t\t if($i>$target)\n\t\t {\n\t\t \t echo \"NO\\n\";\n\t\t \t break;\n\t\t }\n\t\t \t if($i==$target-1)\n\t\t \t {\n\t\t \t \t echo \"YES\\n\";\n\t\t \t \t break;\n\t\t \t }\n\t\t \t \n\t\t \t if($str[$i]=='#')\n\t\t \t {\n\t\t \t \t echo \"NO\\n\";\n\t\t \t \t break;\n\t\t \t }\n\n\n\t }\n\t \n\t \t\n\n/*\nif($flag==1)\n\techo \"YES\\n\";\nelse\n\techo \"NO\\n\";\n*/", "lang": "PHP", "bug_code_uid": "afacfcbbef704c63e9e87ca3fd8d8966", "src_uid": "189a9b5ce669bdb04b9d371d74a5dd41", "apr_id": "38707c9312b32e831a1ba026ccf01537", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9790145985401459, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "$pos_T && $canJump==0) ||($pos_G<$len && $nchar[$pos_G]=='#'))\n {\n echo 'NO';break;\n } \n }\n \n }else{\n while($pos_G>=$pos_T){\n\n if($pos_G==$pos_T){\n $canJump =1;\n echo 'YES';\n } \n $pos_G = $pos_G-$k;\n if(($pos_G<$pos_T && $canJump==0) ||($pos_G>-1 && $nchar[$pos_G]=='#'))\n {\n echo 'NO';break;\n } \n \n }\n }\n}\n\n\n$nk = trim(fgets(STDIN));\n$nchar = trim(fgets(STDIN));\n \nfindCanJump($nk,$nchar);\n\n", "lang": "PHP", "bug_code_uid": "151d6c9f87fdc0b2398270d88b1f17d7", "src_uid": "189a9b5ce669bdb04b9d371d74a5dd41", "apr_id": "d3302d4e7699be06b35477d9164899f7", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9801587301587301, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "6 || $one>6) {\n\t\t$danger=1;\n\t\tbreak;\n\t}\n}\necho ($danger)?\"YES\":\"NO\";\n?>", "lang": "PHP", "bug_code_uid": "4f719454faeafe3aaa147fa114c9240e", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "652c2f02dd25d9f9ab354c5a9a1283c7", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8296122209165687, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c44ab664c4f8b658976f3732a5699bfd", "src_uid": "d486a88939c132848a7efdf257b9b066", "apr_id": "4388fafd74a242b3125a3a562c025db8", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9992673992673993, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 3) {\n echo -1;\n die();\n}\n$keys = array_keys($itemsMap);\nasort($keys);\n$minItem = (int)min($keys);\n$maxItem = (int)max($keys);\n$delta = floor(($maxItem - $minItem) / 2);\n$middle = $keys[1] - $keys[0];\nif (count($keys) === 2) {\n echo ($maxItem - $minItem) % 2 === 0 ? $delta : $maxItem - $minItem;\n} elseif (($keys[2] - $keys[1]) === $middle) {\n echo $middle;\n} else {\n echo -1;\n}\n", "lang": "PHP", "bug_code_uid": "cad7a7bcea3edee2504b173fdf7e6638", "src_uid": "d486a88939c132848a7efdf257b9b066", "apr_id": "ef9955e88e44f506e2571f3efade3141", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9993434011818779, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 3) {\n echo -1;\n die;\n}\n\n$numbers = array_map('intval', $numbers);\nksort($numbers);\n\n$numbers = array_values($numbers);\n\n$d = -1;\nswitch (count($numbers)) {\n case 1:\n $d = 0;\n break;\n case 2:\n $diff = $numbers[1] - $numbers[0];\n if ($diff % 2) {\n $d = $diff;\n } else {\n $d = $diff / 2;\n }\n break;\n case 3:\n if (($numbers[2] - $numbers[1]) !== ($numbers[1] - $numbers[0])) {\n $d = -1;\n } else {\n $d = $numbers[2] - $numbers[1];\n }\n break;\n}\n\nif ($d < -1) {\n $d = -1;\n}\n\necho $d;\n\n", "lang": "PHP", "bug_code_uid": "c9e7b1dffe3fb56333352c7d6d3fa5cd", "src_uid": "d486a88939c132848a7efdf257b9b066", "apr_id": "f01fac34d310b73dd7b5dc7932a7657a", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.3317125877903836, "equal_cnt": 20, "replace_cnt": 10, "delete_cnt": 6, "insert_cnt": 3, "fix_ops_cnt": 19, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b59c8e5516af1fb49a78a203f00632ae", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "apr_id": "6539b07d25b536996890875eb64628c6", "difficulty": 800, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8003992015968064, "equal_cnt": 14, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 13, "bug_source_code": " $f)\n{\n $g = array_slice($d, 0, $f);\n $h = array_slice($d, $f);\n $i = array_merge($b, $g);\n array_push($i, \".\");\n $j = array_merge($i, $h);\n if($j[1] == \".\")\n {\n print implode($j);\n }\n else\n {\n $k = count($j);\n for($x = 0; $x < $k; $x++)\n {\n if($j[$x] == 0)\n {\n unset($j[$x]);\n }\n else\n {\n break;\n }\n }\n print implode($j);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "b7bff6ee70916b2553adacd89628daac", "src_uid": "a79358099f08f3ec50c013d47d910eef", "apr_id": "b81391830dc57cfa9afa71e5bfd22538", "difficulty": 1400, "tags": ["strings", "math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7047184170471842, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": " $d[$i])\n\t\t\t\t{\n\t\t\t\t\t$tri = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t} else if (abs($d[$j] - $d[$k]) = $d[$i] || $d[$j] + $d[$k] = $d[$i])\n\t\t\t\t{\n\t\t\t\t\t$seg = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}\n\t\n\tif ($tri) print(\"TRIANGLE\");\n\telse if ($seg) print(\"SEGMENT\");\n\telse print(\"IMPOSSIBLE\");\n}\n\n?>", "lang": "PHP", "bug_code_uid": "b14f53017abc120c28a4775fbbb75309", "src_uid": "8f5df9a41e6e100aa65b9fc1d26e447a", "apr_id": "2f3edc3d4df5acb049c5fc754918de75", "difficulty": 900, "tags": ["geometry", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9754098360655737, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $d[$i])\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$tri = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t} else if ($d[$j] + $d[$k] == $d[$i] || $d[$j] + $d[$i] == $d[$k] || $d[$i] + $d[$k] == $d[$j])\n\t\t\t\t{\n\t\t\t\t\t$seg = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}\n\n\tif ($tri) print(\"TRIANGLE\");\n\telse if ($seg) print(\"SEGMENT\");\n\telse print(\"IMPOSSIBLE\");\n}\n\n?>", "lang": "PHP", "bug_code_uid": "72f67128ae7cde493b8ee6c324e2fd9f", "src_uid": "8f5df9a41e6e100aa65b9fc1d26e447a", "apr_id": "2f3edc3d4df5acb049c5fc754918de75", "difficulty": 900, "tags": ["geometry", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9986468200270636, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $tri[2] )\n\t\t{\n\t\t\tdie('TRIANGLE');\n\t\t\t$sol = max($sol, TRI);\n\t\t}\n\t\telseif ( ($tri[0] + $tri[1]) == $tri[2] )\n\t\t\t$sol = max($sol, SEG);\n\t\telse\n\t\t\t$sol = max($sol, IMP);\n\t}\n\tswitch ($sol)\n\t{\n\t\tcase TRI:\n\t\t\techo 'TRIANGLE';\n\t\t\tbreak;\n\t\tcase SEG:\n\t\t\techo 'SEGMENT';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\techo 'IMPOSSIBLE';\n\t\t\tbreak;\n\t}\n?>", "lang": "PHP", "bug_code_uid": "87f89c9692d157dd9afe09262135c730", "src_uid": "8f5df9a41e6e100aa65b9fc1d26e447a", "apr_id": "2507f83591ed68023bdf3bf11cfb3436", "difficulty": 900, "tags": ["geometry", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.95, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "514548ec88066026840901d09ca77bda", "src_uid": "4b7ff467ed5907e32fd529fb39b708db", "apr_id": "435159d5797ceffab7c3e0335795e457", "difficulty": 1000, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.75, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "161544094791c2066d14d6cd15fb6d6d", "src_uid": "df48af9f5e68cb6efc1214f7138accf9", "apr_id": "b74364c95ba08cf901bd8974b88e79e6", "difficulty": 1400, "tags": ["brute force", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4964788732394366, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": " 10) {\n $result = ceil($result / 2);\n}\n\nif ($result > 5) {\n $result -= 5;\n}\n\necho($names[$result]);\n", "lang": "PHP", "bug_code_uid": "e024b3aa30c835a41710527c3959482f", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "4fec59cb2c6c6bd814d1f520c0efdb51", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9899244332493703, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $min) {\n if ($level) {\n $pow *= 2;\n }\n \n $min = 10 * $pow - 5;\n $level++;\n}\n\nwhile ($in + $pow <= $min) {\n $min -= $pow;\n $result--;\n}\n\necho($names[$result]);", "lang": "PHP", "bug_code_uid": "a97a68831728e08705d15b0bbe8731c9", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "4fec59cb2c6c6bd814d1f520c0efdb51", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5532879818594104, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "6e7f69a58002ff3a5afc0400c450d4f2", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "2a2dbecf2c5b00e04bd8f493f9b3a519", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7173396674584323, "equal_cnt": 17, "replace_cnt": 5, "delete_cnt": 7, "insert_cnt": 4, "fix_ops_cnt": 16, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e6a8ee71b657cf2fec03730b034c59bb", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "bd086cc518db90fd5ce19659a7abbfbb", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9701834862385321, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 0 ; $j--) { \n $pos -= $i;\necho \" j=$j pos=$pos \\n\";\n if ($pos < $n) {\n $out = $a[$j];\n break;\n }\n}\n\necho $out;\n\n?>", "lang": "PHP", "bug_code_uid": "ede820052a4bc37819acf66b88f59122", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "81369c45f02945e5d1f3b1c9c49a85b0", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7586206896551724, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": " 5 ? $TBBT[$sequence%6] : $TBBT[$sequence-1];\n?>", "lang": "PHP", "bug_code_uid": "f7e9a99998af8edb8667e171b82656bc", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "adc1ecf228d80c22afd750687fdd220f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.593186372745491, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "15de677e73f6c2cf200f6ebb680198bc", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "adc1ecf228d80c22afd750687fdd220f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9543568464730291, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e4796ac6d7bb6c123a8d49243b0545ba", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "38790250bab21f65e07cb9d814870f6f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6512396694214876, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " 'Sheldon', \n '2' => 'Leonard',\n '3' => 'Penny',\n '4' => 'Rajesh',\n '5' => 'Howard');\n\nif($n <= 5){print $p[$n]; exit(0);}\n\n$i = ceil(log($n / 5, 2));\n\n$n -= 5 * pow(2, $i - 1);\n\n$c = ceil($n / pow(2, $i - 1));\nprint $p[$c];\n?>", "lang": "PHP", "bug_code_uid": "4e6534b715362375ac4643369b95aeeb", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "4b6edad9e303bd96cdf5a2059037ae4f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2647527910685805, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": " 'Sheldon', \n 'l' => 'Leonard',\n 'p' => 'Penny',\n 'r' => 'Rajesh',\n 'h' => 'Howard');\n$q = array(1=>'s',2=>'l',3=>'p',4=>'r',5=>'h');\n$c = 5;\nfor($i=1;$i<=$n;$i++){\n $q[++$c] = $q[$i];\n $q[++$c] = $q[$i];\n if($c >= $n) break;\n}\n\nprint $p[$q[$n]];\n?>", "lang": "PHP", "bug_code_uid": "f707ea934ab2e66f9b7d3986f94a136f", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "4b6edad9e303bd96cdf5a2059037ae4f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9975728155339806, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "12b0a53243437160083533d15db4af11", "src_uid": "6bcb324c072f796f4d50bafea5f624b2", "apr_id": "865db5ed4ee74fa9e600e89e03ce57f0", "difficulty": 1200, "tags": ["greedy", "brute force", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9211956521739131, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "$item){\n if($key == count($way)-1){\n echo $item;\n break;\n }\n echo $item.' ';\n }\n return;\n }\n if($ch % 10 == 1){\n array_push($way, $ch);\n return back(substr($ch, 0, -1));\n }else if($ch % 2 == 0){\n array_push($way, $ch);\n return back($ch/2);\n }else{\n echo \"NO\";\n }\n}\nback($line1[1]);", "lang": "PHP", "bug_code_uid": "a38e7d813a151986a77df559e075c317", "src_uid": "fc3adb1a9a7f1122b567b4d8afd7b3f3", "apr_id": "89f0e4f12c8290207e258d54c54a603d", "difficulty": 1000, "tags": ["brute force", "math", "dfs and similar"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9622166246851386, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "#!/usr/bin/env php\n $s) ? \"NO\" : \"YES\";\n\techo PHP_EOL;", "lang": "PHP", "bug_code_uid": "0784a852c12e5d3bacc0836b7cbbeb84", "src_uid": "496baae594b32c5ffda35b896ebde629", "apr_id": "70fe76a3464f431599112feddadd851b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9787234042553191, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 0))\n {\n print \"-1\";\n break;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "2dca1582f3d22f6a9722568c0f46ef1d", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "apr_id": "c1a5b26fd6f97df7ba16faf5fb5c0771", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9982259018332348, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= $k )\n {\n $tmp=1;\n break;\n }\n }\n if ($k == 0)\n echo 0;\n else if ( $tmp == 1)\n echo $i+1;\n else\n echo 0;\n?>\n", "lang": "PHP", "bug_code_uid": "408277d49140965d17bfe81f01ab8d21", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "apr_id": "21c28591ba3a296dace469910cc12e6c", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8960396039603961, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "=$k) break;}\n\nprint $i+1;\n?>", "lang": "PHP", "bug_code_uid": "358c2c5e64ce1b881f93a1afa9e98a43", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "apr_id": "4330bc757ae60dfe76c02a604f61d712", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5272861356932154, "equal_cnt": 59, "replace_cnt": 52, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 58, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "923832e5501dd9e3a208a1cbf45adcd0", "src_uid": "e88bb7621c7124c54e75109a00f96301", "apr_id": "5a00b096a93f0989e41233428ef037ea", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9113193943763518, "equal_cnt": 13, "replace_cnt": 2, "delete_cnt": 6, "insert_cnt": 4, "fix_ops_cnt": 12, "bug_source_code": " $minimumValue){\n $result++;\n }else if ($resultOfConestantsInt[$count] = $minimumValue && $minimumValue != 0)\n $result++;\n }\n }\n}\n\n\nprintf(\"%s\\n\", $result);\n", "lang": "PHP", "bug_code_uid": "07730e0c756455eb7f5c1bd3014321ef", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "7168e62d6e0af7602b47acc6a050e585", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9977220956719818, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "$score){\n\t\tif($key == $k){\n\t\t\t$reference = $score;\n\n\t\t}\t\n}\n\nforeach($secondExplode as $score){\n\n\t\tif($score >= $reference && $score != 0){\n\t\t\t$approved++;\n\n\t\t}\n}\n\n echo $approved;", "lang": "PHP", "bug_code_uid": "55534c4fe86e5e012e3f0aede9237f0b", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "7d8094fb95c67e82c2c8ddbea5c009b2", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9865841073271414, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "= $b) && ($h <= $c))\n{\n print $h . \" \" . $d . \" \" . $f;\n}\nelseif($h > $c)\n{\n $i = $h - $d;\n if(($i >= $d) && ($i <= $e))\n {\n print $c . \" \" . $i . \" \" . $f;\n }\n else\n {\n $j = $a - $c - $e;\n print $c . \" \" . $e . \" \" . $j;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "1b64ffdd507a7a22ebc2a0b9357db788", "src_uid": "3cd092b6507079518cf206deab21cf97", "apr_id": "04856061048b54dffac1ceb5665118d7", "difficulty": 1100, "tags": ["greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.13083604777415853, "equal_cnt": 17, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 16, "bug_source_code": " 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0);\nfor($x = 0; $x < $a; $x++)\n{\n $c = explode(\" \", trim(fgets(STDIN)));\n for($y = 0; $y < 6; $y++)\n {\n $b[$c[$y]]++;\n }\n}\n$d = 0;\nwhile(TRUE)\n{\n $e = $d;\n $e++;\n $f = str_split($e);\n $g = $b;\n for($x = 0; $x < count($f); $x++)\n {\n $g[$f[$x]]--;\n if($g[$f[$x]] < 0)\n {\n break;\n }\n }\n if($g[$f[$x]] < 0)\n {\n break;\n }\n else\n {\n $d = $e;\n }\n}\nprint $d;\n?>", "lang": "PHP", "bug_code_uid": "7a6f2ef5fd720c12f641dad0238f5846", "src_uid": "20aa53bffdfd47b4e853091ee6b11a4b", "apr_id": "14ddbd16cd0440691ce1a232ca34a430", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5899893503727369, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "4){\n $n -= 3;\n if($m){\n $m = false;\n }else{\n $m = true;\n }\n}\n$r = 0;\nif($n==3){\n $r = $y - $x;\n}else if($n==2){\n $r = $y;\n}else if($n==1){\n $r = $x;\n}\n\nif($m){\n $r *= -1;\n}\n$r %= 1000000007;\nif ($r < 0)\n{\n $r += abs(1000000007);\n}\n\necho \"$r\\n\";", "lang": "PHP", "bug_code_uid": "b32c2c3c328285f81e45463befeed797", "src_uid": "2ff85140e3f19c90e587ce459d64338b", "apr_id": "229cbca6d899f893bd9457e42fec68fc", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9978448275862069, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "3){\n if(ceil($n/3)%2==1){\n $m = true;\n }\n $n = $n % 3;\n}\n\n$r = 0;\nif($n==0 || $n==3){\n $r = $y - $x;\n}else if($n==2){\n $r = $y;\n}else if($n==1){\n $r = $x;\n}\n\nif($m){\n $r *= -1;\n}\n$r %= 1000000007;\nif ($r < 0)\n{\n $r += 1000000007;\n}\n\necho \"$r\\n\";", "lang": "PHP", "bug_code_uid": "68dde2b61b2a21226e585ad1edb02104", "src_uid": "2ff85140e3f19c90e587ce459d64338b", "apr_id": "229cbca6d899f893bd9457e42fec68fc", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9772727272727273, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " 1) {\n break;\n }\n}\n\nfor($i = 0; $i", "lang": "PHP", "bug_code_uid": "de88115784809ffb60ece8df51ec4b7a", "src_uid": "3714b7596a6b48ca5b7a346f60d90549", "apr_id": "dd4f726a2b826f9dd08dc6d474bcd6c8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4863636363636364, "equal_cnt": 19, "replace_cnt": 8, "delete_cnt": 7, "insert_cnt": 3, "fix_ops_cnt": 18, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "429306239cd474117f9f27a22901a9af", "src_uid": "3714b7596a6b48ca5b7a346f60d90549", "apr_id": "dd4f726a2b826f9dd08dc6d474bcd6c8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9913419913419913, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e0ba594d807a2677c545e9f3988425b9", "src_uid": "699444eb6366ad12bc77e7ac2602d74b", "apr_id": "cb85e5ca2bad1ebf77878ec98992c96c", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9070735090152566, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b2226cf8bcace520bad7ac3930a3cf3f", "src_uid": "699444eb6366ad12bc77e7ac2602d74b", "apr_id": "23c8e4f062114a2230ffd7fffe882b1c", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.37950360288230583, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "\n
\n\t\n\t\n\t\n
\n", "lang": "PHP", "bug_code_uid": "8ae72826ae1efb19b326b04cb44d5e59", "src_uid": "699444eb6366ad12bc77e7ac2602d74b", "apr_id": "9d4c8e7aff20e09f841f9a323f36c6a2", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8333333333333334, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5151235dde404f82b1db991282566d51", "src_uid": "699444eb6366ad12bc77e7ac2602d74b", "apr_id": "42e186dd98cf0f23f15cd395bc5a14ac", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3486238532110092, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "910a5bb476c2718cd17b013644cda267", "src_uid": "c30b372a9cc0df4948dca48ef4c5d80d", "apr_id": "d55b309ee8565f0afd604932588af9c7", "difficulty": 800, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3850467289719626, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "= $f) && ($e <= $g))\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "8117aa3d46003f0d34be58c7be1a97ea", "src_uid": "1110d3671e9f77fd8d66dca6e74d2048", "apr_id": "b95702f252aba0f4c0683718e73d436d", "difficulty": 1200, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9422680412371134, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " $bal) {\n\tif ($bal == 0) break;\n\tif ($result >= $k) {\n\t\tif ($data2[$key-1] == $bal) $result++;\n\t\telse break;\n\t} else {$result++;\n}\n\nfile_put_contents('php://stderr', $result);", "lang": "PHP", "bug_code_uid": "20f5ca53e29afa6d498d6ab3d4fb4182", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "5a631fc4fa161f550386d25ffe2fb3e9", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9971428571428571, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= (int)$f[$k]) && ((int)$f[$i] > 0)) {\n $res++;\n }\n }\n echo $res;\n?>", "lang": "PHP", "bug_code_uid": "d7de5be2f733dba2db9f86abbfb64b30", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "11fdbd5080c3d41bd617d6dd9c3e0fac", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.47443762781186094, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "0)\n\tfor($i=0;$i<(int)$a[0];$i++)\n\t\tif((int)$b[$i]>0&&(int)$b[$i]>=(int)$b[(int)$a[1] - 1)])$n++;\necho $n;", "lang": "PHP", "bug_code_uid": "44f98333bb42aa8613cdaf6b0ebc595e", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "a04454b6fe75de62070413764813e345", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7723577235772358, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 6, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "47d6771f601f324025fc05a28437d505", "src_uid": "a4b9ce9c9f170a729a97af13e81b5fe4", "apr_id": "02bb5bb2aaf1155f9c04146df56ac174", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9773462783171522, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $m)\n swap($n, $m);\n \n if ($n & 1)\n fprintf($fo, \"Akshat\");\n else\n fprintf($fo, \"Malvika\");\n \n fclose($fi);\n fclose($fo);\n?>", "lang": "PHP", "bug_code_uid": "c36dfc56f45d47c459f91ccc167e0e78", "src_uid": "a4b9ce9c9f170a729a97af13e81b5fe4", "apr_id": "273309008b2bf3647340b6a4a6c92fc7", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9893899204244032, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "index($a, $b);\n", "lang": "PHP", "bug_code_uid": "d4168fe39c71f7f5882fa21de3609d91", "src_uid": "a4b9ce9c9f170a729a97af13e81b5fe4", "apr_id": "54de6230e290d6da4159c9a72b964662", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9141494435612083, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e932fd48b4ee80de8284d92a660480b7", "src_uid": "df49c0c257903516767fdb8ac9c2bfd6", "apr_id": "ffe530e91374fba0b00418292093e9cf", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9757127771911299, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "= 0 && $i + $t < count($keys))\n $mapp[$keys[$i]] = $keys[$i + $t];\n }\n \n $in = str_split(fgets(STDIN));\n \n $out = \"\";\n \n for ($i = 0; $i < count($in); ++$i) {\n $out .= $mapp[$in[$i]];\n }\n \n echo $out;\n \n?>", "lang": "PHP", "bug_code_uid": "9e242d3e9320506299884a9e3b302bf0", "src_uid": "df49c0c257903516767fdb8ac9c2bfd6", "apr_id": "eec429cd30c071abf2411467bff37942", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9500438212094654, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 7, "bug_source_code": "'w','w'=>'e','e'=>'r','r'=>'t','t'=>'y','y'=>'u','u'=>'i','i'=>'o','o'=>'p','p'=>'a','a'=>'s','s'=>'d','d'=>'f','f'=>'g','g'=>'h','h'=>'j','j'=>'k','k'=>'l','l'=>';','z'=>'x','x'=>'c','c'=>'v','v'=>'b','b'=>'n','n'=>'m','m'=>',',','=>'.'];\n$array2=array_flip($array);\nfor ($i=0; $i ", "lang": "PHP", "bug_code_uid": "3d992f22f9466471af3b44f976e4a606", "src_uid": "df49c0c257903516767fdb8ac9c2bfd6", "apr_id": "1fce2cf4b465b4ead4ec71fb937cadc8", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9686192468619247, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "83e789c9756c50a3a4c7134c4d5834ce", "src_uid": "df49c0c257903516767fdb8ac9c2bfd6", "apr_id": "d8ea2a6fa7c2dd959776b5e5658c935b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9853479853479854, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "68128bd9ffac03cbb82948dc4bade9bb", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "108de943ebba13f4d0e3cb735a25d17a", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9662921348314607, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c8ccf018cac338dad14c02071fdd8433", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "5d2a4a4819627b72fc59160bc4596801", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8717948717948718, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bd7162db3a9c3113a4c46400f1fa68d6", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "6d100dbc1b0d0e6159fad6729a86fa09", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9633802816901409, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f06bd26f01578cfaea53785be979e41d", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "68a5aab58d78af9adeb9a6b1f526b1b0", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9631901840490797, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5ebdf15543f7100be85838e147789e25", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "1846fff7258b11c48e4845271f8c3bf3", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9487179487179487, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "598d7342180585028622bb1b1d36d37a", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "0a5abc94f4d37770e8f66b9f2e28cac2", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8966942148760331, "equal_cnt": 24, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 14, "fix_ops_cnt": 23, "bug_source_code": "reverse(fscanf(STDIN, \"%s\", $str1), fscanf(STDIN, \"%s\", $str2));\n\n\nclass CF41ATest extends PHPUnit_Framework_TestCase{\n public function setUp(){\n \n }\n \n public function tearDown(){\n \n }\n \n public function testTranslation(){\n $translation = new Translation();\n $result = $translation->reverse('code', 'edoc');\n $this->assertInternalType('string', $result);\n $this->assertNotEmpty($result);\n $this->assertEquals(\"YES\\n\", $result);\n \n \n $result = $translation->reverse('abb', 'aba');\n $this->assertInternalType('string', $result);\n $this->assertNotEmpty($result);\n $this->assertEquals(\"NO\\n\", $result);\n \n $result = $translation->reverse('code', 'code');\n $this->assertInternalType('string', $result);\n $this->assertNotEmpty($result);\n $this->assertEquals(\"NO\\n\", $result);\n }\n}", "lang": "PHP", "bug_code_uid": "2b3a710b13d92763c2d30bc682bf548c", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "0bc66f94533b82770c0b6608961d7bb1", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9668820678513732, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "reverse(fscanf(STDIN, \"%s\", $str1), fscanf(STDIN, \"%s\", $str2));\n\n\n//class CF41ATest extends PHPUnit_Framework_TestCase{\n// public function setUp(){\n// \n// }\n// \n// public function tearDown(){\n// \n// }\n// \n// public function testTranslation(){\n// $translation = new Translation();\n// $result = $translation->reverse('code', 'edoc');\n// $this->assertInternalType('string', $result);\n// $this->assertNotEmpty($result);\n// $this->assertEquals(\"YES\\n\", $result);\n// \n// \n// $result = $translation->reverse('abb', 'aba');\n// $this->assertInternalType('string', $result);\n// $this->assertNotEmpty($result);\n// $this->assertEquals(\"NO\\n\", $result);\n// \n// $result = $translation->reverse('code', 'code');\n// $this->assertInternalType('string', $result);\n// $this->assertNotEmpty($result);\n// $this->assertEquals(\"NO\\n\", $result);\n// }\n//}", "lang": "PHP", "bug_code_uid": "2d36fae3de20b5dc1de4910d047497fc", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "0bc66f94533b82770c0b6608961d7bb1", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9371980676328503, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "99db4fd0bb987864a03a132715b0ea80", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "apr_id": "dc56920d61ddae96b5d49e926e392c10", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9539473684210527, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= 1000 && $y <= 9000) {\n\tif(strlen(count_chars($y,3))==4){\n\t\t$ada=$y;\n\t\tbreak;\n\t}\n\t$y++;\n}\necho $ada;\n?>", "lang": "PHP", "bug_code_uid": "571ca8d4d44b0baf793cd1b666f43285", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "6f49df0dae59acab77aad44f21126b2a", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9808695652173913, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9373e2e3136b94c4065e728bfabe89b5", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "2a3585558697c5ffd8332c792c916265", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9796954314720813, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 0)\n {\n \n ++$arr[$x % 10];\n if($arr[$x % 10] > 1 )\n return false;\n $x = $x/10; \n }\n return true;\n}\n\n$year = trim(fgets(STDIN));\n++$year;\nwhile(!helper($year))\n ++$year;\necho $year;\n?> \n", "lang": "PHP", "bug_code_uid": "9b1e78972f4c4c440f50bbb8a2cf071a", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "032609d8a48eae754515e0b5aaf31f31", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9975389663658737, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 1){\n break;\n }\n// if (strpos($i, $i[$n], $n + 1) !== FALSE){\n// break;\n// }\n \n if ($n == 3){ \n $flag = 1;\n break;\n }\n }\n \n if ($flag){\n echo $i . \"\\n\";\n break;\n }\n $i = (int)($i);\n }\n}", "lang": "PHP", "bug_code_uid": "2ddd833c88d3e37ed3a7dac706e5fb15", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "726ceb475d4e5d25bbf3245694848c6b", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.46524064171123, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": " $b[$a - 2])\n {\n print \"UP\";\n }\n elseif($b[$a - 1] < $b[$a - 2])\n {\n print \"DOWN\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "41cce10d49a10981cf0cd08620c281ae", "src_uid": "8330d9fea8d50a79741507b878da0a75", "apr_id": "c8d9ae5d7cef64e6aef85782e2302470", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9883755588673622, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " '',\n\t\t\"\\n\" => '',\n\t);\n\treturn strtr(fgets($f), $r);\n}\n\nfunction readNumString($f) {\n\treturn trim(fgets($f));\n}\n\nfunction stringToArray($str) {\n\treturn str_split($str);\n}\n\nfunction readNum($f, $is_int = false) {\n\t$v = readNumString($f);\n\treturn $is_int ? intval($v) : floatval($v);\n}\n\nfunction readStringExplode($f, $delimiter = ' ') {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = 'trim';\n\treturn array_map($callf, $return);\n}\n\nfunction readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = $is_int ? 'intval' : 'floatval';\n\treturn array_map($callf, $return);\n}\n\n###### /IO ######\n\nfunction getAnswer($is_test = false, $f = false) {\n\tif ($is_test)\n\t\t$stream = $f;\n\telse\n\t\t$stream = STDIN;\n\t/* begin body */\n\t$n = readNum($stream);\n\t$nums = readStringExplodeNum($stream, ' ', true);\n\tif ($n == 1) {\n\t\t$num = array_pop($nums);\n\t\tif ($num == 15) {\n\t\t\techo 'DOWN';\n\t\t} else {\n\t\t\techo -1;\n\t\t}\n\t} else {\n\n\n\t\t$nums = array_slice($nums, count($nums) - 2);\n\t\t$isDec = true;\n\t\tif ($nums[0] < $nums[1]) {\n\t\t\t$isDec = false;\n\t\t}\n\t\t$nums[2] = $nums[1] + 1;\n\t\tif ($isDec && $nums[1] > 0) {\n\t\t\t$nums[2] = $nums[1] - 1;\n\t\t}\n\t\tif ($nums[2] > 15) {\n\t\t\t$nums[2] = $nums[1] - 1;\n\t\t}\n\n\t\tif ($nums[2] > $nums[1]) {\n\t\t\techo 'UP';\n\t\t} else {\n\t\t\techo 'DOWN';\n\t\t}\n\t}\n\t/* / end body */\n}\n\nif (empty($is_test))\n\tgetAnswer();", "lang": "PHP", "bug_code_uid": "24b3dc7eadd2b714d8d1d40dadeb53e9", "src_uid": "8330d9fea8d50a79741507b878da0a75", "apr_id": "1cf37237441d1796f38bc0a163b635b4", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9670588235294117, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $moon[0][$num - 2] or $moon[0][$num - 1] == 0) {\n echo \"UP\";\n}else echo -1; \n?>", "lang": "PHP", "bug_code_uid": "cecb19c914ca810f2072d61da50e1d9e", "src_uid": "8330d9fea8d50a79741507b878da0a75", "apr_id": "1e21123ded9852ce62119b9cc0e1cb8f", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9962546816479401, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "$a[$n-2]&&$a[$n-1]!=15||$a[-1]==0){\n echo\"UP\";\n}else{\n echo\"DOWN\";\n}\n", "lang": "PHP", "bug_code_uid": "56f4ea4b1115d0ee689ce3f39a0f955b", "src_uid": "8330d9fea8d50a79741507b878da0a75", "apr_id": "09a15e6646566c99ccf2af3faa900942", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.99830220713073, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2d0f8efa31cee4485c07f7c4cc2a0920", "src_uid": "c6ec932b852e0e8c30c822a226ef7bcb", "apr_id": "f1633416d8545fc047905ff048880e68", "difficulty": 1500, "tags": ["dp", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9841986455981941, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n\t\tif ((int)$var % 4 == 0 || (int)$var % 7 == 0) echo 'YES';\n\t\techo 'NO';\n\t}\n\telse echo 'YES';", "lang": "PHP", "bug_code_uid": "1580c5e81b73a61702105d3f56324879", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "1d3e87c09f44507c51626a0ef608808c", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " 0) echo 'NO';\n\telse echo 'YES';", "lang": "PHP", "bug_code_uid": "3b755015c894cc199bfc1b8fce85211c", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "1d3e87c09f44507c51626a0ef608808c", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.971830985915493, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bf3b61ed7eeb070ff95351347384b8e1", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "b809ce67737a395c2ec056a723990b65", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.983127109111361, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "fdc905d3d7156a76961fbca34c8e58d1", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "f0436cf282043d63b6dbe8cdee253ab2", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.35294117647058826, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "059b7e2d3589b988cf99ed4123f2d7a0", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "b52530307eb07371a5ceb57c760d329e", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9216354344122658, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d06f8bf1a16a0e6006030d950c45432f", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "3c85aff427a018c41c877f4b57bde22c", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.961038961038961, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "970efd5193ca07bd2bb9855341268757", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "3211499c62de95ac88505d8ed9265ecc", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9949494949494949, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "52496841f6165330763790f94b826f39", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "3211499c62de95ac88505d8ed9265ecc", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.27061310782241016, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7afb489ae363d8cc6c9c0bbf8d5c271a", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "b56d266de945a47293fb5b06209eee2b", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3140794223826715, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4846509739fb90899eac66b7b87b7e66", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "69abe1bb7e2b206584c5e1db2e47f6f1", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.63003663003663, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0acfee6bbad961c954ba4018b74ae6b1", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "be702f42ba7a4cbf39838d91d5214e5e", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8402555910543131, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "acbde53292aaeb831f98c5f9c1b606a4", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "be702f42ba7a4cbf39838d91d5214e5e", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.35294117647058826, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": " $value) {\n\t\tif($input % $value == 0){\n\t\t\techo \"YES\";die();\n\t\t}\n\t}\n\techo \"NO\";\n?>", "lang": "PHP", "bug_code_uid": "9483e82858f6afbd92dc90696d5ff607", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "apr_id": "f0e99a2dc2b695b62b0ca62ee33468ae", "difficulty": 1000, "tags": ["brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9836065573770492, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $d))\n {\n $c = 1;\n $b[$x] = $d;\n }\n elseif(($b[$x] != 9) && ($b[$x] < $d))\n {\n $c = 1;\n }\n elseif($b[$x] == 9)\n {\n $b[$x] = $d;\n }\n}\nprint implode(\"\", $b);\n?>", "lang": "PHP", "bug_code_uid": "842ea5cb89ca5dfcb53fb0a2c200c98d", "src_uid": "d5de5052b4e9bbdb5359ac6e05a18b61", "apr_id": "a04107aafb0524bf8d132e5800041be3", "difficulty": 1200, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2865525672371638, "equal_cnt": 23, "replace_cnt": 15, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 22, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6bc2a7a8391133d347459d7f66f30e1d", "src_uid": "0af3515ed98d9d01ce00546333e98e77", "apr_id": "9a627010938fc71ecb72b6862298d927", "difficulty": 800, "tags": ["brute force", "math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.20550252667040989, "equal_cnt": 16, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 15, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "51a06c28d7fd770bc9d9aee2b2327d6d", "src_uid": "0af3515ed98d9d01ce00546333e98e77", "apr_id": "9a627010938fc71ecb72b6862298d927", "difficulty": 800, "tags": ["brute force", "math", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8219674109837055, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": " insert($c[$x]);\n }\n else\n {\n while(TRUE)\n {\n $g = $d -> top();\n $b += $g;\n $d -> extract();\n $f++;\n if($b >= $c[$x])\n {\n $e .= $f . \" \";\n $b -= $c[$x];\n $d -> insert($c[$x]);\n break;\n }\n }\n }\n}\nprint $e;\n?>", "lang": "PHP", "bug_code_uid": "f73ed44e86060e23ca460673f504db17", "src_uid": "d3c1dc3ed7af2b51b4c49c9b5052c346", "apr_id": "34f51f2f018ef482cb2bbfecd088f3d8", "difficulty": 1200, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.1776, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": " 0)\n {\n $c = max($c, $d - 1);\n $d = 0;\n }\n}\nif($d > 0)\n{\n $c = max($c, $d - 1);\n}\nprint $c;\n?>", "lang": "PHP", "bug_code_uid": "ff5a2f8c85784d53af70c7c84a46acbf", "src_uid": "858b5e75e21c4cba6d08f3f66be0c198", "apr_id": "5a4b428c132da6c6f6d1da16ad3b0d3e", "difficulty": 1300, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9396914446002805, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "_fh = $fileHandler;\n\t}\n\t\n\tpublic function readInt() \n\t{\n\t\t$d = trim(fgets($this->_fh));\n\t\t\n\t\treturn (int)$d;\n\t}\n\t\n\tpublic function readArrayOfInt($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = (int)$item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n\t\n\tpublic function readArrayOfString($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = $item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n}\n\nfunction ntimes($n, $func, $returnResults = false) {\n\t$a = [];\n\tfor ($i=1; $i<=$n; $i++) {\n\t\t$result = $func();\n\t\t\n\t\tif ($returnResults) {\n\t\t\t$a[$i] = $result;\n\t\t}\n\t}\n\t\n\treturn $a;\n}\n\n\n$ir = new InputReader();\n\n$n = $ir->readInt();\n$a = $ir->readArrayOfInt($n,1);\n$a[0] = 0;\n$a[$n+1] = 1001;\n\n$total = 0;\nfor ($i = 1; $i<=$n; $i++) {\n\tif (($a[$i+1] - $a[$i-1]) == 2) {\n\t\t$total++;\n\t}\n}\n\necho $total;\n\n\n\n", "lang": "PHP", "bug_code_uid": "1a001e35d485672036d11a2b4b05a925", "src_uid": "858b5e75e21c4cba6d08f3f66be0c198", "apr_id": "a723514fcf48b70b8ec3ade74a8ca66c", "difficulty": 1300, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2857142857142857, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": " $a)\n {\n $b /= 2;\n $a -= $b;\n break;\n }\n else\n {\n $b *= 2;\n }\n}\nprint $a + 1;\n?>", "lang": "PHP", "bug_code_uid": "668cfab78b0a9a736aaa88bfb2a1dade", "src_uid": "03e4482d53a059134676f431be4c16d2", "apr_id": "74ff03a7aae7c37df9723985590e9be1", "difficulty": 1000, "tags": ["bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7246376811594203, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f1e81ca3fedece11a12c9ebc184ca73e", "src_uid": "03e4482d53a059134676f431be4c16d2", "apr_id": "74ff03a7aae7c37df9723985590e9be1", "difficulty": 1000, "tags": ["bitmasks"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.6359447004608295, "equal_cnt": 13, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3d5e95a0545e9add1941b51b8276be14", "src_uid": "03e4482d53a059134676f431be4c16d2", "apr_id": "3f45ad5a60b353910d728e73055aa7fd", "difficulty": 1000, "tags": ["bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7401574803149606, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9bb85ce5c241196d9608d66acc7a5070", "src_uid": "f6a80c0f474cae1e201032e1df10e9f7", "apr_id": "32a1794d29fb9aa7b29f803854aed3a6", "difficulty": 1300, "tags": ["games", "greedy", "math", "implementation", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.46365914786967416, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "= $middle) {\n echo $m - 1;\n } else {\n echo $m + 1;\n }\n}", "lang": "PHP", "bug_code_uid": "b48cbc2fe21dbcb15b7e147554d2ae3f", "src_uid": "f6a80c0f474cae1e201032e1df10e9f7", "apr_id": "c1cb837dc0e9472a8c843a72452c41ca", "difficulty": 1300, "tags": ["games", "greedy", "math", "implementation", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "$n+1>>1?$m-1:$m+1);", "lang": "PHP", "bug_code_uid": "ffa6ec8c21314aaba4cf48c5bc857eee", "src_uid": "f6a80c0f474cae1e201032e1df10e9f7", "apr_id": "e8d1c84167ffe5c0877a79d0a5751c6b", "difficulty": 1300, "tags": ["games", "greedy", "math", "implementation", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9663865546218487, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": ">1)die($m-1);\nprint($m>$n+1>>1?$m-1:$m+1);", "lang": "PHP", "bug_code_uid": "a3d809a67f2349885d7dfa81e8686b8a", "src_uid": "f6a80c0f474cae1e201032e1df10e9f7", "apr_id": "e8d1c84167ffe5c0877a79d0a5751c6b", "difficulty": 1300, "tags": ["games", "greedy", "math", "implementation", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.40272108843537413, "equal_cnt": 10, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": " 0) {\n if (($x - 5) >= 0) {\n $x -= 5;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 4) >= 0) {\n $x -= 4;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 3) >= 0) {\n $x -= 3;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 2) >= 0) {\n $x -= 2;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 1) >= 0) {\n $x -= 1;\n $s++;\n }\n}\necho $s;\n?>", "lang": "PHP", "bug_code_uid": "3be387295771a58edca7258a3c875837", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "4ccee3b0cd5faf5eb21bfb509133814f", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3774104683195592, "equal_cnt": 10, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": " 0) {\n if (($x - 5) >= 0) {\n $x -= 5;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 4) >= 0) {\n $x -= 4;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 3) >= 0) {\n $x -= 3;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 2) >= 0) {\n $x -= 2;\n $s++;\n }\n}\nwhile ($x > 0) {\n if (($x - 1) >= 0) {\n $x -= 1;\n $s++;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "dd4f5a57e3ed4857e6518f83b6375284", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "4ccee3b0cd5faf5eb21bfb509133814f", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7157894736842105, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "dc5698257f55d53a9bac0a2147c9c86d", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "6a347aaa227102e118adcc73bc479d6d", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9985815602836879, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 5.\nfor($i = 5;$i >= 1;$i--) {\n \n while(($our_number + $i) < $input) {\n \n $steps++;\n $our_number += $i;\n \n }\n \n if($our_number == $input) {\n \n break;\n \n }\n \n}\n\necho $steps;", "lang": "PHP", "bug_code_uid": "1c37110dd7e23df560633ffff206e607", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "923dc001fa1e7d414a59ec4f0b7b51b8", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9133858267716536, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "07456967d9b354c611bf5e1e3057b3fe", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "f50c899d383bbd09ff66761394f5ff80", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9508196721311475, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b43fc0af0ece993b66d390b92d64d0f8", "src_uid": "4b3d65b1b593829e92c852be213922b6", "apr_id": "f50c899d383bbd09ff66761394f5ff80", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9957081545064378, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "702ccb222bfb5879cf5be8ee68e4c57a", "src_uid": "32b59d23f71800bc29da74a3fe2e2b37", "apr_id": "179df164bf592e0071a95fa2ae4b2b33", "difficulty": 1000, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5141242937853108, "equal_cnt": 18, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 11, "fix_ops_cnt": 18, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "afe628fb4b15aab26422998988fc76f6", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "5ec7d34fa6b34d82a16034d64eebfa0b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.99581589958159, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "200f751561c731dea5e5b60f0a65e547", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "ae538cb268834e0f631aa56223e10c1b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9941348973607038, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c7ebabf009d0013be55cca5a90edef63", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "39169e3e8d9d6cbd259e936454c94a42", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.970917225950783, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d23143256b5eb4a00c55c9810a42e188", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "fc2fc88b4876c2e36ed38731c4063c4b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9911111111111112, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1b0c721acfead7f316811d170de34543", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "fc2fc88b4876c2e36ed38731c4063c4b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9623430962343096, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d02d14dfbe2a310d05d250b2e1dcecd9", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "8877dbea19fac2173d8deb5a4f342c26", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9885931558935361, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0a16561e97131d9cb5a0da45f97f194c", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "26dcbc01dd5ee8fdbb729ce000a8e6c9", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9693486590038314, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "324485d2c6af286b390b320ced443fcc", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "apr_id": "46f885e7842711c212e3afc5ed711e5b", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.696551724137931, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "377141d4ea04c80f3bca6eef8f6a8980", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "cd1939181cc33f0b5597ce1384cfdc34", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.95968534906588, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $number){\n\t\tif(!in_array($number, [1,4])){\n\t\t\treturn false;\n\t\t}\n\t\tif($number == 4){\n\t\t\tif($numbers[$key-1] == 1){\n\t\t\t\tcontinue;\n\t\t\t}elseif($numbers[$key-1] == 4){\n\t\t\t\tif($numbers[$key-2] == 1)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\treturn true;\n}\nif(magicNumber($input)){\n\techo \"YES\";\n}else{\n\techo \"NO\";\n}", "lang": "PHP", "bug_code_uid": "5380d133d5167d9af5ab7200a1b8f44e", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "apr_id": "8228fe6d2be024d507e911e35653252e", "difficulty": 900, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3993759750390016, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": " $b)\n {\n $a -= ($b - 1);\n $c = $a % 2;\n if($c == 0)\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "c017bead0a81100c1d4b8dce32d9f95c", "src_uid": "1527171297a0b9c5adf356a549f313b9", "apr_id": "40e00894665168d4a33ce75d0fb54bd5", "difficulty": 1300, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8630705394190872, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $ans) $ans = $num;\n $num = 0;\n }\n }\n if ($num > $ans) $ans = $num;\n $num = 0; $res = 0;\n for ($i = 0; $i < $n; $i ++) {\n if ($st[$i] == 'Y') {\n if ($num > $res) $res = $num;\n $num = 0;\n }\n else $num ++;\n }\n if ($num > $res) $res = $num;\n if ($ans <= $k && $res >= $k) {\n fprintf(STDOUT, \"YES\");\n }\n else {\n fprintf(STDOUT, \"NO\");\n }\n?> ", "lang": "PHP", "bug_code_uid": "1f819757b9993a38370ab484c10c5da7", "src_uid": "5bd578d3da5837c259b222336a194d12", "apr_id": "185d61b7f62ce54966782ac1a99e54b4", "difficulty": 2000, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7430249632892805, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": " $max) $max = $cur;\n\t\t} else {\n\t\t\t$cur = 0;\t\t\t\n\t\t}\n\t}\n\tif ($max > $b) {\n\t\t$poss = false;\n\t}\n\t\n\tif ($poss == true) {\n\t\techo 'YES';\n\t} else {\n\t\techo 'NO';\n\t}\n?>", "lang": "PHP", "bug_code_uid": "5cc418b9af6d9d7d1fe93dced28b9942", "src_uid": "5bd578d3da5837c259b222336a194d12", "apr_id": "6376a5c62ffc7a4104b0e36b747f04d8", "difficulty": 2000, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7913148371531966, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b6e250f83afb7f0e46035c96b6717d8b", "src_uid": "9266a69e767df299569986151852e7b1", "apr_id": "55b0bb1f5006e3fa955c42b894cb27c6", "difficulty": 1100, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6261398176291794, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "abf218d2a2976fc5f143660ee356d833", "src_uid": "84cb9ad2ae3ba7e912920d7feb4f6219", "apr_id": "f58e7cf24a6f58fdf0ef292037c1be62", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7701149425287356, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f9bf3f04e518d1080f83111c5179b8cf", "src_uid": "84cb9ad2ae3ba7e912920d7feb4f6219", "apr_id": "e5275da58353cd419039b1d29f1d223e", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9048562933597621, "equal_cnt": 14, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 11, "fix_ops_cnt": 14, "bug_source_code": "_fh = $fileHandler;\n\t}\n\t\n\tpublic function readInt() \n\t{\n\t\t$d = trim(fgets($this->_fh));\n\t\t\n\t\treturn (int)$d;\n\t}\n\t\n\tpublic function readArrayOfInt($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = (int)$item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n\t\n\tpublic function readArrayOfString($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = $item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n}\n\nfunction ntimes($n, $func, $returnResults = false) {\n\t$a = [];\n\tfor ($i=1; $i<=$n; $i++) {\n\t\t$result = $func();\n\t\t\n\t\tif ($returnResults) {\n\t\t\t$a[$i] = $result;\n\t\t}\n\t}\n\t\n\treturn $a;\n}\n\n\nfunction primes($limit)\n{\n\t$a = str_repeat(chr(85), ($limit>>3) + 1);\n\t$a[0] = chr(83);\n\tfor ($i=3; $i*$i < $limit; $i+=2) {\n\t\tif (ord($a[$i>>3]) & (1<<($i%8))) {\n\t\t\t;\n\t\t} else {\n\t\t\tfor ($k=$i; $k*$i<$limit; $k++) {\n\t\t\t\t$n = $k*$i;\n\t\t\t\t$a[$n>>3] = chr(ord($a[$n>>3]) | (1<<($n%8)));\n\t\t\t}\n\t\t}\n\t}\n\n\tyield 2;\n\tfor ($i=3; $i<$limit; $i+=2) {\n\t\tif (!(ord($a[$i>>3]) & (1<<($i%8)))) {\n\t\t\tyield $i;\n\t\t}\n\t}\n}\n\n\n\n\n\n$ir = new InputReader();\n\n$n = $ir->readInt();\n$p = [];\nforeach (primes(1e3) as $prime) {\n\t$p[] = $prime;\n}\n\n$powers = [];\nif ($n==1) {\n\t$min = 1;\n\t$steps = 0;\n} else {\n\twhile ($n>1) {\n\t\tforeach($p as $prime) {\n\t\t\tif ($n%$prime == 0) {\n\t\t\t\tif (!isset($powers[$prime])) {\n\t\t\t\t\t$powers[$prime] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$powers[$prime] += 1;\n\t\t\t\t$n /= $prime;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$min = array_product(array_keys($powers));\n\t$maxP = max($powers);\n\t$l2 = log($maxP)/log(2);\n\t\n\t$steps = 1 + (int)$l2;\n\tif (intval($l2) < $l2) {\n\t\t$steps++;\n\t}\n}\n// factorize and grab max power\n// echo [log2(power)] + 1 \n\necho $min . ' ' . $steps;\n\n\n\n\n\n", "lang": "PHP", "bug_code_uid": "03a7d4689f2f736abffd0baf78b5da71", "src_uid": "212cda3d9d611cd45332bb10b80f0b56", "apr_id": "89a4648b93ab4ec3e8d6cc0cf688c57b", "difficulty": 1500, "tags": ["greedy", "math", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9979475484606614, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "_fh = $fileHandler;\n\t}\n\t\n\tpublic function readInt() \n\t{\n\t\t$d = trim(fgets($this->_fh));\n\t\t\n\t\treturn (int)$d;\n\t}\n\t\n\tpublic function readArrayOfInt($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = (int)$item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n\t\n\tpublic function readArrayOfString($size, $indexFrom = 0) \n\t{\n\t\t$a = [];\n\t\t$ind = $indexFrom;\n\t\tforeach (explode(' ', fgets($this->_fh)) as $item) {\n\t\t\t$a[$ind++] = $item;\n\t\t}\n\t\t\n\t\treturn $a;\n\t}\n}\n\nfunction ntimes($n, $func, $returnResults = false) {\n\t$a = [];\n\tfor ($i=1; $i<=$n; $i++) {\n\t\t$result = $func();\n\t\t\n\t\tif ($returnResults) {\n\t\t\t$a[$i] = $result;\n\t\t}\n\t}\n\t\n\treturn $a;\n}\n\n\nfunction primes($limit)\n{\n\t$a = str_repeat(chr(85), ($limit>>3) + 1);\n\t$a[0] = chr(83);\n\tfor ($i=3; $i*$i < $limit; $i+=2) {\n\t\tif (ord($a[$i>>3]) & (1<<($i%8))) {\n\t\t\t;\n\t\t} else {\n\t\t\tfor ($k=$i; $k*$i<$limit; $k++) {\n\t\t\t\t$n = $k*$i;\n\t\t\t\t$a[$n>>3] = chr(ord($a[$n>>3]) | (1<<($n%8)));\n\t\t\t}\n\t\t}\n\t}\n\n\tyield 2;\n\tfor ($i=3; $i<$limit; $i+=2) {\n\t\tif (!(ord($a[$i>>3]) & (1<<($i%8)))) {\n\t\t\tyield $i;\n\t\t}\n\t}\n}\n\n\n\n\n\n$ir = new InputReader();\n\n$n = abs($ir->readInt());\n$p = [];\nforeach (primes(1e3) as $prime) {\n\t$p[] = $prime;\n}\n\n$powers = [];\nif ($n==1) {\n\t$min = 1;\n\t$steps = 0;\n} elseif ($n==0) {\n\t$min = 0;\n\t$steps = 0;\n} else {\n\twhile ($n>1) {\n\t\t$foundPrime = false;\n\t\tforeach($p as $prime) {\n\t\t\tif ($n%$prime == 0) {\n\t\t\t\t$foundPrime = true;\n\t\t\t\tif (!isset($powers[$prime])) {\n\t\t\t\t\t$powers[$prime] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$powers[$prime] += 1;\n\t\t\t\t$n /= $prime;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!$foundPrime) {\n\t\t\tif (!isset($powers[$n])) {\n\t\t\t\t$powers[$n] = 0;\n\t\t\t}\n\t\t\t$powers[$n] += 1;\n\t\t\t$n = 1;\n\t\t}\n\t}\n\t\n\t$min = array_product(array_keys($powers));\n\t\n\t$maxP = max($powers);\n\t$minP = min($powers);\n\t\n\tif ($maxP == 1) {\n\t\t$steps = 0;\n\t} else {\n\t\t$l2 = log($maxP)/log(2);\n\t\t\n\t\t$steps = (int)$l2;\n\t\tif (intval($l2) < $l2) {\n\t\t\t$steps++;\n\t\t} else {\n\t\t\tif ($maxP!==$minP) {\n\t\t\t\t$steps++;\n\t\t\t}\n\t\t}\n\t}\n}\n// factorize and grab max power\n// echo [log2(power)] + 1 \n\necho $min . ' ' . $steps.\"\\n\";\n\n//}\n\n\n\n\n", "lang": "PHP", "bug_code_uid": "a780380ef97ca4c8fc01a04811e0ca09", "src_uid": "212cda3d9d611cd45332bb10b80f0b56", "apr_id": "89a4648b93ab4ec3e8d6cc0cf688c57b", "difficulty": 1500, "tags": ["greedy", "math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9962406015037594, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 0)\n{\n print $e - ($f * $b);\n}\nelse\n{\n print $e;\n}\n?>", "lang": "PHP", "bug_code_uid": "0798eeb64a303868f47eca09a0281e7c", "src_uid": "5c21e2dd658825580522af525142397d", "apr_id": "29e828a25fe74b629748304a0bbe3a40", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9972401103955841, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $price) {\n $hooks[] = array(\n 'id' => $index+1,\n 'price' => $price\n );\n}\n\nusort($hooks, function($a, $b) {\n return ($a['price'] < $b['price']) ? -1 : 1;\n});\n\n$rubles = 0;\n$min = min($m, $n);\nfor ($i = 0; $i < $min; $i++) {\n $rubles += $hooks[$i]['price'];\n}\n\nif ($m > $n) {\n $rubles -= ($m-$n);\n}\n\necho $rubles.\"\\n\";\n\n?>", "lang": "PHP", "bug_code_uid": "c80ff4f9273623d2c2dfbafefb8b827e", "src_uid": "5c21e2dd658825580522af525142397d", "apr_id": "526790f1bf33f40d6636007ce16d1f83", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9971949509116409, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " array(2 => 3, 3 => 4), 2 => array(1 => 3), 3 => array(1 => 4));\n $e = 0;\n for($x = 0; $x < $a - 1; $x++)\n {\n $e += $d[$b[$x]][$b[$x + 1]];\n }\n for($x = 0; $x < $a - 2; $x++)\n {\n if(($b[$x] == 3) && ($b[$x + 1] == 1) && ($b[$x + 2] == 2))\n {\n $e--;\n }\n }\n print \"Finite\\n\";\n print $e;\n}\nelse\n{\n print \"Infinite\";\n}\n?>", "lang": "PHP", "bug_code_uid": "c2cc0f626002d8cf20f16e6a2c35103d", "src_uid": "6c8f028f655cc77b05ed89a668273702", "apr_id": "f97b8ab58ec17ab5d8ea915f4782b5a5", "difficulty": 1400, "tags": ["geometry"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8154093097913323, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " 15) {\n\t\t\t$result = $prevMin + 15;\n\t\t\tbreak;\n\t\t}\n\t\t$prevMin = $min;\n\t}\n\techo $result;\n?>", "lang": "PHP", "bug_code_uid": "df735b62843d5fca36378837e2b0b505", "src_uid": "5031b15e220f0ff6cc1dd3731ecdbf27", "apr_id": "1ac90f5ec8e77b501715ac73d556cd46", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.935064935064935, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": " 15) return $start+15;\n $start = $arr[$i];\n }\n return $arr[$n-1] + 15;\n}\n // \u00a0Bear and Game\n $in = 'php://stdin';\n $input = fopen($in, \"r\");\n $n = fgets($input);\n $t = [];\n $t = array_merge($t, explode(\" \", trim(fgets($input))));\n echo (test($n,$t));\n\n?>", "lang": "PHP", "bug_code_uid": "d2de0c5043291ae168c52a8b43132829", "src_uid": "5031b15e220f0ff6cc1dd3731ecdbf27", "apr_id": "99271af1afe816abb8853c00f07c3bb5", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5943970767356882, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": " $maxWait){\n\t\techo $maxWait;die;\n\t}else{\n\t\t$maxWait = $interestMin + 15;\n\t}\n}\necho 90;\n\n?>", "lang": "PHP", "bug_code_uid": "408d29a3e50bd40a7d8cdcdf27ea3f5a", "src_uid": "5031b15e220f0ff6cc1dd3731ecdbf27", "apr_id": "fc4ec544e7794d6e01d3bd003150ed81", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9875518672199171, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " 1){\n break;\n } else {\n $watchTime = $t[$i];\n }\n }\n echo $watchTime+15 > 90 ? $watchTime : $watchTime+15 ;\n}\n\nwatchTime($n,$t);", "lang": "PHP", "bug_code_uid": "a376bd77f171e29a1b8343eaae892157", "src_uid": "5031b15e220f0ff6cc1dd3731ecdbf27", "apr_id": "d10ac02f7ed896d472a4d2bf5e6a0494", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5549339897068696, "equal_cnt": 19, "replace_cnt": 11, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 18, "bug_source_code": "= $d)\n{\n $g = $a - $d;\n $h = floor($g / 2);\n if($b >= $e)\n {\n $i = $b - $e;\n $j = floor($i / 2);\n if($c >= $f)\n {\n print \"Yes\";\n }\n else\n {\n if(($h + $j + ($f - $c)) >= $f)\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n }\n else\n {\n if($c >= $f)\n {\n $k = $c - $f;\n $l = floor($k / 2);\n if(($h + $l + ($e - $b)) >= $e)\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n else\n {\n if(($h + ($e - $b) + ($f - $c)) >= ($e + $f))\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n }\n}\nelse\n{\n if($b >= $e)\n {\n $i = $b - $e;\n $j = floor($i / 2);\n if($c >= $f)\n {\n $m = $c - $f;\n $n = floor($m / 2);\n if((($d - $a) + $j + $n) >= $d)\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n else\n {\n if((($d - $a) + $j + ($f - $c)) >= ($d + $f))\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n }\n else\n {\n if($c >= $f)\n {\n $m = $c - $f;\n $n = floor($m / 2);\n if($n >= (($d - $a) + ($e - $b)))\n {\n print \"Yes\";\n }\n else\n {\n print \"No\";\n }\n }\n else\n {\n print \"No\";\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "311a6a77a027857c0bab751f7723d46a", "src_uid": "1db4ba9dc1000e26532bb73336cf12c3", "apr_id": "496b0d8613741a4c35cb0a841342147c", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8576051779935275, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": " 0 ? $d_a : 0;\n$m_b = $d_b > 0 ? $d_b : 0;\n$m_c = $d_c > 0 ? $d_c : 0;\n$m = $m_a + $m_b + $m_c;\n\n//echo $m_a . \" \" . $m_b . \" \" . $m_c . \"\\n\";\n\n$e_a = -$d_a > 0 ? -$d_a / 2: 0;\n$e_b = -$d_b > 0 ? -$d_b / 2: 0;\n$e_c = -$d_c > 0 ? -$d_c / 2: 0;\n$e = $e_a + $e_b + $e_c;\n\necho $e >= $m ? \"Yes\\n\" : \"No\\n\"\n\n?>", "lang": "PHP", "bug_code_uid": "3b426e12e986c62f634188a19b147b7f", "src_uid": "1db4ba9dc1000e26532bb73336cf12c3", "apr_id": "2c5e9a5a7d89a635a2be249623a24c7b", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9513888888888888, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6b0754c0c49a0c77e7b91f72542758dd", "src_uid": "fe74313abcf381f6c5b7b2057adaaa52", "apr_id": "d8f8e83b3400d008a3de8ced00c5f3e9", "difficulty": 1000, "tags": ["brute force", "constructive algorithms", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8326359832635983, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": " 1) {\n break;\n }\n}\nif ($counter == 0) {\n echo \"NO\";\n} else if ($counter == 1) {\n echo \"YES\";\n} else {\n echo \"NO\";\n}\n", "lang": "PHP", "bug_code_uid": "835a3467ab9338d491c3fbc1cb5c3696", "src_uid": "fe74313abcf381f6c5b7b2057adaaa52", "apr_id": "2e6b9563fe5b82e509089b00a98a56b4", "difficulty": 1000, "tags": ["brute force", "constructive algorithms", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9898477157360406, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6d9f9f51401cbd776b7dd43f98ff6584", "src_uid": "758d342c1badde6d0b4db81285be780c", "apr_id": "34bd15aa56883af2bdcf6aa0d300a6e0", "difficulty": 800, "tags": ["dp", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1932367149758454, "equal_cnt": 29, "replace_cnt": 13, "delete_cnt": 9, "insert_cnt": 7, "fix_ops_cnt": 29, "bug_source_code": " $itemA) {\n $currentValue = ($n - $itemA) % $n;\n while ($amountB[$currentValue] === 0) {\n $nextValue = $orderList[$currentValue];\n if ($amountB[$nextValue] === 0) {\n $nextValue = $orderList[$currentValue] = $orderList[$nextValue];\n }\n $currentValue = $nextValue;\n }\n $result .= ($i ? ' ' : '') . (($itemA + $currentValue) % $n);\n $amountB[$currentValue]--;\n}\n//echo implode(' ', $arrC);\necho PHP_EOL . (microtime(true) - $start) . PHP_EOL;\necho ceil(memory_get_peak_usage() / 1024) . 'KB' . PHP_EOL;\n//echo $result;\n", "lang": "PHP", "bug_code_uid": "6c2d77d6d952385f1b211f9cc73a713e", "src_uid": "758d342c1badde6d0b4db81285be780c", "apr_id": "3e8297c350a57cfb53200b313c7ebe6f", "difficulty": 800, "tags": ["dp", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9338168631006346, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $p) {\n $p = $q;\n }\n}\nprint $p;", "lang": "PHP", "bug_code_uid": "bcae5fd33d2f711e9344a50ff71ea0c0", "src_uid": "f30329023e84b4c50b1b118dc98ae73c", "apr_id": "b9ffd8994d2189ca387ae391e2dc5e68", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4980237154150198, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " $v) {\n if($v > $h) {\n $h = $v;\n }\n}\necho $h;", "lang": "PHP", "bug_code_uid": "55c15feb8d90398459310b6dee38b872", "src_uid": "f30329023e84b4c50b1b118dc98ae73c", "apr_id": "441a43329e722779652ca63b5fa09b88", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.19561551433389546, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": " 0)) {\n\techo \"0.000000000000\";\n} else if ($p1 == $p2 && $m1 == $m2 && $r > 0) {\n\techo \"0.500000000000\";\n}\n?>", "lang": "PHP", "bug_code_uid": "785626b11dc652b252c745eb617b3049", "src_uid": "f7f68a15cfd33f641132fac265bc5299", "apr_id": "c50ffd12dcf65aad1e7ea8580482f82d", "difficulty": 1300, "tags": ["dp", "probabilities", "combinatorics", "bitmasks", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.946031746031746, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " 1,\n 1 => 1,\n 2 => 2,\n 3 => 6,\n 4 => 24,\n 5 => 120,\n 6 => 720,\n 7 => 5040,\n 8 => 40320,\n 9 => 362880,\n 10 => 3628800\n);\n\n$total = 0;\nfor($i=0;$i", "lang": "PHP", "bug_code_uid": "0ef2079077f02796ce1e20f879765fff", "src_uid": "f7f68a15cfd33f641132fac265bc5299", "apr_id": "e1c80b80b81abce4dcac254608cd80dc", "difficulty": 1300, "tags": ["dp", "probabilities", "combinatorics", "bitmasks", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2838283828382838, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "$b)?($c=$a):($c=$b);\nif($c==6) {print (\"1/\".$c); }\nelseif($c==1) {print ($c.\"/1\"); };\n$s=6-($c-1);\nif (($s%2==0)and($s!=6)and($s!=1)) { print(($s/2).\"/\".(6/2));}\nelseif(($s%3==0)and($s!=6)and($s!=1)) {print (($s/3).\"/\".(6/3));}\nelseif(($s!=6)and($s!=1)) {print(($s).\"/6\");}\n?>", "lang": "PHP", "bug_code_uid": "246778e042acc46d1aa3a36b656c89b2", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "83473b9a648bc455403b08255dedc2d2", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9971014492753624, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3fd3031d75c91136265654dd3fb0f2eb", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "4a8456102fe6cd3c619a571dbf3fafb5", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7390029325513197, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "\ufeff\n", "lang": "PHP", "bug_code_uid": "51c05c07752a4dd3cf3d713dd49f5e28", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "d7904e4c5a44fcf04cfb6d2a64bbe4cc", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9974293059125964, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "\ufeff\n", "lang": "PHP", "bug_code_uid": "b49203b9c4507dc3931473ee7711c659", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "d7904e4c5a44fcf04cfb6d2a64bbe4cc", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7958762886597938, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f89822400c3368b2d074c0c22c4b10e5", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "dae435c5f52ff76d2dca21d9cf1f290c", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.869172932330827, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ecf9004c91131a4823a839cbf773b024", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "1aec9e47718bdef9527082bfca270be1", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.92, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "\n\n\n", "lang": "PHP", "bug_code_uid": "239a3b63f12f1bc7512e6bde33cc51be", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "1aec9e47718bdef9527082bfca270be1", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9099848714069592, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "\n\n\n", "lang": "PHP", "bug_code_uid": "23e8fa7e4285848c42d1bc3defddba02", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "apr_id": "1aec9e47718bdef9527082bfca270be1", "difficulty": 800, "tags": ["probabilities", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9471139317014203, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d7c077c07cc2a225be7e24d14a908b2d", "src_uid": "05ec6ec3e9ffcc0e856dc0d461e6eeab", "apr_id": "1ff8e6aaae82b0981e7c36b0d3ec98a0", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9976649153531816, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "41cf4017d17edd7909fd8ffbbea57af2", "src_uid": "05ec6ec3e9ffcc0e856dc0d461e6eeab", "apr_id": "1ff8e6aaae82b0981e7c36b0d3ec98a0", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9966887417218543, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d35c486af85b0435cddcf180197317b5", "src_uid": "d60c8895cebcc5d0c6459238edbdb945", "apr_id": "4aac6061f3c7c2d23ac66beedcde0a26", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.17105263157894737, "equal_cnt": 31, "replace_cnt": 30, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 30, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "aca41727f6d42c450649d0d54e2949ec", "src_uid": "879ac20ae5d3e7f1002afe907d9887df", "apr_id": "5d637e35807103a92887cb07c19324fc", "difficulty": 1500, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9055555555555556, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b05bf102b1ba5c97b6d1d9cde7ea2aac", "src_uid": "879ac20ae5d3e7f1002afe907d9887df", "apr_id": "5d637e35807103a92887cb07c19324fc", "difficulty": 1300, "tags": ["combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9999088838268793, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "Scan();\n\t$inp_arr = str_split(rtrim($Scanner->Scan()));\n\t\n\tfor ($i = 0; $i < $inp_n; $i++) {\n\t\t$inp_arr1[] = $inp_arr[$i];\n\t}\n\tfor ($i = $inp_n; $i < 2 * $inp_n; $i++) {\n\t\t$inp_arr2[] = $inp_arr[$i];\n\t}\n\t\n\tsort($inp_arr1);\n\tsort($inp_arr2);\n\t$LUCY= false;\n\tif ($inp_n === 1 && $inp_arr1[0] === $inp_arr2[0]) $LUCY = true;\n\tfor ($i = 1; $i < $inp_n; $i++) {\n\t\tif ($inp_arr1[0] < $inp_arr2[0]) {\n\t\t\tif ($inp_arr1[$i] >= $inp_arr2[$i]) {\n\t\t\t\t$LUCY= true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif ($inp_arr1[0] > $inp_arr2[0]) {\n\t\t\tif ($inp_arr[$i] <= $inp_arr2[$i]) {\n\t\t\t\t$LUCY= true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} elseif ($inp_arr1[0] === $inp_arr2[0]) {\n\t\t\t$LUCY= true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ($LUCY) {\n\t\tprint(\"NO\");\n\t} else {\n\t\tprint(\"YES\");\n\t}\n\t$Scanner->close();\n}\n\nob_end_clean();\nsolve();\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link or ''php://stdin' err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\n\t\t//err $c_row = array(\"\\n\", \"\\r\", \"\\r\\n\");\n\t\t$c_row = array(\"\\r\\n\", \"\\r\", \"\\n\");\n\t\t$contents = str_replace($c_row, \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Id;\n\t\t$sc = $this->Scanners[$x];\n\t\t$this->Id = ++$x;\n\t\treturn $sc;\n\t}\n\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n/*\n====begin=====\n\n//input $inp_ or upper\n//block $temp_\n//two block$ttemp_\n//as \t $as_\n//instance $(Upper)\n//ref $ref\n//class menba $^Upper\n\n====end=======\n\n===== class begin =====\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\n//ref \"#109_div2_B_1230942 laurenceHR\"\nclass LineScanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $LineIds_Of_ScanIds= array();\n\tprivate $LinesScanners = array();\n\tprivate $LastScanIds_Of_LineIds = array();\n\tprivate $Scan_number = 0;\n\tprivate $Scanline_number = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t\n\t\t$temp_lines = explode(\"\\n\", $contents);\n\t\t$temp_linescanners = array();\n\t\t$temp_x = 0;\n\t\t$temp_y = 0;\n\t\t//--attention for initting of array--(these is not needed but for easily reading)//\n\t\t$ttemp_scanners = array();\n\t\t//$del = Array(\"\\n\",\"\\r\",\"\\n\\r\");\n\t\tforeach ($temp_lines as $as_line) {\n\t\t\tif (strlen($as_line) === 0) {\n\t\t\t\tprint(\"input err\");\n\t\t\t}\n\t\t\t\n\t\t\t//$as_line = str_replace($del,'',$as_line);\n\t\t\t$temp_linescanners[] = $as_line;\n\t\t\t$ttemp_line_scanners = explode(\" \", $as_line);\n\t\t\t//$ttemp_scanners = array();\n\t\t\tforeach ($ttemp_line_scanners as $as_sc) {\n\t\t\t\t$ttemp_scanners[] = $as_sc;\n\t\t\t\t$this->LineIds_Of_ScanIds[$temp_x] = $temp_y;\n\t\t\t\t$temp_x++;\n\t\t\t}\n\t\t\t$this->LastScanIds_Of_LineIds[$temp_y] = $temp_x - 1;\n\t\t\t$temp_y++;\n\t\t}\n\t\t$this->Scanners = $ttemp_scanners;\n\t\t$this->LinesScanners = $temp_linescanners;\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"scan err\");\n\t\t}\n\t\t\t\t\n\t\t$sc = $this->Scanners[$x];\n\t\t//--attention for ++$x//\n\t\t//$this->Scan_number = $x++;\n\t\t$this->Scan_number = ++$x;\n\t\t$this->Scanline_number = $this->LineIds_Of_ScanIds[$x];\n\t\treturn $sc;\n\t}\n\t\n\tfunction LineScan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"linescan err\");\n\t\t}\n\t\t\n\t\t$lsc = $this->LinesScanners[$y];\n\t\t$this->Scan_number = $this->LastScanIds_Of_LineIds[$y] + 1;\n\t\t$this->Scanline_number = $y + 1;\n\t\treturn $lsc;\n\t}\n\t\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\nclass Token{\n\tprivate $token;\n\tprivate $tok;\n\t\n\tpublic function __construct($str_line, $tok) {\n\t\t$this->tok = $tok;\n\t\t$this->token = strtok($str_line, $this->tok);\n\t}\n\n\tpublic function nextToken() {\n\t\t$thisToken = $this->token;\n\t\t$this->token = strtok($this->tok);\n\t\treturn $thisToken;\n\t} \n\t\t\n\tpublic function nextFloat() {\n\t\treturn (float)$this->nextToken();\n\t}\n\t\n \tpublic function nextInt() {\n\t\treturn (int)$this->nextToken();\n\t}\n\t\n\tpublic function nextIntArray() {\n\t\t$temp_arr = array();\n\t\t$flag = -1;\n\t\twhile ($flag !== 1) {\n\t\t\t$thisToken = $this->nextToken();\n\t\t\tif ($thisToken !== false) {\n\t\t\t\t$temp_arr[] = $thisToken;\n\t\t\t} else {\n\t\t\t\t$flag = 1;\n\t\t\t}\n\t\t}\n\t\treturn $temp_arr;\n\t}\n\n\tpublic function nnextIntArray($num) {\n\t\t$temp_arr = array();\n\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t$temp_arr[] = (int)$this->token;\n\t\t}\n\t\treturn $temp_arr;\n\t}\n}\n===== class end ======\n\n=== function begin ===\n\nfunction get_line() {\n $stdin = fopen(\"php://stdin\", \"r\"); \n $line = rtrim($stdin, \"\\n\"); \n fclose($stdin); \n return $line; \n}\n\nfunction num_printf($i){\n\tif (is_float($i)) {\n\t\tprintf(\"%.0f\", $i);\n\t}\n\tif (is_int($i)) {\n\t\tprintf(\"%d\", $i);\n\t}\n}\n\nfunction array_printf(array $array) {\n\t\t$message = \"\";\n\t\tforeach ($array as $value) {\n\t\t\t$message .= \"$value\" . \" \";\n\t\t}\n\t\t$message = rtrim($message);\n\t\tprintf('%s', $message);\n}\n\n== function end ======\n*/\n\n?>", "lang": "PHP", "bug_code_uid": "0c16b698e103bd31772f71878c0395ec", "src_uid": "e4419bca9d605dbd63f7884377e28769", "apr_id": "a5f946fe6f3c99172a2ea3ad95c2c412", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8135593220338984, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": " $mas2[$i])\n {\n $k++;\n }\n else\n {\n $m++;\n }\n}\n\nif ($k == $string1 or $m == $string1)\n{\n echo \"YES\";\n}\nelse\n{\n echo \"NO\";\n}\n\n?>", "lang": "PHP", "bug_code_uid": "1935ee6aa14077d132b2b5c2789e00f5", "src_uid": "e4419bca9d605dbd63f7884377e28769", "apr_id": "0677721e565ec25c3b8f8c8cd7ce978c", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9892294946147473, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "$s[1][$i]) $chek = true; else $chek = false;\n }\n if ($chek == true AND $s[0][$i]>$s[1][$i]) $out = true; elseif ($chek == true AND $s[0][$i]<=$s[1][$i]) {$out = false; break;}\n if ($chek == false AND $s[0][$i]<$s[1][$i]) $out = true; elseif ($chek == false AND $s[0][$i]>=$s[1][$i]) {$out = false; break;}\n}\nif ($out==true) echo \"YES\"; else {echo \"NO\";}\n?>", "lang": "PHP", "bug_code_uid": "c3c15795a61fedffaec30a281277f3c6", "src_uid": "e4419bca9d605dbd63f7884377e28769", "apr_id": "92a6283c09baf5c8b744fc7ec619c5f0", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.6165413533834586, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "$s[1][0]&&$s[0][$n-1]>$s[1][$n-1]||$s[0][0]<$s[1][0]&&$s[0][$n-1]<$s[1][$n-1])\n print 'YES'; else print 'NO';\n\n?>", "lang": "PHP", "bug_code_uid": "5b053027ffcf6333909b756ffb14078c", "src_uid": "e4419bca9d605dbd63f7884377e28769", "apr_id": "0119e10499d345ec2af9158abc61173c", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9965986394557823, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "$c[$i])$ls=false;\n if($b[$i]<$c[$i])$gr=false;\n}\nif($gr||$ls)$is=true;\necho $is?'YES':'NO';", "lang": "PHP", "bug_code_uid": "308f1de085fe7ae525d718b097987b7f", "src_uid": "e4419bca9d605dbd63f7884377e28769", "apr_id": "a37ad8a10af4e8f84fca97f7e272dd25", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.868421052631579, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " $c + 1)\n{\n print $d - $c;\n}\nelse\n{\n print $d;\n}\n?>", "lang": "PHP", "bug_code_uid": "a333629c3d9190aa2fba32c5838d55f6", "src_uid": "51a072916bff600922a77da0c4582180", "apr_id": "fc4e4901a57a74789fd9071a4bd09b8a", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4915254237288136, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e22fd67d528c21ff217eac6c17c6ddc7", "src_uid": "51a072916bff600922a77da0c4582180", "apr_id": "f000bc2feea4154a30155da64cd94d8d", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.976, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "=$a&&($n-$i+1)<=$b) $r++;\nprint $r;\n?>", "lang": "PHP", "bug_code_uid": "4679d611feafe47cf7d079570ac8b005", "src_uid": "51a072916bff600922a77da0c4582180", "apr_id": "0d52b5459c4faab6ea7ffd6c262465e2", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.993006993006993, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " preg_match_all('/[a-z]/', $w, $o)) ? strtoupper($w) : strtolowerfw($w);", "lang": "PHP", "bug_code_uid": "1ba26bd6d19c6d2da4ad4dffca2042ba", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "0e70b93738a3c82d4367c2b2ced76651", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9003690036900369, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " strlen($str))?strtoupper($str):strtolower($str);\n?>", "lang": "PHP", "bug_code_uid": "4893812e6c3620a5da461d64fd7127bd", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "c74f8ae20e9b58ad1301dafb685b51c1", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9965397923875432, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " preg_match_all(\"/[a-z]/\", $str)?strtoupper($str):strtolower($str);\n?>", "lang": "PHP", "bug_code_uid": "6bb768b08a00699930f01d00c2311335", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "c74f8ae20e9b58ad1301dafb685b51c1", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.774384236453202, "equal_cnt": 24, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 17, "fix_ops_cnt": 24, "bug_source_code": "=96)\n $c++;\n else\n $m++;\n }\n\n if($c<$m)\n return strtoupper($d);\n else if ($c>$m)\n return strtolower($d);\n else\n return strtolower($d);\n}\nfunction solve()\n{\n $handle = fopen(\"php://stdin\", \"r\");\n $d='';\n fscanf($handle, \"%s\", $d);\n printf(\"%s\", check($d));\n}\n\nsolve();\n?>", "lang": "PHP", "bug_code_uid": "2489612bdcda1c50a55a07bc9c4c2a2e", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "b9752f555b86141c3ac3e838e29692df", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9971988795518207, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $len / 2)\n echo strtolower($s);\nelse\n echo strtoupper($s);\n?>", "lang": "PHP", "bug_code_uid": "300df63d090df8110d600c4ac9a1988e", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "a9726aab7d71c7de0ead2267900fb7f2", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9935483870967742, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c0baea49f9aecf112e01e106568961a2", "src_uid": "8ce89b754aa4080e7c3b2c3b10f4be46", "apr_id": "2bff22c95ff2186e5d341d43b2d03934", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8559077809798271, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e1a4a204d076f8824140ac9f31f5b591", "src_uid": "8ce89b754aa4080e7c3b2c3b10f4be46", "apr_id": "d319fd87878fcd19477f20a14ed66a80", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6363636363636364, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "echo 25", "lang": "PHP", "bug_code_uid": "2415b5ebb91a41d7fd6e3b72eaa215e7", "src_uid": "dcaff75492eafaf61d598779d6202c9d", "apr_id": "5b17d7dd61fa42c833d6e1e8d08bad9c", "difficulty": 800, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.12093023255813953, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " 2) {\n echo $num[strlen($num) - 2] . $num[strlen($num) - 1];\n} elseif (strlen($num) == 2) {\n echo $num;\n}", "lang": "PHP", "bug_code_uid": "6bc345cbc64443ebe9ef250a74c22d0a", "src_uid": "dcaff75492eafaf61d598779d6202c9d", "apr_id": "30340e69a60b1ef1acd5eaa5c8e85f61", "difficulty": 800, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.5, "equal_cnt": 1, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "23", "lang": "PHP", "bug_code_uid": "548f9b9c66470e9810bc2dafa56c20cc", "src_uid": "dcaff75492eafaf61d598779d6202c9d", "apr_id": "a1759c48de319194b61166a4bb9823e0", "difficulty": 800, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "echo 25", "lang": "PHP", "bug_code_uid": "6f0e175bdadf3c79d4de691fe6b323aa", "src_uid": "dcaff75492eafaf61d598779d6202c9d", "apr_id": "b5e1d2c441d8688b5f6181a8cdef0277", "difficulty": 800, "tags": ["number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7222222222222222, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 1 || $zc > $xc) {print 'illegal'; exit(0);}\n\n$win1 = 0; $win2 = 0;\n\n$win1 += $f1 === 'XXX' ? 1 : 0;\n$win1 += $f2 === 'XXX' ? 1 : 0;\n$win1 += $f3 === 'XXX' ? 1 : 0;\n$win1 += $f1[0].$f2[0].$f3[0] === 'XXX' ? 1 : 0;\n$win1 += $f1[1].$f2[1].$f3[1] === 'XXX' ? 1 : 0;\n$win1 += $f1[2].$f2[2].$f3[2] === 'XXX' ? 1 : 0;\n$win1 += $f1[0].$f2[1].$f3[2] === 'XXX' ? 1 : 0;\n$win1 += $f1[2].$f2[1].$f3[0] === 'XXX' ? 1 : 0;\n\n\n$win2 += $f1 === '000' ? 1 : 0;\n$win2 += $f2 === '000' ? 1 : 0;\n$win2 += $f3 === '000' ? 1 : 0;\n$win2 += $f1[0].$f2[0].$f3[0] === '000' ? 1 : 0;\n$win2 += $f1[1].$f2[1].$f3[1] === '000' ? 1 : 0;\n$win2 += $f1[2].$f2[2].$f3[2] === '000' ? 1 : 0;\n$win2 += $f1[0].$f2[1].$f3[2] === '000' ? 1 : 0;\n$win2 += $f1[2].$f2[1].$f3[0] === '000' ? 1 : 0;\n\nif($win1 && $win2) {print 'illegal'; exit(0);}\n\nif($win1 > 1 || $win2 > 1) {print 'illegal'; exit(0);}\n\nif($win1 && ($zc == $xc)) {print 'illegal'; exit(0);}\n\nif($win2 && (($zc + 1) == $xc)) {print 'illegal'; exit(0);}\n\nif($win1 && !$win2) {print 'the first player won'; exit(0);}\n\nif(!$win1 && $win2) {print 'the second player won'; exit(0);}\n\nif(!$win1 && !$win2 && ($xc + $zc) == 9) {print 'draw'; exit(0);}\n\nif($xc > $zc) {print 'second'; exit(0);}else{print 'first'; exit(0);}\n\n?>", "lang": "PHP", "bug_code_uid": "81ca1a9efb9266eb9dd471293e15fbb5", "src_uid": "892680e26369325fb00d15543a96192c", "apr_id": "d8aa3f387d531ca8b28be0cfaf29d008", "difficulty": 1800, "tags": ["games", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8870264834059671, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 5, "bug_source_code": " $a)\n {\n if($d != 0)\n {\n $b = ceil($b);\n $f++;\n }\n }\n }\n }\n else\n {\n $b++;\n $f = 1;\n for($x = 1; $x <= 100; $x++)\n {\n $b /= 2;\n $d = $b % 2;\n if($b == $a)\n {\n print $f + $x;\n break;\n }\n elseif($b < $a)\n {\n $e = $a - $b;\n print $e + $f + $x;\n break;\n }\n elseif($b > $a)\n {\n if($d != 0)\n {\n $b++;\n $f++;\n }\n }\n }\n }\n}\nelseif($a == $b)\n{\n print \"0\";\n}\nelseif($a > $b)\n{\n print $a - $b;\n}\n?>", "lang": "PHP", "bug_code_uid": "160e6f4d79aae8789bb8f10a11917eef", "src_uid": "861f8edd2813d6d3a5ff7193a804486f", "apr_id": "86514a44f73e714da2bc2bdfc7c9f6b3", "difficulty": 1400, "tags": ["dfs and similar", "greedy", "shortest paths", "math", "implementation", "graphs"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9985486211901307, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1000) return;\n\tglobal $s;\n\tif (isset($s[$p]) && $s[$p] <= $v) return;\n\t$s[$p] = $v;\n\tcalc($p - 1, $v + 1);\n\tcalc($p * 2, $v + 1);\n}\ncalc($from, 0);\necho $s[$to];\n", "lang": "PHP", "bug_code_uid": "8c88d45726f636e0b23b5765cea4362f", "src_uid": "861f8edd2813d6d3a5ff7193a804486f", "apr_id": "3199c550571cf1d3ca4015b8c3717458", "difficulty": 1400, "tags": ["dfs and similar", "greedy", "shortest paths", "math", "implementation", "graphs"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2593516209476309, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "b895190acd27cf0ad5f2b5097572113b", "src_uid": "861f8edd2813d6d3a5ff7193a804486f", "apr_id": "8b0a2d1e1825ca80334b620954ac8bf9", "difficulty": 1400, "tags": ["dfs and similar", "greedy", "shortest paths", "math", "implementation", "graphs"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.621307072515667, "equal_cnt": 16, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 16, "bug_source_code": "= 3) {\n\t\t\t\t$chk = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\techo ($chk) ? 'YES' : 'NO';\n?> ", "lang": "PHP", "bug_code_uid": "7b54c07ea1ed2d45bac6bad234997c21", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "apr_id": "ca7b8082155f3ff050992fdec07a7293", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9135338345864662, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " 2)\n echo \"YES\\n\";\n else echo \"NO\\n\";\n?>", "lang": "PHP", "bug_code_uid": "d619d566738f03ba52d55106ba74ba32", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "apr_id": "c827a664b497e27d6ef6fd62023a766f", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3453029817249118, "equal_cnt": 72, "replace_cnt": 12, "delete_cnt": 32, "insert_cnt": 27, "fix_ops_cnt": 71, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "687a76d5d32d8da704579d4951421226", "src_uid": "46f051f58d626587a5ec449c27407771", "apr_id": "ea6220125cbd5f3b5a66cc28d3dacac7", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.5513698630136986, "equal_cnt": 25, "replace_cnt": 13, "delete_cnt": 6, "insert_cnt": 5, "fix_ops_cnt": 24, "bug_source_code": "\", \"v\", \"<\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"^\", \"<\", \"v\", \">\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \">\")\n{\n $d = array(\">\", \"v\", \"<\", \"^\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\">\", \"^\", \"<\", \"v\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \"v\")\n{\n $d = array(\"v\", \"<\", \"^\", \">\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"v\", \">\", \"^\", \"<\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \"<\")\n{\n $d = array(\"<\", \"^\", \">\", \"v\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"<\", \"v\", \">\", \"^\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "303426906367dc208ae727982326f405", "src_uid": "fb99ef80fd21f98674fe85d80a2e5298", "apr_id": "bac0d3645fc1812e3afca2619de40230", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7793190416141236, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "\",\"v\", \"<\"];\n$counter_clockwise_stats = array_reverse($clockwise_stats);\n\n\n$mod = $n%4;\n$start_pos = array_search($start, $clockwise_stats);\n$start_pos_ccw = array_search($start, $counter_clockwise_stats);\nif($start_pos!==false){\n \t$end_pos = ($start_pos+$mod)%4;\n\tif($end == $clockwise_stats[$end_pos]){\n\t echo \"cw\";\n\t return;\n\t}\n}\nif($start_pos_ccw!==false){\n\n\t$end_pos_ccw = ($start_pos_ccw + $mod)%4;\n\tif($end == $counter_clockwise_stats[$end_pos_ccw]){\n\t echo \"ccw\";\t\n\t return;\n\t}\n}\n\necho \"undefined\";\n", "lang": "PHP", "bug_code_uid": "075c073595d8ad11be5e13aec740cd63", "src_uid": "fb99ef80fd21f98674fe85d80a2e5298", "apr_id": "e72cf36c992e41f7a65e2218c8ca212e", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5447042640990372, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f85ab51820ed9034f05eaa508517b475", "src_uid": "bdf99d78dc291758fa09ec133fff1e9c", "apr_id": "d7c6b0ed1bf993670578ece4282f1c9d", "difficulty": 1300, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9367088607594937, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5edc2060ab279fc33577aa06d506a4c5", "src_uid": "a254b1e3451c507cf7ce3e2496b3d69e", "apr_id": "2138fb6f2dd1a1ae020ca4411de9df54", "difficulty": 1200, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9255533199195171, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "\";\necho $l . \"
\";\n\n\nif ($u==$l) {\n\techo strtolower($s);\n}elseif ($u > $l) {\n\techo strtoupper($s);\n}else{\n\techo strtolower($s);\n}\n\n?>", "lang": "PHP", "bug_code_uid": "fff65bb627ee9e28ba303776ca9596fd", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "87b0ef9bd8b2974f4ebf30f3912313d5", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9983193277310924, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= 'a' && $str[$i] <= 'z' ) $small++;\n if( $str[$i] >= 'A' && $str[$i] <= 'Z' ) $big++;\n}\n\nif( $small > $big )\n echo strtolower($str);\nelse \n echo strtoupper($str);\n?>", "lang": "PHP", "bug_code_uid": "62bd459a04b579c25630a84fec6e8f24", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "94e57e7dae50270d519c05a1c7e95142", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9819277108433735, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "=ord(\"a\")?$cnt++:\"\";\necho $cnt>=(strlen($s)-$cnt)?strtolower($s):strtoupper($s); \n?>", "lang": "PHP", "bug_code_uid": "31c8e8519f63d77a14006f664e2be9d2", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "97f29e44385a51093a487159ecf22257", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9714828897338403, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " ", "lang": "PHP", "bug_code_uid": "b0af9328f66e10c9b940e5e4b9567c98", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "3bdd8107b01116c5baa95f30c0b709ca", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9985443959243085, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $uc) {\n echo strtolower($word);\n} else if ($uc > $lc) {\n echo strtoupper($word);\n}\necho \"\\n\";\n", "lang": "PHP", "bug_code_uid": "9b8481a0b20f06075a26e473cd1bf3e9", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "apr_id": "e3e9d7d43e197f6f415e483401e12e5a", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7378277153558053, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= $c)\n {\n break;\n }\n else\n {\n $d += $x;\n }\n }\n print $d;\n}\n?>", "lang": "PHP", "bug_code_uid": "ef29787ec018a6517cb58487a9479006", "src_uid": "f8eb96deeb82d9f011f13d7dac1e1ab7", "apr_id": "69f6df3edb65467bd0cbb654ead198d8", "difficulty": 900, "tags": ["dp", "math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9958419958419958, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 1) {\n\t\tfor ($i = 2; $i < $n - $v + 1; $i++) {\n\t\t\t$res += $i;\n\t\t}\n\t}\n\techo ($res);\n\n\tfclose($in);\n\n##############################################################################\n\t#echo (number_format($res,0,null,'').\"\\n\");\n\t#$a = explode(\" \", trim(fgets($in)));\n?>", "lang": "PHP", "bug_code_uid": "ae55e6e094e166b6c5e3debe294e39db", "src_uid": "f8eb96deeb82d9f011f13d7dac1e1ab7", "apr_id": "2b7f788fb22db0e3b2c40fa47804ad95", "difficulty": 900, "tags": ["dp", "math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9896907216494846, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "1) {\n for($i=2;$i<$n;++$i) if($n%$i==0) { $n/=$i, break; }\n echo \"$n \";\n}", "lang": "PHP", "bug_code_uid": "58322b1c84f67f2eb673d23d50b23ff0", "src_uid": "2fc946bb72f56b6d86eabfaf60f9fa63", "apr_id": "129dcc743fed3a24e9082ec207e96873", "difficulty": 1300, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9965635738831615, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "1) {\n for($i=2;$i<$n;++$i) if($n%$i==0) { $n/=$i; break; }\n echo \"$n \";\n}", "lang": "PHP", "bug_code_uid": "0fef7761d3c28f4b38359703deeb569b", "src_uid": "2fc946bb72f56b6d86eabfaf60f9fa63", "apr_id": "129dcc743fed3a24e9082ec207e96873", "difficulty": 1300, "tags": ["greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9978768577494692, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "0){\n for($i=1;$i<=$n;$i+=2){\n array_push($num,$i);\n }\n for($i=2;$i<=$n;$i+=2){\n array_push($num,$i);\n }\n echo $num[$k-1].\"\\n\";\n $num = array();\n $n = $k = null;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "f2e1f22fa337a898838761f12401176d", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "5c7997c9ec2809826a5168ddec530b8e", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9932885906040269, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "952c4be746fd4504c37647f28f29f606", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "e1dc71d7f9f22c286bf38868da13babb", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4173027989821883, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 14, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1aca155ad8d77bdb89cf321c844900d0", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "e1dc71d7f9f22c286bf38868da13babb", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5451559934318555, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "514b771d0e424b611160a551ae0beafe", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "75e609dc597cf19158a7a5dd49ffdbb6", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.496, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": " $part)\n{\n echo 2 * ($part-$k);\n}\n else {\n echo 2*($k-1)+1;\n}", "lang": "PHP", "bug_code_uid": "727fbd8dd734eb5364aaf4b14295e635", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "0282debeaee5cfaf498968109e0b6ea6", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9945054945054945, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cec5dd07a2a195e03b0030523ea572a7", "src_uid": "8aef4947322438664bd8610632fe0947", "apr_id": "f65cd7f87f28b778dadfae70d3af0520", "difficulty": 800, "tags": ["dp", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8434959349593496, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "= 5)? 'YES'.PHP_EOL : 'NO'.PHP_EOL;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\techo ($div >= 3)? 'YES'.PHP_EOL : 'NO'.PHP_EOL;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}\n", "lang": "PHP", "bug_code_uid": "c844ebec123e7a9eddb4ac79597fe02a", "src_uid": "cfd1182be98fb5f0c426f8b68e48d452", "apr_id": "2837ea423a2ccc27ceabfc6379f621cf", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9905956112852664, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "$t = (int)fgets(STDIN);\nfor ($i = 0; $i < $t; $i += 1) {\n $flag = false;\n $x = (int)fgets(STDIN);\n for ($j = 0; $j <= $x; $j +=7) {\n if (($x - $j) % 3 === 0) {\n fwrite(STDOUT, \"YES\\n\");\n $flag = true;\n break;\n }\n }\n if (! $flag) fwrite(STDOUT, \"NO\\n\");\n}", "lang": "PHP", "bug_code_uid": "f91563f5de7e2492fdc18b005df55eb0", "src_uid": "cfd1182be98fb5f0c426f8b68e48d452", "apr_id": "d1b623a04f0ecf83bd4d66255e6bf58e", "difficulty": 900, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7357001972386588, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " $value) {\n\t$b[$key] += 0;\n}\narsort($b);\n$count = 0;\nfor ($i=0; $i < $n; $i++) { \n\tif ($m <= $k) break;\n\tif ($k != 0) {\n\t\t$count++;\n\t\t$k += $b[$i] - 1;\n\t} else {\n\t\t$count = -1;\n\t\tbreak;\n\t}\n}\nif ($m > $k) $count = -1;\nfwrite($f_out, $count);\nfclose($f_out);", "lang": "PHP", "bug_code_uid": "c17c186a1d8575666c9dd1b4a6efc57f", "src_uid": "b32ab27503ee3c4196d6f0d0f133d13c", "apr_id": "07991a5d1408ddce3d7d23bde19a4424", "difficulty": 1100, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6948356807511737, "equal_cnt": 14, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 10, "fix_ops_cnt": 13, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4043e6dba31899a6f7245295b63d2681", "src_uid": "daf0dd781bf403f7c1bb668925caa64d", "apr_id": "3e02ff3f321f2b7bc1649332a5a1b67a", "difficulty": 1300, "tags": ["graphs", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9537648612945839, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "304f206df34c19f141666cb0ed1cdad8", "src_uid": "e2357a1f54757bce77dce625772e4f18", "apr_id": "7b56c59159c3398306d5dcd4e9e8d76c", "difficulty": 1700, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9575596816976127, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bed681330218bd31922e2105c1b54c13", "src_uid": "e2357a1f54757bce77dce625772e4f18", "apr_id": "7b56c59159c3398306d5dcd4e9e8d76c", "difficulty": 1700, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9693396226415094, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a778b5a6280adde2e56ef3416f538332", "src_uid": "4bd174a997707ed3a368bd0f2424590f", "apr_id": "abfb481a6bfca5bce46cd6a093257cc3", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.32742440041710114, "equal_cnt": 22, "replace_cnt": 16, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 22, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f87b3d6eaa633c9b44051b67d2f0f556", "src_uid": "082b31cc156a7ba1e0a982f07ecc207e", "apr_id": "7678ac82b10df5f82b69b78b4e19b564", "difficulty": 800, "tags": ["greedy", "math", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.34845360824742266, "equal_cnt": 20, "replace_cnt": 14, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 19, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "4b4e62a7736362c7b60c9bf385a10432", "src_uid": "082b31cc156a7ba1e0a982f07ecc207e", "apr_id": "7678ac82b10df5f82b69b78b4e19b564", "difficulty": 800, "tags": ["greedy", "math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9990069513406157, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $value) {\n \n if ($key == 1) $value3=$value;\n if ($key == 0) $value2=$value;\n if ($key == 2) $value5=$value;\n if ($key == 3) $value6=$value;\n \n \n \n if ($value2 < $value5 and $value2 < $value6) {\n $final=$value2 * 256;\n \n }elseif ($value5 < $value2 and $value5 < $value6) {\n \n $final=$value5 * 256;\n \n }elseif ($value6 < $value2 and $value6 < $value5){\n \n $final=$value6 * 256;\n \n }elseif ($value5 == $value6) {\n \n $final= $value5 * 256;\n \n }\n\n $actvalue=$final / 256;\n $ac2=$value2 - $actvalue;\n \n \n if ($actvalue == $value2) {\n $ff =$final ;\n \n }elseif ($value3 < $ac2) {\n $mm=$value3 * 32;\n $ff=$mm + $final;\n \n \n \n }elseif ($ac2 < $value3) {\n $ff = $ac2 * 32 + $final;\n \n }elseif ($ac2 == $value3) {\n \n $ff= $value3 * 32 + $final;\n }\n \n \n\n}\n echo $ff;\n \n?>", "lang": "PHP", "bug_code_uid": "e24d71aae76c51885282d3a55fcc9b46", "src_uid": "082b31cc156a7ba1e0a982f07ecc207e", "apr_id": "186d8b4d148935540a778e92577aa075", "difficulty": 800, "tags": ["greedy", "math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9985141158989599, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "=$n) break;\n\t$left_space = $n-$taked_box_cnt;\n\t$taked_box = ($left_space<$box_cnt)?$left_space:$box_cnt;\n\t$taked_box_cnt += $taked_box;\n\t$taked_match_cnt += ($taked_box*$match_cnt);\n\n}\necho $taked_match_cnt;\n", "lang": "PHP", "bug_code_uid": "1b86ab52cdfc5397a71e4e2192841aeb", "src_uid": "c052d85e402691b05e494b5283d62679", "apr_id": "3568b3df8276b0acff1d72267cbee5fd", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8805970149253731, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": " $v) {\n $totalcnt += $k * $v;\n $totalkorobok += $k;\n if ($totalkorobok > $n) {\n $totalcnt = $totalcnt - ($totalkorobok - $n) * $v;\n echo $totalcnt;\n exit();\n }\n}\necho $totalcnt;\n\n?>", "lang": "PHP", "bug_code_uid": "03a8582ff63a548ed6c07541a4a2124d", "src_uid": "c052d85e402691b05e494b5283d62679", "apr_id": "f3ea496c04dbfaea8bd771c775accc00", "difficulty": 900, "tags": ["greedy", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9434229137199435, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "= 0))\n{\n $e = abs($a) + $c;\n}\nelseif(($a >= 0) & ($c < 0))\n{\n $e = $a + abs($c);\n}\nelseif(($a >= 0) && ($c >= 0))\n{\n $e = max($a, $c) - min($a, $c);\n}\nif(($b < 0) && ($d < 0))\n{\n $a = abs($b);\n $c = abs($d);\n $f = max($b, $d) - min($b, $d);\n}\nelseif(($a < 0) && ($c >= 0))\n{\n $f = abs($b) + $d;\n}\nelseif(($a >= 0) & ($c < 0))\n{\n $f = $b + abs($d);\n}\nelseif(($a >= 0) && ($c >= 0))\n{\n $f = max($b, $d) - min($b, $d);\n}\nprint max($e, $f);\n?>", "lang": "PHP", "bug_code_uid": "b4dac15237c40721f7186aa1557af7d4", "src_uid": "a6e9405bc3d4847fe962446bc1c457b4", "apr_id": "c204681c311adfb45efa89118099e07d", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6992481203007519, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "cfe1a3bbc428503f67dea08a2baf451c", "src_uid": "a6e9405bc3d4847fe962446bc1c457b4", "apr_id": "ed8fa5e90f9354c77f11f38f9cd7ad6e", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8756218905472637, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "';\n\n if (is_array($data)) {\n print_r($data);\n } else {\n var_dump($data);\n }\n\n if ($die) {\n die();\n }\n\n echo '';\n}\n\nfunction stdin() {\n $stdin = @fopen('data.txt', 'r');\n if (!$stdin) {\n $stdin = fopen('php://stdin', 'r');\n }\n\n return $stdin;\n}\n\nfunction g() {\n global $stdin;\n return trim(fgets($stdin));\n}\n\n$stdin = stdin();\n/****************************************************** Solving block *****************************************************/\necho preg_replace('/\\/{2,}/', '/', g());\n\n?>", "lang": "PHP", "bug_code_uid": "643e48a5d5c5187d6ef99397715a1546", "src_uid": "6c2e658ac3c3d6b0569dd373806fa031", "apr_id": "75be598198529b93c5e67edc22de28ca", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9616858237547893, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9a0b08feacde9aa1a4f334d62943854e", "src_uid": "6c2e658ac3c3d6b0569dd373806fa031", "apr_id": "7124a695eb1c76b69b8743c9ef3e9761", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3444730077120823, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 14, "bug_source_code": " $h) && ($a < $i)) || (($f > $h) && ($f < $i)) || (($g > $h) && ($g < $i)))\n{\n print \"NO\";\n}\nelse\n{\n print \"YES\";\n}\n?>", "lang": "PHP", "bug_code_uid": "4f3221a03626599a371dff1feb545629", "src_uid": "912c8f557a976bdedda728ba9f916c95", "apr_id": "ab98b1c66c2006b12fe21efaad090666", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9251363411006446, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $a, 1 => $b, 2 => $c);\n $f = array(\"s\", \"m\", \"p\");\n for($w = 0; $w < 3; $w++)\n {\n for($x = 1; $x <= 7; $x++)\n {\n for($y = $x + 1; $y <= 8; $y++)\n {\n for($z = $y + 1; $z <= 9; $z++)\n {\n $g = $x . $f[$w];\n $h = $y . $f[$w];\n $i = $z . $f[$w];\n $j = array($g, $h, $i);\n $k = array_intersect($e, $j);\n $l = 3 - count($k);\n $m = min($m, $l);\n }\n }\n }\n }\n}\nprint min($d, $m);\n?>", "lang": "PHP", "bug_code_uid": "fe8d2a38b02e37f341da8504c44e2c87", "src_uid": "7e42cebc670e76ace967e01021f752d3", "apr_id": "a23d8cec2592e9698cb44f4706e6ca4a", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9888851465139777, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 0, 'p' => 0, 's' => 0);\n foreach($n as $k => $v){\n $arr[$v[1]] += 1; \n }\n arsort($arr);\n if(reset($arr) == 1){\n echo 2;\n } else if (reset($arr) == 2) {\n foreach($n as $sk => $sv){\n if($sv[1] == array_keys($arr)[0]) {\n $a[] = $sv[0];\n }\n }\n if(abs($a[0] - $a[1]) <= 2) {\n echo 1;\n } else {\n echo 2;\n }\n } else if(reset($arr) == 3) {\n foreach($n as $sk => $sv){\n if($sv[1] == array_keys($arr)[0]) {\n $a[] = $sv[0];\n }\n }\n $b = array_count_values($a);\n arsort($b);\n if(max($a) - min($a) == 0) {\n echo 0;\n } else if (max($a) - min($a) == 2) {\n if(reset($b) < 2) {\n echo 0;\n }else{\n echo 1;\n }\n } else if (max($a) - min($a) > 2){\n $b = array_count_values($a);\n arsort($b);\n $d = array_keys($b);\n sort($d);\n $m1 = $d[0]+1;\n $m2 = $d[2]-1;\n $m3 = $d[1]+1;\n $m4 = $d[1]-1;\n if(reset($b) < 2) {\n if(in_array($m1, $d) || in_array($m2, $d) || in_array($m3, $d) || in_array($m4, $d) || ($m1 == $m4) || ($m3 == $m2)){\n echo 1;\n } else {\n echo 2;\n }\n } else {\n echo 1;\n }\n }\n }\n\n ?>", "lang": "PHP", "bug_code_uid": "66d32ee4447a3ec13093a4eb7ef9ffed", "src_uid": "7e42cebc670e76ace967e01021f752d3", "apr_id": "d92ede3f55f2ac51ec66bdd418c3ce9e", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8828420256991686, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3e5033bb7cc67850c875a3e180f3da72", "src_uid": "5f94c2ecf1cf8fdbb6117cab801ed281", "apr_id": "f693aa6e11ef31bbc5c9325bea5c113d", "difficulty": 1000, "tags": ["greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.956982131039047, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": " $b) {\n $rs--;\n }\n }\n }\n fprintf($fileOUT, $rs);\n}\n\nfclose($fileIN);\nfclose($fileOUT);\n?>\n", "lang": "PHP", "bug_code_uid": "c10339cb7c0c4cd2809bb94c05e41511", "src_uid": "6e0715f9239787e085b294139abb2475", "apr_id": "495ea48833d8f230227df3347df52781", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9603864734299516, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= count($comb)) {\n return false;\n }\n $comb[$pos]++;\n if ($comb[$pos] > $orders[$pos]) {\n $comb[$pos] = 0;\n return next_comb($comb, $orders, $pos + 1);\n }\n return true;\n}\n\nif ($a == $b) {\n echo \"infinity\\n\";\n} elseif ($b > $a) {\n echo \"0\\n\";\n} else {\n $divs = all_divisors($a - $b);\n $divisors = array_keys($divs);\n $orders = array_values($divs);\n $comb = array_fill(0, count($divs), 0);\n $ok = 0;\n do {\n $tryN = 1;\n foreach ($comb as $i => $count) {\n $tryN *= pow($divisors[$i], $count);\n }\n if ($tryN > $b) {\n $ok++;\n }\n } while (next_comb($comb, $orders));\n echo \"$ok\\n\";\n}\n\n", "lang": "PHP", "bug_code_uid": "56fdbeeadf6a487fe571a7c9847bc58e", "src_uid": "6e0715f9239787e085b294139abb2475", "apr_id": "7169d59d2e38a5f5a5ad8cf87f529700", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8083916083916084, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "$b);\n } else {\n $ans += ($i>$b)+((int)($a/$i)>$b);\n }\n }\n }\n echo $ans;\n}\n?>", "lang": "PHP", "bug_code_uid": "58ab77455bf9f594559fc2931511a52f", "src_uid": "6e0715f9239787e085b294139abb2475", "apr_id": "c4bdb54ace26d89bfd063c96a6d59618", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9707112970711297, "equal_cnt": 10, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 9, "bug_source_code": " $c)\n {\n $b -= $c;\n if($d == 1)\n {\n if($b2 < $a - $c)\n {\n $g = 1;\n }\n else\n {\n $h++;\n }\n break;\n }\n }\n elseif($b == $c)\n {\n $b = $b2;\n if($d == 1)\n {\n if($b < $a - $c)\n {\n $g = 1;\n break;\n }\n }\n $h++;\n }\n elseif($b < $c)\n {\n $g = 1;\n break;\n }\n }\n else\n {\n $j = $i % 2;\n $i++;\n if($j == 0)\n {\n if($x == $d + 1)\n {\n if($f / 2 > $b)\n {\n $b = $b2;\n $h++;\n }\n break;\n }\n else\n {\n if($f > $b)\n {\n $b = $b2;\n if($b < $f)\n {\n $g = 1;\n break;\n }\n $h++;\n }\n $b -= $f;\n }\n }\n else\n {\n if($x == $d + 1)\n {\n if($e / 2 > $b)\n {\n $b = $b2;\n $h++;\n }\n break;\n }\n else\n {\n if($e > $b)\n {\n $b = $b2;\n if($b < $e)\n {\n $g = 1;\n break;\n }\n $h++;\n }\n $b -= $e;\n }\n }\n }\n}\nif($g == 0)\n{\n print $h;\n}\nelse\n{\n print \"-1\";\n}\n?>", "lang": "PHP", "bug_code_uid": "d19caf5aba962229e39b12f051a18c44", "src_uid": "283aff24320c6518e8518d4b045e1eca", "apr_id": "a802d141ff49f7d717a3fb1a570c558e", "difficulty": 1500, "tags": ["greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9036764705882353, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $c[$x])\n {\n $f = $c[$x + 1] - $c[$x];\n if($d[$c[$x]] == 0)\n {\n $d[$c[$x]] = $f;\n }\n elseif($d[$c[$x]] != $f)\n {\n $e = 1;\n break;\n }\n }\n elseif($c[$x + 1] == $c[$x])\n {\n $f = $c[$x];\n if($d[$c[$x]] == 0)\n {\n $d[$c[$x]] = $f;\n }\n elseif($d[$c[$x]] != $f)\n {\n $e = 1;\n break;\n }\n }\n elseif($c[$x + 1] < $c[$x])\n {\n $f = $a + $c[$x + 1] - $c[$x];\n if($d[$c[$x]] == 0)\n {\n $d[$c[$x]] = $f;\n }\n elseif($d[$c[$x]] != $f)\n {\n $e = 1;\n break;\n }\n }\n}\nif($e == 0)\n{\n $g = array_unique($d);\n sort($g);\n $h = array_slice($g, 1);\n sort($g);\n $i = range(1, $a);\n $j = array_diff($i, $g);\n sort($j);\n $k = 0;\n for($x = 1; $x <= $a; $x++)\n {\n if($d[$x] == 0)\n {\n $d[$x] = $j[$k];\n $k++;\n }\n }\n $l = array_unique($d);\n if(count($l) == count($d))\n {\n print implode(\" \", $d);\n }\n else\n {\n print \"-1\";\n }\n}\nelse\n{\n print \"-1\";\n}\n?>", "lang": "PHP", "bug_code_uid": "b38f5de6e83a551ecfe4d2ba5c588d7c", "src_uid": "4a7c959ca279d0a9bd9bbf0ce88cf72b", "apr_id": "7c477b28448f153ba1386ca7ef050436", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9833666001330672, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "440c9960a1bf2a5c4636664dbff5f150", "src_uid": "af1ec6a6fc1f2360506fc8a34e3dcd20", "apr_id": "9a4ca8004b62f816fcf5ac60c7f302f2", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9795081967213115, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b6974fe85bc6474771d86a9638b022a2", "src_uid": "af1ec6a6fc1f2360506fc8a34e3dcd20", "apr_id": "2c36e9d3cbb01ef4182eb7aba940cafb", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9702380952380952, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "0){\n\t\techo \"$sum/5\";\n\t}\n\telse{\n\t\techo \"-1\";\n\t}\n?>", "lang": "PHP", "bug_code_uid": "a5ba4cc8795b63ba021d13edb445473c", "src_uid": "af1ec6a6fc1f2360506fc8a34e3dcd20", "apr_id": "3563068f3c830fadcfa69585d73e6c30", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9776536312849162, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " 0) {\n $left -= (($kmin - 1) * $amin);\n\n if ($left > 0) {\n $r1 = min($left, $amin + $amax);\n } else {\n $r1 = 0;\n }\n} else {\n $r1 = 0;\n}\n\necho $r1;\n\n// max value\n\n$left = $n - ($kmin * $amin);\nif ($left > 0) {\n\n $r2 = $amin + min(floor($left / $kmax), $amax);\n} else {\n $r2 = floor($left / $kmin);\n}\n\necho ' ', $r2;", "lang": "PHP", "bug_code_uid": "c7170bfbc74e6dadc42dc2721762cb52", "src_uid": "2be8e0b8ad4d3de2930576c0209e8b91", "apr_id": "0686470ee23466d938b916936620759b", "difficulty": 1000, "tags": ["greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9841269841269841, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8ec9b5df9e7382e851657aebd3b465b4", "src_uid": "b4af2b8a7e9844bf58ad3410c2cb5223", "apr_id": "d9650611d08014b891aca9a9fd610f3f", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.24621094958243117, "equal_cnt": 17, "replace_cnt": 9, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "= 1)\n {\n $e[$y][$z] = 1;\n }\n }\n else\n {\n if($z == 1)\n {\n if($c[$y - 1][$z] > 1)\n {\n $c[$y][$z] += $d;\n if($c[$y][$z] >= 1)\n {\n $e[$y][$z] = 1;\n }\n }\n }\n elseif($z == count($f))\n {\n if($c[$y - 1][$z - 1] > 1)\n {\n $c[$y][$z] += $d;\n if($c[$y][$z] >= 1)\n {\n $e[$y][$z] = 1;\n }\n }\n }\n else\n {\n if($c[$y - 1][$z - 1] > 1)\n {\n $c[$y][$z] += $d;\n if($c[$y][$z] >= 1)\n {\n $e[$y][$z] = 1;\n }\n }\n if($c[$y - 1][$z] > 1)\n {\n $c[$y][$z] += $d;\n if($c[$y][$z] >= 1)\n {\n $e[$y][$z] = 1;\n }\n }\n }\n }\n }\n }\n}\n$g = 0;\nfor($x = 1; $x <= count($e); $x++)\n{\n $f = $e[$x];\n $g += array_sum($f);\n}\nprint $g;\n?>", "lang": "PHP", "bug_code_uid": "738b67e5acd34aecea49a15e372c0f36", "src_uid": "b2b49b7f6e3279d435766085958fb69d", "apr_id": "050a95d94152b3155bbfc2ebec09d94f", "difficulty": 1500, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9456066945606695, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c758b38202c442f4ff87ddf8a4846de1", "src_uid": "5551742f6ab39fdac3930d866f439e3e", "apr_id": "0073956d131905c515d3da51426696d0", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7804878048780488, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "1){\n $Hades++;\n}\n\necho $Hades;\n\n?>", "lang": "PHP", "bug_code_uid": "50d5c4ea5f395837df4be364ca7296ba", "src_uid": "5551742f6ab39fdac3930d866f439e3e", "apr_id": "1d2c41e20158d96bfd9e6b4fdbf668f6", "difficulty": 800, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9734789391575663, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " intval($toNext)&&intval($points[$i]) != intval($points[$i - 1])) {\n break;\n }\n if (intval($points[$i]) == 0) continue;\n $result++;\n}\necho $result;", "lang": "PHP", "bug_code_uid": "f222d9787e8c65546b27b6ff65e250b5", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "38a5c70ac180c089c42ae832e5cbbca6", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5533980582524272, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " $k) $total++;\n\t\telse break;\n\t}\n\techo $total;\n?>", "lang": "PHP", "bug_code_uid": "ef22d515af2d772674cbd4ec202f1a98", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "a4c25047704f03be2a6eea0b1aa28f13", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.96794208893485, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0218c1a2e99559d57bca1649262d388a", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "8528480a7a588078ec01ff919e4d72b4", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9556907037358818, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4acafa48b8930d28b53ead3f80d390e4", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "aa2437e722a2b721ad8ed9627da68d6a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5834862385321101, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": "=$score)\n{\n$sum++;\n$i++;\n}\n\nfputs(STDOUT, \"$sum\");\n?>", "lang": "PHP", "bug_code_uid": "9a5e9df66f11eda3faaa19b4660c5dee", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "apr_id": "8324edfe488d4d82a6087a06e5fbc7dd", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9902329075882795, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8a5071eeb7cd73af2c599ebbe5e58b5b", "src_uid": "ce220726392fb0cacf0ec44a7490084a", "apr_id": "646f249d89609312620a7e8245dde3e4", "difficulty": 900, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9963484611371936, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "65778f9ae26680bbdef96c3877f0e1e7", "src_uid": "fc86df4931e787fa3a1a40e2aecf0b92", "apr_id": "fd98be2453055abdad611e95dba774d9", "difficulty": 1100, "tags": ["strings", "implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9857535616095976, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " '',\n\t\t\"\\n\" => '',\n\t);\n\treturn strtr(fgets($f), $r);\n}\n\nfunction readNumString($f) {\n\treturn trim(fgets($f));\n}\n\nfunction stringToArray($str) {\n\treturn str_split($str);\n}\n\nfunction readNum($f, $is_int = false) {\n\t$v = readNumString($f);\n\treturn $is_int ? intval($v) : floatval($v);\n}\n\nfunction readStringExplode($f, $delimiter = ' ') {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = 'trim';\n\treturn array_map($callf, $return);\n}\n\nfunction readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = $is_int ? 'intval' : 'floatval';\n\treturn array_map($callf, $return);\n}\n\n###### /IO ######\n\nfunction pass_compare($p1, $p2) {\n\t$l1 = strlen($p1);\n\t$l2 = strlen($p2);\n\tif ($l1 > $l2) {\n\t\treturn 1;\n\t} elseif ($l1 < $l2) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nfunction getAnswer($is_test = false, $f = false) {\n\tif ($is_test)\n\t\t$stream = $f;\n\telse\n\t\t$stream = STDIN;\n\t/* begin body */\n\t$len = readNum($stream);\n\t$baseStr = readString($stream);\n\n\t$isInS = false;\n\t$maxWord = '';\n\t$wordsInS = array();\n\t$isDoingWord = false;\n\t$currentWord = '';\n\tfor ($i = 0; $i < $len; $i++) {\n\t\tif (in_array($baseStr[$i], array('(', ')', '_'))) {\n\t\t\tif (!empty($currentWord)) {\n\t\t\t\tif ($isInS) {\n\t\t\t\t\t$wordsInS[] = $currentWord;\n\t\t\t\t} elseif (strlen($currentWord) > strlen($maxWord)) {\n\t\t\t\t\t$maxWord = $currentWord;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$isDoingWord = false;\n\t\t\t$currentWord = '';\n\t\t\tif ($baseStr[$i] == '(') {\n\t\t\t\t$isInS = true;\n\t\t\t} elseif ($baseStr[$i] == ')') {\n\t\t\t\t$isInS = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$isDoingWord = true;\n\t\t\t$currentWord.=$baseStr[$i];\n\t\t}\n\t}\n\techo strlen($maxWord) . ' ' . count($wordsInS);\n\t/* / end body */\n}\n\nif (empty($is_test))\n\tgetAnswer();", "lang": "PHP", "bug_code_uid": "b4c8d564d5045988ad5a82fbc5bb89ee", "src_uid": "fc86df4931e787fa3a1a40e2aecf0b92", "apr_id": "0228419c93ccded5187b8886aa872b2a", "difficulty": 1100, "tags": ["strings", "implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9992193598750976, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $longestWordLength) {\n $longestWordLength = strlen($word);\n \n }\n}\necho $longestWordLength.\" \".$countword2;\n?>", "lang": "PHP", "bug_code_uid": "8d1d6bb595fb40af470acd0a4c6f7d09", "src_uid": "fc86df4931e787fa3a1a40e2aecf0b92", "apr_id": "dd8bded46d15dc423cffc2b05a34d209", "difficulty": 1100, "tags": ["strings", "implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.11952191235059761, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "= $mas[0])\n{ $ver = $i; break; }\n}\n\nfor ($j = 1; $j <= $mas[1]; $j++)\n{\nif ($mas[2] * $j >= $mas[1])\n{ $gor = $j; break; }\n}\n$sum = $ver * $gor;\necho $sum;\n?>", "lang": "PHP", "bug_code_uid": "82962e440f8a50c86d044a7f2742ced9", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "4f4f1a72583557c51b1704c9ac3fe0eb", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.573502722323049, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "18983439c6965554349dfd17f41dac19", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "6eb6de82c4d9a08bd26c859489356e54", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9948717948717949, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9167ae83112a089a983935367eb02b89", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "2124d6fcf6d668dbdcdb54892488cbf9", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8384879725085911, "equal_cnt": 9, "replace_cnt": 0, "delete_cnt": 6, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "83db09144bb86da2be1051733959a79d", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "c67ce5c6e11836a15d5118f30a9c13f8", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.112, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "';\necho '';\necho '';\necho '';\n\nfscanf(STDIN, \"%d\",$year)\n$key = array_search($year, $arr);\n$key = $key+1;\necho $arr[$key];\n?>", "lang": "PHP", "bug_code_uid": "1c25410523a6c01f6387bd7b31b99307", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "c67ce5c6e11836a15d5118f30a9c13f8", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9761092150170648, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "59ae7e14782f4e6cd6842620e43d22a2", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "37141ec697d6405a0bef802b3efcd37b", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9293924466338259, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": " 0){\n $arr[$b % 10] = 1;\n $b /= 10;\n }\n if (count($arr) == 4){\n break;\n }\n }\n echo $i;", "lang": "PHP", "bug_code_uid": "38ea562bf15153de727b24eb34436c6f", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "c711938c8fbe4b1b59bd299427607967", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9978432782171099, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n break;\n }\n}\n", "lang": "PHP", "bug_code_uid": "3d0db0c292d41356b4e98e4aab981084", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "apr_id": "f5a0bd34e16d781f342e84626a5b06f8", "difficulty": 800, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9552845528455285, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "6b96c57aebf4885a4ed9d9509072c80e", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "9f94ea2f67734985f4ac44aba27bf1c3", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7083700440528634, "equal_cnt": 24, "replace_cnt": 3, "delete_cnt": 7, "insert_cnt": 13, "fix_ops_cnt": 23, "bug_source_code": " 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0);\n$b = array(\"6\", \"2\", \"5\", \"5\", \"4\", \"5\", \"6\", \"3\", \"7\", \"6\");\nlist($c, $d) = explode(\" \", trim(fgets(STDIN)));\nfor($x = $c; $x <= $d; $x++)\n{\n $e = str_split($x);\n for($y = 0; $y < count($e); $y++)\n {\n $a[$e[$y]]++;\n }\n}\n$f = 0;\nfor($x = 0; $x < 9; $x++)\n{\n $g = $a[$x] * $b[$x];\n $f += $g;\n}\nprint $f;\n?>", "lang": "PHP", "bug_code_uid": "3d272b4dfedae9fb87b268782732b0c8", "src_uid": "1193de6f80a9feee8522a404d16425b9", "apr_id": "99498dd1f0433bcb8bffca3fdda941a5", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9983633387888707, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= 2)\n{\n print \"Correct\";\n}\nelse\n{\n print \"Incorrect\";\n}\n?>", "lang": "PHP", "bug_code_uid": "bfd9305668188d5e6876745983c49a9a", "src_uid": "99f9cdc85010bd89434f39b78f15b65e", "apr_id": "883cbe37387f0999847769006600496e", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9891696750902527, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e1307756307f0e35f3594c663a2d2c92", "src_uid": "f98168cdd72369303b82b5a7ac45c3af", "apr_id": "5d5266e6faac33af7de4ad76e5514804", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9739714525608733, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c19edd93fcf77951c7ea8fc8ccdf2e8a", "src_uid": "f98168cdd72369303b82b5a7ac45c3af", "apr_id": "85ff5b992610e6d3106a909989202e76", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4779874213836478, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2ca104b1db3304fa98eb0b196de330c1", "src_uid": "f98168cdd72369303b82b5a7ac45c3af", "apr_id": "eb503f68eda6f9334b180c594c40078f", "difficulty": 1200, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.20765027322404372, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1ea76c76137f7ea65a31d8d4c0ad987a", "src_uid": "eb8212aec951f8f69b084446da73eaf7", "apr_id": "4c8482ed309a405ab17736f03e728365", "difficulty": 1100, "tags": ["math", "constructive algorithms", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.33299284984678246, "equal_cnt": 30, "replace_cnt": 24, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 29, "bug_source_code": " $h)\n {\n $h = $b[$x];\n }\n if($c[$x] < $g)\n {\n $g = $c[$x];\n }\n if($c[$x] > $i)\n {\n $i = $c[$x];\n }\n }\n for($x = 0; $x < 4 * $a + 1; $x++)\n {\n if($b[$x] < $f)\n {\n print $b[$x] . \" \" . $c[$x];\n break;\n }\n elseif($b[$x] > $h)\n {\n print $b[$x] . \" \" . $c[$x];\n break;\n }\n elseif($c[$x] < $g)\n {\n print $b[$x] . \" \" . $c[$x];\n break;\n }\n elseif($c[$x] > $i)\n {\n print $b[$x] . \" \" . $c[$x];\n break;\n }\n elseif(($b[$x] > $f) && ($b[$x] < $h) && ($c[$x] < $i) && ($c[$x] > $g))\n {\n print $b[$x] . \" \" . $c[$x];\n break;\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "bb9f7ea3da855f44dab1c34c8392dfa1", "src_uid": "1f9153088dcba9383b1a2dbe592e4d06", "apr_id": "069ec2b264b1429e8157a7088f22a708", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9463414634146341, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b56a72c17940f7b08cb72445d8c2c509", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "29ea7a9d1d4bbf98585dea49f591b0cc", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9539748953974896, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= $i){\n $b -= $i;\n }else{\n echo 'Vladik';\n }\n\n }else{ //$i\u03aa\ufffd\ufffd\ufffd\ufffd\n if($a >= $i){\n $a -= $i;\n }else{\n echo 'Valera';\n }\n $b += $i;\n }\n }\n}\ntest($a,$b)\n?>\n", "lang": "PHP", "bug_code_uid": "fa96ea5c508d910e40de582ac4fce06a", "src_uid": "87e37a82be7e39e433060fd8cdb03270", "apr_id": "537f9a5dafa8cc816b66a00f31b84ad7", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7137254901960784, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "$b) {\n $n = $a;\n }\n if ($a > 2 && $b > 2) {\n for ($i = 1; $i < $n; $i++) {\n if ($i%2 == 1) {\n $a = $a - $i;\n if ($a <= 0) {\n echo 'Vladik';\n break;\n }\n } else {\n $b = $b - $i;\n if ($b <= 0) {\n echo 'Valera';\n break;\n }\n }\n }\n } else {\n if ($a <= 2 && $b < $a) {\n echo 'Valera';\n } else {\n echo 'Vladik';\n }\n \n }\n \n?>", "lang": "PHP", "bug_code_uid": "e7bec71b9a55e6cdae6285b5566cf2e5", "src_uid": "87e37a82be7e39e433060fd8cdb03270", "apr_id": "f4da25193ef944e6c4860885ff5c6c96", "difficulty": 800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.749185667752443, "equal_cnt": 27, "replace_cnt": 13, "delete_cnt": 2, "insert_cnt": 11, "fix_ops_cnt": 26, "bug_source_code": " 0)\n {\n $f += $a;\n }\n}\nif(($x == $b - 1) && ($i == 0))\n{\n $f += $a;\n}\nelseif(($x == $b - 1) && ($i == 1))\n{\n $f += $h;\n}\n$e[count($e)] = $f;\n$j = array_sum($d);\n$k = 0;\nfor($x = 0; $x < $a; $x++)\n{\n $c -= $j;\n if($c < 0)\n {\n $c += $j;\n $a -= $x;\n for($y = 0; $y < $b; $y++)\n {\n $g = $d[$y] * $a;\n $c -= $g;\n if($c < 0)\n {\n $c += $g;\n $h = floor($c / $d[$y]);\n $k += $h;\n break;\n }\n elseif($c == 0)\n {\n $k += $a;\n break;\n }\n elseif($c > 0)\n {\n $k += $a;\n }\n }\n break;\n }\n elseif($c == 0)\n {\n $k += $b + 1;\n break;\n }\n elseif($c > 0)\n {\n $k += $b + 1;\n }\n}\n$e[count($e)] = $k;\nprint max($e);\n?>", "lang": "PHP", "bug_code_uid": "0e0a4933b561280602546e59a5f2fd55", "src_uid": "d659e92a410c1bc836be64fc1c0db160", "apr_id": "4a78db8d1f2b3e30443cb5d6f28a25a7", "difficulty": 1800, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.16666666666666666, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "af312a058d5cd09eb8cfea3e928e1cab", "src_uid": "01b50fcba4185ceb1eb8e4ba04a0cc10", "apr_id": "cb71a06ef47e69005ab2028c27afece2", "difficulty": 1200, "tags": ["dp", "brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.35714285714285715, "equal_cnt": 9, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "=0; $i--){\n\t $sum1 += $a[$i];\n\t $sum2 = 0;\n\t $s = $i;\n\t for($k=0; $k < $s; $k++){\n\t $sum2 += $a[$k];\n\t }\n\t \n\t if($sum1 - $sum2 == 0 ){\n\t echo \"YES\"; return;\n\t }\n\t}\n echo \"NO\"; return;\n?>", "lang": "PHP", "bug_code_uid": "366ecb1b98fccdc862f02ea9a2467cec", "src_uid": "01b50fcba4185ceb1eb8e4ba04a0cc10", "apr_id": "1b6f5fc189648dc56e8a5cacbd2780a9", "difficulty": 1200, "tags": ["dp", "brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9781931464174455, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": " 0)\n die();\n $num = explode(' ', $line);\n $x = $num[0];\n $c = $num[1];\n \n for ($i=0; $i < $c; $i++) { \n if ($x%10 === 0) {\n $x = $x / 10;\n }\n else\n $x -= 1;\n }\n put($x);\n\n}\n", "lang": "PHP", "bug_code_uid": "df57158341a0fef5a03024c39f662254", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "704edb07905c64498565f1ebe969e18f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9636363636363636, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f36e5b752310c45cc26a51a021a62e8f", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "39e603bfca400df6140f18b8db8848c3", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6717557251908397, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "$handle = fopen (\"php://stdin\",\"r\");\n//$line = fgets($handle);\n//$array = explode(\" \",$height_temp);\n//array_walk($array,'intval');4\nfscanf($handle,\"%d\",$n);\nfscanf($handle,\"%d\",$k);\n\nwhile($k) {\n $lastDigit = $n % 10;\n if($lastDigit == 0) {\n $n = $n / 10;\n } else {\n $n--;\n }\n $k--;\n}\necho abs($n).\"\\n\";", "lang": "PHP", "bug_code_uid": "7f9f3dec7fe999d0fec1f2d09a44b0f4", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "7e8e643a9ad96012f4fc9da790c1ef9f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9893048128342246, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 0){\n if($number % 10 == 0){\n $number /= 10;\n }\n else{\n $number--;\n }\n }\n return $number;\n}\n\nfunction main()\n{\n $data = intval(fread(STDIN, 4096));\n list($num, $k) = explode(\" \", $data);\n echo wrong_subtraction(intval($num), intval($k));\n}\n\nmain();", "lang": "PHP", "bug_code_uid": "833deb6764e92fe3b1a1cb8a7acdc3dd", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "c292fa3ba729163b9260beb9824c2e22", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9713114754098361, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "= 1) {\n $last = (int)array_pop($digits);\n $d -= ($last + 1);\n}\n\nprint implode('', $digits);\nif ($d < 0) {\n print -1 - $d;\n}", "lang": "PHP", "bug_code_uid": "b4b1a3e3644d69b0e1c1d708a8a94d64", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "155e664043222a29f29ad4b35473eba7", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7010309278350515, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "5796f240359074010faab5e699d6407d", "src_uid": "064162604284ce252b88050b4174ba55", "apr_id": "d606e315a567a7219468215cb40996eb", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9683860232945092, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "34d2d6443b6f810b919e8101919b4df7", "src_uid": "0fa526ebc0b4fa3a5866c7c5b3a4656f", "apr_id": "84b0655fb59c9971a9d4d7e53b57b728", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9767441860465116, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "$n) ? -1 : $step);\n?>", "lang": "PHP", "bug_code_uid": "24db7918a8e678d10c6d0a85154f9b95", "src_uid": "0fa526ebc0b4fa3a5866c7c5b3a4656f", "apr_id": "bd02b84db2ca6a09c30409efc37faccd", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9604221635883905, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "=0;$i--)\n\tif(($n-$i)%$m==0){\n\t\t$ans = (int)($n-$i);\n\t}\necho $ans;\n?>", "lang": "PHP", "bug_code_uid": "d1e31ee4b2b01e8880d27e72095f36cd", "src_uid": "0fa526ebc0b4fa3a5866c7c5b3a4656f", "apr_id": "8f5a1ed9c7451ca9e51b23a16c47439b", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9960159362549801, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3f1543c14c2acafb15fb6c563d0844d1", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "7cdbedf764b8583a069f19aee5c8caa5", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.725111441307578, "equal_cnt": 12, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e6190357cb0aefede0f14201d9a89b94", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "bc0f23f2aff82dad3cb291e2f9df2410", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9339774557165862, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "=65&&ord($str[$i])<=90)\n \t$cnt++;\n}\nif($cnt==$len)\n\techo strtolower($str);\nelseif ($cnt==$len-1)\n{\n\techo strtoupper($str[0]).strtolower(substr($str,1));\n}\nelse\n echo \"$str\";", "lang": "PHP", "bug_code_uid": "ac8cf5e396e5004cd1506aec5b1ae365", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "f8d9a5409e89d22b6109fff79840a493", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.973568281938326, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d2403e6bc8e7a69538a6b586417865d5", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "310d030cd5dde35940f28804f854fd28", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.37606837606837606, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f3220fa7e694a6af382a8076751c4ea8", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "3f7f762c144d30248629b012b627a1f6", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9893048128342246, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "69ffbb93816743b5688259b9bdb648d3", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "3f7f762c144d30248629b012b627a1f6", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9064748201438849, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "36ebec8f9e3e1527346e943efaae4516", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "apr_id": "f07c8abb93b1e320bdd497430858255c", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8687454677302393, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c2df87d5f840144a045f02704f2ee1ae", "src_uid": "6e006ae3df3bcd24755358a5f584ec03", "apr_id": "f4c59138726dd1e4593bc366cd64ba38", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7824817518248175, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e037b8d0e55b6520ea8a7af8652be414", "src_uid": "6e006ae3df3bcd24755358a5f584ec03", "apr_id": "f4c59138726dd1e4593bc366cd64ba38", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9081761006289308, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "9c3e9922d8777abc13dfec7d94ac11b3", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "e1f6325f4d9ad824f4c375f79f46afdc", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9965397923875432, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= $b){\n $a += $left;\n $left = 0;\n }\n\n $left += $a % $b;\n $a = intdiv($a, $b);\n// echo $a . \"\\n\";\n\n\n}\nif($left == $b){\n $count++;\n}\necho $count;", "lang": "PHP", "bug_code_uid": "14bbd85d32f77dce84bb0c245a02a5fd", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "b0c8ac2b6767ada15d91c85353c01226", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9137931034482759, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "db277e4d1dd22ff6f7fce1dd85b0fcc0", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "20dc7c72f848924205d740ac743466e9", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9570552147239264, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "d09e950f6213a089b2b060dbb23b8e7a", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "apr_id": "20dc7c72f848924205d740ac743466e9", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.26342710997442453, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "3c19c41b935393c7721843f04f0c3909", "src_uid": "2a75f68a7374b90b80bb362c6ead9a35", "apr_id": "cf1527346dedff7210670e17de5e9bee", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.154, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "= $r)){\n for ($i = 0; $i < $r - 1; $i++){\n $k = $k + 2;\n echo $k;\n }\n }\n if (($n % 2 == 0) && ($n / 2 < $r)){\n for ($i = 0; $i < ($r - $n / 2 ) ; $i++){\n $k = $k + 1;\n echo $k;\n }\n }\n if (($n % 2 != 0) && ( round($n / 2) >= $r)){\n for ($i = 0; $i < $r - 1; $i++){\n $k = $k + 2; \n echo ($k);\n }\n }if (($n % 2 !== 0) && ( round($n / 2) < $r)){\n for ($i = 0; $i < ($r - round($n / 2)); $i++){\n $k = $k + 1; \n echo ($k + 2);\n }\n }\n ", "lang": "PHP", "bug_code_uid": "14c38125cbda0a9f6c6502481bfb2b77", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "60c020eed51a5068f340e5388df2e20f", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.14299332697807435, "equal_cnt": 11, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "= $r)){\n for ($i = 1; $i < $r; $i++){\n $k = $k + 2;\n \n }\n echo $k;\n }\n if (($n % 2 == 0) && ($n / 2 < $r)){\n for ($i = 1; $i < ($r - $n / 2 ) ; $i++){\n $q = $q + 2;\n \n }\n echo $q;\n }\n if (($n % 2 != 0) && ( round($n / 2) >= $r)){\n for ($i = 1; $i < $r ; $i++){\n $k = $k + 2; \n }\n echo $k;\n }\n if (($n % 2 != 0) && ( round($n / 2) < $r)){\n for ($i = 1; $i < ($r - round($n / 2)); $i++){\n $q = $q + 2; \n \n }\n echo $q;\n }\n \n ", "lang": "PHP", "bug_code_uid": "4b3c803ab81b987d60b04ec7a2ac1513", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "60c020eed51a5068f340e5388df2e20f", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.4935064935064935, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 12, "bug_source_code": "= 0; $i--) {\n array_unshift($even, $odd[$i]);\n}\nprint($even[$k-1]);", "lang": "PHP", "bug_code_uid": "231aba60f1a0b0db27f4e5d42b276981", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "ff69478f813699d9a049b1106644e937", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.20229007633587787, "equal_cnt": 10, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "= 0; $i--) {\n array_unshift($even, $odd[$i]);\n}\nprint($even[$k-1]);", "lang": "PHP", "bug_code_uid": "9aa84d6ca4aa6bc27d676a8dff8d9c5e", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "ff69478f813699d9a049b1106644e937", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1958266452648475, "equal_cnt": 11, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "= 0; $i--) {\n array_unshift($even, $odd[$i]);\n}\nprint($even[$k-1]);", "lang": "PHP", "bug_code_uid": "fc5e72d23479e152348c8ef93ef1fed6", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "apr_id": "ff69478f813699d9a049b1106644e937", "difficulty": 900, "tags": ["math"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.38162544169611307, "equal_cnt": 11, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "31db9901d1029de2a9d9244eb2fde6a0", "src_uid": "ac6971f4feea0662d82da8e0862031ad", "apr_id": "148c5932c01b42a4018b49db6552630c", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.06274509803921569, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "$n = 10\n\necho \"10\";", "lang": "PHP", "bug_code_uid": "947a4a1ec09b3b9be663d5184164570b", "src_uid": "ac6971f4feea0662d82da8e0862031ad", "apr_id": "8740f64dc3688b868f184a22a1b39579", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9998844865426822, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0a2f781e3ab4b96813cac507d24dcb4e", "src_uid": "6821f502f5b6ec95c505e5dd8f3cd5d3", "apr_id": "03aff74b4a7de3a2fbdeedad367ea0aa", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2631275245239469, "equal_cnt": 22, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 11, "fix_ops_cnt": 21, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ead6d5a07e5092521d40cb0f00830b1a", "src_uid": "565bbd09f79eb7bfe2f2da46647af0f2", "apr_id": "833fee997a576c6b3bcbd439b740bee2", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.2622196664749856, "equal_cnt": 22, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 11, "fix_ops_cnt": 21, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "eba68c13e15f44576f396614b800a844", "src_uid": "565bbd09f79eb7bfe2f2da46647af0f2", "apr_id": "833fee997a576c6b3bcbd439b740bee2", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.994833255049319, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $c)\n {\n if($f < $b)\n {\n $i = (($a - $f) + ($a - $c)) * $d;\n }\n else\n {\n $i = (($a - $f) + ($a - $c)) * $d;\n }\n }\n}\nelseif($g == -1)\n{\n if($b < $c)\n {\n if($f <= $b)\n {\n $i = ($f + $c) * $d;\n }\n else\n {\n $i = ($f + $c) * $d;\n }\n }\n elseif($b > $c)\n {\n if($f < $b)\n {\n $i = ($f + $a + ($a - $c)) * $d;\n }\n else\n {\n $i = $f * $d;\n }\n }\n}\nprint min($h, $i);\n?>", "lang": "PHP", "bug_code_uid": "0ffa590ae10f63e1dc375332e2a2e624", "src_uid": "fb3aca6eba3a952e9d5736c5d8566821", "apr_id": "a0b057b6d7f3bcfa796142c2cd5c31e7", "difficulty": 1600, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2820874471086037, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4426360cc61981c482b5e8c0b894fdc9", "src_uid": "05fac54ed2064b46338bb18f897a4411", "apr_id": "f59fe859bdc5dd28188b3794fea6d865", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9899328859060402, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "6e38c91c1e5ef7d69cc1fd4e94cb5391", "src_uid": "05fac54ed2064b46338bb18f897a4411", "apr_id": "f59fe859bdc5dd28188b3794fea6d865", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5616045845272206, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "eb13dede1462e254e874be634d067d7a", "src_uid": "05fac54ed2064b46338bb18f897a4411", "apr_id": "41d6560fa697a4d51d44723a0719d0eb", "difficulty": 1300, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7712, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0451fb5aea8a2762f39320c222b0aa7e", "src_uid": "b99578086043537297d374dc01eeb6f8", "apr_id": "7be02dabc235f235d805206d80663f64", "difficulty": 1100, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.968212927756654, "equal_cnt": 77, "replace_cnt": 71, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 76, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "eeb50f86e487ac59535a543b32fa684a", "src_uid": "c42abec29bfd17de3f43385fa6bea534", "apr_id": "71224db3ee9a03b2392ddf0cf23e721c", "difficulty": 1300, "tags": ["brute force", "dp", "dfs and similar", "strings"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.968212927756654, "equal_cnt": 77, "replace_cnt": 71, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 76, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "eaef351fcf15290594dec2fd4986b118", "src_uid": "c42abec29bfd17de3f43385fa6bea534", "apr_id": "71224db3ee9a03b2392ddf0cf23e721c", "difficulty": 1300, "tags": ["brute force", "dp", "dfs and similar", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9933053090456173, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "283a72d50b6dff63af00db8b2fda13c9", "src_uid": "b045abf40c75bb66a80fd6148ecc5bd6", "apr_id": "73fff1e01824da113271279af3be3868", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9950617283950617, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a800a7d9c15e5b9c21f74abe638ee9c8", "src_uid": "b045abf40c75bb66a80fd6148ecc5bd6", "apr_id": "624970f16320a82c5c670f304294263a", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7157534246575342, "equal_cnt": 11, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ceefb30ecfa15b595ce5b0752b98260d", "src_uid": "e66ecb0021a34042885442b336f3d911", "apr_id": "a17769376073a68cd686f6eadedfd5e8", "difficulty": 1100, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8372943327239488, "equal_cnt": 12, "replace_cnt": 4, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a6a1a204bd2fd9068b60564a38e0646d", "src_uid": "e66ecb0021a34042885442b336f3d911", "apr_id": "bd266a65268cf55bf8a103e2006994e4", "difficulty": 1100, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9982363315696648, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7530649c15d919879e1985e867daaa1d", "src_uid": "e66ecb0021a34042885442b336f3d911", "apr_id": "bd266a65268cf55bf8a103e2006994e4", "difficulty": 1100, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9807073954983923, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "fff0edee13655b5aac69cf5a1eacaa3c", "src_uid": "bb6fb9516b2c55d1ee47a30d423562d7", "apr_id": "66a9f00692b4f42ee127ee496824b3d8", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9945474372955289, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "0b55aba2ccc4686255e29888cef78873", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "apr_id": "c09dc097367e6e118b0170e204385055", "difficulty": 1000, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9717514124293786, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "0 && $x<10) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction checkResult($a, $b, $n, $k, $r, $c, $d) {\n if (($a+$b)==$r[0] \n && ($n+$k)==$r[1]\n && ($a+$n)==$c[0]\n && ($b+$k)==$c[1]\n && ($a+$k)==$d[0]\n && ($b+$n)==$d[1]\n && $a!=$b\n && $n!=$k) {\n \n return true;\n } else {\n return false;\n }\n}\n$file = file('php://stdin');\n$r = explode(' ', $file[0]); \n$c = explode(' ', $file[1]); \n$d = explode(' ', $file[2]);\nif ($r[0]==1 || $r[1]==1 || $d[0]==1 || $d[1]==1 || $c[0]==1 || $c[1]==1){\n echo '-1';\n exit;\n}\nfor ($a=1; $a<=min($r[0]-1, 9); $a++) {\n $b = $r[0]-$a;\n for ($n=1; $n<=min($r[1]-1, 9); $n++) {\n $k = $r[1]-$n;\n if (checkNumber($a) && checkNumber($b) && checkNumber($n) && checkNumber($k) && checkResult($a, $b, $n, $k, $r, $c, $d)) {\n echo \"$a $b\\n\";\n echo \"$n $k\";\n exit;\n }\n }\n}\necho '-1';\n\n\n?>", "lang": "PHP", "bug_code_uid": "d85199d7e946054f32824d6303e2ca2c", "src_uid": "6821f502f5b6ec95c505e5dd8f3cd5d3", "apr_id": "5296226173a320edd83e151b5d7ebb82", "difficulty": 1000, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9973821989528796, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "05b56122e55597f75a224a90e94b71fb", "src_uid": "f22b6dab443f63fb8d2d288b702f20ad", "apr_id": "f9296c54cb79534541d5062de2a06f95", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8893709327548807, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " $profit) ? $profit : $temp;\n $isrestrict = true;\n }\n }\n if (!$isrestrict) {\n $max += $hotel[1] * $hotel[1];\n } else {\n $max += $temp;\n }\n}\necho $max; // your code goes here \n", "lang": "PHP", "bug_code_uid": "686a4775f89c144ad292577a081d26dc", "src_uid": "f22b6dab443f63fb8d2d288b702f20ad", "apr_id": "6255dc0cd962e867c8bc8e452fcdc28b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9548872180451128, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": " 1) {\n $total += $sum - 1;\n }\n $sum = 0;\n }\n $letter = $string[$i];\n}\nif ($sum > 1) {\n $total += $sum - 1;\n}\n\necho $total;", "lang": "PHP", "bug_code_uid": "cc701af69270a42e28a39e6a0ac96033", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "19b589f238b5e008add45790e3432126", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7535641547861507, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "$file = fopen('input.txt', 'rt');\n$c = fgets($file);\n$str = fgets($file);\nfclose($file);\n$a = 0;\nfor ($i=0; $i", "lang": "PHP", "bug_code_uid": "b6e4afc9bde19f1ffbbe394883bb847c", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "b3fa336982751810390e978c520812b0", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.864321608040201, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "248467c383b637e75635c358b0456745", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "d1b92ad3422e90bca889694406e4d95d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.3131115459882583, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "1)? $R = $R*2 : $R;\n\n$B = substr_count($stones,\"BB\");\n($B >1)? $B = $B*2 : $B;\n\n$G = substr_count($stones,\"GG\");\n($G >1)? $$GR = $G*2 : $G;\n\necho($R + $G + $B);", "lang": "PHP", "bug_code_uid": "b991bab9438d6adb79efd54d05f62c08", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "367e779550bfd25364cd9f38ce709d46", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.943952802359882, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a1c04b672ddfd5633fbd1af53743b5c6", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "5394326fe6f9ca4b02e8faaef8e244e9", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8895184135977338, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 9, "bug_source_code": "$k = trim(fgets(STDIN));\n$str1 = trim(fgets(STDIN));\n\n$count = 0;\nfor ($i = 1; $i < len($str1); ++$i)\n{\n if ($str1[i] == $str1[i-1]) $count++;\n echo($str1[i]);\n}\necho $count;", "lang": "PHP", "bug_code_uid": "25275cf57562283dd38e3b0a4bc2c4f5", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "bd0d03abdb647965686a19a5c0980a30", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9855072463768116, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "437e9cc142800a2185dc4efedb30229a", "src_uid": "d561436e2ddc9074b98ebbe49b9e27b8", "apr_id": "bd0d03abdb647965686a19a5c0980a30", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.896421845574388, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "= 0; $y--)\n {\n $h = $e[$x];\n $g[$y][$x] = $h[$y];\n }\n}\n$i = array();\nfor($x = 3; $x >= 0; $x--)\n{\n $j = $g[$x];\n $i[count($i)] = $j;\n}\nfor($x = 0; $x < 4; $x++)\n{\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \"x\") && ($i[$x][$y + 1] == \"x\") && ($i[$x][$y + 2] == \".\"))\n {\n $f = 1;\n break;\n }\n }\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \".\") && ($i[$x][$y + 1] == \"x\") && ($i[$x][$y + 2] == \"x\"))\n {\n $f = 1;\n break;\n }\n }\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \"x\") && ($i[$x][$y + 1] == \".\") && ($i[$x][$y + 2] == \"x\"))\n {\n $f = 1;\n break;\n }\n }\n}\nif(($e[0][1] == \"x\") && ($e[1][2] == \"x\") && ($e[2][3] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][1] == \".\") && ($e[1][2] == \"x\") && ($e[2][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][1] == \"x\") && ($e[1][2] == \".\") && ($e[2][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \"x\") && ($e[2][2] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \"x\") && ($e[2][2] == \"x\") && ($e[3][3] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \".\") && ($e[2][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \"x\") && ($e[2][2] == \".\") && ($e[3][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \".\") && ($e[2][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \".\") && ($e[2][2] == \"x\") && ($e[3][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \"x\") && ($e[2][1] == \"x\") && ($e[3][2] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \".\") && ($e[2][1] == \"x\") && ($e[3][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \"x\") && ($e[2][1] == \".\") && ($e[3][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \"x\") && ($e[1][1] == \"x\") && ($e[2][0] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \".\") && ($e[1][1] == \"x\") && ($e[2][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \"x\") && ($e[1][1] == \".\") && ($e[2][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \"x\") && ($e[1][2] == \"x\") && ($e[2][1] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \".\") && ($e[1][2] == \"x\") && ($e[2][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \"x\") && ($e[1][2] == \".\") && ($e[2][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][1] == \".\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][1] == \".\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \".\") && ($e[2][1] == \"x\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][2] == \"x\") && ($e[3][1] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \".\") && ($e[2][2] == \"x\") && ($e[3][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][2] == \".\") && ($e[3][1] == \"x\"))\n{\n $f = 1;\n}\nif($f == 1)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang": "PHP", "bug_code_uid": "d84086c77a1b2b3ef2d4106239984743", "src_uid": "ca4a77fe9718b8bd0b3cc3d956e22917", "apr_id": "c99ad7e891f725bc0ce98131117354b2", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9819494584837545, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $f)\n {\n if($c[$x] == $b)\n {\n $e++;\n $d = 0;\n $f = $b;\n }\n elseif($c[$x] < $b)\n {\n $e++;\n }\n elseif($c[$x] > $b)\n {\n $f += $b;\n }\n }\n elseif(($d < $f) && ($d == $c[$x]))\n {\n $e++;\n }\n}\nprint $e;\n?>", "lang": "PHP", "bug_code_uid": "3b45b265cbcbeb6f39e027842cc715de", "src_uid": "5c73d6e3770dff034d210cdd572ccf0f", "apr_id": "32a1632a3a54f2ef043b7e2a217704f5", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.975, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "eefa4b3ddb6c1cd60f29e59c8ce33018", "src_uid": "f63fc2d97fd88273241fce206cc217f2", "apr_id": "5ca89d3aeb3a39a295725f8c460c925c", "difficulty": 1500, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7607843137254902, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8b671af0f5634ed907e7484c40d33453", "src_uid": "7038d7b31e1900588da8b61b325e4299", "apr_id": "6b461aae8016d8faf52a33abc46dfea0", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9951573849878934, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "Scan();\n\t$X = (int)$Scanner->Scan();\n\t$Y = (int)$Scanner->Scan();\n\t\n\t$temp = (string)(($N * ($Y / 100)));\n\t$temp = ceil($temp);\n\t$need = $temp - $X;\n\t\n\tprint($need);\n\t\n\t$Scanner->Close();\n}\n\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t$contents = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tpublic function Scan(){\n\t\treturn $this->Scanners[$this->Id++];\n\t}\n\n\tpublic function Close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n?>", "lang": "PHP", "bug_code_uid": "070257d56deb4d7825f2864560cb7f41", "src_uid": "7038d7b31e1900588da8b61b325e4299", "apr_id": "4710f082df5b8d7ea390557f0bd26567", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9831144465290806, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "1a07c536f4ae6161af55f45930602353", "src_uid": "7038d7b31e1900588da8b61b325e4299", "apr_id": "ab0cb66013aef2fd27bf7ac395ffc117", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.927007299270073, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e351ee0e8299093778b085ee849db39d", "src_uid": "7038d7b31e1900588da8b61b325e4299", "apr_id": "43e2ad492dcab0e158d2f75666afc0f2", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9741824440619621, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "= $a)\n{\n $d = $a + ($b - $a); // min\n}\nelse\n{\n $d = $a; // min\n}\nif($a == 0)\n{\n print \"Impossible\";\n}\nelse\n{\n print $d . \" \" . $c;\n}\n?>", "lang": "PHP", "bug_code_uid": "82b1b09b4e0234c682d382fcea51e60e", "src_uid": "1e865eda33afe09302bda9077d613763", "apr_id": "dcfebcb4a3a354a9ff113eec64715655", "difficulty": 1100, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5379975874547648, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": " $h)\n{\n print \">\";\n}\n?>", "lang": "PHP", "bug_code_uid": "7dd1461d348687a5539905e6f75db2c6", "src_uid": "d6ab5f75a7bee28f0af2bf168a0b2e67", "apr_id": "4c25359e8ed4acc75aaebe680b4ffbd3", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1922230374174615, "equal_cnt": 19, "replace_cnt": 17, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 19, "bug_source_code": " $val2){\n return \">\";\n }else{\n return \"<\";\n }\n}\n\n\n", "lang": "PHP", "bug_code_uid": "6f827c8288b896965ed53cd293329686", "src_uid": "d6ab5f75a7bee28f0af2bf168a0b2e67", "apr_id": "e593863f2e9bfe06a62741df50c00791", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.48984468339307047, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": " $number2) {\n $sign = '>';\n} else {\n $sign = '<';\n}\necho $sign;\n?>", "lang": "PHP", "bug_code_uid": "be82947a0e071bb94943075a795828a4", "src_uid": "d6ab5f75a7bee28f0af2bf168a0b2e67", "apr_id": "690fa4bc8db04a4c040b4efb6a572a51", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9147982062780269, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "81267aa26ffc217b68afa62b80a1b5a5", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "35476eb1dd97fb4711d36fcb7c2f1368", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7240356083086054, "equal_cnt": 21, "replace_cnt": 14, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 20, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "fca55c2954dc760c802df7e045d5a814", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "bd99708443e1e8649ca0be6d0b6e8170", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5831062670299727, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4274f36546e9a05a8d722da0c07d3298", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "b1a5be38688578d1e2c841910700be77", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5698324022346368, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "=$m){\n $d = $d/$m;\n $d = explode(\".\", $d);\n $d = $d[0];\n if(isset($d[1]))\n $count++;\n $s += $d;\n }\n \n echo $s;\n}\n \n\n\n$nm = trim(fgets(STDIN));\n\n\n \nFinddays($nm);\n\n", "lang": "PHP", "bug_code_uid": "e103e014c75b39f859ec7030831c75a8", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "ec5f9d266e5c70aeff59cc27258f22d3", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9496221662468514, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n $out += $n;\n\n $ost += $n % $m;\n $n = intval( $n / $m );\n\n if ($ost >= $m) {\n $n ++;\n $ost -= $m;\n }\n\necho \" out=$out n=$n ost=$ost \\n\";\n}\n\necho $out;\n\n?>", "lang": "PHP", "bug_code_uid": "4748fb2c3896f9154a39d0f409671f07", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "4bda1661bbc804ad3819dc4bd17c2302", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.8876404494382022, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": " 0) {\n\t$output += $q;\n\t$t = $q;\n}\n\nprint $output;\n", "lang": "PHP", "bug_code_uid": "60e3394f57a1e01f9732fb783c23e381", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "apr_id": "7d5cf6d5c2a9f6c3802e81c9ec238021", "difficulty": 900, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9704035874439462, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $b)\n {\n $e = 2;\n break;\n }\n }\n}\nif($e == 0)\n{\n $f = $b % $c;\n}\nelseif($e == 1)\n{\n $f = 0;\n}\nelseif($e == 2)\n{\n $f = $b;\n}\nprint $f;\n?>", "lang": "PHP", "bug_code_uid": "b317e966d6155f236ec6b087c4215d73", "src_uid": "c649052b549126e600691931b512022f", "apr_id": "d676adb834b25a932f56bc7e0552c22a", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9295039164490861, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "=$b){\n echo $b;\n}else{\n $s=1;\n for($i=0;$i<$a;$i++)\n {\n $s*=2;\n }\n echo ($s>=$b)?$b:$b%$s;\n}\n\n?>", "lang": "PHP", "bug_code_uid": "c0519ab86c6515cce900769c0388f697", "src_uid": "c649052b549126e600691931b512022f", "apr_id": "9df500a232eea0c4a710f6647f7cc903", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9319371727748691, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "=$b){\n echo $b;\n}else{\n $s=1;\n for($i=0;$i<$a;$i++)\n {\n $s*=2;\n }\n echo ($s>$b)?$b:$b%$s;\n}\n\n?>", "lang": "PHP", "bug_code_uid": "4615b2e23a30fdcff96b5f7e88238d7f", "src_uid": "c649052b549126e600691931b512022f", "apr_id": "9df500a232eea0c4a710f6647f7cc903", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6019417475728155, "equal_cnt": 16, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 12, "fix_ops_cnt": 17, "bug_source_code": "$n = readline();\n$m = readline();\n\nif($n>=27)\n echo $m;\nelse\n echo ($m%(1<<$n));", "lang": "PHP", "bug_code_uid": "318b582c06f64be7e7a17104c2b0c070", "src_uid": "c649052b549126e600691931b512022f", "apr_id": "4bf3f02d954a6543c2a0616c5b44d833", "difficulty": 900, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.999490575649516, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " 5) && ($e == 1) && ($f == 1) && ($g == 1))\n{\n print \"Correct\";\n}\nelse\n{\n print \"Too weak\";\n}\n?>", "lang": "PHP", "bug_code_uid": "ff3e534eb8c1b079d006f11bfccfe6c9", "src_uid": "42a964b01e269491975965860ec92be7", "apr_id": "eacfc675cae6fadc97061c902b140384", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9967880085653105, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "= 5) {\n $pas[0] = 1;\n}\nfor ($i = 0; $i < strlen($password); ++$i) {\n if (ord($password[$i]) >= 65 && ord($password[$i]) <= 90) {\n $pas[1] = 1;\n }\n if (ord($password[$i]) >= 97 && ord($password[$i]) <= 122) {\n $pas[2] = 1;\n }\n if (ord($password[$i]) >= 48 && ord($password[$i]) <= 57) {\n $pas[3] = 1;\n }\n if ($password[$i] == \"!\" || $password[$i] == \"?\" || $password[$i] == \"_\" || $password[$i] == \".\" || $password[$i] == \",\") {\n $pas[4] = 1;\n }\n}\n$sol = 1;\nfor ($i = 0; $i <= 3; ++$i) {\n if ($pas[$i] == 0) {\n $sol = 0;\n }\n}\nif ($sol == 0) {\n fprintf($fileOUT, \"Too weak\\n\");\n} else {\n fprintf($fileOUT, \"Correct\\n\");\n}\nfclose($fileIN);\nfclose($fileOUT);\n?>\n", "lang": "PHP", "bug_code_uid": "6f26174797acf9fcad335a1283328348", "src_uid": "42a964b01e269491975965860ec92be7", "apr_id": "085657bc459ce21270bbf8e8e06c3491", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.987535182951347, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " $d))\n{\n print \"Final!\";\n}\nelse\n{\n $e = range(1, $a);\n $g = 1;\n $h = 0;\n while(TRUE)\n {\n $f = array();\n for($x = 0; $x < count($e) - 1; $x++)\n {\n if((($e[$x] == $b) && ($e[$x + 1] == $c)) || (($e[$x] == $c) && ($e[$x + 1] == $b)))\n {\n $h = 1;\n break;\n }\n elseif((($e[$x] == $b) && ($e[$x + 1] != $c)) || (($e[$x] != $c) && ($e[$x + 1] == $b)))\n {\n $f[count($f)] = $b;\n }\n elseif((($e[$x] != $b) && ($e[$x + 1] == $c)) || (($e[$x] == $c) && ($e[$x + 1] != $b)))\n {\n $f[count($f)] = $c;\n }\n elseif((($e[$x] != $b) && ($e[$x + 1] != $c)) || (($e[$x] != $c) && ($e[$x + 1] != $b)))\n {\n $f[count($f)] = $e[$x];\n }\n $x++;\n }\n if($h == 0)\n {\n $e = $f;\n $g++;\n }\n else\n {\n break;\n }\n }\n print $g;\n}\n?>", "lang": "PHP", "bug_code_uid": "f44fefcd8ce0c5cacee488c89f7bd994", "src_uid": "a753bfa7bde157e108f34a28240f441f", "apr_id": "bbc4a7c5fbe63886d46b5fe655e25b71", "difficulty": 1200, "tags": ["constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.996742671009772, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $b)\n {\n $d -= $b;\n $e = $d % $a;\n if($e == 0)\n {\n print $a;\n }\n else\n {\n print $e;\n }\n }\n}\nelseif($c == 0)\n{\n print $b;\n}\nelseif($c > 0)\n{\n $d = $a - $b;\n if($c <= $d)\n {\n print $b + $c;\n }\n elseif($c > $d)\n {\n $c -= $d;\n $e = $c % $a;\n if($e == 0)\n {\n print $a;\n }\n else\n {\n print $e;\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "fb6885c5d42a4e4f410084674b576820", "src_uid": "cd0e90042a6aca647465f1d51e6dffc4", "apr_id": "0ebabe5054f155b1dee5f32bdc50309b", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.3032581453634085, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": " $n) {\n $k = $w % $n;\n if ($k == 0) {\n $k = $w / $n;\n }\n} else {\n $k = $a + $b;\n}\nprint abs($k);\n?>", "lang": "PHP", "bug_code_uid": "a93a000b6d1ae15262bfe05105a8919b", "src_uid": "cd0e90042a6aca647465f1d51e6dffc4", "apr_id": "8df9cd7004ad8c713f5de3623a1248db", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9569202566452796, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " 0) {\n for ($i = $a; ; $i++) {\n $c++;\n if ($i > $n) $i = 1;\n if ($c == $b) {\n $k = $i + 1;\n if ($k == $n + 1) $k = 1;\n break;\n }\n }\n} else {\n for ($i = $a; ; $i--) {\n $c++;\n if ($i == 0) $i = $n;\n if ($c == abs($b)) {\n $k = $i - 1;\n if ($k == 0) $k = $n;\n break;\n }\n }\n}\nprint $k;\n?>", "lang": "PHP", "bug_code_uid": "2047b20de9fdf771d32192e48c87e727", "src_uid": "cd0e90042a6aca647465f1d51e6dffc4", "apr_id": "8df9cd7004ad8c713f5de3623a1248db", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9176470588235294, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2c1d860b092fb796509570cfa114a9db", "src_uid": "cd0e90042a6aca647465f1d51e6dffc4", "apr_id": "ec467986f16341ab27f272276bf9956f", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6547884187082406, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cecf41ebd7444b959dc2072d4ad64d8a", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "d1a45289bb48aa414e85d5094b1ed0fa", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.5905172413793104, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e117fcfa65df76809e835882956eac24", "src_uid": "ef971874d8c4da37581336284b688517", "apr_id": "d1a45289bb48aa414e85d5094b1ed0fa", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9799408089444261, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= $b)\n {\n $f = 1;\n $h = array_slice($c, 0, $x);\n $i = array_slice($c, $x);\n break;\n }\n }\n if($f == 1)\n {\n $c = $h;\n $d[count($d)] = min($i);\n }\n if(count($c) > 0)\n {\n $r = 0;\n while(TRUE)\n {\n $j = array();\n for($x = 0; $x < count($c); $x++)\n {\n $k = pow($e, $x);\n $l = $c[$x] / $k;\n $j[$x] = $l;\n }\n asort($j);\n $m = array_keys($j);\n $n = floor($b / pow($e, $m[0]));\n $o = $n * $c[$m[0]];\n $r += $o;\n $b -= $n * pow($e, $m[0]);\n if($b <= 0)\n {\n $d[count($d)] = $r;\n break;\n }\n else\n {\n $d[count($d)] = $r + $c[$m[0]];\n $c = array_slice($c, 0, $m[0]);\n }\n }\n }\n $p = min($d);\n printf(\"%.0f\", $p);\n}\n?>", "lang": "PHP", "bug_code_uid": "3b3248a4c76daf830750773e8acacff2", "src_uid": "04ca137d0383c03944e3ce1c502c635b", "apr_id": "e2991fc454ee64c91ac3ebae35a34266", "difficulty": 1600, "tags": ["dp", "greedy", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8755284170972287, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "= $f)\n {\n print \"1\";\n }\n else\n {\n if($c[0] >= $f)\n {\n print \"1\";\n }\n else\n {\n $h = 9 - $b[1];\n if($g + $h >= $f)\n {\n print \"2\";\n }\n else\n {\n if($c[0] + $c[1] >= $f)\n {\n print \"2\";\n }\n else\n {\n print \"3\";\n }\n }\n }\n }\n }\n elseif($d > $e)\n {\n $g = 9 - $c[2];\n if($g >= $f)\n {\n print \"1\";\n }\n else\n {\n if($b[0] >= $f)\n {\n print \"1\";\n }\n else\n {\n $h = 9 - $c[1];\n if($g + $h >= $f)\n {\n print \"2\";\n }\n else\n {\n if($b[0] + $b[1] >= $f)\n {\n print \"2\";\n }\n else\n {\n print \"3\";\n }\n }\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "520e21870d1ccc12ffff60a4194a33bb", "src_uid": "09601fd1742ffdc9f822950f1d3e8494", "apr_id": "104be912f9de844ba5c899b7dd733110", "difficulty": 1600, "tags": ["greedy", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8996897621509824, "equal_cnt": 84, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 83, "fix_ops_cnt": 83, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "18e144df826b005e588f9b83133a0169", "src_uid": "72d7e422a865cc1f85108500bdf2adf2", "apr_id": "2bb1908a6fd77bde0017d18ccaafa3c4", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.18789372774582305, "equal_cnt": 31, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 23, "fix_ops_cnt": 30, "bug_source_code": " $a)\n {\n break;\n }\n }\n if($e == 1)\n {\n break;\n }\n }\n if($e == 1)\n {\n break;\n }\n }\n if($e == 1)\n {\n print \"YES\";\n }\n else\n {\n print \"NO\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "9919e1bba79835f3b2bc24ec09f99d75", "src_uid": "72d7e422a865cc1f85108500bdf2adf2", "apr_id": "2bb1908a6fd77bde0017d18ccaafa3c4", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.381201044386423, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "ff1e507e1b176aee0ee481815bde3872", "src_uid": "72a196044787cb8dbd8d350cb60ccc32", "apr_id": "dba83a9a9d60a0a383fc3c45a8504678", "difficulty": 1500, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9595448798988622, "equal_cnt": 15, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 14, "bug_source_code": " $iBlackWeight)\n\t\techo \"White\\n\";\n\telse if ($iWhiteWeight < $iBlackWeight)\n\t\techo \"Black\\n\";\n\telse if ($iWhiteWeight == $iBlackWeight)\n\t\techo \"Draw\\n\";\n?>", "lang": "PHP", "bug_code_uid": "96ce5e6e4cfa33991e853095fa06db1b", "src_uid": "44bed0ca7a8fb42fb72c1584d39a4442", "apr_id": "9bc79adc136dbd5f8ed4b6c2e1f2a57f", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9893730074388948, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": " $bWeight){\n echo \"White\";\n}\nif($wWeight < $bWeight){\n echo \"Black\";\n}\nif($wWeight == $bWeight){\n echo \"Draw\";\n}\n\n", "lang": "PHP", "bug_code_uid": "d7f18602a409df1b2fa56d86e1ed3438", "src_uid": "44bed0ca7a8fb42fb72c1584d39a4442", "apr_id": "73ab54b587eb7c7354e3e31be1453f56", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9663564781675018, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": " $black){\n fwrite(STDOUT, 'White'); \n } else {\n fwrite(STDOUT, 'Black'); \n }\n \n \n ?>", "lang": "PHP", "bug_code_uid": "95e66040ca104977b8490c4013569172", "src_uid": "44bed0ca7a8fb42fb72c1584d39a4442", "apr_id": "76a44a681d76a73907bec813d1790695", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.18759547815459823, "equal_cnt": 20, "replace_cnt": 13, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 19, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c3d572562750c1ad6a9ecbab6eea8754", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "d0b9601d8c286209f73a905e71e8a52e", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1777134587554269, "equal_cnt": 20, "replace_cnt": 13, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 19, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "50ddc8d87da6926b88728b77ef3fdc6c", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "d0b9601d8c286209f73a905e71e8a52e", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.946969696969697, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " 1) {\n $mod32 /= 3;\n $result++;\n}\nwhile (($mod32 % 2) === 0) {\n $mod32 /= 2;\n $result++;\n}\necho $result ?: '-1';\n", "lang": "PHP", "bug_code_uid": "1c3f9cda5d7cdb6fd222fc17835c9bf9", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "53ea1768390d97b09edf33d2c6603615", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9002557544757033, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "8f87262a158077439ccda27673f6c9bc", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "9bad09f633d8031b4be063cea9c763dd", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7180124223602484, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a1a69ac2aeafd013159c99dd525a5b0a", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "9bad09f633d8031b4be063cea9c763dd", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.2601626016260163, "equal_cnt": 7, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": " $arr[0]) {\n if ($arr[1] % 3 == 0 and $arr[1] / 3 >= $arr[0]) {\n $arr[1] /= 3; \n $ch++;\n } elseif ($arr[1] % 2 == 0 and ($arr[1] / 2) >= $arr[0]) {\n $arr[1] /= 2;\n $ch++;\n } else {\n echo -1;\n exit(0);\n }\n}\necho $ch;\n\n", "lang": "PHP", "bug_code_uid": "96c4b84dfc1a2e367b4873b8f244c6e4", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "f40ec156a14faa8cd940aa9a6b10e196", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8765217391304347, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": " 1){\n\t\t$k = ($k % 2 == 0 ? $k/2 : $k/3);\n\t\t$c++;\n\t}\n\tfwrite(STDOUT, $c);\n}else{\n\tfwrite(STDOUT, \"-1\");\n}", "lang": "PHP", "bug_code_uid": "19a9162d5d6cfd4af56f83ef7868cb9f", "src_uid": "3f9980ad292185f63a80bce10705e806", "apr_id": "18e284acd09d8a2260f9056f70f1735f", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9542097488921714, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "=(int)TenToTwo($i)){\n $ans+=1;\n }else{\n break;\n }\n}\nprint($ans.\"\\n\");\n?>", "lang": "PHP", "bug_code_uid": "9d500775be0bb62a6e2ba085c56ffd25", "src_uid": "64a842f9a41f85a83b7d65bfbe21b6cb", "apr_id": "e43eac8b53c3e7b148f918b6e874c186", "difficulty": 1200, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9976798143851509, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "70a86d8f8fc741895a6b9d738a426b95", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "061be887bdad3bbf045746b30b52d68d", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9203539823008849, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " $n[1])\n $pay = $pay - $n[1];\necho $pay;\n?>", "lang": "PHP", "bug_code_uid": "202a4a8a8248c7b0399a121800a5208e", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "061be887bdad3bbf045746b30b52d68d", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9772727272727273, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": " $a[1]){\n\techo $a[1]-$hitung;\n}else{\n\techo 0;\n}\n\n\n?>", "lang": "PHP", "bug_code_uid": "9329079bcd6e6b3587ea4bed56bdccb0", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "568fb0070e225c797354a3aae076bc07", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7900990099009901, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": " 0) {\n echo $ans;\n} else {\n echo 0;\n}\n", "lang": "PHP", "bug_code_uid": "f5eb284bdc546e339f2b24a50c4cc9c9", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "e468fac57f7019758d90efa997745b7f", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9941107184923439, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "index($k, $n, $w);", "lang": "PHP", "bug_code_uid": "bf7a302320879d524230977c2c47b5cc", "src_uid": "e87d9798107734a885fd8263e1431347", "apr_id": "bf694c4178158a90b8f68e4b1821feab", "difficulty": 800, "tags": ["math", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9109677419354839, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "504b95fd14d0787de318ca86534eb223", "src_uid": "3ad3b8b700f6f34b3a53fdb63af351a5", "apr_id": "4219f8f2487c08202ba8cb18f1088165", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.4797047970479705, "equal_cnt": 26, "replace_cnt": 14, "delete_cnt": 0, "insert_cnt": 11, "fix_ops_cnt": 25, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7d08b42e3224632e77ac5d59c98d4b42", "src_uid": "3ad3b8b700f6f34b3a53fdb63af351a5", "apr_id": "dce1224a2635a7e44186095364f9f37a", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9935483870967742, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e887be2c460a061c1f8473c4111a77d6", "src_uid": "3ad3b8b700f6f34b3a53fdb63af351a5", "apr_id": "dce1224a2635a7e44186095364f9f37a", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6996587030716723, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f1df8d18f5863aa0f77190265ca171a5", "src_uid": "e4b3a2707ba080b93a152f4e6e983973", "apr_id": "b93b44fbce2c3250d6f42b376f8986a5", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9838822704975473, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "Scan();\n\n\t$ans = $I % 3 + 1; \n\t\n\tprint($ans);\n\t\n\t$Scanner->Close();\n}\n\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t$contents = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tpublic function Scan(){\n\t\treturn $this->Scanners[$this->Id++];\n\t}\n\n\tpublic function Close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n?>", "lang": "PHP", "bug_code_uid": "30cc8add7b8deb6d4503156f1685adb4", "src_uid": "c702e07fed684b7741d8337aafa005fb", "apr_id": "d73524c042cbea07af2ecbf6c73e9463", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9017132551848512, "equal_cnt": 15, "replace_cnt": 3, "delete_cnt": 11, "insert_cnt": 0, "fix_ops_cnt": 14, "bug_source_code": " 1 && $joy[1] > 1) {\n while ($joy[0] > 0 && $joy[1] > 0) {\n $time = $time + 1;\n \n if ($charger == 0) {\n $joy[0]++;\n $joy[1] = $joy[1] - 2;\n } else {\n $joy[1]++;\n $joy[0] = $joy[0] - 2;\n }\n \n if ($joy[0] <= 2) {\n $charger = 0;\n } else if ($joy[1] <= 2) {\n $charger = 1;\n }\n }\n }\n \n echo $time;", "lang": "PHP", "bug_code_uid": "44d3799bbde4bfef00cd7ffc1f3fabf1", "src_uid": "ba0f9f5f0ad4786b9274c829be587961", "apr_id": "a0a69c4355cd8f830b52b5b3032c4b05", "difficulty": 1100, "tags": ["dp", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.7937608318890814, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " 0 and $a2 > 0) {\n if ($a1 <= $a2) {\n $a1 += 1;\n $a2 -= 2;\n } else {\n $a2 += 1;\n $a1 -= 2;\n }\n $m += 1;\n}\nprint $m;\n?>", "lang": "PHP", "bug_code_uid": "687f6f1856983a83a8fca3e8fd80b4e8", "src_uid": "ba0f9f5f0ad4786b9274c829be587961", "apr_id": "97d7ef1a3ce21d9c066784ed95e1db67", "difficulty": 1100, "tags": ["dp", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9171668667466987, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " $a2){\n $a1 -= 2;\n $a2 += 1;\n }\n else{\n $a2 -= 2;\n $a1 += 1;\n }\n \n }\n\n\n printf(\"%d\\n\",$count);\n\n\n?>", "lang": "PHP", "bug_code_uid": "4a61962107798f92040f503784666f04", "src_uid": "ba0f9f5f0ad4786b9274c829be587961", "apr_id": "1c5ade550df21ff29aabbe8747befb87", "difficulty": 1100, "tags": ["dp", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.965034965034965, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "0 && $a2 > 0) {\n\tif ($a1 < $a2) {\n\t\t$a1++;\n\t\t$a2 = $a2 - 2;\n\t\t$n++;\n\t} else {\n\t\t$a2++;\n\t\t$a1 = $a1 - 2;\n\t\t$n++;\n\t}\n}\n\nprint $n;\n?>", "lang": "PHP", "bug_code_uid": "97d89ab970e0efd67306314607f0b68a", "src_uid": "ba0f9f5f0ad4786b9274c829be587961", "apr_id": "df846e0ab458b4200bae74a8247c84e1", "difficulty": 1100, "tags": ["dp", "greedy", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8541627157216006, "equal_cnt": 19, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 18, "bug_source_code": "= $c)\n {\n $d[0] = 4;\n }\n else\n {\n $g = floor($a / $c);\n if($g >= 2)\n {\n $d[0] = 5;\n }\n else\n {\n $d[0] = 6;\n }\n }\n}\nelseif($e == 2)\n{\n if($f >= $c)\n {\n $d[0] = 2;\n }\n else\n {\n $g = floor($a / $c);\n if($g >= 2)\n {\n $d[0] = 3;\n }\n else\n {\n $d[0] = 4;\n }\n }\n}\nelseif($e == 3)\n{\n if(max($f, ($a - $b) / 2) >= $c)\n {\n $d[0] = 2;\n }\n elseif(max($f, ($a - $b) / 1) >= $c)\n {\n $d[0] = 3;\n }\n else\n {\n $g = floor($a / $c);\n if($g >= 2)\n {\n $d[0] = 3;\n }\n else\n {\n $d[0] = 4;\n }\n }\n}\nelseif($e >= 4)\n{\n if(($a - ($b * 4)) / 2 >= $c)\n {\n $d[0] = 1;\n }\n else\n {\n $g = floor($a / $c);\n if($g >= 2)\n {\n $d[0] = 2;\n }\n else\n {\n $d[0] = 3;\n }\n }\n}\n$h = floor($a / $c);\n$i = $a % $c;\nif($h == 1)\n{\n if($i < $b)\n {\n $j = floor($a / $b);\n if($j == 1)\n {\n $d[1] = 6;\n }\n elseif(($j == 2) || ($j == 3))\n {\n $d[1] = 4;\n }\n elseif($j >= 4)\n {\n $d[1] = 3;\n }\n }\n elseif($i >= $b * 2)\n {\n $d[1] = 2;\n }\n elseif($i >= $b)\n {\n $j = floor($a / $b);\n if($j == 1)\n {\n $d[1] = 4;\n }\n elseif($j >= 2)\n {\n $d[1] = 3;\n }\n }\n}\nelseif($h >= 2)\n{\n if($i < $b)\n {\n $j = floor($a / $b);\n if($j == 1)\n {\n $d[1] = 6;\n }\n elseif(($j == 2) || ($j == 3))\n {\n $d[1] = 4;\n }\n elseif($j >= 4)\n {\n $d[1] = 3;\n }\n }\n elseif($i >= $b * 2)\n {\n $d[1] = 2;\n }\n elseif($i >= $b)\n {\n $j = floor($a / $b);\n if($j == 1)\n {\n $d[1] = 4;\n }\n elseif($j >= 2)\n {\n $d[1] = 3;\n }\n }\n}\nprint min($d);\n?>", "lang": "PHP", "bug_code_uid": "521dac7ae6f4fb7236b9eda15a9a5b08", "src_uid": "1a50fe39e18f86adac790093e195979a", "apr_id": "0f33ef0da09514601ded030363a93234", "difficulty": 1600, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8895348837209303, "equal_cnt": 23, "replace_cnt": 7, "delete_cnt": 6, "insert_cnt": 9, "fix_ops_cnt": 22, "bug_source_code": "0)&&($n<=100))\n{\n for($i=0; $i<$n; $i++)\n {\n $c=$s[$i];\n $r=ord($c);\n if (($r<97)||($r>122))\n {\n $f=false;\n }\n }\nif ($f)\n{\n$n=strlen($s);\n$n1=floor($n/2);\n$k=1;\n for ($j=1; $j<$n; $j++)\n {\n $pstr=substr($s,0,$j); \n $k1=strpos($s,$pstr);\n $k2=strripos($s,$pstr);\n \n if ($k1!=$k2) {$mas[$k]=strlen($pstr); $k++;}\n }\n $mass=0;\n for ($j=1; $j<$k; $j++)\n {\n if ($mas[$j]>$mass) {$mass=$mas[$j];}\n }\n fputs(STDOUT, \"$mass\");\n }\n }\n?>", "lang": "PHP", "bug_code_uid": "175f3d672cdcdc90b9dcaa32917729d8", "src_uid": "13b5cf94f2fabd053375a5ccf3fd44c7", "apr_id": "281c901f3e6f7b50ddb1d096a2adedee", "difficulty": 1200, "tags": ["brute force", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.37575757575757573, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 10, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "73d18413b55ce9d7dde239f260941c7b", "src_uid": "0a98a6a15e553ce11cb468d3330fc86a", "apr_id": "7768aa4a16c59e47a47bf44026f065f6", "difficulty": 1100, "tags": ["dp", "number theory", "implementation", "brute force", "binary search"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7525035765379113, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 7, "bug_source_code": " 0){\n $sum += $number % 10;\n $number /= 10;\n }\n return $sum;\n}\n\nfscanf(STDIN, \"%d\\n\", $k);\n$i = 2;\n$prefect = 18;\nwhile($k > 0){\n $prefect++;\n if(decompose($prefect) == 10){\n $k--;\n }\n}\necho $prefect;", "lang": "PHP", "bug_code_uid": "a80fd6a2877a21e0d784dd3043151705", "src_uid": "0a98a6a15e553ce11cb468d3330fc86a", "apr_id": "e840d9c4423f1ab0fa8e05b17ba9a22d", "difficulty": 1100, "tags": ["dp", "number theory", "implementation", "brute force", "binary search"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9227586206896552, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": " 0)\n{\n $c = array_slice($c, $d);\n if(count($c) == 1)\n {\n if(implode($c) === $b)\n {\n print \"OK\";\n }\n else\n {\n print \"WRONG_ANSWER\";\n }\n }\n else\n {\n for($x = 1; $x <= $d; $x++)\n {\n array_splice($c, 1, 0, \"0\");\n }\n if(implode($c) === $b)\n {\n print \"OK\";\n }\n else\n {\n print \"WRONG_ANSWER\";\n }\n }\n}\nelse\n{\n if(implode($c) === $b)\n {\n print \"OK\";\n }\n else\n {\n print \"WRONG_ANSWER\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "24893b1561de590d160a0b7d26da707a", "src_uid": "d1e381b72a6c09a0723cfe72c0917372", "apr_id": "7c8389cf235c0629f9ef2ee10bdcb6fa", "difficulty": 1100, "tags": ["sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9979633401221996, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "=$j) { $i=$i%$j; } else { $j=$j%$i; } }\n return $i+$j;\n}\n\n// uprosh drob\n$nod=nod($x,$y);\nwhile ($nod>1)\n{\n $x=$x/$nod;\n $y=$y/$nod;\n $nod=nod($x,$y);\n}\n$a2=0;\n$b2=0;\nwhile (($a2+$x<$a)&&($b2+$y<$b))\n{\n $a2=$a2+$x;\n $b2=$b2+$y;\n}\n\n\n\n\n$stdout=fopen('php://stdout','w');\nfwrite($stdout,$a2.' '.$b2);\nfclose($stdout);\n\n?>", "lang": "PHP", "bug_code_uid": "26708af005a9f02d7d1864777b1135f7", "src_uid": "97999cd7c6de79a4e39f56a41ff59e7a", "apr_id": "746b87f9749a5f5624ce2e1e213aac40", "difficulty": 1800, "tags": ["number theory", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8254620123203286, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6d48c357bbdb81f89f19d518d1c8ab45", "src_uid": "055fbbde4b9ffd4473e6e716da6da899", "apr_id": "561a0f128b64b93ade96fd2acda4e0c5", "difficulty": 1100, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9963768115942029, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "1,'.'=>-1);\n$s = '';\nfor($i =0;$i<4;$i++)\n\t$s .= trim(fgets(STDIN));\nfor($i=0;$i<3;$i++)\n\tfor($j=0;$j<3;$j++)\n\t\tif(abs($m[$s[$i*4+$j]]+$m[$s[$i*4+$j+1]]+$m[$s[($i+1)*4+$j]]+$m[$s[($i+1)*4+$j+1]])==2&&$a = \"YES\")\n\t\t\tbreak 2;\necho $a;\nreturn;\n?>", "lang": "PHP", "bug_code_uid": "dc8105182e289ccae7a78d318d5972c8", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "apr_id": "a9b19f69b1aaa12252e3cf766dd30315", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6620926243567753, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "1,'.'=>-1);\n$a = \"NO\";\nfor($i=0;$i<3;$i++)\n\tfor($j=0;$j<3;$j++)\n\t\tif(abs($m[$s[$i*4+$j]]+$m[$s[$i*4+$j+1]]+$m[$s[($i+1)*4+$j]]+$m[$s[($i+1)*4+$j+1]])==2&&$a = \"YES\")\n\t\t\tbreak 2;\n\necho $a;\nreturn;\n?>", "lang": "PHP", "bug_code_uid": "44fe630548562c0bf7b856cda7bc58d0", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "apr_id": "a9b19f69b1aaa12252e3cf766dd30315", "difficulty": 1100, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.999213217938631, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "= 97){\n\t\t$o -= 97;\n\t}\n\telse{\n\t\t$o -= 65;\n\t}\n\t$a[$o] = 1;\n}\nif(count($a) == 26) echo \"YES\";\nelse echo \"NO\";\n?>", "lang": "PHP", "bug_code_uid": "8ee3c32eae22a4e0db9e10e13203ebbd", "src_uid": "f13eba0a0fb86e20495d218fc4ad532d", "apr_id": "4b55f37d1128aec742d1cbb0ada12566", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9691943127962085, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " $f) && ($d > $g))\n{\n $i++;\n}\nif(($a > $h) && ($d > $e))\n{\n $i++;\n}\nif($i == 2)\n{\n print \"Team 1\";\n}\nelse\n{\n $i = 0;\n if(($c > $f) && ($b > $g))\n {\n $i++;\n }\n if(($c > $h) && ($b > $e))\n {\n $i++;\n }\n if($i == 2)\n {\n print \"Team 1\";\n }\n else\n {\n $i = 0;\n if(($f > $a) && ($g > $d))\n {\n $i++;\n }\n if(($f > $c) && ($g > $b))\n {\n $i++;\n }\n if($i == 2)\n {\n print \"Team 2\";\n }\n else\n {\n $i = 0;\n if(($h > $a) && ($e > $d))\n {\n $i++;\n }\n if(($h > $c) && ($e > $b))\n {\n $i++;\n }\n if($i == 2)\n {\n print \"Team 2\";\n }\n else\n {\n print \"Draw\";\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "ddfa382ed8a1bfed67a53dd4dd5a5023", "src_uid": "1a70ed6f58028a7c7a86e73c28ff245f", "apr_id": "b54c2c8fe39cb34d04f791eb88620db6", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8377793799567411, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "= ($f2 + $e2))\n {\n $e = ($m1[0] + $m1[1]) / 2; // \u0447\u0438\u0441\u043b\u0430 \u0432\u0441\u0440\u0435\u0447\u0438\n $f = $m1[0] - $e; // \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0434\u043e\u0432 \u0434\u043e \u0447\u0438\u0441\u0435\u043b \u0432\u0441\u0442\u0440\u0435\u0447\u0438\n if($m1[2] < $f)\n {\n $g = $f - $m1[2];\n $d = $g + ($f - $g) * 2 + $e;\n print $d; \n }\n else\n {\n $d = $f + $e;\n print $d;\n }\n }\n elseif(($f1 + $e1) < ($f2 + $e2))\n {\n $e = ($m1[1] + $m1[2]) / 2; // \u0447\u0438\u0441\u043b\u0430 \u0432\u0441\u0440\u0435\u0447\u0438\n $f = $m1[1] - $e; // \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0434\u043e\u0432 \u0434\u043e \u0447\u0438\u0441\u0435\u043b \u0432\u0441\u0442\u0440\u0435\u0447\u0438\n if($m1[0] < $f)\n {\n $g = $f - $m1[0];\n $d = $g + ($f - $g) * 2 + $e;\n print $d; \n }\n else\n {\n $d = $f + $e;\n print $d;\n }\n }\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "df630d0bcf5b50e9f28f4aa858677208", "src_uid": "b8008caf788336775cb8ebb76478b04c", "apr_id": "8157c54d09e66a6edff2647238fa5342", "difficulty": 2100, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.39811542991755006, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 14, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7ff7dfb12629ad2ddc40c2269c9c783e", "src_uid": "b8008caf788336775cb8ebb76478b04c", "apr_id": "8157c54d09e66a6edff2647238fa5342", "difficulty": 2100, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.07446113651208361, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "1)) {$rez=$rez.\"a\";};\n if ((($b%2)==0)and($b>1)) {$rez=$rez.\"b\";};\n if ((($c%2)==0)and($c>1)) {$rez=$rez.\"c\";};\n return $rez; }\n\nfunction kolvonc(&$a,&$b,&$c)\n { if ((($a%2)!=0)and($a>1)) {$res=$res.\"a\";};\n if ((($b%2)!=0)and($b>1)) {$res=$res.\"b\";};\n if ((($c%2)!=0)and($c>1)) {$res=$res.\"c\";};\n return $res; }\n\nfunction vvod(&$a,&$b,&$c,&$u)\n {if ($u==\"ab\") {$res=(max($a,$b));};\n if ($u==\"bc\") {$res=(max($b,$c));};\n if ($u==\"ac\") {$res=(max($a,$c));};\n if ($u==\"abc\") {$res=(($a+$b+$c)-(min($a,$b,$c)+max($a,$b,$c)));};\n return $res; }\n\nfunction vvodd(&$a,&$b,&$c,&$u)\n {if (($u==\"ab\")and($c<2)) {$res=(min($a,$b));} else{$res=(max($a,$b));};\n if (($u==\"bc\")and($a<2)) {$res=(min($b,$c));} else{$res=(max($b,$c));};\n if (($u==\"ac\")and($b<2)) {$res=(min($a,$c));} else{$res=(max($a,$c));};\n if ($u==\"abc\") {$res=(($a+$b+$c)-(min($a,$b,$c)+max($a,$b,$c)));};\n return $res; }\n\n$m=kolvo($a,$b,$c);\n$n=kolvonc($a,$b,$c);\nif ((strlen($m))>(strlen($n))) {print (vvod($a,$b,$c,$m));} else {print (vvodd($a,$b,$c,$n));} ;\n?>", "lang": "PHP", "bug_code_uid": "3521df12f5b8e8d3dcc9ce5d326175bb", "src_uid": "b8008caf788336775cb8ebb76478b04c", "apr_id": "b8070a7c4ee69936f3ba514b4b1c1a7b", "difficulty": 2100, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.20176297747306562, "equal_cnt": 14, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": " 0)\n {\n $f = array_product(str_split($a));\n if($f > $e)\n {\n $e = $f;\n }\n $a--;\n }\n else\n {\n break;\n }\n}\nprint max($c, $d, $e);\n?>", "lang": "PHP", "bug_code_uid": "b8956bc459fee3ca11fc0a656dd24a28", "src_uid": "38690bd32e7d0b314f701f138ce19dfb", "apr_id": "f6a7bbbe2f97f27d6376c3bca7437099", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9906450024618415, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "347a1692254c1d9cc221a6466b23970e", "src_uid": "c4b139eadca94201596f1305b2f76496", "apr_id": "e913cbb891892ed78841539f1ef9a8af", "difficulty": 1000, "tags": ["number theory", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3394919168591224, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b79da52590b8e79950d01403c93b16cc", "src_uid": "c4b139eadca94201596f1305b2f76496", "apr_id": "e913cbb891892ed78841539f1ef9a8af", "difficulty": 1000, "tags": ["number theory", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9475247524752475, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "13)\n\t\t\n\t\t\t$g1=abs(implode(',',array_keys($split,$str1[0]))-26);\n\t\t\t//echo \"$g1\\n\";\n\t\t\n\t\telse\n\t\t\t$g1=implode(',',array_keys($split,$str1[0]));\n\n\t\tif(implode(',',array_keys($split,$str1[1]))>15)\n\t\t\t$g2=abs(implode(',',array_keys($split,$str1[1]))-28);\n\t\telse\n\t\t\n\t\t\t$g2=abs(implode(',',array_keys($split,$str1[1]))-2);\n\t\t\t//echo \"$g2\\n\";\n\t\t\n\n\t\tif(implode(',',array_keys($split,$str1[2]))<6)\n\t\t\t$g3=abs(implode(',',array_keys($split,$str1[2]))+7);\n\t\telse\n\t\t\t$g3=abs(19-implode(',',array_keys($split,$str1[2])));\n\n\t\tif(implode(',',array_keys($split,$str1[3]))>19)\n\t\t\t$g4=abs(32-implode(',',array_keys($split,$str1[3])));\n\t\telse\n\t\t\t$g4=abs(implode(',',array_keys($split,$str1[3]))-6);\n\t\t$count[$i]=$g1+$g2+$g3+$g4;\n $min=$count[0];\n\n\t\tif($count[$i]<$min)\n\t\t\t$min=$count[$i];\n\n\n\n\t\n\t\n}\necho \"$min\";\n\n", "lang": "PHP", "bug_code_uid": "c020abb861948edbc0c1e65f4ec00d2d", "src_uid": "ee4f88abe4c9fa776abd15c5f3a94543", "apr_id": "e9a8b8299a180747497d09695132ab6a", "difficulty": 1000, "tags": ["brute force", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9923303834808259, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "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);\n\t$n = trim(fgets(STDIN));\n\t//ACTG\n\t$s = trim(fgets(STDIN));\n\t\n\t$a = str_split($s);\n\t$c = 0; $c_min = 51;\n\tfor($i=0; $i<$n-3; $i++){\n\t\t$c += min(26-abs($ALPH[$a[$i]] - $ALPH['A']), abs($ALPH[$a[$i]] - $ALPH['A']));\n\t\t$c += min(26-abs($ALPH[$a[$i+1]] - $ALPH['C']),abs($ALPH[$a[$i+1]] - $ALPH['C']));\n\t\t$c += min(26-abs($ALPH[$a[$i+2]] - $ALPH['T']),abs($ALPH[$a[$i+2]] - $ALPH['T']));\n\t\t$c += min(26-abs($ALPH[$a[$i+3]] - $ALPH['G']),abs($ALPH[$a[$i+3]] - $ALPH['G']));\n\t\t\n\t\t//echo $a[$i].$a[$i+1].$a[$i+2].$a[$i+3].\"\\n\";\n\t\t\n\t\tif($c <= $c_min){\n\t\t\t$c_min = $c;\n\t\t}\n\t\t$c = 0;\n\t}\n\t\n\techo $c_min;\n?>", "lang": "PHP", "bug_code_uid": "f5f75bf498354859c58b6ef9f0fe6e8c", "src_uid": "ee4f88abe4c9fa776abd15c5f3a94543", "apr_id": "40b5a09d899ec902a297d1ba471b6887", "difficulty": 1000, "tags": ["brute force", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8362573099415205, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "= $g) || ($i >= $f))\n{\n print $d + $e;\n}\nelse\n{\n print \"-1\";\n}\n?>", "lang": "PHP", "bug_code_uid": "3f2ad80a74646a2c30c7b83b86cbbf05", "src_uid": "6e3b8193d1ca1a1d449dc7a4ad45b8f2", "apr_id": "63f0b3d3abfedd6559cc840b4dc1e8d8", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9245194561650257, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "423b438d54fb80a37ffc23e24bdd3ba6", "src_uid": "d0f5174bb0bcca5a486db327b492bf33", "apr_id": "cca3cdf47c5714539c0054afb59ff5ce", "difficulty": 1400, "tags": ["brute force", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9894448788115715, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "Scan();\n\t$inp_K = (int)$Scanner->Scan();\n\t\n\tfor ($i = 2; $i <= $inp_N; $i++) {\n\t\t$temp = $i;\n\t\t$sum = 0;\n\t\twhile ($temp !== 0) {\n\t\t\t$sum += $temp;\n\t\t\t//$temp = $temp / $inp_K;\n\t\t\t$temp = (int)($temp / $inp_K);\n\t\t}\t\n\t\t//if ($sum > $inp_N) {\n\t\tif ($sum >= $inp_N) {\n\t\t\t$V = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tprintf(\"%d\", $V);\n\t$Scanner->close();\n}\n\nob_end_clean();\nsolve();\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link or ''php://stdin' err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\n\t\t//err $c_row = array(\"\\n\", \"\\r\", \"\\r\\n\");\n\t\t$c_row = array(\"\\r\\n\", \"\\r\", \"\\n\");\n\t\t$contents = str_replace($c_row, \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Id;\n\t\t$sc = $this->Scanners[$x];\n\t\t$this->Id = ++$x;\n\t\treturn $sc;\n\t}\n\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n/*\n====begin=====\n\n//input $inp_ or upper\n//block $temp_\n//two block$ttemp_\n//as \t $as_\n//instance $(Upper)\n//ref $ref\n//class menba $^Upper\n\n====end=======\n\n===== class begin =====\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\n//ref \"#109_div2_B_1230942 laurenceHR\"\nclass LineScanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $LineIds_Of_ScanIds= array();\n\tprivate $LinesScanners = array();\n\tprivate $LastScanIds_Of_LineIds = array();\n\tprivate $Scan_number = 0;\n\tprivate $Scanline_number = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t\n\t\t$temp_lines = explode(\"\\n\", $contents);\n\t\t$temp_linescanners = array();\n\t\t$temp_x = 0;\n\t\t$temp_y = 0;\n\t\t//--attention for initting of array--(these is not needed but for easily reading)//\n\t\t$ttemp_scanners = array();\n\t\t//$del = Array(\"\\n\",\"\\r\",\"\\n\\r\");\n\t\tforeach ($temp_lines as $as_line) {\n\t\t\tif (strlen($as_line) === 0) {\n\t\t\t\tprint(\"input err\");\n\t\t\t}\n\t\t\t\n\t\t\t//$as_line = str_replace($del,'',$as_line);\n\t\t\t$temp_linescanners[] = $as_line;\n\t\t\t$ttemp_line_scanners = explode(\" \", $as_line);\n\t\t\t//$ttemp_scanners = array();\n\t\t\tforeach ($ttemp_line_scanners as $as_sc) {\n\t\t\t\t$ttemp_scanners[] = $as_sc;\n\t\t\t\t$this->LineIds_Of_ScanIds[$temp_x] = $temp_y;\n\t\t\t\t$temp_x++;\n\t\t\t}\n\t\t\t$this->LastScanIds_Of_LineIds[$temp_y] = $temp_x - 1;\n\t\t\t$temp_y++;\n\t\t}\n\t\t$this->Scanners = $ttemp_scanners;\n\t\t$this->LinesScanners = $temp_linescanners;\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"scan err\");\n\t\t}\n\t\t\t\t\n\t\t$sc = $this->Scanners[$x];\n\t\t//--attention for ++$x//\n\t\t//$this->Scan_number = $x++;\n\t\t$this->Scan_number = ++$x;\n\t\t$this->Scanline_number = $this->LineIds_Of_ScanIds[$x];\n\t\treturn $sc;\n\t}\n\t\n\tfunction LineScan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"linescan err\");\n\t\t}\n\t\t\n\t\t$lsc = $this->LinesScanners[$y];\n\t\t$this->Scan_number = $this->LastScanIds_Of_LineIds[$y] + 1;\n\t\t$this->Scanline_number = $y + 1;\n\t\treturn $lsc;\n\t}\n\t\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\nclass Token{\n\tprivate $token;\n\tprivate $tok;\n\t\n\tpublic function __construct($str_line, $tok) {\n\t\t$this->tok = $tok;\n\t\t$this->token = strtok($str_line, $this->tok);\n\t}\n\n\tpublic function nextToken() {\n\t\t$thisToken = $this->token;\n\t\t$this->token = strtok($this->tok);\n\t\treturn $thisToken;\n\t} \n\t\t\n\tpublic function nextFloat() {\n\t\treturn (float)$this->nextToken();\n\t}\n\t\n \tpublic function nextInt() {\n\t\treturn (int)$this->nextToken();\n\t}\n\t\n\tpublic function nextIntArray() {\n\t\t$temp_arr = array();\n\t\t$flag = -1;\n\t\twhile ($flag !== 1) {\n\t\t\t$thisToken = $this->nextToken();\n\t\t\tif ($thisToken !== false) {\n\t\t\t\t$temp_arr[] = $thisToken;\n\t\t\t} else {\n\t\t\t\t$flag = 1;\n\t\t\t}\n\t\t}\n\t\treturn $temp_arr;\n\t}\n\n\tpublic function nnextIntArray($num) {\n\t\t$temp_arr = array();\n\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t$temp_arr[] = (int)$this->token;\n\t\t}\n\t\treturn $temp_arr;\n\t}\n}\n===== class end ======\n\n=== function begin ===\n\nfunction get_line() {\n $stdin = fopen(\"php://stdin\", \"r\"); \n $line = rtrim($stdin, \"\\n\"); \n fclose($stdin); \n return $line; \n}\n\nfunction num_printf($i){\n\tif (is_float($i)) {\n\t\tprintf(\"%.0f\", $i);\n\t}\n\tif (is_int($i)) {\n\t\tprintf(\"%d\", $i);\n\t}\n}\n\nfunction array_printf(array $array) {\n\t\t$message = \"\";\n\t\tforeach ($array as $value) {\n\t\t\t$message .= \"$value\" . \" \";\n\t\t}\n\t\t$message = rtrim($message);\n\t\tprintf('%s', $message);\n}\n\n== function end ======\n*/\n\n?>", "lang": "PHP", "bug_code_uid": "af471ed5cbd30e9ede133f932bdfbe58", "src_uid": "41dfc86d341082dd96e089ac5433dc04", "apr_id": "54dce4cb2a9dea03a5e3089a8394bab6", "difficulty": 1500, "tags": ["implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9915949960906959, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "Scan();\n\t$inp_K = (int)$Scanner->Scan();\n\t\n\tfor ($i = 1; $i <= $inp_N; $i++) {\n\t\t$temp = $i;\n\t\t$sum = 0;\n\t\twhile ($temp !== 0) {\n\t\t\t$sum += $temp;\n\t\t\t//$temp = $temp / $inp_K;\n\t\t\t$temp = (int)($temp / $inp_K);\n\t\t}\t\n\t\t//if ($sum > $inp_N) {\n\t\tif ($sum >= $inp_N) {\n\t\t\t$V = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tprintf(\"%d\", $V);\n\t$Scanner->close();\n}\n\nob_end_clean();\nsolve();\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link or ''php://stdin' err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\n\t\t//err $c_row = array(\"\\n\", \"\\r\", \"\\r\\n\");\n\t\t$c_row = array(\"\\r\\n\", \"\\r\", \"\\n\");\n\t\t$contents = str_replace($c_row, \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Id;\n\t\t$sc = $this->Scanners[$x];\n\t\t$this->Id = ++$x;\n\t\treturn $sc;\n\t}\n\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n/*\n====begin=====\n\n//input $inp_ or upper\n//block $temp_\n//two block$ttemp_\n//as \t $as_\n//instance $(Upper)\n//ref $ref\n//class menba $^Upper\n\n====end=======\n\n===== class begin =====\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\n//ref \"#109_div2_B_1230942 laurenceHR\"\nclass LineScanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $LineIds_Of_ScanIds= array();\n\tprivate $LinesScanners = array();\n\tprivate $LastScanIds_Of_LineIds = array();\n\tprivate $Scan_number = 0;\n\tprivate $Scanline_number = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t\n\t\t$temp_lines = explode(\"\\n\", $contents);\n\t\t$temp_linescanners = array();\n\t\t$temp_x = 0;\n\t\t$temp_y = 0;\n\t\t//--attention for initting of array--(these is not needed but for easily reading)//\n\t\t$ttemp_scanners = array();\n\t\t//$del = Array(\"\\n\",\"\\r\",\"\\n\\r\");\n\t\tforeach ($temp_lines as $as_line) {\n\t\t\tif (strlen($as_line) === 0) {\n\t\t\t\tprint(\"input err\");\n\t\t\t}\n\t\t\t\n\t\t\t//$as_line = str_replace($del,'',$as_line);\n\t\t\t$temp_linescanners[] = $as_line;\n\t\t\t$ttemp_line_scanners = explode(\" \", $as_line);\n\t\t\t//$ttemp_scanners = array();\n\t\t\tforeach ($ttemp_line_scanners as $as_sc) {\n\t\t\t\t$ttemp_scanners[] = $as_sc;\n\t\t\t\t$this->LineIds_Of_ScanIds[$temp_x] = $temp_y;\n\t\t\t\t$temp_x++;\n\t\t\t}\n\t\t\t$this->LastScanIds_Of_LineIds[$temp_y] = $temp_x - 1;\n\t\t\t$temp_y++;\n\t\t}\n\t\t$this->Scanners = $ttemp_scanners;\n\t\t$this->LinesScanners = $temp_linescanners;\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"scan err\");\n\t\t}\n\t\t\t\t\n\t\t$sc = $this->Scanners[$x];\n\t\t//--attention for ++$x//\n\t\t//$this->Scan_number = $x++;\n\t\t$this->Scan_number = ++$x;\n\t\t$this->Scanline_number = $this->LineIds_Of_ScanIds[$x];\n\t\treturn $sc;\n\t}\n\t\n\tfunction LineScan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"linescan err\");\n\t\t}\n\t\t\n\t\t$lsc = $this->LinesScanners[$y];\n\t\t$this->Scan_number = $this->LastScanIds_Of_LineIds[$y] + 1;\n\t\t$this->Scanline_number = $y + 1;\n\t\treturn $lsc;\n\t}\n\t\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\nclass Token{\n\tprivate $token;\n\tprivate $tok;\n\t\n\tpublic function __construct($str_line, $tok) {\n\t\t$this->tok = $tok;\n\t\t$this->token = strtok($str_line, $this->tok);\n\t}\n\n\tpublic function nextToken() {\n\t\t$thisToken = $this->token;\n\t\t$this->token = strtok($this->tok);\n\t\treturn $thisToken;\n\t} \n\t\t\n\tpublic function nextFloat() {\n\t\treturn (float)$this->nextToken();\n\t}\n\t\n \tpublic function nextInt() {\n\t\treturn (int)$this->nextToken();\n\t}\n\t\n\tpublic function nextIntArray() {\n\t\t$temp_arr = array();\n\t\t$flag = -1;\n\t\twhile ($flag !== 1) {\n\t\t\t$thisToken = $this->nextToken();\n\t\t\tif ($thisToken !== false) {\n\t\t\t\t$temp_arr[] = $thisToken;\n\t\t\t} else {\n\t\t\t\t$flag = 1;\n\t\t\t}\n\t\t}\n\t\treturn $temp_arr;\n\t}\n\n\tpublic function nnextIntArray($num) {\n\t\t$temp_arr = array();\n\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t$temp_arr[] = (int)$this->token;\n\t\t}\n\t\treturn $temp_arr;\n\t}\n}\n===== class end ======\n\n=== function begin ===\n\nfunction get_line() {\n $stdin = fopen(\"php://stdin\", \"r\"); \n $line = rtrim($stdin, \"\\n\"); \n fclose($stdin); \n return $line; \n}\n\nfunction num_printf($i){\n\tif (is_float($i)) {\n\t\tprintf(\"%.0f\", $i);\n\t}\n\tif (is_int($i)) {\n\t\tprintf(\"%d\", $i);\n\t}\n}\n\nfunction array_printf(array $array) {\n\t\t$message = \"\";\n\t\tforeach ($array as $value) {\n\t\t\t$message .= \"$value\" . \" \";\n\t\t}\n\t\t$message = rtrim($message);\n\t\tprintf('%s', $message);\n}\n\n== function end ======\n*/\n\n?>", "lang": "PHP", "bug_code_uid": "eee9d6f64c748203d8f4b6042b51cb3c", "src_uid": "41dfc86d341082dd96e089ac5433dc04", "apr_id": "54dce4cb2a9dea03a5e3089a8394bab6", "difficulty": 1500, "tags": ["implementation", "binary search"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9999030913848241, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "Scan();\n\t$inp_K = (int)$Scanner->Scan();\n\t\n\t$start = $inp_N - (int)($inp_N / $inp_K);\n\t//for ($i = 1; $i <= $inp_N; $i++) {\n\t/for ($i = $start; $i <= $inp_N; $i++) {\n\t\t$temp = $i;\n\t\t$sum = 0;\n\t\twhile ($temp !== 0) {\n\t\t\t$sum += $temp;\n\t\t\t//$temp = $temp / $inp_K;\n\t\t\t$temp = (int)($temp / $inp_K);\n\t\t}\t\n\t\t//if ($sum > $inp_N) {\n\t\tif ($sum >= $inp_N) {\n\t\t\t$V = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tprintf(\"%d\", $V);\n\t$Scanner->close();\n}\n\nob_end_clean();\nsolve();\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\nclass Scanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $Id = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link or ''php://stdin' err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\n\t\t//err $c_row = array(\"\\n\", \"\\r\", \"\\r\\n\");\n\t\t$c_row = array(\"\\r\\n\", \"\\r\", \"\\n\");\n\t\t$contents = str_replace($c_row, \" \", $contents);\n\t\t$this->Scanners = explode(\" \", $contents);\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Id;\n\t\t$sc = $this->Scanners[$x];\n\t\t$this->Id = ++$x;\n\t\treturn $sc;\n\t}\n\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\n/*\n====begin=====\n\n//input $inp_ or upper\n//block $temp_\n//two block$ttemp_\n//as \t $as_\n//instance $(Upper)\n//ref $ref\n//class menba $^Upper\n\n====end=======\n\n===== class begin =====\n\n//error_reporting(0);\n//$Scanner = new Scanner(\"php://stdin\");\n//ref \"#109_div2_B_1230942 laurenceHR\"\nclass LineScanner{\n\tprivate $Stream;\n\tprivate $Scanners = array();\n\tprivate $LineIds_Of_ScanIds= array();\n\tprivate $LinesScanners = array();\n\tprivate $LastScanIds_Of_LineIds = array();\n\tprivate $Scan_number = 0;\n\tprivate $Scanline_number = 0;\n\t\n\tpublic function __construct($opend){\n\t\tif((!is_file($opend) && !is_link($opend)) && $opend !== \"php://stdin\"){\n \t\t\tprint(\"file or link err\");\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$this->Stream = fopen($opend, 'r');\n\t\t$contents = stream_get_contents($this->Stream);\n\t\t\n\t\t$temp_lines = explode(\"\\n\", $contents);\n\t\t$temp_linescanners = array();\n\t\t$temp_x = 0;\n\t\t$temp_y = 0;\n\t\t//--attention for initting of array--(these is not needed but for easily reading)//\n\t\t$ttemp_scanners = array();\n\t\t//$del = Array(\"\\n\",\"\\r\",\"\\n\\r\");\n\t\tforeach ($temp_lines as $as_line) {\n\t\t\tif (strlen($as_line) === 0) {\n\t\t\t\tprint(\"input err\");\n\t\t\t}\n\t\t\t\n\t\t\t//$as_line = str_replace($del,'',$as_line);\n\t\t\t$temp_linescanners[] = $as_line;\n\t\t\t$ttemp_line_scanners = explode(\" \", $as_line);\n\t\t\t//$ttemp_scanners = array();\n\t\t\tforeach ($ttemp_line_scanners as $as_sc) {\n\t\t\t\t$ttemp_scanners[] = $as_sc;\n\t\t\t\t$this->LineIds_Of_ScanIds[$temp_x] = $temp_y;\n\t\t\t\t$temp_x++;\n\t\t\t}\n\t\t\t$this->LastScanIds_Of_LineIds[$temp_y] = $temp_x - 1;\n\t\t\t$temp_y++;\n\t\t}\n\t\t$this->Scanners = $ttemp_scanners;\n\t\t$this->LinesScanners = $temp_linescanners;\n\t}\n\t\n\tfunction Scan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"scan err\");\n\t\t}\n\t\t\t\t\n\t\t$sc = $this->Scanners[$x];\n\t\t//--attention for ++$x//\n\t\t//$this->Scan_number = $x++;\n\t\t$this->Scan_number = ++$x;\n\t\t$this->Scanline_number = $this->LineIds_Of_ScanIds[$x];\n\t\treturn $sc;\n\t}\n\t\n\tfunction LineScan(){\n\t\t$x = $this->Scan_number;\n\t\t$y = $this->Scanline_number;\n\t\tif ($this->LineIds_Of_ScanIds[$x] === false || $this->LastScanIds_Of_LineIds[$y] === false) {\n\t\t\tprint(\"linescan err\");\n\t\t}\n\t\t\n\t\t$lsc = $this->LinesScanners[$y];\n\t\t$this->Scan_number = $this->LastScanIds_Of_LineIds[$y] + 1;\n\t\t$this->Scanline_number = $y + 1;\n\t\treturn $lsc;\n\t}\n\t\n\tfunction close(){\n\t\tfclose($this->Stream);\n\t}\n}\n\nclass Token{\n\tprivate $token;\n\tprivate $tok;\n\t\n\tpublic function __construct($str_line, $tok) {\n\t\t$this->tok = $tok;\n\t\t$this->token = strtok($str_line, $this->tok);\n\t}\n\n\tpublic function nextToken() {\n\t\t$thisToken = $this->token;\n\t\t$this->token = strtok($this->tok);\n\t\treturn $thisToken;\n\t} \n\t\t\n\tpublic function nextFloat() {\n\t\treturn (float)$this->nextToken();\n\t}\n\t\n \tpublic function nextInt() {\n\t\treturn (int)$this->nextToken();\n\t}\n\t\n\tpublic function nextIntArray() {\n\t\t$temp_arr = array();\n\t\t$flag = -1;\n\t\twhile ($flag !== 1) {\n\t\t\t$thisToken = $this->nextToken();\n\t\t\tif ($thisToken !== false) {\n\t\t\t\t$temp_arr[] = $thisToken;\n\t\t\t} else {\n\t\t\t\t$flag = 1;\n\t\t\t}\n\t\t}\n\t\treturn $temp_arr;\n\t}\n\n\tpublic function nnextIntArray($num) {\n\t\t$temp_arr = array();\n\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t$temp_arr[] = (int)$this->token;\n\t\t}\n\t\treturn $temp_arr;\n\t}\n}\n===== class end ======\n\n=== function begin ===\n\nfunction get_line() {\n $stdin = fopen(\"php://stdin\", \"r\"); \n $line = rtrim($stdin, \"\\n\"); \n fclose($stdin); \n return $line; \n}\n\nfunction num_printf($i){\n\tif (is_float($i)) {\n\t\tprintf(\"%.0f\", $i);\n\t}\n\tif (is_int($i)) {\n\t\tprintf(\"%d\", $i);\n\t}\n}\n\nfunction array_printf(array $array) {\n\t\t$message = \"\";\n\t\tforeach ($array as $value) {\n\t\t\t$message .= \"$value\" . \" \";\n\t\t}\n\t\t$message = rtrim($message);\n\t\tprintf('%s', $message);\n}\n\n== function end ======\n*/\n\n?>", "lang": "PHP", "bug_code_uid": "7db9c0007851415618a5450f48d67328", "src_uid": "41dfc86d341082dd96e089ac5433dc04", "apr_id": "54dce4cb2a9dea03a5e3089a8394bab6", "difficulty": 1500, "tags": ["implementation", "binary search"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.36639857015192134, "equal_cnt": 13, "replace_cnt": 12, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": " 0) {\n $res = $res + $a;\n $s++;\n $a = floor($m/pow($k,$s));\n }\n if (($w == 1) and ($res < $n)) {\n echo $result;\n die();\n }\n if (($w == 2) and ($res >= $n)) {\n echo $m;\n die();\n }\n if ($res >= $n) {\n $result = $m;\n $m--;\n $w = 1;\n }\n else {\n $m++;\n $w = 2;\n }\n}\necho \"1\";\n?>", "lang": "PHP", "bug_code_uid": "158074f5a038bb8facff6eaea64a0435", "src_uid": "41dfc86d341082dd96e089ac5433dc04", "apr_id": "ac72e6c122a8ea90d78e74136f2c9087", "difficulty": 1500, "tags": ["implementation", "binary search"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.3628158844765343, "equal_cnt": 13, "replace_cnt": 12, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": " 0) {\n $a = floor($m/pow($k,$s));\n $s++;\n $res = $res + $a;\n }\n if (($w == 1) and ($res < $n)) {\n echo $result;\n die();\n }\n if (($w == 2) and ($res >= $n)) {\n echo $m;\n die();\n }\n if ($res >= $n) {\n $result = $m;\n $m--;\n $w = 1;\n }\n else {\n $m++;\n $w = 2;\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "9366e9c9ba985491d23a0f06c681a22f", "src_uid": "41dfc86d341082dd96e089ac5433dc04", "apr_id": "ac72e6c122a8ea90d78e74136f2c9087", "difficulty": 1500, "tags": ["implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.34210526315789475, "equal_cnt": 15, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "de5c6171700203fdf984452f41b4d1aa", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "e520bdb403009c05693e3109ac9ddebd", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9352608422375864, "equal_cnt": 16, "replace_cnt": 13, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 15, "bug_source_code": " $x) && ($a <= $x * 2))\n {\n break;\n }\n }\n $c = $x / 5;\n if(($a > $x) && ($a <= ($x + $c)))\n {\n print \"Sheldon\";\n }\n elseif(($a > ($x + $c)) && ($a <= ($x + ($c * 2))))\n {\n print \"Leonard\";\n }\n elseif((($a > ($x + ($c * 2)))) && ($a <= ($x + ($c * 3))))\n {\n print \"Penny\";\n }\n elseif((($a > ($x + ($c * 3)))) && ($a <= ($x + ($c * 4))))\n {\n print \"Rajesh\";\n }\n elseif((($a > ($x + ($c * 4)))) && ($a <= ($x + ($c * 5))))\n {\n print \"Howard\";\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "ddc77293ec1b3d8e8a97d686a53f528b", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "e520bdb403009c05693e3109ac9ddebd", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7120418848167539, "equal_cnt": 21, "replace_cnt": 8, "delete_cnt": 3, "insert_cnt": 9, "fix_ops_cnt": 20, "bug_source_code": " 0){\n\t$tmp = $arr[0];\n\t$arr = array_slice($arr, 1);\n\t$arr[] = $tmp;\n\t$arr[] = $tmp;\n\t$a--;\n}\necho $arr[0];\n?>", "lang": "PHP", "bug_code_uid": "442d7c746263b3477c8f60cc96849892", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "3d4940ea85411dbcfd87316d4c199b3f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.7172774869109948, "equal_cnt": 19, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 8, "fix_ops_cnt": 18, "bug_source_code": " 0){\n\t$tmp = $arr[0];\n\t$arr = array_slice($arr, 1);\n\t$arr[] = $tmp;\n\t$arr[] = $tmp;\n\t$a--;\n}\necho $arr[0];\n?>", "lang": "PHP", "bug_code_uid": "6b1d4cc7fb5487c1f4c2a3d9df7a9ab6", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "3d4940ea85411dbcfd87316d4c199b3f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7338501291989664, "equal_cnt": 18, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 17, "bug_source_code": " 0){\n\t$tmp = $arr[0];\n\t$arr = array_slice($arr, 1);\n\t$arr[] = $tmp;\n\t$arr[] = $tmp;\n\t$a--;\n}\necho $arr[0];\n?>", "lang": "PHP", "bug_code_uid": "a336dd76f3ab8610b3a9b8a4134f2da0", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "3d4940ea85411dbcfd87316d4c199b3f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9955423476968797, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "bccf81f3596de024621631405cb4b502", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "6ea48112121b801165df19764611e983", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9968354430379747, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "$n) $sum -= $m;\n $n -= $sum;\n $n = ceil($n/$count);\n echo $names[$n-1];\n?>", "lang": "PHP", "bug_code_uid": "d94f836dfc5e391e6566efda29f0edaf", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "b0aed417f2fd464b3874615b5d189d54", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.08235294117647059, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "e41bc41fd3ac76420ae56f7f083115be", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "480425f97d3001a1331bda71440af06f", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7641700404858299, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "';print_r($var);echo '';} \n function read_line()\n { \n if(DEBUG) { $file = $GLOBALS['file'];$line = trim(fgets($file));}\n else $line = trim(fgets(STDIN));\n return $line;\n }\n function get_array($line){return explode(' ', $line);}\n function read_array(){return get_array(read_line());} \n //echo \"$s\\n\";\n /*****************************************************************/\n \n $n = read_line();\n \n $people[] = 'Sheldon';\n $people[] = 'Leonard';\n $people[] = 'Penny';\n $people[] = 'Rajesh';\n $people[] = 'Howard'; \n \n for ($i=1; $i<$n; $i++)\n {\n $char = array_shift($people);\n $people[]=$char;\n $people[]=$char;\n }\n \n echo $people[0];\n?>", "lang": "PHP", "bug_code_uid": "c7288ac48e5a13f3ff97beb131de163e", "src_uid": "023b169765e81d896cdc1184e5a82b22", "apr_id": "b1730cf6ed28d44f07c5d2476124dc6e", "difficulty": 1100, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9411764705882353, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "0bd6559a762b2b9fb01dac22499c4047", "src_uid": "ff6b3fd358c758324c19a26283ab96a4", "apr_id": "fdec24064c8327e1ac6154d157d03f1a", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9939393939393939, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "b68a49aee215fb1c8c75bfac93b7197f", "src_uid": "ff6b3fd358c758324c19a26283ab96a4", "apr_id": "a02fb28ca95c323ba2bd328205bb74da", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.14432989690721648, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "563f61cc6983ed446dc9ca1aa618ed3b", "src_uid": "ff6b3fd358c758324c19a26283ab96a4", "apr_id": "a02fb28ca95c323ba2bd328205bb74da", "difficulty": 1000, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9041095890410958, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "d57940d5a1701e008852a5ab0800d29c", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "0d8689388025307ed0e3fd7d23c45a7a", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9585798816568047, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "cdbcce7cc33ce3ca6295e3787213bee8", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "58c369d5e012d0a4f449b9c9a25df197", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9375, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7ced75b08294ff7d5c4c74040de36a45", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "4a6b112838f8a486da6c57dfe1915ca2", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.5454545454545454, "equal_cnt": 13, "replace_cnt": 6, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "88bd9490b8da0ba5c534ab9e35e68db5", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "b13704239db6faf618a68a64cfa27d5b", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9559748427672956, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "b8b39a6b5efa8fb4400480d842260371", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "b13704239db6faf618a68a64cfa27d5b", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9590643274853801, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7cde931738dfa581eff88abb861bdea7", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "2a357bc1fe5721cd98cfa208e15aa1d3", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9536423841059603, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "$res2 ? $res1 : $res2 ;\n\n\nfwrite(STDOUT, $res1.\"\\n\"); \n", "lang": "PHP", "bug_code_uid": "8923ffb4702c7958038b9b122066f57e", "src_uid": "e840e7bfe83764bee6186fcf92a1b5cd", "apr_id": "d0ff297d9cff0e172c3d7cff68a171af", "difficulty": 800, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9239250275633958, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "7a2cb0003d97aa35b94722c6331140d7", "src_uid": "6c2e658ac3c3d6b0569dd373806fa031", "apr_id": "b6fa9c2bef50666bf89daa1ecfeef3b3", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.837573385518591, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\n", "lang": "PHP", "bug_code_uid": "ede47b57f0f8a7e68261ae9697054ecc", "src_uid": "6c2e658ac3c3d6b0569dd373806fa031", "apr_id": "fc152d366888a06fc85f8d94d625d1ab", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6471544715447154, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "4fff093047587c0ba7d2b2baccc70dd1", "src_uid": "6c2e658ac3c3d6b0569dd373806fa031", "apr_id": "3bf3531f1160575c5b7b11a456c56861", "difficulty": 1700, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.8580542264752791, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "31789fce00f72290137cebadbcd2af53", "src_uid": "956228e31679caa9952b216e010f9773", "apr_id": "32d3e6034c0969464fdc63cfb163bec9", "difficulty": 1800, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9861111111111112, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "= $b)\n{\n $d = 0;\n for($x = 1; $x <= $b; $x++)\n {\n $d += ($a - 1);\n $a--;\n $d += ($a - 1);\n $a--;\n }\n printf(\"%.0f\", $d);\n}\nelse\n{\n $e = $b - $c;\n $f = $e % 2;\n $d = 0;\n for($x = 1; $x <= $c; $x++)\n {\n $d += ($a - 1);\n $a--;\n $d += ($a - 1);\n $a--;\n }\n if($f == 0)\n {\n printf(\"%.0f\", $d);\n }\n else\n {\n $d--;\n printf(\"%.0f\", $d);\n }\n}\n?>", "lang": "PHP", "bug_code_uid": "1f25d0bbe539d9e2787c8ac0564124b2", "src_uid": "ea36ca0a3c336424d5b7e1b4c56947b0", "apr_id": "18629c5e33a3e446f653051042936106", "difficulty": 1200, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.9500860585197934, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a8f667223ff7ca5199df39d919c36313", "src_uid": "a307b402b20554ce177a73db07170691", "apr_id": "4863f18b79e745875b8efd91f8336fdb", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.00036454219575915913, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "1 2 3\n", "lang": "PHP", "bug_code_uid": "1fb6e3b8d93eb565e87566d5c8fbcdc1", "src_uid": "29e481abfa9ad1f18e6157c9e833f16e", "apr_id": "6fefcf410424c70f98715e14ef362a4b", "difficulty": 1900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9606986899563319, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": " 0){\n\t$w .= substr($in,0,$r+1);\n}\n$w .= '.ru';\n$in = substr($in,($r+3));\n\nif($in<>''){\n\t$w .= '/'.$in;\n}\n\necho $w;\n\n?>", "lang": "PHP", "bug_code_uid": "3b2159f8cc26b242b289ee165b895be7", "src_uid": "4c999b7854a8a08960b6501a90b3bba3", "apr_id": "4877bf41335072c7a75e9acb683db665", "difficulty": 1100, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9579439252336449, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "c8f99e952c02bc9b604169dfca1695be", "src_uid": "05cffd59b28b9e026ca3203718b2e6ca", "apr_id": "9dadaff3df1b47ad39ca91faeedbf607", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9786392405063291, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "2ef917b9dfed0e064203de6e55d58f32", "src_uid": "44fdf71d56bef949ec83f00d17c29127", "apr_id": "ff71257d859cc2c6d5a6be2a113d677b", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9747081712062257, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "\n\n\n", "lang": "PHP", "bug_code_uid": "6b73e88946747342ed1dbe86fe14e21c", "src_uid": "1fc7e939cdeb015fe31f3cf1c0982fee", "apr_id": "a1880486345988f3dfb8176bf4a10fcf", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.1111111111111111, "equal_cnt": 6, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "$max)\n\t\t$max=$cnt;\n\t\t$cnt=1;\n\t}\n\telse\n\t\t$cnt++;\n\n\n }\n echo \"$max\";", "lang": "PHP", "bug_code_uid": "ac0a05276e85be6e0cfee0681ff0f6f0", "src_uid": "1fc7e939cdeb015fe31f3cf1c0982fee", "apr_id": "d657e21f99b25b10c214497f5eaddd8f", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.6660323501427212, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "51182c0c227e712a56bfedece0611e95", "src_uid": "578bae0fe6634882227ac371ebb38fc9", "apr_id": "852a28485707a72ca603f75d13273a97", "difficulty": 1100, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8163265306122449, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": " 6) $b = 'YES';\n}\nprint($b);\n?>", "lang": "PHP", "bug_code_uid": "5d4dc96fdce13aff7819b82333945f3d", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "5b15afd581ba1854b43474b505788387", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.9880952380952381, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "a4989c39ec22de080ff853c9ed7e4727", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "47219ef79c43228b90321f0b5d1afacd", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9785932721712538, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "100 || strpos($str, '0')===false || strpos($str, '1')===false)\n echo \"NO\\n\";\nelse{\n $i=$counter=$flag=0;\n while($i= 7) {\n $flag=1;\n break;\n }\n $i++;\n }\n echo $flag == 1 ? \"YES\\n\" : \"NO\\n\";\n}\nfclose($file);\n", "lang": "PHP", "bug_code_uid": "3cb92c1bdd4b64435829c3eb1c147385", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "e9d11235f6d52d585d174cdf8c6b424e", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9883720930232558, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "204d070e19f216f56a19f342cdfdaef1", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "d049f12bf647532ce6c03bf78a772cb9", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "PHP"} {"similarity_score": 0.3992673992673993, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "=$len || $len<1){\n fprintf(STDOUT,\"NO\\n\");\n }\n else{\n fprintf(STDOUT,\"YES\\n\");\n }\n}", "lang": "PHP", "bug_code_uid": "0795bffa817da455434088d60d8cf4e6", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "ed1c5159dc857114d1c40518f6bfd5e4", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.6133333333333333, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": " 7 && $len <= 100) && strpos($team, '1') !== FALSE && strpos($team, '0')!== FALSE ){\n\t\tif(!empty($team) ){\n\t\t\t$ct = 0;\n\t\t\tfor($i = 0; $i != $len; ++$i){\n\t\t\t\t$j = $i;\n\t\t\t\twhile($j != $len){\n\t\t\t\t\tif($team[$i] == $team[$j]){\n\t\t\t\t\t\t++$ct;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t++$j;\n\t\t\t\t}\n\t\t\t\tif($ct == 7){\n\t\t\t\t\techo \"YES\";\n\t\t\t\t}\n\t\t\t\t$ct = 0;\n\t\t\t}\n\t\t}\n\t}\n\techo \"NO\";\n}\n\n\n?>", "lang": "PHP", "bug_code_uid": "05f043f56ea7e3d0a18fc6b1ea9c3c15", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "fe031db8e06c951c0a267b8f1a6259ab", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.7483588621444202, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "f5b2365f8083b731bb8d257136567b8d", "src_uid": "ed9a763362abc6ed40356731f1036b38", "apr_id": "9a5370c0896f4087f4448a139a4fb3d4", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "PHP"} {"similarity_score": 0.9956140350877193, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "", "lang": "PHP", "bug_code_uid": "6674b13d802533ad5767949c39cd7c71", "src_uid": "0f4f7ca388dd1b2192436c67f9ac74d9", "apr_id": "1d02d381e227a3586d76b8760817302f", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.8269581056466302, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "= $orda)\n\t\t{\n\t\t\t$ai -= $base;\n\t\t} \n\t\t\n\t\t$ords[$a[$i]] = $ai;\n\t}\n\t\n\t$ai = $ords[$a[$i]];\n\t\n\tif(!isset($ords[$b[$i]]))\n\t{\n\t\t$bi = ord($b[$i]);\n\n\t\tif($bi >= $orda)\n\t\t{\n\t\t\t$bi -= $base;\n\t\t} \n\t\t\n\t\t$ords[$b[$i]] = $bi;\n\t}\n\t\n\t$bi = $ords[$b[$i]];\n\t\t\n\tif($ai > $bi)\n\t{\n\t\t$result = 1;\n\t\tbreak;\n\t}elseif($ai < $bi)\n\t{\n\t\t$result = -1;\n\t}\n}\n\necho $result;\n", "lang": "PHP", "bug_code_uid": "3eeefc5b9666bd6b1a218796933dd927", "src_uid": "ffeae332696a901813677bd1033cf01e", "apr_id": "79a1add23a5808a8484d9d57622b4d62", "difficulty": 800, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"} {"similarity_score": 0.47863247863247865, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 12, "bug_source_code": "8){\n\t\t$sum+=8;\n\t\t$arr[$i+1]+=($arr[$i] - 8);\n\t}\n\telse{\n\t\t$sum+=$arr[$i];\n\t}\n\t//print $sum . ' ';\n\tif($sum>=$val[1]){\n\t\t$hold = $i+1;\n\t}\n\n}\nprint $hold;\n?>", "lang": "PHP", "bug_code_uid": "6efd877ed2356408dd69b872e35db17b", "src_uid": "24695b6a2aa573e90f0fe661b0c0bd3a", "apr_id": "bb9ee8df70d65d5302dd74ce3a4065ef", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "PHP"}