{"similarity_score": 0.5454545454545454, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nrl.on('line', (n, mahmoud = false) => {\n while(n > 0) {\n mahmoud = !mahmoud;\n mahmoud ? n -= 2 : n -= 1; \n }\n if (n === 0) { mahmoud ? console.log('Mahmoud') : console.log('Ehab') }\n else mahmoud ? console.log('Ehab') : console.log('Mahmoud');\n return rl.close();\n});", "lang": "Node.js", "bug_code_uid": "a344363a6f1ddfbe9e30a1cbab710f9e", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "62ca69d0084701733659d07bb1e84bbc", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9968253968253968, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "let readline = require('readline');\nlet intInput = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\nlet num;\n\nintInput.on('line', (line) => {\n\tnum = Number(line)\n});\nintInput.on('close', () => {\n\tlet result = 'Ehub';\n\tif (num % 2 == 0){\n\t\tresult = 'Mahmoud'\n\t}\n\tconsole.log(result);\n})", "lang": "Node.js", "bug_code_uid": "08bb2e8011ad1fa7cb784880b52e81be", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "38a49b644e5cf8b6f83bd778311f661b", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9985272459499264, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n \nconst input = [];\nreadLine.on('line', line => input.push(line));\n \nreadLine.on('close', () => {\n const [n] = input[0].split(' ').map(x => parseInt(x));\n\n if (n % 2 === 0) console.log('Mahmud');\n else console.log('Ehab');\n}); ", "lang": "Node.js", "bug_code_uid": "dfa8ff4816e673a6e38161fd7e825196", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "d4a57c574db843756162db9c245326d9", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9753320683111955, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inp = 0\nprocess.stdin.on(\"data\",input=>{\n inp = input\n})\nprocess.stdin.on(\"end\",input=>{\n \n main();\n})\n\n\n\n\nfunction main(){\nif(inp%2===0){console.log(\"YES\")} else {console.log(\"NO\")}}", "lang": "Node.js", "bug_code_uid": "42e94f1b0817880295f0ed35b14a05c6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3b4f9387a27d1a47e00d86abca6d080d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.8864864864864865, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "#!/usr/bin/env nodejs\n\n// 4A - Watermelon\n\nfunction main(stdin) {\n console.log(parseInt(stdin) % 2 === 0 ? \"YES\" : \"NO\");\n}\n\nmain(require(\"fs\").readFileSync(0, \"utf-8\"));\n", "lang": "Node.js", "bug_code_uid": "6bf1191bdf1d5876ca75f5a214460538", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0e1aeedcd3e2469929c74d1810c1494e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.5674325674325674, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (w) => {\n main(w);\n rl.close();\n});\n\nfunction main(watermelon) {\n let path = watermelon/2;\n if ((path % 2) === 0){\n console.log('YES')\n }else{\n console.log('NO')\n }\n}\n", "lang": "Node.js", "bug_code_uid": "a0532bee5f6a88bf89cdd653c64cde43", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7981fdfbe352bf8d8e561a9174a0f4ad", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.15178571428571427, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet watermelon = 0;\n\nprocess.stdin.on('data', w => {\n watermelon = w;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main(watermelon);\n});\n\n\nfunction main(watermelon) {\n let path = watermelon/2;\n if ((path % 2) === 0){\n console.log('YES')\n }else{\n console.log('NO')\n }\n}\n", "lang": "Node.js", "bug_code_uid": "a27d27c354023cdebefdbccfc06f2762", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7981fdfbe352bf8d8e561a9174a0f4ad", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.454320987654321, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n", "lang": "JavaScript", "bug_code_uid": "307b25f8382f8cb98f8a6f901755ef7d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "96de76bd6b31fbd1e1d12c0030766bca", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.17594254937163376, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "const process = require('process')\nprocess.stdout.write(process.argv[2] % 2 === 0 ? 'YES' : 'NO')\n", "lang": "Node.js", "bug_code_uid": "e7b3c909478750513ed9594a4c0827b4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "41f71281b4288887b57a0a20cd0f4474", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.12164579606440072, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "const process = require('process')\nfor(let i = 0; i < 3; i++) process.stdout.write(process.argv[i])\n", "lang": "Node.js", "bug_code_uid": "c3460c76a28a03b4aa46843911f05895", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "41f71281b4288887b57a0a20cd0f4474", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.1295843520782396, "equal_cnt": 8, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "const readline = require('readline')\nconst w = readline().split(' ').map(x => parseInt(x))\n\nconst b = w/2;\nif(b % 2 === 0){\n console.log(\"YES\");\n} else {\n console.log(\"NO\");\n}\n\n", "lang": "Node.js", "bug_code_uid": "921b2216943666a922e0e046b30bb451", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a59f6d808e59b7af06a005fbdede8a51", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.992862807295797, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "let i = ''\n\nfunction main(w) {\n // let dem = 0;\n // for(let i = 2; i <= w ; i++){\n // if(w % i == 0){\n // dem++;\n // }\n // };\n //\n // if(dem >= 2){\n // console.log(\"YES\");\n // }else {\n // console.log(\"NO\");\n // }\n if(w % 2 == 0){\n console.log(\"YES\");\n }else {\n console.log(\"NO\");\n }\n}\n// main(6);\n\n\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL)\n const line1Array = lines[0].split(' ').map(x => parseInt(x))\n const w = line1Array[0]\n\n main(w);\n})\n\n", "lang": "Node.js", "bug_code_uid": "8fbe341e8ecb2d165694703369f46e50", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a59f6d808e59b7af06a005fbdede8a51", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9984917043740573, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function(line){\n const weight = parseInt(line);\n if(weight < 2 || weight % 2 !== 0) {\n console.log(\"NO\");\n } else {\n console.log(\"YES\"); \n }\n})", "lang": "Node.js", "bug_code_uid": "0f0b07931fef571ea9fbfd8f526070a8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c3977d5daa3ed4be4ac4c71032247994", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.2663755458515284, "equal_cnt": 7, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "var readline = require('readline');\n\nconst weight = parseInt(readline());\n\nif(weight <= 2 || weight % 2 !== 0) {\n console.log(\"NO\");\n} else {\n console.log(\"YES\"); \n}", "lang": "Node.js", "bug_code_uid": "10f32ac387ab201cfdfe50c82d6f1403", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c3977d5daa3ed4be4ac4c71032247994", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9819121447028424, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const data = [];\nprocess.stdin.on('data', (chunk) => data.push(chunk));\n\nprocess.stdin.on('end', () => {\n const n = +(data.join('').trim());\n console.log(n % 2 || !n ? 'NO' : 'YES')\n});", "lang": "Node.js", "bug_code_uid": "0cd71dcdb778fd60ab167d2e2fe9b5da", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "76f58d06d3c045da917e3c7bd18a34be", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.5165165165165165, "equal_cnt": 20, "replace_cnt": 11, "delete_cnt": 5, "insert_cnt": 5, "fix_ops_cnt": 21, "bug_source_code": "process.stdin.on('data', (chunk) => {\n process.stdout.write(+(chunk+''));\n process.stdout.write(+(chunk+'') % 2 ? 'YES' : 'NO');\n})", "lang": "Node.js", "bug_code_uid": "5d374c75b38cc776c1884b4e03fce313", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "76f58d06d3c045da917e3c7bd18a34be", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.03858520900321544, "equal_cnt": 4, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "if(w%2==0)console.log('YES')", "lang": "Node.js", "bug_code_uid": "00258c91e1c9ce9bb358894e9b498a66", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "052b8fe3c2f10987b664c1da3310a5bd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9880952380952381, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const x = readline();\n console.log(x%2==0?'YES':'NO');\n}", "lang": "Node.js", "bug_code_uid": "991ad0c0f0e380e272cc06b7eaeafc94", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "052b8fe3c2f10987b664c1da3310a5bd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.994263862332696, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// single line input\nreadline.on('line', line => {\n readline.close(), console.log(parseInt(line) % 2 === 0 && parseInt(line) >= 2 ? \"YES\" : \"NO\");\n});\n\n", "lang": "Node.js", "bug_code_uid": "45bc10a1575ff42aa4d274b911f0c895", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "db906ffd5bcc37be012c13a5dc140170", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9874804381846636, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let w = parseInt(readLine());\n if (w === 2) {\n console.log('NO');\n }\n if (w % 2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n", "lang": "Node.js", "bug_code_uid": "f9efa0bf97b28f0c18550e1ef549e9a5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4b45dc4ce4db4b375853afb176b5d3ec", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9732620320855615, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on('line', (input) => {\n console.log(da(input))\n rl.close()\n});\n\nfunction da (n) {\n if (n == 2) return \"НЕТ\"\n return n % 2 ? \"НЕТ\" : \"ДА\"\n}", "lang": "Node.js", "bug_code_uid": "c925243b474c498bddf5c1f02cbaf168", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b74bce0170b62ec9c21642536498eb9e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9244482173174873, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "const readline = require('readline');\n\nconst INPUT = 'test.in';\nconst LOCAL = process.env.ENABLE_LOCAL_ENV === 'true';\nconst log = (...args) => {\n LOCAL && console.log(...args)\n};\nlet rl;\nlet lineNr = 0;\n\n/**\n * MAIN\n */\n(async () => {\n const promises = await setup(INPUT);\n await Promise.all(promises);\n})();\n\n\nfunction setup() {\n const promises = []\n rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n });\n\n rl.on('line', (line) => {\n promises.push(work(line, lineNr));\n lineNr++;\n });\n\n rl.on('error', (err) => {\n log('Error:', err);\n });\n\n return new Promise(res => {\n rl.on('close', () => {\n res(promises)\n log('Done!');\n });\n });\n}\n\nasync function work(line, lineNr) {\n const solutionForLine = await solve(line.trim());\n const responseLine = `${solutionForLine}\\n`;\n process.stdout.write(responseLine);\n}\n\n/**\n * \n * Solution goes below\n * \n */\nfunction solve(line) {\n return parseInt(line) % 2 === 0 ? 'YES' : 'NO';\n}\n", "lang": "Node.js", "bug_code_uid": "89013f81ac25a5a43d56fffd7a7e548a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "57143c135d2af46e6b0d1ba3d951d88d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9372759856630825, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const weight = readline();\n const output = weight % 2 === 0 ? \"YES\" : \"NO\";\n \n process.stdout.write(output)\n}", "lang": "Node.js", "bug_code_uid": "d06bfeb8cdcacaadbbaef4a220bf692d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "15c3340979cbacbf4ddb872b3b5a65f4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9818780889621087, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "let i = '';\nprocess.stdin.on('data', (c) => {\n i += c;\n});\nprocess.stdin.on('end', () => {\n const { EOL } = require('os');\n const lines = i.split(EOL);\n canSplitEqually(parseInt(lines, 10)) ? console.log('YES') : console.log('NO');\n});\n\nfunction canSplitEqually(w) {\n return (w / 2) % 2 === 0;\n}\n", "lang": "Node.js", "bug_code_uid": "e8ccae4fab24b1bd1638148e777f7623", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9bb0a152cd24c3accca1d2aa2dc4cc34", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.5371024734982333, "equal_cnt": 37, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 31, "fix_ops_cnt": 38, "bug_source_code": "let a = +print(\"\", \"\");\nif (a == 2) return \"NO\";\nif (a / 2 % 2 === 0) return \"YES\";\nelse return \"NO\";\n", "lang": "Node.js", "bug_code_uid": "5b8bd58e6f587bd5c75f899d0a860643", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "742ad53ef85411c7907476282ef82f43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9890710382513661, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "process.stdin.on('data', (data) => {\n if (data == 2) {process.stdout.write(\"NO\");}\n else if (data / 2 % 2 === 0) {process.stdout.write(\"YES\");}\n else {process.stdout.write(\"NO\");}\n})", "lang": "Node.js", "bug_code_uid": "91621298c06e6d2d7a987365d6f67d00", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "742ad53ef85411c7907476282ef82f43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9771528998242531, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (input) => {\n if (input % 2 === 0) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n rl.close();\n});", "lang": "Node.js", "bug_code_uid": "d4190cb11c5bcb545d71fe6c04c73cda", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "48ed217ccb995c67fe09da7831893071", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9980276134122288, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\n\nconst rl1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nconst canDivide = (aWeight) => {\n if(typeof aWeight === 'number' && aWeight >= 1 && aWeight <= 100) {\n if(aWeight % 2 === 0) {\n const dividedWeight = aWeight/2;\n if(dividedWeight > 0) {\n return 'YES'\n }\n }\n }\n\n return 'NO';\n} \n\nrl1.on('line', (aInput) => {\n let weight = parseInt(aInput);\n console.log(canDivide(weight));\n rl1.close();\n});\n\n", "lang": "Node.js", "bug_code_uid": "af3e71589d56514fe9995c13f1ec4a45", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2569482dfda40f0ece524cb27206d0c2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9867452135493373, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n terminal: false\n});\n\nprocess.stdin.setEncoding('utf8');\nrl.once('line', line => {\n const n = line.toString().split(' ').map(Number);\n\n if (n % 2 === 0) console.log('YES');\n else console.log('NO');\n process.exit();\n});", "lang": "Node.js", "bug_code_uid": "f6864e29d67c74beacc8b53b36771bbd", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "43b45071a94bd4d4d25e56cb25f5ead3", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9458272327964861, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) \n divideEvenly(lines[0]);\n});\n \nfunction divideEvenly(w){\n if (w < 1 || w > 100) console.log('NO');\n if (w % 2 === 0 && w !== 2){ console.log('YES')}\n else{ console.log('NO');}\n}\n ", "lang": "Node.js", "bug_code_uid": "2bd94a51f40d82ca2c316034b44765da", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "28e0752f426e2eadc6b6c967615c5780", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9828125, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "var readline = (()=>{\n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n \n let inputString = '';\n let currentLine = 0;\n \n process.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n });\n \n process.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n });\t\n \n function readline() {\n return inputString[currentLine++];\n }\n return readline;\n})()\n \n\nfunction main() {\n\treturn readline().match(/(.)\\1*/g).filter(str=>str.length%2===0).length;\n \n}\n", "lang": "Node.js", "bug_code_uid": "7e3a4813da401440f1a3f1d047924a09", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "apr_id": "ea765d50c67a062916428d82c0445629", "difficulty": null, "tags": ["implementation", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.5651984300043611, "equal_cnt": 37, "replace_cnt": 20, "delete_cnt": 8, "insert_cnt": 8, "fix_ops_cnt": 36, "bug_source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n \n \nfunction main() {\n const x = readline();\n var line2 = readline(); \n \n console.log(removeAdjacent(x, line2));\n}\n \nfunction findComparable(direction /* -1 left, 1 right*/, from, sArr) {\n\treturn from+(direction*(sArr.findIndex((_, index) => sArr[from+(direction*(index+1))]!='#')+1));\n}\n \nfunction removeAdjacent(l, s) {\n \n\tlet sArr = Array.from(s);\n \n\t// create a dictionary where every letter in associated the its positions in the string\n\tconst lettersDict = sArr.reduce((acc, curr, i) => {\n\t\tif (curr in acc) {\n\t\t\tacc[curr].push(i);\n\t\t}\n\t\telse {\n\t\t\tacc[curr] = [i];\n\t\t}\n\t\treturn acc;\n\t}, {});\n \n\t// order the keys of the dictionary by ascii value\n\tconst keys = Object.keys(lettersDict);\n\tkeys.sort((a, b) => {\n\t\treturn b.charCodeAt(0) - a.charCodeAt(0)\n\t});\n \n\t// for every entry in keys check the string for adjacents\n\treturn keys.reduce((acc, curr) => {\n\t\tlet nEliminated = 0;\n\n\t\tfor (let i = 0; i < lettersDict[curr].length; i++) {\n\t\t\tlet position = lettersDict[curr][i];\n\t\t\tlet leftComparable = findComparable(-1, position, sArr);\n\t\t\tlet rightComparable = findComparable(1, position, sArr);\n\t\t\tif ((sArr[leftComparable] && (sArr[leftComparable].charCodeAt(0) - sArr[position].charCodeAt(0) == -1)) ||\n\t\t\t\t(sArr[rightComparable] && (sArr[rightComparable].charCodeAt(0) - sArr[position].charCodeAt(0) == -1))) {\n\t\t\t\tnEliminated++;\n\t\t\t\tif (sArr[position-1] === sArr[position]) {\n\t\t\t\t\ti -= 2;\n\t\t\t\t}\n\t\t\t\tsArr[position] = '#';\n\t\t\t}\n\t\t}\n\n\t\treturn acc + nEliminated;\n\t}, 0);\n}", "lang": "Node.js", "bug_code_uid": "2b8f41bfdbf4b480d768179e04060d37", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "685f18a400fea28b0c27ba0bbdfd5f53", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9948947032546267, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "\nprocess.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nlet input = ''\nlet ptr = 0\nprocess.stdin.on('data', (i) => {\n input += i\n})\n\n\nprocess.stdin.on('end', () => {\n input = input.split('\\n').map(a => a.replace(/(\\r\\n|\\n|\\r)/gm, ''))\n main()\n})\n\nfunction wr(...x) {\n console.log(...x)\n}\n\nfunction sort(a, inc = true) {\n if(inc) a.sort((a, b) => a - b)\n else a.sort((a, b) => b - a)\n}\n\nfunction readInt() {\n return parseInt(input[ptr++])\n}\n\nfunction readString() {\n return input[ptr++]\n}\n\nfunction readStrings() {\n return input[ptr++].split(' ')\n}\n\nfunction readInts() {\n return input[ptr++].split(' ').map(a => parseInt(a))\n}\n\nfunction main() {\n const l = readInt()\n let s = readString()\n let max = 0\n let count = 0\n let len = l\n for(let c = 1; c < l; c++) { // l -1 times\n let f = false\n for(let i = 1; i < len; i++) {\n if(s[i] > s[max]) max = i\n }\n // console.log(s, max, s[max], count)\n if(max !== 0 && s.charCodeAt(max) - 1 === s.charCodeAt(max - 1)) {\n s = cut(max)\n len--\n count++\n f = true\n }\n else {\n for(let x = max; x < len - 1; x++) {\n if(s[x] === s[max] && s.charCodeAt(x) - 1 === s.charCodeAt(x + 1)) {\n // console.log('x', x, s[x])\n s = cut(x)\n len--\n count++\n f = true\n }\n }\n }\n if(!f) s = put(max)\n max = 0\n }\n\n wr(count)\n\n function cut(i) {\n i++\n return s.substring(0, i - 1) + s.substring(i)\n }\n function put(i) {\n i++\n return s.substring(0, i - 1) + 'A' + s.substring(i)\n\n }\n}\n", "lang": "Node.js", "bug_code_uid": "04d9fdb2e400927b2927f489955afdac", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "02eb50b0444ccdc553f194cc73f9538b", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9983098591549295, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "function generateAlphabets() {\n var alphabets = [];\n var start = 'a'.charCodeAt(0);\n var last = 'z'.charCodeAt(0);\n for (var i = start; i <= last; ++i) {\n alphabets.push(String.fromCharCode(i));\n }\n\n return alphabets;\n}\n\nconst seq = generateAlphabets();\n\n\n\n\nconst processData = (lines) => {\n const s = lines[1].split('').map(x => x.charCodeAt(0))\n let sum = 0\n const set = Array.from(new Set(s)).sort((a, b) => a - b).reverse()\n for (const l of set) {\n const target = l - 1;\n for (let j =0; j i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n processData(lines)\n})\n", "lang": "Node.js", "bug_code_uid": "511f78d63b8634f4f3f7bd1059bac3de", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "afc6fffe764fc57e3cf00c2d19744c01", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8951612903225806, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\nlet check = 'NO'\nconst SF = input[1].match(/(SF)/g).length\nconst FS = input[1].match(/(FS)/g).length\nif (SF > FS)\n check = 'YES'\nconsole.log(check)\n})", "lang": "Node.js", "bug_code_uid": "a984752a959cbb0804b0e52a9f7486e0", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "ec53fd88f0ed58067d0b551cccafc86f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.7722772277227723, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "function solution(num){ \n return num.match(/SF/g).length > num.match(/FS/g).length? \"YES\": \"NO\"\n}\nprocess.stdin.addListener(\"data\", (data)=>{\n var num = data.toString().replace(/\\d+\\s+/, \"\");\n console.log(solution(num))\n})", "lang": "Node.js", "bug_code_uid": "a19a81221594ec318af7388d06e94d40", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "566d12fa35ff569fb3b0bb676954a304", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9326880774307084, "equal_cnt": 16, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 15, "bug_source_code": "process.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nvar arr = ''\nprocess.stdin.on('data', (i) => {\n arr += i\n})\n\n\nprocess.stdin.on('end', () => {\n arr = arr.split('\\n')\n const ax = arr.shift().split(' ')\n const v = parseInt(ax[0])\n const e = parseInt(ax[1])\n\n if(e == 0) {\n console.log(0)\n return\n }\n if(v <= 6) {\n console.log(e)\n }\n\n else {\n let m = new Map()\n \n for(let i = 1; i <= e; i ++) {\n m.set(i, [])\n }\n \n for(let i = 0; i < e; i ++) {\n const edge = arr.shift().split(' ')\n const a = parseInt(edge[0])\n const b = parseInt(edge[1])\n m.get(a).push(b)\n m.get(b).push(a) \n }\n\n var f = false\n var a7 = m.get(7)\n var noOfVertices = 20\n for(let i = 1; i <= 6; i ++) {\n var other = m.get(i)\n var x = a7.filter(el => other.indexOf(el) != -1)\n if(x.length == 0) {\n f = true\n break\n }\n else if(x.length < noOfVertices) {\n noOfVertices = x.length\n }\n }\n if(f) {\n console.log(e)\n }\n\n else {\n console.log(e - noOfVertices)\n }\n }\n}) ", "lang": "Node.js", "bug_code_uid": "5a2cf35d0b06c8c99118ba1fb5d104e3", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "4f3ac34f1564f81ad7af2f75a24a498a", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9343901365037428, "equal_cnt": 14, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 13, "bug_source_code": "process.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nvar arr = ''\nprocess.stdin.on('data', (i) => {\n arr += i\n})\n\n\nprocess.stdin.on('end', () => {\n arr = arr.split('\\n')\n const ax = arr.shift().split(' ')\n const v = parseInt(ax[0])\n const e = parseInt(ax[1])\n\n if(e == 0) {\n console.log(0)\n return\n }\n if(v <= 6) {\n console.log(e)\n }\n\n else {\n let m = new Map()\n \n for(let i = 1; i <= v; i ++) {\n m.set(i, [])\n }\n \n for(let i = 0; i < e; i ++) {\n const edge = arr.shift().split(' ')\n const a = parseInt(edge[0])\n const b = parseInt(edge[1])\n m.get(a).push(b)\n m.get(b).push(a)\n }\n\n var f = false\n var a7 = m.get(7)\n var noOfVertices = 20\n for(let i = 1; i <= 6; i ++) {\n var other = m.get(i)\n var x = a7.filter(el => other.indexOf(el) != -1)\n if(x.length == 0) {\n f = true\n break\n }\n else if(x.length < noOfVertices) {\n noOfVertices = x.length\n }\n }\n if(f) {\n console.log(e)\n }\n\n else {\n console.log(e - noOfVertices)\n }\n }\n}) ", "lang": "Node.js", "bug_code_uid": "daef697c218c0960f1234dd9eed8019d", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "4f3ac34f1564f81ad7af2f75a24a498a", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7773722627737226, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst gcd = (a, b) => {\n while (b !== 0) {\n const temp = a;\n a = b;\n b = temp % b;\n }\n\n return a;\n}\n\nconst factorial = (n) => {\n const arr = [1, 1];\n\n for (let i = 2; i <= n; i++) {\n arr[i] = arr[i - 1] * i;\n }\n\n return arr[n];\n}\n\nrl.on('line', (d) => {\n const [a, b] = d.split(' ').map(Number);\n\n console.log(gcd(factorial(a), factorial(b)));\n});\n", "lang": "Node.js", "bug_code_uid": "3bbd2444044ee1c0faa3e4be9add81c0", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "112cca288b80db7919c584f12a945422", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8840579710144928, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst gcd = (a, b) => {\n while (b !== 0) {\n const temp = a;\n a = b;\n b = temp % b;\n }\n\n return a;\n}\n\nconst factorial = (n) => {\n let prev = 1;\n let r = prev;\n\n for (let i = 2; i <= n; i++) {\n r = prev * i;\n prev = r;\n }\n\n return r;\n}\n\nrl.on('line', (d) => {\n const [a, b] = d.split(' ').map(Number);\n\n console.log(gcd(factorial(a), factorial(b)));\n});\n", "lang": "Node.js", "bug_code_uid": "fb03e0c7f58395889250e8a6f971a5f1", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "112cca288b80db7919c584f12a945422", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8857609139126887, "equal_cnt": 13, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 13, "bug_source_code": "var read = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar obj;\nvar inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n var returnObj = {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){\n if(!this.hasNext()){\n\n throw \"ArrayIndexOutOfBoundsException これ以上ないよ\";\n }\n else{\n var returnInput = this.list[this.index];\n this.index++;\n return returnInput;\n }\n }};\n return returnObj;\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n //[no]要素の扱い。数値型\n //不明値、異常時:引数そのまま返す 1:数値へ変換\n //2:半角SPで分割 4:半角SPで分割し、数値配列へ\n //6:1文字で分割 7:1文字で分割し、数値配列へ\n //8:半角SPで結合 9:改行で結合 0:文字なしで結合\nfunction myconv(i,no){\n try{\n switch(no){\n case 1:return parseInt(i);\n case 2:return i.split(\" \");\n case 4:return i.split(\" \").map(Number);\n case 6:return i.split(\"\");\n case 7:return i.split(\"\").map(Number);\n case 8:return i.join(\" \");\n case 9:return i.join(\"\\n\");\n case 0:return i.join(\"\");\n default:return i;\n }\n }\n catch(e){\n return i;\n }\n}\nfunction Main(){\n var output = [];\n\n var ul = next();\n var arr = nextIntArray() ;\n var brr = nextIntArray() ; \n mina = minb = 10 ;\n arr.forEach((x)=> {\n if(x < mina) {\n mina =x ;\n }\n })\n brr.forEach((x)=> {\n if(x < minb) {\n minb =x ;\n }\n })\n if(minb < mina) {\n var temp = 0 \n temp = mina ;\n mina = minb ;\n minb = temp ;\n }\n if(mina !== minb)\n myout(mina+\"\"+minb); \n else \n myout(mina);\n}", "lang": "Node.js", "bug_code_uid": "6aae77c560e9a8505cc0f2cfa27df16f", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "2d5d07971c5833470ed3888cd271533d", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9409282700421941, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const BubbleSort = (vector) => {\n for (let i = vector.size - 1; i > 1; i--) {\n for (let j = 1; j < i; j++) {\n if (vector[j] < vector[j-1]) {\n let temp = vector[j-1];\n vector[j-1] = vector[j];\n vector[j] = temp;\n }\n }\n }\n }\n\n let vector = lines.split(' ');\n vector = BubbleSort(vector);\n let res = 0;\n\n res = vector[2] - vector[0];\n\n console.log(res);\n});\n\n\n\n", "lang": "Node.js", "bug_code_uid": "ac75580e61be86e10befa0deeb8e7dee", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "fdd36d33995fa75e12932c782a0b72e2", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9750346740638003, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const BubbleSort = (vector) => {\n for (let i = vector.length - 1; i > 1; i--) {\n for (let j = 1; j < i; j++) {\n if (vector[j] < vector[j-1]) {\n let temp = vector[j-1];\n vector[j-1] = vector[j];\n vector[j] = temp;\n }\n }\n }\n\n }\n\n\n let vector = lines[0].split(' ').map( n => parseInt(n));\n BubbleSort(vector);\n let res = 0;\n res = vector[2] - vector[0];\n\n console.log(res);\n});\n\n\n\n", "lang": "Node.js", "bug_code_uid": "f31136f5c75b80ca976ded4e8c3fd499", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "fdd36d33995fa75e12932c782a0b72e2", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9695841092489137, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n\n let inputs = str.trim().split(' ').sort();\n let midFriend = +inputs[1];\n let total = +inputs[2] - midFriend;\n total += midFriend - +inputs[0];\n return total.toString();\n\n}\n\n\n\n\n\n", "lang": "Node.js", "bug_code_uid": "7f889777e0894adb4db8566c572e07cb", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "20a05c3f1e9c517d67f895db127cdce5", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9180576631259484, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let x = readLine().split(' ').map(v => parseInt(v)).sort();\n let x1 = x[0];\n let x2 = x[1];\n let x3 = x[2];\n console.log(Math.abs(x2 - x1) + Math.abs(x3 - x2))\n}", "lang": "Node.js", "bug_code_uid": "a5141ce6bf2a81cbfed7dca21068ae99", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "950454ceaffae5105839944b742d5fa8", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9995037220843672, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let theNum = readline();\n\n let result = isTrue(theNum);\n\n if(result) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n\nfunction isTrue(theNum) {\n if(theNum === 2) {\n return false;\n }\n let secondNum = theNum - 2;\n for(let i = 2; i <= theNum; i+=2, secondNum-=2) {\n if(i + secondNum == theNum) {\n if(i % 2 == 0 && secondNum % 2 == 0) {\n return true;\n }\n }\n }\n return false;\n}\n", "lang": "Node.js", "bug_code_uid": "0f4232f5a83cdfab13f65feed715b6f8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ad457109ca87f6c663bc2089b157216e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9561224489795919, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let theNum = readline();\n\n let result = isTrue(theNum);\n\n if(result) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n\nfunction isTrue(theNum) {\n let secondNum = theNum - 2;\n for(i = 2; i <= theNum; i+=2, secondNum-=2) {\n if(i + secondNum == theNum) {\n if(i % 2 == 0 && secondNum % 2 == 0) {\n return true;\n }\n }\n }\n return false;\n}\n", "lang": "Node.js", "bug_code_uid": "d564889ada9c5df53df00fd6242fe95a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ad457109ca87f6c663bc2089b157216e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9821567106283942, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const number = readline();\n\n (number % 2 == 0) ? process.stdout.write(\"YES\") : process.stdout.write(\"NO\"); \n}\n", "lang": "Node.js", "bug_code_uid": "256a669e6317af4ac5fd18ea978b5459", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "655464838e7af80a30c1489c36edbc93", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.10223642172523961, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "var n = readline();\n\nif(n === 2){\n\tconsole.log(\"No\");\n}\nelse if(n % 2 === 0){\n\tconsole.log(\"Yes\");\n}\nelse{\n\tconsole.log(\"No\");\n}", "lang": "Node.js", "bug_code_uid": "a5257bbfecee2067fe6852eb615d694f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "17fb9267a9bf800d3542caef859c302d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9404255319148936, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet input = [];\nlet result = \"\";\n\nrl.on('line', function (line) {\n input = line.split(' ').map((el) => parseInt(el));\n if(input[0] % 2 ===0){\n \tresult = \"Yes\";\n }\n else{\n \tresult = \"No\";\n }\n rl.close();\n })\n .on('close', function () {\n console.log(result);\n process.exit();\n });\n", "lang": "Node.js", "bug_code_uid": "6255cebe657d271943900495b21039e5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "17fb9267a9bf800d3542caef859c302d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.49673202614379086, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": "var input = parseInt(readline());\n\nfunction splitWatermelon(weight) {\n for (var w1 = 1; w1 < weight; w1++) {\n var w2 = weight - w1;\n if (w1 % 2 === 0 && w2 % 2 === 0 ) {\n return true;\n }\n }\n \n return false;\n}\n\nprint(splitWatermelon(input) ? 'YES' : 'NO');\n", "lang": "Node.js", "bug_code_uid": "8f917a9aa2feb0a2b532d2fd763a9e96", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "34ce0f610844e9291fbb557817e73f11", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9985096870342772, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = getArray(inputString, '\\n');\n\n main();\n});\n\nfunction getArray(str, delimiter) {\n return str\n .trim()\n .split(delimiter)\n .map((string) => {\n return string.trim();\n });\n}\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction pi(str) {\n return parseInt(str);\n}\n\nfunction main() {\n var n = readLine();\n if (pi(n) %2 === 0 && pi(n) > 0) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n", "lang": "Node.js", "bug_code_uid": "18ef7fde5922ffda290068d01276b303", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a6b367125de5d45729b5077cc89bf5f8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9942816297355254, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "\nconst readline = require('readline')\n\nclass ReadStream {\n lines = []\n\n currPromise = undefined\n\n readlineHandler = input => {\n this.lines.push(input)\n }\n\n constructor() {\n this.rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n this.rl.on('line', this.readlineHandler)\n }\n\n async next() {\n this.currPromise = new Promise((resolve, reject) => {\n const tempPromise = this.currPromise ? this.currPromise : Promise.resolve()\n \n tempPromise.then(_ => {\n if (this.lines .length) {\n resolve(this.lines.shift())\n }\n else {\n this.rl.off('line', this.readlineHandler)\n this.rl.once('line', (input) => {\n resolve(input)\n this.rl.on('line', this.readlineHandler)\n })\n }\n })\n \n })\n return this.currPromise\n }\n\n close() {\n this.rl.off('list', this.readlineHandler)\n this.rl.close()\n }\n}\n\n\nconst cin = new ReadStream()\n\nasync function main() {\n const weight = parseInt(await cin.next())\n\n if (weight % 4 === 0) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n\n cin.close()\n}\n\nmain()", "lang": "Node.js", "bug_code_uid": "b256bec47ff8708ce4d53a48b2b90556", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1422283deaf932196b65b300d1a6cb43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.7657512116316639, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline');\n\nconst r1= readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n})\nr1.on('line', (line) => {\n\twatermelon(+line);\n\tr1.close();\n})\n\nfunction watermelon(kg) {\n\treturn kg % 2 ? console.log('NO') : console.log('YES');\n}\n\n\n", "lang": "Node.js", "bug_code_uid": "1ed209e44a9365b2d3d5f0641b25ddb9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4f460735dfc5972aebfdf405822ac264", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9982425307557118, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require(\"readline\");\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nrl.question(\"\", (N) => {\n N = parseInt(N);\n if (N % 2 == 0 && N > 4) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n rl.close();\n});\n", "lang": "Node.js", "bug_code_uid": "bfb77613d8e0541a8ac247c108433991", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dbc8095df65f3860acd673cd416bae17", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.999026921829387, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "readline = require('readline')\nlet stdinInput = '';\n\n// //file\n// var fs = require('fs');\n// const inputfile = '_in.txt';\n// const outputfile = '_out.txt';\n// fs.writeFileSync(outputfile, '');\n// var myInterface = readline.createInterface({\n// input: fs.createReadStream(inputfile),\n// });\n// myInterface.on('line', function (line) {\n// stdinInput += line+'\\n';\n// }).on('close', () => {\n// main(); \n// process.exit(0);\n// })\n /*\n * Api Scanner\n */\n class Scanner {\n constructor() {\n this.index = -1;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n \n nextLine() {\n this.index += 1;\n return this.lines[this.index].trim();\n }\n nextArray(fn) {\n const array = this.nextLine().split(' ');\n return fn === String ? array : array.map(fn);\n }\n \n hasNext() {\n return this.index < this.lines.length;\n }\n }\n \n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n process.stdin.on('data', (input) => { stdinInput += input; });\n process.stdin.on('end', () => { main(); });\n\nvar n;\nfunction main() {\n const is = new Scanner();\n \n // const s = is.nextArray(Number);\n // const t = is.nextArray(Number);\n // // const k = is.nextArray();\n\n n = parseInt(is.nextLine());\n console.log(n);\n if(kt()==1)\n console.log(\"YES\");\n\t\telse\n console.log(\"NO\");\n }\n \n function kt(){\n for(var i=2; i {\n console.log(text);\n};\n\nrl.on('line', function (w) {\n if (w < 3) {\n ans('NO');\n }\n\n if (w % 2 === 0) {\n ans('YES');\n }\n else {\n ans('NO');\n }\n})\n", "lang": "Node.js", "bug_code_uid": "f306963f9eead2b57bbb1bb1e4683df0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5d8f1162d7a2c38dd342d0d4da59681b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9483870967741935, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (weight) => {\n if (weight <= 3) console.log('NO');\n\n var answer = weight % 2;\n console.log(answer ? 'NO' : 'YES');\n rl.close();\n});", "lang": "Node.js", "bug_code_uid": "2943b810633a47400d0d7202092a5f1d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d86e76bf457292864b17438adc9c4408", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9533502968617472, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "var inputs = null;\n//let inputs = ['8'];\nfunction main(inputs) {\n var weight = parseInt(inputs[0]);\n for (var i = 2; i < 50; i += 2) {\n if (weight % 2 == 0)\n return console.log('YES');\n }\n console.log('NO');\n}\n// Do not change this\nif (!inputs) {\n var input_1 = '';\n process.stdin.on('data', function (char) { return input_1 += char; });\n process.stdin.on('end', function () {\n var EOL = require('os').EOL;\n var inputs = input_1.split(EOL).slice(0, -1);\n main(inputs);\n });\n}\nelse\n main(inputs);\n", "lang": "Node.js", "bug_code_uid": "e08b3c01e945632bd271ddde9b09e736", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "252ff87df6296f965b8888ebcf647078", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9156414762741653, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "function main(inputs) {\n var weight = parseInt(inputs[0]);\n for (var i = 2; i < 50; i += 2) {\n if (weight % 2 == 0)\n return console.log('YES');\n }\n console.log('NO');\n}\n// Do not change this\nif (!inputs) {\n var input_1 = '';\n process.stdin.on('data', function (char) { return input_1 += char; });\n process.stdin.on('end', function () {\n var EOL = require('os').EOL;\n var inputs = input_1.split(EOL).slice(0, -1);\n main(inputs);\n });\n}\nelse\n main(inputs);\n", "lang": "Node.js", "bug_code_uid": "a0bdafc6f46689cf0fab41e5504070c0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "252ff87df6296f965b8888ebcf647078", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9915848527349228, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "var inputs = null;\n//inputs = ['8'];\nfunction main(inputs) {\n var w = parseInt(inputs[0]);\n if (w == 2)\n solution('NO');\n for (var i = 2; i < 50; i += 2) {\n if (w % 2 == 0)\n solution('YES');\n }\n solution('NO');\n}\n///////////////////////////////////////////////////////////////////////////////////////\nif (!inputs) {\n var input_1 = '';\n process.stdin.on('data', function (char) { return input_1 += char; });\n process.stdin.on('end', function () {\n var EOL = require('os').EOL;\n var inputs = input_1.split(EOL).slice(0, -1);\n main(inputs);\n });\n}\nelse\n main(inputs);\nfunction solution(data) {\n console.log(data);\n process.abort();\n}\n", "lang": "Node.js", "bug_code_uid": "38a6aafcacafab0ba844d629aef7fa8b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "252ff87df6296f965b8888ebcf647078", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.2959830866807611, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "function main() {\n const x = readline();\n write(x % 2 == 0 && x > 3 ? 'YES' : 'NO');\n}\n\nmain();\n", "lang": "Node.js", "bug_code_uid": "ad7300c9418319d8f6a02e5bf0c834d8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "977740d02f54ede8f9c2359b2744d6d8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9639519359145527, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction main(x) {\n console.log(x % 2 == 0 && x > 3 ? 'YES' : 'NO');\n}\n\nconst a;\n\n// single line input\nreadline.on('line', line => {\n a = line;\n readline.close();\n});\n\n// multi line input\n// readline.on('line', line => {\n// console.log(line);\n// });\n\nmain(a);\n", "lang": "Node.js", "bug_code_uid": "88e5298c188ba1908bc8f300bd1016a9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "977740d02f54ede8f9c2359b2744d6d8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9718875502008032, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction main(x) {\n console.log(x % 2 == 0 && x > 3 ? 'YES' : 'NO');\n}\n\nlet a;\n\n// single line input\nreadline.on('line', line => {\n a = line;\n readline.close();\n});\n\n// multi line input\n// readline.on('line', line => {\n// console.log(line);\n// });\n\nmain(a);\n", "lang": "Node.js", "bug_code_uid": "279b0aadd01beb458e93f827f1c2f17a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "977740d02f54ede8f9c2359b2744d6d8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9911218724778047, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('ascii');\n \nvar input_stdin = \"\";\nvar input_stdin_array = \"\";\nvar input_currentline = 0;\n \nprocess.stdin.on('data', function (data) {\n input_stdin += data;\n});\n \nprocess.stdin.on('end', function () {\n input_stdin_array = input_stdin.split(\"\\n\");\n main(); \n});\n \nfunction readLine() {\n return input_stdin_array[input_currentline++];\n}\n \nfunction solveMeFirst(a) {\n // Hint: Type return a+b below \n return a % 4 === 0 ? \"YES\" : \"NO\"; \n}\n \n \nfunction main() {\n var a = parseInt(readLine());\n \n var res = solveMeFirst(a);\n console.log(res);\n}", "lang": "Node.js", "bug_code_uid": "efa0324e9b6d9352d883ec559f0ecefd", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c13bbabfdb7d3a4892b7d08abe8b8f58", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9952830188679245, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main(){\n var n = parseInt(readLine());\n var res = \"NO\";\n if(n%2 ==0){\n for(var i=1;i<(n+1);i++){\n if(i%2 ==0){\n if((n-i)%2 ==0){\n res=\"YES\";\n }\n }\n }\n}\nconsole.log(res);\n\n}\n", "lang": "Node.js", "bug_code_uid": "54f86faff1aca6410e286a7665564e47", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b53066c3ae96657b3bfda6929a57afe1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9970238095238095, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readLine = require('readline')\n\nconst rl = readLine.createInterface({\n input: process.stdin,\n output: process.stdout,\n})\n\nconst input = []\n\nrl.on('line', line => input.push(line.toString().split(' ').map(Number)))\n\nrl.on('close', () => {\n const [[w]] = input\n console.log(['NO', 'YES'][Number((w - 2) % 4 === 0 && w > 3)])\n})\n", "lang": "Node.js", "bug_code_uid": "066ee166b2efe1658d84ef93433fb243", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "12ddc2e97d692b2699949665d49c8c90", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.3842364532019704, "equal_cnt": 8, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "const prompt = require('prompt-sync')({sigint: true});\n\nconst w = prompt();\nif(w>2 && w%2==0 ){\n console.log('YES');\n}else{\n console.log('NO');\n}\n", "lang": "Node.js", "bug_code_uid": "348282776ddbe3d44ff68a07383f9776", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4fd9093bc622d7ead0d713a2bc856e51", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9980657640232108, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nrl.question('a',(val)=>{\n if(val>2 && val%2==0){\n console.log('YES');\n }else{\n console.log('NO');\n }\n rl.close();\n})\n\n", "lang": "Node.js", "bug_code_uid": "68328007c1fb9d00fde603de84b8c8c8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4fd9093bc622d7ead0d713a2bc856e51", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.8278145695364238, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "process.stdin.on('data', data => {\n process.stdout.write(parseInt(data.toString().trim()) - 2 % 2 === 0 ? \"YES\" : \"NO\");\n})", "lang": "Node.js", "bug_code_uid": "65fc3771a0ad202e0b56fb1e2f5091d4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0aefc0e9c0a24b06a06d78962daf031e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.6915254237288135, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "process.stdin.on('data', function(line) {\n process.stdout.write(parseInt(line.trim()) % 4 === 0 ? \"YES\" : \"NO\");\n});", "lang": "Node.js", "bug_code_uid": "25ae1b255cb013436ae6be5cb1e46784", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0aefc0e9c0a24b06a06d78962daf031e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9981785063752276, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "'use strict'\nconst readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nvar kilos;\nrl.question('', (kilos) => {\n if((kilos%2==0) && (kilos>4)){\n console.log(\"YES\")\n }else{\n console.log(\"NO\")\n }\n});\n", "lang": "Node.js", "bug_code_uid": "a10674221b66a35931c0d18b67db3fad", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "afc7897cd635d0947ef522be76087f46", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9760869565217392, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const readline = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\n// single line input\n// readline.on(\"line\", (line) => {\n// readline.close();\n// });\n\n// multi line input\nreadline.on(\"line\", (line) => {\n const input = +line.split(\" \")[0];\n readline.close();\n const half = input / 2;\n if (input % 2 === 0) {\n if (half % 2 === 0) {\n console.log(\"YES\");\n return;\n }\n }\n console.log(\"NO\");\n});\n", "lang": "Node.js", "bug_code_uid": "305444dc4346880f0d856877585ceb6d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f866bbd490694fb1f169dc4692059a46", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9125379700429455, "equal_cnt": 31, "replace_cnt": 17, "delete_cnt": 8, "insert_cnt": 5, "fix_ops_cnt": 30, "bug_source_code": "function ProblemSolver() {\n this.HAS_TEST_CASES = false;\n this.INPUT_FILE_NAME = \"test.in\";\n this.OUTPUT_FILE_NAME = \"out.txt\";\n this.DO_OUTPUT_TO_FILE = false;\n this.CLEAR_ARRAY_PER_CASE = false;\n\n\tthis.calc = function() {\n\t\tvar i , fl , idx , j , crr ;\n\t\twhile( true ) {\n\t\t\tfl = 0 ;\n\t\t\tfor( i = 0 ; i <= this.cn - 3 ; i++ ) {\n\t\t\t\tif( this.brr[ i ] == this.brr[ i + 1 ] && this.brr[ i + 1 ] == this.brr[ i + 2 ] ) {\n\t\t\t\t\tfl = 1 ;\n\t\t\t\t\tidx = 0 ;\n\t\t\t\t\tcrr = new Array() ;\n\t\t\t\t\tfor( j = 0 ; j < this.cn ; j++ ) {\n\t\t\t\t\t\tif( j != i && j != i + 1 && j != i + 2 ) {\n\t\t\t\t\t\t\tcrr.push( this.brr[ j ] ) ;\n\t\t\t\t\t\t\tidx++ ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.brr = crr ;\n\t\t\t\t\tthis.cn = idx ;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( fl == 0 ) {\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\treturn this.n + 1 - this.cn ;\n\t} ;\n\t\n this.solveCase = function() {\n var res , i , j , fl , cn , temp ;\n res = 0 ;\n //at the start\n this.cn = 0 ;\n this.brr[ this.cn++ ] = this.x ;\n for( i = 0 ; i < this.n ; i++ ) {\n \tthis.brr[ this.cn++ ] = this.arr[ i ] ;\n }\n res = Math.max( res , this.calc() ) ;\n //at the end\n this.cn = 0 ;\n for( i = 0 ; i < this.n ; i++ ) {\n \tthis.brr[ this.cn++ ] = this.arr[ i ] ;\n }\n this.brr[ this.cn++ ] = this.x ;\n res = Math.max( res , this.calc() ) ;\n //anywhere in the middle\n for( j = 0 ; j < this.n - 1 ; j++ ) {\n \tthis.cn = 0 ;\n\t for( i = 0 ; i <= j ; i++ ) {\n\t \tthis.brr[ this.cn++ ] = this.arr[ i ] ;\n\t }\n\t this.brr[ this.cn++ ] = this.x ;\n\t for( i = j + 1 ; i < this.n ; i++ ) {\n\t \tthis.brr[ this.cn++ ] = this.arr[ i ] ;\n\t }\n \tres = Math.max( res , this.calc() ) ;\n\t }\n print( res );\n };\n\n this.init = function() {\n this.lim1 = 100010;\n this.lim2 = 110;\n this.cc = 1;\n this.ind = 1;\n this.n = 0;\n this.cn = 0;\n this.declareAndFillArrays();\n };\n\n this.getInput = function( irObj ) {\n var hasMoreInput , i;\n hasMoreInput = true;\n try {\n this.n = irObj.nextInt();\n this.k = irObj.nextInt();\n this.x = irObj.nextInt();\n for( i = 0 ; i < this.n ; i++ ) {\n this.arr[ i ] = irObj.nextInt();\n }\n }\n catch( ex ) {\n hasMoreInput = false;\n }\n return hasMoreInput;\n };\n\n this.clearArraysPerCase = function() {\n var i;\n this.arr = new Array();\n this.adj_list = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.arr.push( 0 );\n this.adj_list.push( new Array() );\n }\n };\n\n this.clearPerCase = function() {\n this.cn = 0;\n this.cc++;\n if( this.CLEAR_ARRAY_PER_CASE == true ) {\n this.clearArraysPerCase() ;\n }\n };\n\n this.declareAndFillArrays = function() {\n var i , j;\n this.srr = new Array();\n this.vis = new Array();\n this.arr = new Array();\n this.brr = new Array();\n this.memo = new Array();\n this.done = new Array();\n this.adj_list = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.srr.push( \"\" );\n this.vis.push( 0 );\n this.arr.push( 0 );\n this.brr.push( 0 );\n this.adj_list.push( new Array() );\n }\n for( i = 0 ; i < this.lim2 ; i++ ) {\n this.memo.push( new Array() );\n this.done.push( new Array() );\n for( j = 0 ; j < this.lim2 ; j++ ) {\n this.memo[ i ].push( -1 );\n this.done[ i ].push( 0 );\n }\n }\n };\n\n this.init();\n}\n\nfunction InputReader() {\n var self = this ;\n this.allLines = new Array();\n this.currrentLineNumber = 0;\n this.currrentCharacterIndex = 0;\n this.callBackFunction = null ;\n this.parentContext = null ;\n\n this.readAllLines = function() {\n var singleLine;\n while( true ) {\n try {\n singleLine = readline();\n if( singleLine == null ) {\n break;\n }\n }\n catch( ex ) {\n break;\n }\n this.allLines.push( singleLine );\n }\n };\n \n this.readAllLinesFromRhino = function() {\n var brObj , line ;\n importPackage( java.io ) ;\n importPackage( java.lang ) ;\n brObj = new BufferedReader( new InputStreamReader( System[ 'in' ] ) ) ;\n this.allLines = [] ;\n while( true ) {\n line = brObj.readLine() ;\n if( line == null ) {\n break;\n }\n this.allLines.push( line ) ;\n }\n };\n \n this.readSingleLinesFromNodeJsJudgeServer = function( chunk ) {\n self.chunkData += chunk ;\n };\n\n this.readEndFromNodeJsJudgeServer = function() {\n self.parseRawData( self.chunkData ) ;\n self.parentContext.runCases() ;\n };\n \n this.readAllLinesFromNodeJsJudgeServer = function( parentContext ) {\n this.parentContext = parentContext ;\n process.stdin.resume() ;\n process.stdin.setEncoding( 'utf8' ) ;\n this.chunkData = '' ;\n process.stdin.on( 'data' , this.readSingleLinesFromNodeJsJudgeServer ) ;\n process.stdin.on( 'end' , this.readEndFromNodeJsJudgeServer ) ;\n };\n\n this.parseRawData = function( data ) {\n var len , i , currentString;\n len = data.length;\n currentString = \"\";\n this.allLines = [] ;\n for( i = 0 ; i < len ; i++ ) {\n if( data[ i ] == '\\r' ) {\n }\n else if( data[ i ] == '\\n' ) {\n this.allLines.push( currentString );\n currentString = \"\";\n }\n else {\n currentString += data[ i ];\n }\n }\n if( currentString != \"\" ) {\n this.allLines.push( currentString );\n }\n };\n\n this.readAllLinesFromFile = function( inputFileName ) {\n var currentDirectory , fsObj , inputFilePath , rawData;\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n inputFilePath = currentDirectory + \"\\\\\" + inputFileName;\n rawData = fsObj.readFileSync( inputFilePath , \"utf8\" );\n this.parseRawData( rawData );\n };\n\n this.next = function( flag ) {\n var len , i , startIdx , res , endIdx;\n if( flag == 0 ) {\n if( this.currrentCharacterIndex != 0 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n res = \"\";\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i ) ;\n }\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n return res;\n }\n while( true ) {\n if( this.currrentLineNumber >= this.allLines.length ) {\n throw new Error( \"No more tokens available!\" );\n }\n startIdx = -1;\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) != ' '.charCodeAt( 0 ) ) {\n startIdx = i;\n break;\n }\n }\n if( startIdx == -1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n continue;\n }\n res = \"\";\n endIdx = len - 1 ;\n for( i = startIdx ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) == ' '.charCodeAt( 0 ) ) {\n endIdx = i;\n break;\n }\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) >= 48 && this.allLines[ this.currrentLineNumber ].charCodeAt( i ) <= 57 ) {\n res += '' + ( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) - 48 ) ;\n }\n else {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i );\n }\n }\n this.currrentCharacterIndex = endIdx;\n if( endIdx == len - 1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n return res;\n }\n };\n\n this.nextInt = function() {\n return parseInt( this.next( 1 ) );\n };\n\n this.nextDouble = function() {\n return parseFloat( this.next( 1 ) );\n };\n\n this.nextString = function() {\n return this.next( 1 );\n };\n\n this.nextLine = function() {\n return this.next( 0 );\n };\n}\n\nfunction FileOutputHandler() {\n this.resultantStringArray = new Array();\n\n this.addNewLine = function( newString ) {\n this.resultantStringArray.push( newString );\n };\n\n this.clearPercase = function() {\n this.resultantStringArray = new Array();\n };\n\n this.flushOutOutputToFile = function( outputFileName ) {\n var i , sz , res , currentDirectory , fsObj , outputFilePath;\n res = \"\";\n sz = this.resultantStringArray.length;\n for( i = 0 ; i < sz ; i++ ) {\n if( i != 0 ) {\n res += \"\\n\";\n }\n res += this.resultantStringArray[ i ];\n }\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n outputFilePath = currentDirectory + \"\\\\\" + outputFileName;\n fsObj.writeFileSync( outputFilePath , res );\n this.clearPercase();\n };\n}\n\nfunction CodeExecutioner() {\n this.irObj = new InputReader();\n this.psObj = new ProblemSolver();\n this.fohObj = new FileOutputHandler();\n\n this.runCases = function() {\n if( this.psObj.HAS_TEST_CASES == true ) {\n testCases = this.irObj.nextInt();\n for( i = 0 ; i < testCases ; i++ ) {\n this.psObj.clearPerCase();\n this.psObj.getInput( this.irObj );\n this.psObj.solveCase();\n }\n }\n else {\n while( true ) {\n this.psObj.clearPerCase();\n hasMoreTestCases = this.psObj.getInput( this.irObj );\n if( hasMoreTestCases == false ) {\n break;\n }\n this.psObj.solveCase();\n }\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n this.fohObj.flushOutOutputToFile( this.psObj.OUTPUT_FILE_NAME );\n }\n };\n\n this.detectEnvironmentType = function() {\n var environmentType = null ;\n try {\n if( importPackage != null ) {\n environmentType = 'rhino' ;\n }\n }\n catch( ex1 ) {\n try {\n //for nodejs local server check\n if( __dirname != null && readline != null && typeof( readline ) != 'function' ) {\n environmentType = 'local-node-js' ;\n }\n }\n catch( ex2 ) {\n try {\n if( readline == null || typeof( readline ) != 'function' ) {\n environmentType = 'server-node-js' ;\n }\n else {\n try {\n if( Map != null ) {\n environmentType = 'spider-monkey' ;\n }\n else {\n environmentType = 'javascript-v8' ;\n }\n }\n catch( ex3 ) {\n environmentType = 'javascript-v8' ;\n }\n }\n }\n catch( ex3 ) {\n environmentType = 'server-node-js' ;\n }\n }\n }\n return environmentType ;\n };\n\n this.configureStreamsAndReadInput = function() {\n var testCases , i , hasMoreTestCases , isLocal , localContext , isNodeJsJudgeServer , environmentType ;\n isNodeJsJudgeServer = false ;\n environmentType = this.detectEnvironmentType() ;\n if( environmentType == 'local-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n localContext = this.fohObj;\n print = function() {\n localContext.addNewLine.apply( localContext , arguments );\n }\n }\n this.irObj.readAllLinesFromFile( this.psObj.INPUT_FILE_NAME );\n this.runCases() ;\n }\n else if( environmentType == 'server-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n this.irObj.readAllLinesFromNodeJsJudgeServer( this ) ;\n }\n else if( environmentType == 'javascript-v8' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n else if( environmentType == 'rhino' ) {\n this.irObj.readAllLinesFromRhino();\n this.runCases() ;\n }\n else if( environmentType == 'spider-monkey' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n };\n \n this.configureStreamsAndReadInput();\n}\n\nnew CodeExecutioner();\n", "lang": "JavaScript", "bug_code_uid": "940118f511980b53d3f7d59048dea202", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "114c1fe3377802c37fd5da9e487a8810", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8727885425442291, "equal_cnt": 10, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray().sort(function(a,b){return a - b;});\n var x1 = one[0];\n var x2 = one[1];\n var x3 = one[2];\n if((x3 - x1) % 2 == 0){\n var center = (x3 + x1) / 2;\n var output = Math.abs(center - x3);\n output += Math.abs(center - x2);\n output += Math.abs(center - x1);\n myout(output);\n }else{\n var L = Math.floor((x3 + x1) / 2);\n var R = Math.ceil((x3 + x1) / 2);\n var outputL = Math.abs(L - x3);\n outputL += Math.abs(L - x2);\n outputL += Math.abs(L - x1);\n var outputR = Math.abs(R - x3);\n outputR += Math.abs(R - x2);\n outputR += Math.abs(R - x1);\n myout(Math.min(outputR, outputL));\n }\n}\n", "lang": "Node.js", "bug_code_uid": "d53f1cc736bfb57dc75956a908501599", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "6eec2e06ea0da6941f792a25b7669dac", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8125727590221188, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const arr = d.split(' ').map(Number);\n const point = arr.reduce((acc, x) => acc + x, 0) / arr.length;\n let ans = 0;\n\n for (let i = 0; i < arr.length; i++) {\n ans += Math.abs(point - arr[i]);\n }\n\n console.log(ans);\n});\n", "lang": "Node.js", "bug_code_uid": "aebe2df47a30ddf9b31ba951f71e9b39", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "b530f6ba0121a5a64806776316ba1781", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.6438095238095238, "equal_cnt": 40, "replace_cnt": 16, "delete_cnt": 4, "insert_cnt": 20, "fix_ops_cnt": 40, "bug_source_code": "const state = {stdin:Buffer.alloc(0)}\nconst consume = chunk => state.stdin = Buffer.concat([state.stdin, chunk], state.stdin.length+chunk.length )\nconst commit = answer => process.stdout.write(answer)\n// \nconst main = args => {\n let data = parseInt(state.stdin.toString('utf8'))\n let solution = 'NO'\n if(data < 1 || data > 100) return null\n\n // divide the watermelon into two parts, \n // each of them weighing even number of kilos;\n \n for(let i = 1; i < data; i++){\n let partOne = data-i\n let partTwo = data-partOne\n if( partOne % 2 == 0 && partTwo % 2 == 0 ) {\n solution = 'YES'\n return commit(solution)\n }\n }\n}\n\nprocess.stdin\n .on('data', consume)\n .on('end', main)", "lang": "Node.js", "bug_code_uid": "1a254f1a893d8d68640b05319b223c97", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6c76519af3b23f18578190935bfc2525", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9752066115702479, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const state = { stdin: Buffer.alloc(0) };\nconst consume = (chunk) =>\n (state.stdin = Buffer.concat(\n [state.stdin, chunk],\n state.stdin.length + chunk.length\n ));\nconst commit = (answer) => process.stdout.write(answer);\n//\nconst main = (args) => {\n let data = parseInt(state.stdin.toString(\"utf8\"));\n // let solution = \"NO\";\n // num%2 === 0 ? num/parts+1 : num/parts\n return data % 2 === 0 && commit(\"YES\") || commit(\"NO\");\n // for (let i = 1; i < data; i++) {\n // if (i % 2 === 0 && (data - i) % 2 === 0) {\n // solution = \"YES\";\n // commit(solution);\n // return;\n // }\n // }\n // commit(solution);\n};\n\nprocess.stdin.on(\"data\", consume).on(\"end\", main);\n", "lang": "Node.js", "bug_code_uid": "ba4dbbaac93a23013bd7103d7bc407d0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6c76519af3b23f18578190935bfc2525", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9943342776203966, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n })\n \n // multi line input\n readline.on('line', line => {\n let number = parseInt(line)\n console.log(watermelon(number))\n})\n\n//it's a main function \nfunction watermelon(number) {\n return number > -1 && number%2 === 0 ? 'YES' : 'NO'\n\n}", "lang": "Node.js", "bug_code_uid": "1b8f2a166b9ccf9996ed0812367cc187", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "62377214ce3deb54f9ff8045e06d0f31", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.14939024390243902, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 9, "bug_source_code": "// let weight = process.argv[2];\nlet weight = input();\n\nif (weight >= 2 && weight % 2 == 0)\n\n{\n console.log('YES')\n}\nelse\n{\n console.log('NO')\n}\n", "lang": "Node.js", "bug_code_uid": "0f4e6732806be28d9018879334cc656a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a795a7794f20e9a91d95a0674bbc5d93", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9922394678492239, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "// let weight = process.argv[2];\n// let weight = input();\n\n// if (weight >= 2 && weight % 2 == 0)\n\n// {\n// console.log('YES')\n// }\n// else\n// {\n// console.log('NO')\n// }\n\n/************* KEEP BELOW CODE AS IT IS *********************/\n/**\n * This code has been taken from: https://codeforces.com/blog/entry/69610\n * I am not the owner of the readLine function below, understanding them require knowledge of basic NodeJS I/O and streams\n */\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n\n/****** BELOW HERE START WRITING YOUR CODE IN main() FUNCTION ***************************************/\n/**\n * Use \"readLine()\" function for input, which will return a string consisting the entire line, so accordingly split the string \n * when required.\n *\n * I am using console.log() to output\n */\nfunction main() {\n let weight = readLine();\n // let weight = process.argv[2];\n\n if (weight >= 2 && weight % 2 == 0)\n\n {\n console.log('YES')\n }\n else\n {\n console.log('NO')\n }\n\n // t = parseInt(t);\n // console.log(\"mai yahan aaya\")\n // while(t--) {\n // let line = readLine();\n // line = line.split(\" \");\n // let n = parseInt(line[0]);\n // let m = parseInt(line[1]);\n // if(n === 1) {\n // console.log(\"0\");\n // } else if (n === 2) {\n // console.log(m);\n // } else {\n // console.log(2*m);\n // }\n // }\n}", "lang": "Node.js", "bug_code_uid": "145a5e0cd4bb6e5223a227a79545bc77", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a795a7794f20e9a91d95a0674bbc5d93", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9735099337748344, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n if(lines[0] % 2 === 0 && ((lines[0]/2)%2) === 0) {\n console.log(\"YES\")\n } else {\n console.log(\"NO\");\n }\n})", "lang": "Node.js", "bug_code_uid": "4756ef29cd9b314db7007c9d77746d80", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a87893a936ed449233d9907d03100c4c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.8610567514677103, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\nreadline.question(\"\", (weight) => {\n if (weight % 2 == 0)\n console.log(\"YES\")\n else\n console.log(\"NO\")\n readline.close()\n})", "lang": "Node.js", "bug_code_uid": "b6d4ee51500e12d2a9c8348af9d98eac", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "52fcf69566fdbdf1699add6480210408", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9907063197026023, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "// Input\n'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readline() {\n return inputString[currentLine++];\n}\n \n//main\nfunction main() {\n var n = parseInt(readline());\n console.log(n%2 ? \"NO\" : \"YES\");\n}", "lang": "Node.js", "bug_code_uid": "1d1014a5b1c866693ef9033778e36a2a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7a1cfaab45346c997aa049e16bc6ef86", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.996969696969697, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n \nfunction solution(input){\n if(input === 2){\n return \"NO\"\n }\n return input % 2 === 0 ? \"YES\" : \"NO\"\n}\n \nrl.on('line', function(line){\n console.log(solution(line))\n})", "lang": "Node.js", "bug_code_uid": "1ef4cbfc6843d70faae513cb77b7f931", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "39dd8d35902151da1d2fedb284033b3e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.5259417199715707, "equal_cnt": 14, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 12, "fix_ops_cnt": 15, "bug_source_code": "const weight = readLine();\nif ((weight < 1 && weight > 100) || (weight % 2 !== 0)) return 'NO';\nlet evenWeights = [];\nfor (let i = 0; i < weight; i++) {\n if (i % 2 === 0 && i > 0) {\n evenWeights.push(i);\n }\n}\nfor (let i = 0; i < evenWeights.length; i++) {\n for (let j = 0; j < evenWeights.length; j++) {\n if (evenWeights[i] + evenWeights[j] === weight) return true;\n }\n}\n", "lang": "Node.js", "bug_code_uid": "5d5c2459b2c8eafe4f77364a3e51f869", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dd22294f40471e1fd2def5f01c5e9681", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9897109260166586, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction divideEvenWatermelon(weight) {\n if ((weight < 1 && weight > 100 ) || (weight % 2 !== 0)) return 'NO';\n if (weight === 2) return 'NO';\n let evenWeights = [];\n for (let i = 0; i < weight; i++) {\n if (i % 2 === 0 && i > 0) {\n evenWeights.push(i);\n }\n return 'NO';\n }\n for (let i = 0; i < evenWeights.length; i++) {\n for (let j = 0; j < evenWeights.length; j++) {\n if (evenWeights[i] + evenWeights[j] === weight) return 'YES';\n }\n }\n}\n\nfunction main() {\n const x = +(readline());\n console.log(divideEvenWatermelon(x));\n}\n", "lang": "Node.js", "bug_code_uid": "58f0df48b285a096e86eda04b7832497", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dd22294f40471e1fd2def5f01c5e9681", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.8396135265700483, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const x = readline();\n console.log(divideEvenWatermelon(x)\n}\nfunction divideEvenWatermelon(weight) {\n if ((weight < 1 && weight > 100 ) || (weight % 2 !== 0)) console.log('NO');\n let evenWeights = [];\n for (let i = 0; i < weight; i++) {\n if (i % 2 === 0 && i > 0) {\n evenWeights.push(i);\n }\n }\n for (let i = 0; i < evenWeights.length; i++) {\n for (let j = 0; j < evenWeights.length; j++) {\n if (evenWeights[i] + evenWeights[j] === weight) console.log('YES');\n }\n }\n}\n", "lang": "Node.js", "bug_code_uid": "fbfdbf647f168dad661b5d3c23be6e50", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dd22294f40471e1fd2def5f01c5e9681", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.3594936708860759, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "import prompt from \"prompt\";\n\nconst w = prompt();\nif (w <= 2 || w % 2 !== 0) {\n console.log(\"NO\", w);\n} else {\n console.log(\"YES\", w);\n}\n", "lang": "Node.js", "bug_code_uid": "d03b64e51f75d74f826dfcd52a1b356e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6da85605a9d5a044b8e7df07d3e6aa8c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9922178988326849, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "const readline = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nreadline.question('', (w) => {\n if (w != 2 || w % 2 !== 0) {\n console.log(\"NO\");\n } else {\n console.log(\"YES\");\n }\n readline.close();\n});\n", "lang": "Node.js", "bug_code_uid": "35840423ef23432b7051bc29783a7bfb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6da85605a9d5a044b8e7df07d3e6aa8c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.8631578947368421, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "process.stdin.on('data', input => (input > 2 && input % 2 == 0) ? 'YES' : 'NO');\n\n", "lang": "Node.js", "bug_code_uid": "559d292d238df7f38ce95e6475f3ef41", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dc323b2f59c431f470d8a7615346727b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.969385129920247, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "//↓見なくていいよ!ここから--------------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar obj;\nvar inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n myerr(\"-----start-----\");\n var start = new Date();\n Main();\n var end = new Date() - start;\n myerr(\"----- end -----\");\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n var returnObj = {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(!this.hasNext()){throw \"ArrayIndexOutOfBoundsException これ以上ないよ\";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}\n };\n return returnObj;\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//[no]要素の扱い。数値型\n//不明値、異常時:引数そのまま返す 1:数値へ変換\n//2:半角SPで分割 4:半角SPで分割し、数値配列へ\n//6:1文字で分割 7:1文字で分割し、数値配列へ\n//8:半角SPで結合 9:改行で結合 0:文字なしで結合\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//↑見なくていいよ!ここまで--------------------------------------------------\nfunction Main(){\n var w = nextInt();\n if(w % 2 == 0){\n myout(\"YES\");\n }else{\n myout(\"NO\");\n }\n}\n", "lang": "Node.js", "bug_code_uid": "501c11b14c54a97fe0ae63de60ab6be6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0eb06f82065cf442924fef76234a30fa", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.5094905094905094, "equal_cnt": 28, "replace_cnt": 15, "delete_cnt": 6, "insert_cnt": 8, "fix_ops_cnt": 29, "bug_source_code": "num = process.stdin\nconsole.log(num)\n\n// const c=require(\"child_process\")\n// c.spawn('dir').stdout.on('data', (data)=>(console.log(data)))\n// process.exit()\nfunction test(t) {\n if ( t<1 || t>100 ) {\n console.log(\"input error\")\n process.exit()\n }\n}\n\ntest(num)\n\nfor(let i = 1; i < num; i++) {\n if (i%2 == 0) {\n let m = num-i\n if (m%2 == 0) {\n console.log(\"YES\");\n process.exit();\n }\n\n }\n}\nconsole.log(\"NO\")\n", "lang": "Node.js", "bug_code_uid": "5f61b093336682be68e5caf7df06dd77", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a27b7aee24c69d514e5e23d36dfbcf70", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.5090180360721442, "equal_cnt": 27, "replace_cnt": 14, "delete_cnt": 6, "insert_cnt": 8, "fix_ops_cnt": 28, "bug_source_code": "num = input()\n// console.log(num)\n\n// const c=require(\"child_process\")\n// c.spawn('dir').stdout.on('data', (data)=>(console.log(data)))\n// process.exit()\nfunction test(t) {\n if ( t<1 || t>100 ) {\n console.log(\"input error\")\n process.exit()\n }\n}\n\ntest(num)\n\nfor(let i = 1; i < num; i++) {\n if (i%2 == 0) {\n let m = num-i\n if (m%2 == 0) {\n console.log(\"YES\");\n process.exit();\n }\n\n }\n}\nconsole.log(\"NO\")\n", "lang": "Node.js", "bug_code_uid": "12ce98ce4633e01dcbd31d069971a35e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a27b7aee24c69d514e5e23d36dfbcf70", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9990281827016521, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "let readline = require('readline');\nlet rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout,\n\tterminal: false\n});\n\nlet input = [];\nrl.on('line', function(line) {\n\tinput.push(line);\n\tif (input.length === 1) {\n\t\twaterMelon(parseInt(input[0]));\n\t\trl.close();\n\t}\n});\n\nlet waterMelon = (input) => {\n\tlet start = 1;\n\tlet end = input - 1;\n\tlet result = 'NO';\n\tfor (let i = start; i < end; i++) {\n\t\tif (i % 2 === 0 && end % 2 === 0) {\n\t\t\tresult = 'YES';\n\t\t}\n\t\tend--;\n\t}\n\tconsole.log(result);\n};\n", "lang": "Node.js", "bug_code_uid": "3d473ea5b6b05a0287d38afaa64adf47", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "133d72ab527f15dcf41866468c15c17c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.759493670886076, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "process.stdin.on('data', function(chunk){\n console.log(Number(chunk) % 2 === 0 ? 'YES' : 'NO');\n});", "lang": "Node.js", "bug_code_uid": "2b4665246f8e8c0a1a7d895f449b2a57", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d73ec11d2166605a3babc49ea89b42ea", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9086892488954345, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\n\n// var getline;\nvar input = \"\";\nvar read;\nvar writeline = (x) => process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\n\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n // input = input.split(/\\r?\\n/);\n // getline = () => input.shift();\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n\nfunction main() {\n let l;\n while ((l = read()) !== undefined) {\n let x = parseInt(l);\n writeline(x % 2 === 0 ? 'YES' : 'NO');\n }\n return 0;\n}", "lang": "Node.js", "bug_code_uid": "3ddc45ced2edf4ec33cd5c430eaa9975", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3702a608c50d926d3817118b12cebf99", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9349112426035503, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "var stdin = \"\";\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"ascii\");\nprocess.stdin.on(\"data\", function(data) {\n stdin += data;\n});\nprocess.stdin.on(\"end\", function() {\n main(stdin);\n});\n\nconst debug = 0;\nvar log = console.log;\nvar dbg = debug ? console.log : _ => {};\n\n/////////////// ignore above this line ////////////////////\n\nfunction main(stdin) {\n log(stdin % 2 ? \"NO\" : \"YES\");\n}\n", "lang": "Node.js", "bug_code_uid": "bd88eab208e175a44892fab9a5cdce0c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "91a7e068e43662e62e8af251c23ddce2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8542914171656687, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "let i = '';\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', () => {\n const { EOL, } = require('os');\n const weight = i.split(EOL);\n const res = (val) => val % 2 === 0 ? 'YES' : 'NO';\n \n console.log(res(weight));\n});", "lang": "Node.js", "bug_code_uid": "5fe59e62102f582587af2aa2488c9962", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "798902c545af6b15bf1ce9bf67566039", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8787185354691075, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 8, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nprocess.stdin.on('data', inputStdin => {\n if (inputStdin % 2 === 0) {\n console.log('YES');\n } else console.log('NO');\n});", "lang": "Node.js", "bug_code_uid": "8a5c5518005cfbdd36ddf9b508d21830", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a0c22516a4bfb46ca2e7c58ae2a86ce0", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.8864628820960698, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const r = require('readline');\nconst rc = r.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrc.on('line', function(i){ \n console.log((i % 2 === 0) ? 'YES' : 'NO')\n})", "lang": "Node.js", "bug_code_uid": "14bfda68343ae7c2d3088849bc7e0a0f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3eaedb53417638a62c8b9e6232ab6cec", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9976689976689976, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction printResult(x) {\n process.stdout.write(x);\n}\n\nfunction main() {\n const arrPoints = new Array(8);\n for (let i = 0; i < 8; i++) {\n let rl = readLine().split(' ').map(Number);\n arrPoints[i] = new Point(rl[0], rl[1]);\n }\n\n eightPointSet(arrPoints);\n}\n\nfunction Point(x, y)\n{\n this.x = x;\n this.y = y;\n}\n\nconst comparePoints = (a, b) => {\n if (a.x < b.x || (a.x === b.x && a.y < b.y)) {\n return -1;\n }\n if (a.x > b.x || (a.x === b.x && a.y > b.y)) {\n return 1;\n }\n return 0;\n}\n\n/**\n * eightPointSet\n *\n * 2 4 7\n * 1 6\n * 0 3 5\n *\n * => Equal\n * x0 = x0 = x2\n * x3 = x4\n * x5 = x6 = x7\n * y0 = y3 = y5\n * y1 = y6\n * y2 = y4 = y7\n *\n * => Not equal\n * x0 != x3\n * x3 != x5\n * y0 != y1\n * y1 != y2\n */\nconst eightPointSet = (a) => {\n a.sort(comparePoints);\n if (a[0].x === a[1].x && a[1].x === a[2].x\n && a[3].x === a[4].x\n && a[5].x === a[6].x && a[6].x === a[7].x\n && a[0].y === a[3].y && a[3].y === a[5].y\n && a[1].y === a[6].y\n && a[2].y === a[4].y && a[4].y === a[7].y\n\n && a[0].x === a[3].x\n && a[3].x === a[5].x\n && a[0].y === a[1].y\n && a[1].y === a[2].y) {\n printResult('respectable');\n } else {\n printResult('ugly');\n }\n};", "lang": "Node.js", "bug_code_uid": "16f3c5ea3ebb000bfdd6712f018fdf72", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "d9dd83a757472f56cf2ea1391a354db8", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.6328471781864299, "equal_cnt": 14, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "function findGreeting( input ) {\n const greeting = 'hello';\n\n if ( input.length < greeting.length ) {\n return 'NO';\n }\n\n const inputArr = Array.from( input );\n const indices = [];\n\n for ( let i = 0; i < greeting.length; i++ ) {\n const char = greeting[ i ];\n\n const index = inputArr.findIndex( ( letter ) => letter === char );\n\n if ( index === -1 ) {\n return 'NO';\n }\n\n indices.push( index );\n\n if ( i !== 0 && indices[ i - 1 ] > indices[ i ] ) {\n return 'NO';\n }\n\n inputArr[ index ] = ',';\n }\n\n if ( !indices.length ) {\n return 'NO';\n }\n\n let asc = true;\n\n indices.reduce( ( acc, cur ) => {\n if ( acc > cur ) {\n asc = false;\n }\n\n return cur;\n } );\n\n return asc ? 'YES' : 'NO';\n}\n\n\n\nconst { EOL } = require('os');\n\nlet i = '';\n\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const lines = i.split(EOL)\n const res = findGreeting(lines[0])\n console.log(res);\n})", "lang": "Node.js", "bug_code_uid": "0b2099d5751f323ea91d823ddad04644", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "3457a2509c47205539a5fae3d866eb45", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9933481152993349, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "function findGreeting(str) {\n const word = 'hello';\n let i = 0;\n for(const l of str) {\n if(l.length > i && l === word[i]) {\n i++;\n }\n }\n return i === word.length ? 'YES' : 'NO';\n}\n \nconst { EOL } = require('os');\n \nlet i = '';\n \nprocess.stdin.on('data', c => i += c)\n process.stdin.on('end', () => {\n const lines = i.split(EOL)\n const res = findGreeting(lines[0])\n console.log(res);\n })\n", "lang": "Node.js", "bug_code_uid": "071a6e44d4abbd72493c3d8e6d9afc2b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "3457a2509c47205539a5fae3d866eb45", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.7670781893004115, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 8, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nreadline.on('line', hay => {\n const needle = 'hello';\n\n let needleP = 0;\n let hayP = 0;\n\n while (hayP < hay.length) {\n if (hay[hayP] === needle[needleP]) {\n needleP++;\n if (needleP === needle.length - 1) {\n break;\n }\n } else if (hay[hayP] === needle[needleP - 1]) {\n }\n hayP++;\n }\n\n console.log(needleP === needle.length - 1 ? 'YES' : 'NO');\n});", "lang": "Node.js", "bug_code_uid": "de50ffbf464121365f310b11b9ad45af", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "109ce543c1a7e14e53d6d1b1d87f8b7a", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.5247706422018349, "equal_cnt": 12, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 9, "fix_ops_cnt": 12, "bug_source_code": "readline.on('line', hay => {\n const needle = 'hello';\n\n let needleP = 0;\n let hayP = 0;\n\n while (hayP < hay.length) {\n if (hay[hayP] === needle[needleP] || hay[hayP] === needle[needleP - 1]) {\n needleP++;\n if (needleP === needle.length - 1) {\n break;\n }\n }\n hayP++;\n }\n\n console.log(needleP === needle.length - 1 ? 'YES' : 'NO');\n});", "lang": "Node.js", "bug_code_uid": "d063f4d460676e72fea6c7e1aa1e3541", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "109ce543c1a7e14e53d6d1b1d87f8b7a", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9266802443991853, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString = '';\nlet currentLine = 0;\n\nfunction readLine() {\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData=> {\n standardInputString += rawData;\n})\n\nprocess.stdin.on('end', _ => {\n standardInputString = standardInputString.trim().split('\\n').map(line=> {\n return line.trim();\n })\n main();\n})\n\nfunction main() {\n let message = Array.from(readLine());\n const word = Array.from('hello');\n let counter = 0;\n if(!message.join(\"\").includes('h')) {\n console.log('NO');\n return;\n }\n for(let i = message.indexOf('h'); i < message.length; i++) {\n if(message[i] === word[counter]) {\n if((word.length - 1) === counter) {\n console.log(\"YES\");\n break;\n }\n counter++;\n } else {\n if(message[i] != word[counter - 1]) {\n console.log(\"NO\");\n break;\n }\n }\n }\n}", "lang": "Node.js", "bug_code_uid": "0278d98a3af920124b43fc8be2f13469", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "a349db97b236965fbbeadd850f19d251", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.83765752409192, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let word = readLine();\n if (word.includes('hello')) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n", "lang": "Node.js", "bug_code_uid": "d5006526baa1b5b326030797e2aff7f4", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "307eeaadd801c8ab3f63efba966baa4d", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9597701149425287, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nprocess.stdin.on('data', (input) => {\n process.stdout.write(input.match(/h+e+ll+o+/g) ? 'YES' : 'NO');\n});", "lang": "Node.js", "bug_code_uid": "dd23ee790945318bc80ab45a813a4717", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "f5079c6186301c8edd9e1dc9c56a28da", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7384615384615385, "equal_cnt": 10, "replace_cnt": 1, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nprocess.stdin.on('data', (input) => {\n process.stdout.write(\n Array.from(input)\n .filter((c) => ['h', 'e', 'l', 'o'].some(c))\n .join('')\n .match(/h+e+ll+o+/g)\n ? 'YES'\n : 'NO'\n );\n});", "lang": "Node.js", "bug_code_uid": "c0a669372b286ef4f6ad5f7cf6ed6f69", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "f5079c6186301c8edd9e1dc9c56a28da", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9280868385345997, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on('line', line => {\n line.split(' ').reduce((a, b) => {\n a > b ? console.log(`${b} ${Math.floor((a - b) / 2)}`) : console.log(`${a} ${Math.floor((b - a) / 2)}`);\n });\n}).on('close', () => {\n process.exit(0);\n});\n", "lang": "Node.js", "bug_code_uid": "28722fb68f536740f8e035002b34db85", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "a908e081aab6a68a2e81f72d21634293", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9743062692702981, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "function main() {\n // write code here:\n var arr = stdin[0].split(' ').map(Number);\n var fashion = Math.min(...arr);\n var temp = Math.max(...arr) - fashion;\n var pair = 0;\n if (temp % 2 === 0) {\n pair = temp / 2;\n }\n console.log(fashion + ' ' + pair);\n}\n\nconst readline = require('readline');\nconst rl = readline.createInterface({input: process.stdin});\nvar stdin = [];\nrl.on('line', function (line) {\n stdin.push(line);\n});\nrl.on('close', main);", "lang": "Node.js", "bug_code_uid": "3da28b94e501fdac39725a4cbc289639", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "600bb604cc36363ff678e3f2ade7c2b7", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9786950732356857, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nlet input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n const all = input[0].split(' ')\n let red = parseInt(all[0], 10)\n let blue = parseInt(all[1], 10)\n let multi = 0\n if (red > blue) {\n multi = blue\n red -= blue\n blue = 0\n } else if (red < blue) {\n multi = red\n blue -= red\n red = 0\n } else if (red === blue) {\n multi = red\n red = 0\n blue = 0\n }\n if (red > 0)\n multi += ` ${Math.floor(red / 2)}`\n else if (blue > 0)\n multi += ` ${Math.floor(blue / 2)}`\n console.log(multi)\n})", "lang": "Node.js", "bug_code_uid": "68b1462a6bab2a931689bcb6e248b515", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "f226c97bf8b0943047d9a54d17f19931", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.8359550561797753, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n let vasayInput = lines[0].split(\" \").map( element => {\n return parseInt(element)\n })\n let redSocksCount = vasayInput[0]\n let blueSocksCount = vasayInput[1]\n distributeSocks(redSocksCount, blueSocksCount)\n})\n\nfunction distributeSocks(redSocks, blueSocks) {\n let hipsterDaySocksCount = Math.min(redSocks, blueSocks)\n\n let remainingBlueSocks = blueSocks - hipsterDaySocksCount\n let remainingRedSocks = redSocks - hipsterDaySocksCount\n\n let normalDaysSocks = 0\n\n if (remainingBlueSocks % 2 === 0) {\n normalDaysSocks += remainingBlueSocks / 2\n }\n\n if (remainingRedSocks % 2 === 0) {\n normalDaysSocks += remainingRedSocks / 2\n }\n\n console.log(hipsterDaySocksCount + \" \" + normalDaysSocks)\n}", "lang": "Node.js", "bug_code_uid": "adeb2bbf2709c7e64374b5f04edf301e", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "b449972116fd4d878d645d5f8db8502f", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9987937273823885, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const mainFunction = (lines) => {\n let arr = lines[1].split(\" \").map(Number).sort((a, b) => a - b);\n arr = [...new Set(arr)]\n //console.log(arr)\n for(let i = 1; i < arr.length - 1; i++) {\n if( Math.abs(arr[i-1]-arr[i]) == Math.abs(arr[i+1]-arr[i]) && Math.abs(arr[i-1]-arr[i]) == 1 \n && [...new Set([arr[i-1], arr[i], arr[i+1]])].length == 3){\n console.log([arr[i-1], arr[i], arr[i+1]])\n console.log(\"YES\"); return 0;\n }\n }\n console.log(\"NO\");\n}\n\nconst { EOL } = require('os')\nconst fs = require(\"fs\");\nif (__filename.substr(9, 4) != \"azer\") {\n let yourInput = ''\n process.stdin.on('data', i => yourInput += i)\n process.stdin.on('end', () => mainFunction(yourInput.split(EOL)))\n} else {\n mainFunction(fs.readFileSync('input.txt', 'utf8').split(EOL))\n}", "lang": "Node.js", "bug_code_uid": "374af239bab6254dfec9b383340469f6", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "5956d1f3fd34f294a406a952fb5d4d24", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9975669099756691, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const input = [];\n\nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n \nRL.on('line', line => input.push(line));\n\nRL.on('close', () => {\n const [n, k, l, c, d, p, nl, np] = input[0].split(' ').map(x => parseInt(x));\n let botl = parseInt((k * l) / nl);\n let lim = d; let s = parseInt(p / np);\n\n console.log( parseInt(Math.min(botl, lim, s) / n) );\n});", "lang": "Node.js", "bug_code_uid": "52dc85e89cdaef2ba175ab4871863186", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "5f4c36241828e984278ee4ee7fddcdf4", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9924242424242424, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "'use strict';\n\nconst fs = require('fs');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\nmain();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction solve(n) {\n return n/2%2===0 ? `YES`: `NO`;\n}\n\nfunction main() {\n\n const nk = readLine().split(' ');\n\n const n = parseInt(nk[0], 10);\n\n let result = solve(n);\n console.log(result);\n}\n", "lang": "Node.js", "bug_code_uid": "582ead827e73d38466f14e951e4dd963", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "75f8da8c7c8f94cd690c3fe99f19fdc8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.8245614035087719, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "const readline = require(\"readline\");\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nrl.question(\"What is weight of a watermelon? \", (value) => {\n console.log(getAnswer(+value));\n rl.close();\n});\n\nfunction getAnswer(weight) {\n if (weight < 4 || weight > 100 || weight % 2 !== 0) {\n return \"NO\";\n }\n\n return \"YES\";\n}\n", "lang": "Node.js", "bug_code_uid": "4298f8a69be9b9974c45354be3a7e521", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2ffeadc77128c4ca6d2d679ef5c9c5cd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9425, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n \nreadline.on('line', line => {\n readline.close();\n\n const number = line.split(\" \")[0];\n \n if (number % 2 === 0) {\n print('YES');\n } else {\n print('NO');\n }\n});", "lang": "Node.js", "bug_code_uid": "8620eff81d418756cef9ba4e2cfec0b5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2eebf53325aee46adac17182266e94c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9827586206896551, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n \nreadline.on('line', line => {\n readline.close();\n\n const number = line.split(\" \")[0];\n \n if (number % 2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n});", "lang": "Node.js", "bug_code_uid": "269a6ca5a07bc542c220aab49b60232f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2eebf53325aee46adac17182266e94c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9832635983263598, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function(line){\n console.log(+line % 2 === 0 && line !== 0 ? \"YES\" : \"NO\");\n})", "lang": "Node.js", "bug_code_uid": "f5f08e42e993fe81c496bf7a4106368b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8338ecfa124b4a61280729836be580a1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9884297520661157, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n rl.question(\"\",function (x) {\n \n \n\n\n if (x%2 === 0 || x===2 ) {\n console.log('YES');\n \n }else {\n console.log('NO')\n }\n \n })", "lang": "Node.js", "bug_code_uid": "2282a9cef44d179764ff2896d3991918", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3f879ee4a908553cd69305d09c873f86", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9740932642487047, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (answer) => {\n if (answer % 2 === 0) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n rl.close()\n})", "lang": "Node.js", "bug_code_uid": "9957b318040ab5359c8a724c26822d43", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b39530e3134f87b2d99c52c289c41d10", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9717682020802377, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\nconst z=2 ;\nconst x=1;\nconst c=100\nconst rl = readline.createInterface({\n input: process.stdin\n});\nrl.on('line', (input) => {\n if (input.trim()>=x && input.trim()<=c){\n if (input.trim() % z != 0 )\n {\n console.log(\"NO\");\n }\n else\n {\n console.log(\"YES\");\n }\n}\n rl.close();\n});", "lang": "Node.js", "bug_code_uid": "f5aef7ead21863b96e3d8468b69a9bb6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "657559bca2246ca4e4270c2398f69af3", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.060862214708368556, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nvar arr = \"\";\nprocess.stdin.on('data', function(chunk) {\n arr += chunk;\n});\nprocess.stdin.on('end', function() {\n arr = arr.split(\"\\n\");\n var n = parseInt(arr.shift()); // in order ot get no of test cases\n if(n%2===0 && n!==2)\n console.log('YES');\n else\n console.log('NO');\n }\n \n});", "lang": "Node.js", "bug_code_uid": "4669bae24fb06dc390f7976028a0bf60", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b08878d5d6b536d3330941ad612a5dcf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.05725806451612903, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nvar arr = \"\";\nprocess.stdin.on('data', function(chunk) {\n arr += chunk;\n});\nprocess.stdin.on('end', function() {\n arr = arr.split(\"\\n\");\n var n = parseInt(arr.shift()); // in order ot get no of test cases\n for(let i=0;i {\n if (w <= 2 || w % 2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n \n rl.close();\n});", "lang": "Node.js", "bug_code_uid": "03b7465e4aa642e0e533043b9966318d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d92f472c3f0b538f30847b95bb7d6aa9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.22432859399684044, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "var w = readline();\nif(w-2)%2 != 0) console.log(\"YES\")\nelse console.log(\"NO\");", "lang": "Node.js", "bug_code_uid": "cb56b528140ef5929e11a9b7af4f07bf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "61234b9bbf7797b2b2fd44b2f215d77f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.22362204724409449, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 7, "bug_source_code": "var w = readline();\nif((w-2)%2 != 1) console.log(\"YES\");\nelse console.log(\"NO\");", "lang": "Node.js", "bug_code_uid": "48d1c0764c6d8c909fe14670972d3b5a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "61234b9bbf7797b2b2fd44b2f215d77f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9890710382513661, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let w = readline();\n if(w > 1 && (w-2) %2 == 0)console.log(\"YES\");\n else console.log(\"NO\");\n}\n", "lang": "Node.js", "bug_code_uid": "75c2c68f0820c40e275b2640143b1073", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "61234b9bbf7797b2b2fd44b2f215d77f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9847405900305188, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "const solve = (w) => {\n if (w % 2 != 0) return false;\n if ((w >> 1) % 2 != 0) return false;\n return true;\n};\n\nconst main = () => {\n const readline = require('readline');\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n let input;\n rl.on('line', (line) => {\n input = Number(line);\n });\n\n rl.on('close', () => {\n let res = solve(input) ? 'YES' : 'NO';\n console.log(res);\n });\n\n};\n\nmain()", "lang": "Node.js", "bug_code_uid": "733f28d600deffd0560ad7955927a61e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "73b6521b81b18f9778a063e8dfa23eba", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9672578444747613, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "// Generated by CoffeeScript 2.5.1\nvar lines, mainAux, print, readline, rl, rli, write;\n\nrl = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nprint = console.log;\n\nwrite = function(...args) {\n return process.stdout.write(args.join(' '));\n};\n\nlines = [];\n\nrl.on('line', function(line) {\n return lines.push(line);\n});\n\nrl.on('close', main);\n\nrli = 0;\n\nreadline = function() {\n return lines[rli++];\n};\n\nmainAux = function() {\n var args, weight;\n args = readline();\n weight = args;\n if ((weight - 2) % 2 === 0) {\n return print('YES');\n } else {\n return print('NO');\n }\n};\n\nfunction main() {\n return mainAux();\n};\n\n//# sourceMappingURL=watermelon.js.map\n", "lang": "Node.js", "bug_code_uid": "6adcad9c66e7bd35e4c9b8907025591d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ef81487a2c8a7357368780888ce7573f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.8451757666417352, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "// Generated by CoffeeScript 2.5.1\nvar lines, mainAux, print, readline, rl, rli, write;\n\nrl = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nprint = console.log;\n\nwrite = function(...args) {\n return process.stdout.write(args.join(' '));\n};\n\nlines = [];\n\nrl.on('line', line(function() {\n return lines.push(line);\n}));\n\nrl.on('close', main);\n\nrli = 0;\n\nreadline = function() {\n return lines[rli++];\n};\n\nmainAux = function() {\n return print('YES');\n};\n\nfunction main() {\n return mainAux();\n};\n\n//# sourceMappingURL=watermelon.js.map\n", "lang": "Node.js", "bug_code_uid": "fc7239bd4eecb9cc960600945935d7e3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ef81487a2c8a7357368780888ce7573f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9401561144839549, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString\n .trim()\n .split('\\n')\n .map(string => {\n return string.trim();\n });\n\n process.stdout.write(main(inputString));\n process.exit();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nconst main = ([inputString]) => {\n return inputString % 2 === 0 ? 'YES' : 'NO';\n};\n", "lang": "Node.js", "bug_code_uid": "d8f43d52ed220fcc87dfd642bb231d3d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6e7cc1c89f953614ade0a31f869ac26e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.6652173913043479, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.on('line', (input) => {\n console.log(\"YES\" + input);\n});\nrl.close();\n\n", "lang": "Node.js", "bug_code_uid": "327c56b37e3e08547a50ded6d360106a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1646d6b0c7f249f5c99360761a13fd0c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.35443037974683544, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "var line = readline().split(' ')\nvar number = parseInt(line)\nif (number % 2 === 0 && number > 2) {\n\tprint(\"YES\")\n} else {\n\tprint(\"NO\")\n}\n\n", "lang": "Node.js", "bug_code_uid": "53a58ad8f75396ca6c1ee58ad818dba9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1646d6b0c7f249f5c99360761a13fd0c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9310810810810811, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", function() {\n inputString = inputString\n .replace(/\\s*$/, \"\")\n .split(\"\\n\")\n .map(str => str.replace(/\\s*$/, \"\"));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const firstLine = readLine();\n const weight = parseInt(firstLine, 10);\n // const a = readLine().split(' ').map(aTemp => parseInt(aTemp, 10));\n\n console.log(watermelon(weight));\n}\n\nfunction watermelon(weight) {\n return weight % 2 === 0 ? \"YES\" : \"NO\";\n}\n", "lang": "Node.js", "bug_code_uid": "55d4e5b1ae06fa0ef15d4fe8efadda9a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "24cdc587cef86c2a61e017b027190be9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.758220502901354, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin[],\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function(line){\n console.log(line);\n})", "lang": "Node.js", "bug_code_uid": "eee7bd3791cf2f494b22b95c19d74705", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1df6ccc124efcbdf532074e9e82f5159", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.7611650485436893, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function(line){\n console.log(line);\n})", "lang": "Node.js", "bug_code_uid": "cde19474238709f3ab35a40514d9ce7b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1df6ccc124efcbdf532074e9e82f5159", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9453125, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.question('Give input', (input) => {\n if (input%2 === 0 && input>= 4) {console.log (\"YES\")}\n else console.log (\"NO\")\n}\n\n\n)\n\n", "lang": "Node.js", "bug_code_uid": "be7555e3cd7d60cdf93405d49d75e51c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9b071f5e420861a0798e0ef327751f1f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9898717083051992, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n\n// Write your code here\nfunction nameLookUp(arr) {\n let nLines = arr.split('\\n');\n let nWeight = nLines[0];\n let quotient = nWeight % 2 === 0 ? 'yes' : 'no';\n return quotient;\n\n}", "lang": "Node.js", "bug_code_uid": "f7f84ef7170854612fd5df03cbc68ac2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e03f48de516f758b2ee0cf3f679d18d5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9992156862745099, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\n \n \nfunction main() {\n const parameterVariable = readLine();\n const line2 = readLine();\n \n if(parameterVariable >= 2 && parameterVariable % 2 === 0) console.log('YES')\n else console.log('NO')\n \n}", "lang": "Node.js", "bug_code_uid": "c451bc9b31ba6fcac5933b7f31e31fd5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b3013681203336ce4055f7a9a03c5855", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.96045197740113, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "process.stdin.on('data', (n) => \n process.stdout.write(n < 4 && n % 2? 'No' : 'YES')\n);", "lang": "Node.js", "bug_code_uid": "13f608504b86ec3e631a10704ffd1359", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2eda546db38d001d6c9e0ea17356394", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9872611464968153, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function (line) {\n console.log(dividable(parseInt(line)) ? 'YES' : 'NO');\n rl.close()\n})\n\n\nfunction dividable(w) {\n return (w % 2) === 0;\n // let part = 0;\n // while (part <= w) {\n // if (((w - part) % 2) === 0) return true;\n // part += 2;\n // }\n // return false;\n}", "lang": "Node.js", "bug_code_uid": "fb823759baafd300b50d36cc55315366", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "29147acd55cc0ad731ea364bf30f6b00", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9986431478968792, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// single line input\n// readline.on('line', line => {\n// readline.close(), console.log(line)}\n// });\n\n// multi line input\nreadline.on('line', line => {\n let val = parseFloat(line);\n console.log( val%2 ==0 && val >=2? 'YES': 'NO');;\n readline.close();\n});\n", "lang": "Node.js", "bug_code_uid": "ebb4873d2c21ac37ac29f18292cb012e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7c4b4dfbf389f386c67f2c8286e70014", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9797713280562885, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": " /*\nOwn input stream*/\nconst readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n terminal: false\n});\n\nprocess.stdin.setEncoding('utf8');\nlet arr=[]\nrl.on('line', (input) => {\n if(input!='') arr.push(input)\n \n}).on('close', () => {\n console.log(minfill(arr))\n process.exit(0);\n \n});\nfunction minfill(arr){\n\n \n if ((arr/2)%2==0){\n return \"YES\"\n \n }\n else if(arr%2!=0){\n return \"NO\"\n } \n else{\n return \"YES\"\n \n }\n \n \n}\n\n\nmodule.exports=(minfill)\n\n", "lang": "Node.js", "bug_code_uid": "6aaf2cfe659ec0715fa0b69418a06615", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5adff11f21a066024bffcb6f570a347d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7401574803149606, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": " /*\nOwn input stream*/\nconst readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n terminal: false\n});\n\nprocess.stdin.setEncoding('utf8');\nlet arr=[]\nrl.on('line', (input) => {\n if(input!=='') arr.push(input);\n \n}).on('close', () => {\n console.log(minfill(arr))\n process.exit(0);\n \n});\nfunction minfill(arr){\nreturn (arr>=2&&arr%2==0?\"YES\":\"NO\")\n \n \n}\n\n\nmodule.exports=(minfill)\n\n", "lang": "Node.js", "bug_code_uid": "b43eedcb031fd3e5333d3079dcc59df7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5adff11f21a066024bffcb6f570a347d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7882111034955449, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"ascii\");\n_input = \"\";\nprocess.stdin.on(\"data\", function (input) {\n _input += input;\n});\n\nprocess.stdin.on(\"end\", function () {\n processData(_input);\n});\n\nfunction processData(input) {\n const values = input.split('\\n')\n if (values && values.length > 0 && values[0]%2 === 0) {\n const temp = Math.floor(values[0]/2)\n if (temp%2 === 0) {\n console.log(\"YES\")\n\n } else {\n console.log(\"NO\")\n\n }\n\n } else {\n console.log(\"NO\")\n }\n}", "lang": "Node.js", "bug_code_uid": "9880959e03d6e4ca9151dba43b2db444", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0eee4ee558532648f26300bd39c0733e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7443181818181818, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"ascii\");\n_input = \"\";\nprocess.stdin.on(\"data\", function (input) {\n _input += input;\n});\n\nprocess.stdin.on(\"end\", function () {\n processData(_input);\n});\n\nfunction processData(input) {\n const values = input.split('\\n')\n if (values && values.length > 0 && values[0]%2 === 0) {\n const temp = Math.floor(values[0]/2)\n if (temp%2 === 0) {\n console.log(\"YES\")\n\n } else {\n console.log(\"NO\")\n\n }\n", "lang": "Node.js", "bug_code_uid": "d10dfd18a1d73613d4a57a5091a4bd69", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0eee4ee558532648f26300bd39c0733e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.1867881548974943, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.on('line', (input) => console.log(`${input}`));\n/*\nlet n = readline();\nconsole.log(1);\n*/\nfunction main(){\n let a = readline();\n if(a > 2 && a % 2 === 0) console.log(\"YES\");\n else console.log(\"NO\")\n return 0;\n}", "lang": "Node.js", "bug_code_uid": "fa05a991822b160e8e8fc27d265decfd", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c445078a1e941ce87de7dfb85d9d02d6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.5862068965517241, "equal_cnt": 12, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nlet input= '', readline, cout;\nprocess.stdin.on('data', (chunk) => input+=chunk);\nprocess.stdin.on('end', () => {\n input = input.split('\\n');\n cout = (data) => process.stdout.write(data+'\\n');\n var inputLineIndex = 0;\n readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};\n process.exit(main() || 0);\n});\n/*\nlet n = readline();\noutput(1);\n*/\nfunction main(){\n let a = readline();\n if(a > 2 && a % 2 === 0) output(\"YES\");\n else output(\"NO\")\n return 0;\n}", "lang": "Node.js", "bug_code_uid": "b95bd3118e724e4a1a2728c81bea7e65", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c445078a1e941ce87de7dfb85d9d02d6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9846678023850085, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on(\"line\",(name) => {\n const n = parseInt(name)\n \n if(n % 2 == 0 ){\n console.log(\"YES\");\n\n }else{\n console.log(\"NO\")\n }\n process.exit()\n});\n", "lang": "Node.js", "bug_code_uid": "d6a03e3bb7bd0302333246cebff951af", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f82d948ee90259c6ddc272fe77b64807", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9909142532651902, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "var read = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar obj;\nvar inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n myerr(\"-----start-----\");\n var start = new Date();\n Main();\n var end = new Date() - start;\n myerr(\"----- end -----\");\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n var returnObj = {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(!this.hasNext()){throw \"ArrayIndexOutOfBoundsException これ以上ないよ\";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}\n };\n return returnObj;\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n\nfunction Main() {\n var t = nextInt();\n if (t % 2 === 0) {\n if (t / 2 === 1) {\n console.log(\"NO\");\n }\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}", "lang": "Node.js", "bug_code_uid": "f959522341d803df5d925ccb5b9e08f2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "60cd5a9bc9bf8ae7de6e31459b129333", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9978213507625272, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "\nconst readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction input(){\n return new Promise ( (resolve , error) => {\n readline.question('', (data) => {\n readline.close();\n resolve(data);\n })\n });\n}\n\nasync function main(){\n n = await input();\n if(n === 2 || n % 2 === 1){\n console.log('NO');\n } else {\n console.log('YES');\n }\n}\n\nmain();", "lang": "Node.js", "bug_code_uid": "4dc140d875899cf916c1aa4c01f519b6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e06288e661c3934362e7aa8e465f5f3b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9368191721132898, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction input(){\n return new Promise ( (resolve , error) => {\n readline.question('', (data) => {\n readline.close();\n //resolve(data);\n })\n });\n}\n\nasync function main(){\n n = await input();\n if(n == 2 || n % 2 == 1){\n console.log('NO');\n } else {\n console.log('YES');\n }\n}\n\nmain();", "lang": "Node.js", "bug_code_uid": "b3c29cd368f88d6ff217f0494fe5105b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e06288e661c3934362e7aa8e465f5f3b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9193370165745857, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction input(){\n return new Promise ( (resolve , error) => {\n readline.question('', (data) => {\n readline.close();\n })\n });\n}\n\nasync function main(){\n n = await input();\n if(n == 2 || n % 2 == 1){\n console.log('NO');\n } else {\n console.log('YES');\n }\n}\n\nmain();\nresolve(data);", "lang": "Node.js", "bug_code_uid": "d2c31d6cdff0bb5e0e085947391a640d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e06288e661c3934362e7aa8e465f5f3b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.6177777777777778, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "// https://code.i-harness.com/ko-kr/q/4c65e5\nvar stdin = process.stdin;\nstdin.setEncoding( 'utf8' );\nstdin.on( 'data', function( key ){\n process.stdout.write( parseInt(key) % 4 === 0 ? \"YES\" : \"NO\" );\n});\n", "lang": "Node.js", "bug_code_uid": "5a3b5ebf1d716e500b412b75488c70f3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "837e8ad02ef699781a916b1e8a1d5362", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.913312693498452, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "//nodejs v4.2.6\nprocess.stdin.resume(); \n\tprocess.stdin.setEncoding('utf8');\n\t//Taking a usr input\n\tprocess.stdin.on('data', function (text) {\n\t\t\t//Printing out user input\n\t\t\tvar input = parseInt(text)\n\t\t\t\tif(input%2 === 0){\n\t\t\t\t\tconsole.log('YES');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('NO')\n\t\t\t\t}\n\t});\n", "lang": "Node.js", "bug_code_uid": "936513130c3cfd13f08748fda76cf52d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "834c82a3b051ca59cac72d602763bb24", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9971509971509972, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "//nodejs v4.2.6\nprocess.stdin.resume(); \n\tprocess.stdin.setEncoding('utf8');\n\t//Taking a usr input\n\tprocess.stdin.on('data', function (text) {\n\t\t\t//Printing out user input\n\t\t\tvar input = parseInt(text)\n\t\t\t\tif(input===2){\n\t\t\t\t\tcolsole.log('NO')\n\t\t\t\t}else\n\t\t\t\tif(input%2 === 0){\n\t\t\t\t\tconsole.log('YES');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('NO')\n\t\t\t\t}\n\t});\n ", "lang": "Node.js", "bug_code_uid": "497cb6b5bc059241f6cdecc3f8f03b86", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "834c82a3b051ca59cac72d602763bb24", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.8998109640831758, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "//const readline = require('readline')\n\nconst rl = readline.createInterface({\n\t input: process.stdin,\n\t output: process.stdout,\n\tterminal : false\n});\n\n\nrl.on(\"line\", (w)=>{\n\tconst r = w%2 ===0 ? \"YES\" : \"NO\"\n console.log(r)\t\n})\n", "lang": "Node.js", "bug_code_uid": "8b271bed2811a62aeebbd99903fdcee8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4156ed0d7488e8f3b85dfc14c65be29d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9032258064516129, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n\t input: process.stdin,\n\t output: process.stdout,\n\tterminal : false\n});\n\n\nrl.on(\"line\", (w)=>{\n\tconst r = w%2 ===0 ? \"YES\" : \"NO\"\n console.log(r)\t\n})\n", "lang": "Node.js", "bug_code_uid": "c62b5518167bc1b2173ce22f19a0859e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4156ed0d7488e8f3b85dfc14c65be29d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9932381667918858, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let w = readline();\n w = parseInt(w);\n\n if (w%2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}", "lang": "Node.js", "bug_code_uid": "417ee670b299495842f2899ece61fd53", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3ed9644ab149cd42a598eaa47fa27974", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.2857142857142857, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "let w = readline();\n w = parseInt(w);\n\n if (w%2 === 0) {\n foo('YES');\n } else {\n foo( 'NO');\n }", "lang": "Node.js", "bug_code_uid": "4acff2c50666b08551f928f66ea5d681", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3ed9644ab149cd42a598eaa47fa27974", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9929203539823008, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main(){\n const w = readLine();\n if (w%2===0){\n console.log(\"YES\");\n }\n else{\n console.log(\"NO\");\n }\n \n}", "lang": "Node.js", "bug_code_uid": "307a226c2c3e3ebe7eba452fdbd7d9e1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "75851bcbe61cec369d077d52d3418b32", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.11371841155234658, "equal_cnt": 8, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "\nconst readline = require('readline');\nlet inputs = [];\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\nrl.on('close', () => {\n\t\tconst n = inputs[0].split(' ').map(function (a) { return parseInt(a); });\n const k = inputs[1].split(' ').map(function (a) { return parseInt(a); });\n console.log(solution(n, k));\n})\n function solution(n){\n if(n%2===0){\n console.log(\"YES\")\n }\n else{\n console.log(\"NO\")\n }\n }", "lang": "Node.js", "bug_code_uid": "5a74eddf92a86bd3addddf2df8c66978", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "75851bcbe61cec369d077d52d3418b32", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9857651245551602, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 8, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main(){\n const w = readLine();\n if w%2===0{\n console.log(\"YES\");\n }\n else{\n console.log(\"NO\");\n }\n \n}\n", "lang": "Node.js", "bug_code_uid": "022206e9e7416d104361216c1b815b5c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "75851bcbe61cec369d077d52d3418b32", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.967741935483871, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "var readline = require('readline'),\n rl = readline.createInterface(process.stdin, process.stdout);\n\n rl.prompt();\n \nrl.on('line', function (line) {\n \n var n=line.split(' ')\n n%2==0 && n!=2 ? console.log(\"YES\") : console.log(\"NO\");\n rl.close();\n\n}).on('close', function () {\n\n process.exit(0);\n});\n\n\n", "lang": "Node.js", "bug_code_uid": "d4d6a251f850b17be9fa727c054918d6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8cd01696287b990c2bb2ea64ec8b0644", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9819967266775778, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "var readline = require('readline'),\n rl = readline.createInterface(process.stdin, process.stdout);\n\n \n \nrl.on('line', function (line) {\n \n var n=line.split(' ')\n (n%2==0 && n!=2) ? console.log(\"YES\") : console.log(\"NO\");\n rl.close();\n\n}).on('close', function () {\n\n process.exit(0);\n});\n\n\n", "lang": "Node.js", "bug_code_uid": "4971a1e366497fd08b9b083beabd1478", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8cd01696287b990c2bb2ea64ec8b0644", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9984399375975039, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const { read } = require('fs');\n\nconst readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nreadline.question('', w => {\n if(parseInt(w) %2==0 && parseInt(w)>4){\n console.log('YES');\n }\n else{\n console.log('NO');\n }\n readline.close();\n})", "lang": "Node.js", "bug_code_uid": "fec28e7e19bd5c47685cb0d020b5998c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e6c95669440860e0268609262d4eabae", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.7196110210696921, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "const readline = require('readline').Interface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\nconst watermelon = (num) => {\n\treturn num % 2 === 0 ? 'YES' : 'NO';\n};\nreadline.on('line', (num) => {\n\treadline.close(), print(watermelon(num));\n});\n", "lang": "Node.js", "bug_code_uid": "81a741e8163e06853e5dc482b43eb9e3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aec33b247389d1daf27ba531e1198bae", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9720670391061452, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline').Interface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\nconst watermelon = (num) => {\n\tfor (let i = 2; i < num; i += 2) {\n\t\tfor (let j = 2; j < num; j += 2) {\n\t\t\tif (i + j === num) return 'YES';\n\t\t}\n\t}\n\treturn 'NO';\n};\n\nreadline.on('line', (num) => {\n\treadline.close(), console.log(watermelon(num));\n});\n", "lang": "Node.js", "bug_code_uid": "8e2bdd2530dd44a526e65eb5067cf10b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aec33b247389d1daf27ba531e1198bae", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9924812030075187, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\n// read each line\nrl.on(\"line\", (lineInput) => {\n if (lineInput % 2 == 0 || lineInput != 2) {\n console.log(\"Yes\");\n } else console.log(\"NO\");\n});\n\n// when all file readed\nrl.on(\"close\", () => {});\n", "lang": "Node.js", "bug_code_uid": "6d06d75a51a7f20aec35cd148c2e5154", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1a5359cf1a7cc9c7ed177638c3713813", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.47244094488188976, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "console.log(process.argv[2]%2 === 0 ? \"YES\", \"NO\")", "lang": "Node.js", "bug_code_uid": "53351fd4e8e5c02c3bdf9a6a76f9b685", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "05ee67ad5a1d64d9e97096b3f8a98088", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.703030303030303, "equal_cnt": 11, "replace_cnt": 2, "delete_cnt": 8, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "process.stdin.on('data', chunk => console.log(chunk.toString() % 2 === 0 ? \"YES\":\"NO\"))\n", "lang": "Node.js", "bug_code_uid": "da8ca658980996c65448417d5363a6be", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "05ee67ad5a1d64d9e97096b3f8a98088", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.818783865141481, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 10, "bug_source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\n// Read Inputs\nrl.on('line', inputLine => {\n let nums = inputLine.split(' ').map(num => parseInt(num));\n let n = nums[0];\n let m = nums[1];\n let a = nums[2];\n let b = nums[3];\n\n if (n === 1) {\n if (a < b)\n return console.log(a)\n else\n return console.log(b)\n } else if (n % m === 0 || a > b) {\n return console.log(Math.ceil((n / m)) * b)\n } else {\n return console.log((Math.floor((n / m)) * b) + (n % m) * a)\n }\n\n\n return console.log(n)\n\n});", "lang": "Node.js", "bug_code_uid": "0363a361fc5489c8113c08c1384666e6", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "12c5f437670f84293e0fb8c64b3a0a85", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9799270072992701, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const input = [];\n \nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n \nRL.on('line', (line) => {\n input.push(line);\n});\n\nRL.on('close', () => {\n let [n, m, a, b] = input[0].split(' ').map(x => parseInt(x));\n \n if (b/m <= a) {\n if (n % m === 0) {\n console.log( (n/m) * b );\n } else {\n console.log(Math.min(\n (parseInt(n/m) * b) + (n - parseInt(n/m) * m) * a,\n parseInt(Math.ceil(n/m) * b)\n ));\n }\n } else {\n console.log(m/b);\n console.log(n*a);\n }\n});", "lang": "Node.js", "bug_code_uid": "0de49d4b5339bda266fafe425c813416", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "73a02e609962dd396560c76fa6f73ac7", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.86, "equal_cnt": 4, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet n, k;\n\nrl.on('line', (d) => {\n if (c === 0) {\n [n, k] = d.split(' ').map(Number);\n c++;\n return;\n }\n\n const arr = [...d];\n const obj = {};\n\n for (let i = 0; i < arr.length; i++) {\n if (obj[arr[i]]) {\n obj[arr[i]]++;\n }\n else {\n obj[arr[i]] = 1;\n }\n }\n\n const ans = new Set(Object.values(obj));\n if (ans.size === 1) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n\n c++;\n});\n", "lang": "Node.js", "bug_code_uid": "ba0809766bfbb723bc02a8f0dda03da8", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "072b53a0cab2f6ad6b34a16666976c51", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9963436928702011, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "const readline = require('readline');\n//const lineReader = require('fs');\n//const scanner = lineReader.createReadStream('main.in');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n}); \n\nrl.on('line', (input) => {\n let n = parseInt(input);\n for (let i = 1; i * i <= n; i++){\n let eq = ((n - 1) - i - (i * i)) / (2 * i);\n if (eq === parseInt(eq) || eq > 0){\n console.log(i + \" \" + eq);\n process.exit(0);\n }\n }\n console.log(\"NO\");\n rl.close(); \n});", "lang": "Node.js", "bug_code_uid": "aa5879bc6ce4123e331381aa6dfc1148", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "51bcbb4a0cc42a23dfa345a7769dbccd", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Javascript"} {"similarity_score": 0.9995366079703429, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "(()=>{\"use strict\";var t={675:(t,r)=>{Object.defineProperty(r,\"__esModule\",{value:!0}),Array.prototype.sortAsc=function(){return this.sort(((t,r)=>t-r))},Array.prototype.sortDesc=function(){return this.sort(((t,r)=>r-t))},Array.prototype.max=function(){return Math.max(...this)},Array.prototype.min=function(){return Math.min(...this)},Array.prototype.sum=function(){let t=0;for(let r=0;r{if(l)return s=o.default.readFileSync(\"input.txt\").toString().trim().split(\"\\n\").map((t=>t.trim())),t(),void o.default.writeFileSync(\"output.txt\",a);process.stdin.resume(),process.stdin.setEncoding(\"utf-8\"),process.stdin.on(\"data\",(t=>{u+=t})),process.stdin.on(\"end\",(r=>{s=u.trim().split(\"\\n\").map((t=>t.trim())),t(),console.log(a)}))};function f(){return s[i++]}function p(){return f().split(\" \").map((t=>parseFloat(t)))}function d(){return f().split(\"\")}r.default={runMain:c,runEachTest:t=>{c((()=>{let[r]=p();for(;r>0;)t(),r--}))},readline:f,nextNumbers:p,nextNumbersMatrix:function(t){let r=[];for(let e=0;en;){if(s-=n,!(s>u)){i+=u-s;break}s-=u}i+=(t-r)/e,o.default.put(i)}))},747:t=>{t.exports=require(\"fs\")}},r={};!function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{}};return t[n].call(o.exports,o,o.exports,e),o.exports}(965)})();", "lang": "Node.js", "bug_code_uid": "0ad5329f3211086e5e3a5b3b913b091c", "src_uid": "e4a4affb439365c843c9f9828d81b42c", "apr_id": "473a9d67168081805c8737b247978588", "difficulty": 1500, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9651360544217688, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const nn = readline();\n var n = nn[0];\n let arr = readline().split(' '); \n n = parseInt(n);\n \n arr = arr.map(ele => parseInt(ele))\n \n console.log(flip(n, arr));\n}\n\n\nfunction flip (n, arr) {\n let total = 0;\n for(let i = 0; i < arr.length; i ++){\n total += arr[i];\n }\n\n let max = 0;\n \n for (let i = 0; i < arr.length -2; i++) {\n for (let j = arr.length - 1; j > i; j--) {\n let sub = arr.slice(i, j + 1);\n let subSum = 0;\n for(let k = 0; k < sub.length; k++) {\n subSum += sub[k] === 0 ? 1 : -1;\n }\n let subRes = total + subSum;\n max = Math.max(max, subRes);\n }\n }\n return max;\n}\n", "lang": "Node.js", "bug_code_uid": "c8fae81e4ffb7e0003e518bcde36a775", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "5680a7a934ae48095429c8cc07d61517", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.8943488943488943, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "function run(input, count = 0) {\n var i = input.indexOf('xxx'); \n if (i == -1) return count;\n else return run(input.substr(i + 1), count + 1)\n}\n\nprocess.stdin.setEncoding('utf8');\n \nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n \n if (input !== null) {\n run(input);\n }\n \n process.exit(0);\n \n});", "lang": "Node.js", "bug_code_uid": "79d7e80aeab705bf1ce8817302ee4700", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "57cab515404d4e456e2c153e3da49ec8", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Javascript"} {"similarity_score": 0.9757377049180328, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n let fileName = lines[0]\n let newFileName = buildNewFileName(fileName)\n let omittedCharactersCount = fileName.length - newFileName.length\n console.log(omittedCharactersCount)\n})\n\nfunction buildNewFileName(fileName) {\n let explodedName = fileName.split(\"\")\n \n let xCount = 0\n let newFileName = \"\";\n explodedName.forEach(element => {\n if (element === 'x') {\n xCount++;\n } else {\n xCount = 0\n }\n\n if (xCount < 3) {\n newFileName += element\n }\n });\n return newFileName\n}", "lang": "Node.js", "bug_code_uid": "c111eceadfa40b7060de60baa9a30a97", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "30e432e2585e6ce7044e2b01d67c8461", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"} {"similarity_score": 0.9911003236245954, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "'use strict';\r\n\r\nvar readline = require('readline');\r\n\r\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\r\n\r\nvar readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);\r\n\r\nasync function solve(read) {\r\n const rn = async () => Number(await read());\r\n const n = await rn();\r\n const check = m => {\r\n let ans = Math.floor((m - 1) / 2) + Math.floor(m / 4) - 1;\r\n return ans >= n;\r\n };\r\n let l = 3,\r\n r = 10 ** 12;\r\n while (l < r) {\r\n const m = Math.floor((l + r) / 2);\r\n if (check(m)) {\r\n r = m;\r\n } else {\r\n l = m + 1;\r\n }\r\n }\r\n return l;\r\n}\r\n\r\nasync function main(r) {\r\n try {\r\n let t = 1;\r\n let res = new Array(t);\r\n for (let i = 0; i < t; i++) {\r\n res[i] = await solve(r);\r\n }\r\n return res.join('\\n');\r\n } catch (error) {\r\n console.log('zdebug' + error);\r\n }\r\n}\r\n\r\nconst rl = readline__default[\"default\"].createInterface({\r\n input: process.stdin,\r\n output: process.stdout\r\n});\r\nconst it = rl[Symbol.asyncIterator]();\r\nasync function read() {\r\n return (await it.next()).value;\r\n}\r\nvoid async function () {\r\n const output = await main(read);\r\n process.stdout.write(output);\r\n}();\r\n", "lang": "Node.js", "bug_code_uid": "49928a543d926d987cccf66f5f8b4d94", "src_uid": "d0a8604b78ba19ab769fd1ec90a72e4e", "apr_id": "223775731a2bb7fb072d8abfeba9bddd", "difficulty": 1500, "tags": ["geometry", "math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Javascript"}