{"problem_id":"p03274","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\nx = list(map(int, input().split()))\n\nfor i in range(n):\n if x[i] >= 0:\n ori = i\n break\n\nf_inf = float(\"inf\")\nres = f_inf\nfor i in range(max(ori - k, 0), min(ori + k, n) - k + 1):\n time = abs(0 - x[i]) + abs(x[i + k - 1] - x[i])\n res = min(res, time)\n\nprint(res)\n","fail":"n, k = map(int, input().split())\nx = list(map(int, input().split()))\n\nif x[0] >= 0:\n print(x[k - 1])\n exit()\nelif x[n - 1] < 0:\n print(abs(x[n - k]))\n exit()\nelse:\n for i in range(n):\n if x[i] >= 0:\n ori = i\n break\n\nf_inf = float(\"inf\")\nres = f_inf\nfor i in range(max(ori - k, 0), min(ori + k, n) - k + 1):\n time = min(\n abs(x[i + k - 1] - x[i]) + abs(x[i + k - 1]),\n abs(x[i]) + abs(x[i + k - 1] - x[i]),\n )\n res = min(res, time)\n\nprint(res)\n","change":"replace","i1":3,"i2":12,"j1":3,"j2":22,"error":"0","stderr":null,"stdout":40} {"problem_id":"p03274","language":"Python","original_status":"Runtime Error","pass":"from bisect import bisect_left\n\nn, k = map(int, input().split())\nx = list(map(int, input().split()))\n# if 0 in x:\n# x.remove(0)\n# k -= 1\n# n -= 1\n#\n# if n == 0:\n# print(0)\n\nsi = bisect_left(x, 0)\n\n\nans = x[-1] - x[0]\nif si + k - 1 < len(x):\n ans = min(ans, x[si + k - 1])\nif si - k >= 0:\n ans = min(ans, abs(x[si - k]))\n\nfor i in range(n):\n tmp_ans = 0\n if i < si:\n tmp_ans = abs(x[i]) * 2 + x[i + k - 1]\n ans = min(ans, tmp_ans)\n elif i - k + 1 >= 0:\n tmp_ans = x[i] * 2 + abs(x[i - k + 1])\n ans = min(ans, tmp_ans)\n\nprint(ans)\n","fail":"from bisect import bisect_left\n\nn, k = map(int, input().split())\nx = list(map(int, input().split()))\nif 0 in x:\n x.remove(0)\n k -= 1\n n -= 1\n\nif n == 0:\n print(0)\nelse:\n si = bisect_left(x, 0)\n\n ans = (x[-1] - x[0]) * 2\n if si + k - 1 < len(x):\n ans = min(ans, x[si + k - 1])\n if si - k >= 0:\n ans = min(ans, abs(x[si - k]))\n\n for i in range(n):\n tmp_ans = 0\n if i < si and i + k - 1 < len(x):\n tmp_ans = abs(x[i]) * 2 + x[i + k - 1]\n ans = min(ans, tmp_ans)\n elif i >= si and i - k + 1 >= 0:\n tmp_ans = x[i] * 2 + abs(x[i - k + 1])\n ans = min(ans, tmp_ans)\n\n print(ans)\n","change":"replace","i1":4,"i2":31,"j1":4,"j2":30,"error":"0","stderr":null,"stdout":40} {"problem_id":"p03274","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\nans = ((N - 1) + (K - 1 - 1)) \/\/ (K - 1)\nprint(ans)\n","fail":"import numpy as np\n\nN, K = map(int, input().split())\nX = np.array(list(map(int, input().split())))\nidx = np.searchsorted(X, 0)\n# print('idx', idx)\nans = 10**10\nfor i in range(N - K + 1):\n l = i\n r = i + K - 1\n d1 = np.abs(X[l]) + np.abs(X[r] - X[l])\n d2 = np.abs(X[r]) + np.abs(X[r] - X[l])\n d = min(d1, d2)\n ans = min(ans, d)\nprint(ans)\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":14,"error":"WA","stderr":null,"stdout":2} {"problem_id":"p03280","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\n\nans = (a - 1) * (b - 1)\nprint(ans)\n","fail":"a, b = map(int, input().split())\n\nans = (a - 1) * (b - 1)\nprint(ans)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '2 2'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03280\/Python\/s458869287.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '2 2'\n","stdout":null} {"problem_id":"p03280","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\n\ntotal = a * b - (a + b - 1)\n\nprint(total)\n","fail":"a, b = list(map(int, input().split()))\n\ntotal = a * b - (a + b - 1)\n\nprint(total)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '2 2'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03280\/Python\/s569302437.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '2 2'\n","stdout":null} {"problem_id":"p03281","language":"Python","original_status":"Runtime Error","pass":"number = int(input())\n\nnum_eight_divisors = 0\n\nnumbers = list(range(9, number + 1, 2))\n\nfor i in range(9, number + 1, 2):\n divisors = [1, i]\n\n for j in range(2, i):\n q, mod = divmod(i, j)\n\n if mod == 0:\n divisors.append(j, q)\n\n if len(set(divisors)):\n num_eight_divisors = num_eight_divisors + 1\n\nprint(num_eight_divisors)\n","fail":"number = int(input())\n\nnum_eight_divisors = 0\n\nnumbers = list(range(9, number + 1, 2))\n\nfor i in range(9, number + 1, 2):\n divisors = [1, i]\n\n for j in range(2, i):\n q, mod = divmod(i, j)\n\n if mod == 0:\n divisors.append(j)\n divisors.append(q)\n\n if len(set(divisors)) == 8:\n num_eight_divisors = num_eight_divisors + 1\n\nprint(num_eight_divisors)\n","change":"replace","i1":13,"i2":16,"j1":13,"j2":17,"error":"TypeError: list.append() takes exactly one argument (2 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03281\/Python\/s888176624.py\", line 14, in \n divisors.append(j, q)\nTypeError: list.append() takes exactly one argument (2 given)\n","stdout":null} {"problem_id":"p03281","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n# \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\nimport sympy as sp\n\n# \u6a19\u6e96\u5165\u529b\u3092\u53d6\u5f97\nN = int(input())\n\n# \u6c42\u89e3\u51e6\u7406\nans = 0\nfor n in range(1, N + 1, 2):\n if sp.divisor_count(n) == 8:\n ans += 1\n\n# \u7d50\u679c\u51fa\u529b\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\n# \u6a19\u6e96\u5165\u529b\u3092\u53d6\u5f97\nN = int(input())\n\n\ndef divisor_count(n: int) -> int:\n ans = 0\n i = 1\n while i * i <= n:\n if n % i == 0:\n ans += 1\n if i != n \/\/ i:\n ans += 1\n i += 1\n return ans\n\n\n# \u6c42\u89e3\u51e6\u7406\nans = 0\nfor n in range(1, N + 1, 2):\n if divisor_count(n) == 8:\n ans += 1\n\n# \u7d50\u679c\u51fa\u529b\nprint(ans)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":21,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = input()\nk = int(input())\n\nfor i in range(len(s)):\n if s[i] == \"1\":\n continue\n else:\n ans = s[i]\n break\n ans = \"1\"\n\nprint(ans)\n","fail":"s = input()\nk = int(input())\n\nlen1s = 0\nfor i in range(len(s)):\n if s[i] == \"1\":\n len1s += 1\n continue\n else:\n res = s[i]\n break\nelse:\n res = \"1\"\n\nif k <= len1s:\n ans = \"1\"\nelse:\n ans = res\n\nprint(ans)\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":18,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\nkey = 1\ni = 0\nwhile True:\n if i > 100:\n break\n if int(S[i]) != 1:\n print(S[i])\n key = 1\n break\n i += 1\n\nif key == 0:\n print(S[0])\n","fail":"S = input()\nK = int(input())\nkey = 0\ni = 0\nwhile True:\n if i >= K:\n break\n if i >= len(S):\n break\n if int(S[i]) != 1:\n print(S[i])\n key = 1\n break\n i += 1\n\nif key == 0:\n print(S[0])\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":8,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"list_s = list(str(input()))\nk = int(input())\nfor i in range(len(list_s)):\n if list_s[i] != \"1\":\n bord = i\n break\nif k <= bord:\n print(1)\nelse:\n print(list_s[i])\n","fail":"list_s = list(str(input()))\nk = int(input())\nbord = 10**9\nfor i in range(len(list_s)):\n if list_s[i] != \"1\":\n bord = i\n break\nif k <= bord:\n print(1)\nelse:\n print(list_s[i])\n","change":"insert","i1":2,"i2":2,"j1":2,"j2":3,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\n\nanswer = S[1]\nprint(answer)\n","fail":"S = input()\nK = int(input())\n\nare_all_one = True\nfor i in range(len(S)):\n if S[i] != \"1\":\n are_all_one = False\n break\n\nnth = i + 1\nif are_all_one or K < nth:\n print(1)\n exit()\n\nanswer = S[i]\nprint(answer)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":15,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\n\ncount = 0\nwhile True:\n if S[count] == \"1\":\n count += 1\n else:\n break\n\nif K > count:\n print(S[count])\nelse:\n print(1)\n","fail":"S = input()\nK = int(input())\n\ncount = 0\nwhile count < len(S):\n if S[count] == \"1\":\n count += 1\n else:\n break\nif K > count:\n print(S[count])\nelse:\n print(1)\n","change":"replace","i1":4,"i2":10,"j1":4,"j2":9,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = input()\nk = int(input())\nonesum = 0\nwhile s[0] == \"1\" and len(s) > 0:\n s = s[1:]\n onesum += 1\nif k <= onesum:\n print(1)\nelse:\n print(s[0])\n","fail":"s = input()\nk = int(input())\nonesum = 0\nwhile s[0] == \"1\":\n onesum += 1\n if len(s) == 1:\n break\n s = s[1:]\nif k <= onesum:\n print(1)\nelse:\n print(s[0])\n","change":"replace","i1":3,"i2":6,"j1":3,"j2":8,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\n\nans = 1\n\nfor i in range(len(S)):\n if int(S[i]) == 1:\n pass\n else:\n ans = int(S[i])\n ones = i\n break\n\nif not ones:\n ones = len(S) + 1\nelif K <= ones:\n ans = 1\n\nprint(ans)\n","fail":"S = input()\nK = int(input())\n\n# S = \"111111111\"\n# K = 6565\n\nans = 1\nones = -1\n\nfor i in range(len(S)):\n if int(S[i]) == 1:\n pass\n else:\n ans = int(S[i])\n ones = i\n break\n\nif ones == -1:\n ones = len(S) + 1\n\nif K <= ones:\n ans = 1\n\nprint(ans)\n","change":"replace","i1":3,"i2":16,"j1":3,"j2":21,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"import sys\n\n\nS = [int(_) for _ in list(input())]\nK = int(input())\nt = 0\nwhile t <= len(S):\n if S[t] == 1:\n t += 1\n else:\n break\n\nif K <= t:\n print(1)\n sys.exit()\nelse:\n print(S[t])\n sys.exit()\n","fail":"import sys\n\n\nS = [int(_) for _ in list(input())]\nK = int(input())\nt = 0\nwhile t <= len(S) - 1:\n if S[t] == 1:\n t += 1\n else:\n break\n\nif K <= t:\n print(1)\n sys.exit()\nelse:\n print(S[t])\n sys.exit()\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat May 9 16:54:06 2020\n\n@author: shinba\n\"\"\"\n\ns = input()\nk = int(input())\n\ncnt = 0\n\nwhile s[cnt] == \"1\":\n cnt += 1\n\nif cnt >= k:\n print(1)\nelse:\n print(s[cnt])\n","fail":"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat May 9 16:54:06 2020\n\n@author: shinba\n\"\"\"\n\ns = input()\nk = int(input())\n\ncnt = 0\n\nwhile s[cnt] == \"1\":\n cnt += 1\n if cnt == len(s):\n break\n\nif cnt >= k:\n print(1)\nelse:\n print(s[cnt])\n","change":"insert","i1":14,"i2":14,"j1":14,"j2":16,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = list(input())\nk = int(input())\nnumber = 0\ncount = 0\nfor i in range(k):\n if s[i] == \"1\":\n count += 1\n if count == k - 1:\n number = 1\n elif s[i] != \"1\" and number == 0:\n number = s[i]\nprint(number)\n","fail":"s = list(input())\nk = int(input())\nfor i in range(min(len(s), k)):\n if s[i] != \"1\":\n print(s[i])\n exit()\nprint(1)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":7,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = input()\nk = int(input())\n\nfor i in range(min(k, len(s))):\n if s[i] != \"1\":\n ans = s[i]\n break\n\nprint(ans)\n","fail":"s = input()\nk = int(input())\n\nans = s[0]\nfor i in range(min(k, len(s))):\n if s[i] != \"1\":\n ans = s[i]\n break\n\nprint(ans)\n","change":"insert","i1":3,"i2":3,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\nret = \"1\"\nfor i in K:\n if len(S) <= K:\n break\n if S[i] != \"1\":\n ret = S[i]\n break\nprint(ret)\n","fail":"S = input()\nK = int(input())\nret = \"1\"\nfor i in range(K):\n if len(S) < i - 1:\n break\n if S[i] != \"1\":\n ret = S[i]\n break\nprint(ret)\n","change":"replace","i1":3,"i2":5,"j1":3,"j2":5,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03282\/Python\/s935785504.py\", line 4, in \n for i in K:\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = list(input())\nK = int(input())\nif not S[0] == \"1\":\n print(S[0])\nelse:\n print(S[1])\n","fail":"def searchInf(s, k):\n l = k if len(s) >= k else len(s)\n for i in range(l):\n if s[i] == \"1\":\n continue\n else:\n print(s[i])\n return 0\n print(1)\n return 0\n\n\nS = list(input())\nK = int(input())\nsearchInf(S, K)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":15,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = str(input())\nk = int(input())\nif len(S) == 1:\n print(S)\n exit()\nfor i in range(10):\n if S[i] == \"1\" and int(S[i]) == k:\n print(\"1\")\n break\n elif S[i] != \"1\":\n print(S[i])\n break\n","fail":"S = str(input())\nk = int(input())\nfor i in range(k):\n if S[i] != \"1\":\n print(S[i])\n exit()\nprint(\"1\")\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":7,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\nif S[0] != \"1\":\n print(S[0])\nelse:\n ind = 1\n while S[ind] == \"1\" and ind < len(S) - 1:\n ind += 1\n if ind < K:\n print(S[ind])\n else:\n print(\"1\")\n","fail":"S = input()\nK = int(input())\nif S[0] != \"1\":\n print(S[0])\nelse:\n ind = 0\n while S[ind] == \"1\" and ind < len(S) - 1:\n ind += 1\n if ind < K:\n print(S[ind])\n else:\n print(\"1\")\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\nif S[0] == \"1\":\n print(list(set(S))[1])\nelse:\n print(S[0])\n","fail":"S = input()\nK = int(input())\nif K == S[:K].count(\"1\"):\n print(1)\nelse:\n for c in S:\n if c != \"1\":\n print(c)\n break\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":9,"error":"WA","stderr":null,"stdout":"1\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = input()\nif \"1\" == s[0]:\n print(s.replace(\"1\", \"\")[0])\nelse:\n print(s[0])\n","fail":"s = input()\nk = int(input())\nrep = s.replace(\"1\", \"\")\nif len(rep) == 0:\n print(\"1\")\nelse:\n if s.index(rep[0]) < k:\n print(rep[0])\n else:\n print(\"1\")\n","change":"replace","i1":1,"i2":5,"j1":1,"j2":10,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = str(input())\nK = int(input())\nif S.count(\"1\") == S(len):\n print(1)\n exit(0)\nfor s in S:\n if s != \"1\":\n print(s)\n exit()\n","fail":"S = str(input())\nK = int(input())\nfor i in range(0, K):\n if S[i] != \"1\":\n print(S[i])\n exit()\nprint(1)\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":7,"error":"TypeError: 'str' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03282\/Python\/s709061193.py\", line 3, in \n if S.count(\"1\") == S(len):\nTypeError: 'str' object is not callable\n","stdout":null} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nS_list = list(map(int, S.split()))\nK = int(input())\n\nS_set_under_K = set(S[:K])\n\nif len(S_set_under_K) == 1 and S_list[0] == 1:\n print(1)\nelse:\n print(S_list[1])\n","fail":"S = input()\nS_list = list(map(int, list(S)))\nK = int(input())\n\nS_set_under_K = set(S[:K])\n\nif len(S) == 1:\n print(S)\nelif len(S_set_under_K) == 1 and S_list[0] == 1:\n print(1)\nelse:\n for c in S:\n if c != \"1\":\n print(c)\n exit()\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":15,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03282\/Python\/s272308200.py\", line 10, in \n print(S_list[1])\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"def solve():\n s = input()\n return [c for c in s if c != \"1\"][0]\n\n\nif __name__ == \"__main__\":\n print(solve())\n","fail":"def solve():\n s = input()\n k = int(input())\n head_ones = 0\n for c in s:\n if c != \"1\":\n break\n else:\n head_ones += 1\n\n return \"1\" if head_ones >= k else [c for c in s if c != \"1\"][0]\n\n\nif __name__ == \"__main__\":\n print(solve())\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":11,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = str(input())\nK = int(input())\n\nif K == 1:\n print(S[0])\nelif K >= 2:\n if S[0] != \"1\":\n print(S[0])\n quit()\n elif S[0:K] == \"1\" * K:\n print(S[0])\n quit()\n else:\n i = 1\n while S[i] == \"1\" and len(S) - 2 >= i:\n i += 1\n print(S[i])\n","fail":"S = list(input())\nK = int(input())\nif K == 1:\n print(S[0])\n quit()\n\nfor i in range(K):\n if S[i] != \"1\":\n print(S[i])\n quit()\n\nprint(\"1\")\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":12,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\nflag = True\n\nfor i in range(K):\n if S[i] != 1:\n print(S[i])\n flag = False\n\nif flag:\n print(1)\n","fail":"S = input()\nK = int(input())\nflag = True\n\nfor i in range(K):\n if S[i] != \"1\":\n print(S[i])\n flag = False\n break\n\nif flag:\n print(1)\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":9,"error":"WA","stderr":null,"stdout":"1\n2\n1\n4\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"import re\n\nS = input()\nK = int(input()[:4])\n\nn1i = re.search(\"[2-9]\", S).start()\n\nprint(S[min(n1i, K - 1)])\n","fail":"import re\n\nS = input()\nK = int(input())\n\nn1 = re.search(\"[2-9]\", S)\nif not n1:\n print(\"1\")\n exit()\n\nn1i = n1.start()\nprint(S[min(n1i, K - 1)])\n","change":"replace","i1":3,"i2":7,"j1":3,"j2":11,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = list(map(int, list(input())))\nk = int(input())\n\nif s[0] == 1:\n print(s[1])\nelse:\n print(s[0])\n","fail":"s = list(map(int, list(input())))\nk = int(input())\nans = 1\n\nif len(s) <= k:\n for i in s:\n if i != 1:\n ans = i\n break\nelse:\n for i in range(0, k):\n if s[i] != 1:\n ans = s[i]\n break\n\nprint(ans)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":16,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"s = input()\nk = int(input())\n\nc = 0\nfor si in s:\n if si == \"1\":\n c += 0\n else:\n a = si\n break\n\nprint(\"1\" if k - c <= 0 else a)\n","fail":"s = input()\nk = int(input())\n\nc = 0\na = 1\nfor si in s:\n if si == \"1\":\n c += 1\n else:\n a = si\n break\n\nprint(\"1\" if k - c <= 0 else a)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":8,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03282","language":"Python","original_status":"Runtime Error","pass":"S = input()\nK = int(input())\ncounter = 0\nnum = 0\nlog = 0\nfor i in range(101):\n if int(S[i]) != 1:\n log = counter\n num = int(S[i])\n break\n counter += 1\n\nif K <= log:\n print(1)\nelse:\n print(num)\n","fail":"S = input()\nK = int(input())\ncounter = 0\nnum = 1\nlog = 0\nfor i in S:\n if int(i) != 1:\n log = counter\n num = int(i)\n break\n counter += 1\n\nif K <= log:\n print(1)\nelse:\n print(num)\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":9,"error":"0","stderr":null,"stdout":"2\n"} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M, Q = map(int, input().split())\n\nt = [[0] * (N + 1) for _ in range(N + 1)]\nfor _ in range(M):\n L, R = map(int, input().split())\n t[L][R] += 1\n\nfor i in range(N + 1):\n for j in range(N):\n t[i][j + 1] += t[i][j]\n\nfor _ in range(Q):\n p, q = map(int, input().split())\n print(sum(t[i][q] - t[i][i - 1] for i in range(p, q + 1)))\n","fail":"N, M, Q = map(int, input().split())\n\nt = [[0] * (N + 1) for _ in range(N + 1)]\nfor _ in range(M):\n L, R = map(int, input().split())\n t[L][R] += 1\n\nfor i in range(N + 1):\n for j in range(N):\n t[i][j + 1] += t[i][j]\n\nresult = []\nfor _ in range(Q):\n p, q = map(int, input().split())\n result.append(sum(t[i][q] - t[i][i - 1] for i in range(p, q + 1)))\nprint(\"\\\\n\".join(str(v) for v in result))\n","change":"replace","i1":11,"i2":14,"j1":11,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M, Q = map(int, input().split())\n\nx = [[0 for _ in range(N + 1)] for _ in range(N + 1)]\nfor _ in range(M):\n L, R = map(int, input().split())\n x[L][R] += 1\n\nc = [[0 for _ in range(N + 1)] for _ in range(N + 1)]\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n c[i][j] += c[i][j - 1] + x[i][j]\n\nfor _ in range(Q):\n P, Q = map(int, input().split())\n ans = 0\n for i in range(P, Q + 1):\n ans += c[i][Q] - c[i][P - 1]\n print(ans)\n","fail":"import sys\n\ninput = sys.stdin.readline\n\nN, M, Q = map(int, input().split())\nt = [[0] * (N + 1) for _ in range(N + 1)]\n# es[L][R]:=\u533a\u9593[L,R]\u3092\u8d70\u308b\u5217\u8eca\u306e\u672c\u6570\n\nfor _ in range(M):\n l, r = map(int, input().split())\n t[l][r] += 1\n\nfor L in range(1, N + 1):\n for R in range(1, N + 1):\n t[L][R] += t[L - 1][R]\n t[L][R] += t[L][R - 1]\n t[L][R] -= t[L - 1][R - 1]\n # \u7d2f\u7a4d\u548c\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308b\n # \u6700\u7d42\u7684\u306b\u306f\n # t[L][R]\u306b\u306f\u533a\u9593\u304c[L,R]\u306b\u542b\u307e\u308c\u308b\u672c\u6570\u3092\u5165\u308c\u308b\u304c\u3001\n # \u73fe\u6642\u70b9\u3067\u306f\u533a\u9593\u304c[L,R]\u306b\u4e00\u81f4\u3059\u308b\u672c\u6570\u3057\u304b\u5165\u3063\u3066\u3044\u306a\u3044\n # \u3053\u3053\u306b\u533a\u9593\u304c[L-1,R]\u306b\u542b\u307e\u308c\u308b\u672c\u6570\u3068\n # \u533a\u9593\u304c[L,R-1]\u306b\u542b\u307e\u308c\u308b\u672c\u6570\u3092\u8db3\u3059\u3068\n # \u533a\u9593\u304c[L,R]\u306b\u542b\u307e\u308c\u308b\u7bc4\u56f2\u3092\u30ab\u30d0\u30fc\u3067\u304d\u308b\u304c\u3001\n # \u533a\u9593\u304c[L-1][R-1]\u306e\u7bc4\u56f2\u304c\u91cd\u8907\u3057\u3066\u8db3\u3055\u308c\u3066\u3044\u308b\n\nfor _ in range(Q):\n p, q = map(int, input().split())\n print(t[q][q] - t[p - 1][q] - t[q][p - 1] + t[p - 1][p - 1])\n # 2\u6b21\u5143\u7d2f\u7a4d\u548c\n","change":"replace","i1":0,"i2":18,"j1":0,"j2":30,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"a = input().split()\nn = int(a[0])\nm = int(a[1])\nqq = int(a[2])\n\nx = [[0] * n for _ in range(n)]\n\nfor _ in range(m):\n a = input().split()\n x[int(a[0]) - 1][int(a[1]) - 1] += 1\n\nc = list()\n\nfor i in range(n):\n c.append(list())\n for j in range(n):\n a = x[i][j]\n\n if 0 < j:\n a += c[i][j - 1]\n\n c[i].append(a)\n\nfor _ in range(qq):\n r = 0\n a = input().split()\n p = int(a[0])\n q = int(a[1])\n for j in range(p - 1, q):\n r += c[j][q - 1]\n if 1 < p:\n r -= c[j][p - 2]\n\n print(r)\n","fail":"a = input().split()\nn = int(a[0])\nm = int(a[1])\nqq = int(a[2])\n\nx = [[0] * n for _ in range(n)]\n\nfor _ in range(m):\n a = input().split()\n x[int(a[0]) - 1][int(a[1]) - 1] += 1\n\nc = list()\n\nfor i in range(n):\n c.append(list())\n for j in range(n):\n a = x[i][j]\n\n if 0 < j:\n a += c[i][j - 1]\n\n c[i].append(a)\n\nz = list()\n\nfor i in range(n):\n z.append(list())\n for j in range(n):\n a = c[i][j]\n\n if 0 < i:\n a += z[i - 1][j]\n\n z[i].append(a)\n\nfor _ in range(qq):\n r = 0\n a = input().split()\n p = int(a[0])\n q = int(a[1])\n\n if 0 < q:\n r += z[q - 1][q - 1]\n\n if 0 < q and 1 < p:\n r -= z[q - 1][p - 2] + z[p - 2][q - 1]\n\n if 1 < p:\n r += z[p - 2][p - 2]\n\n print(r)\n","change":"replace","i1":23,"i2":32,"j1":23,"j2":49,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M, Q = map(int, input().split())\ntrains = [list(map(int, input().split())) for _ in range(M)]\nquestions = [list(map(int, input().split())) for _ in range(Q)]\nfor q in questions:\n print(len([t for t in trains if q[0] <= t[0] and q[1] >= t[1]]))\n","fail":"import sys\n\ninput = sys.stdin.readline\nN, M, Q = map(int, input().split())\n\nsum_table = [[0] * (N + 1) for _ in range(N + 1)]\nfor _ in range(M):\n l, r = map(int, input().split())\n sum_table[l][r] += 1\n\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n sum_table[i][j] += (\n sum_table[i - 1][j] + sum_table[i][j - 1] - sum_table[i - 1][j - 1]\n )\n\nfor _ in range(Q):\n p, q = map(int, input().split())\n print(\n sum_table[q][q]\n - sum_table[q][p - 1]\n - sum_table[p - 1][q]\n + sum_table[p - 1][p - 1]\n )\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M, Q = map(int, input().split())\n\nx = [[0 for j in range(N + 1)] for i in range(N + 1)]\nc = [[0 for j in range(N + 1)] for i in range(N + 1)]\n\nfor _ in range(M):\n L, R = map(int, input().split())\n x[L][R] += 1\n\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n x[i][j] += x[i][j - 1]\n\nfor _ in range(Q):\n p, q = map(int, input().split())\n print(sum(x[i][q] - x[i][p - 1] for i in range(p, q + 1)))\n","fail":"N, M, Q = map(int, input().split())\n\nx = [[0 for j in range(N + 1)] for i in range(N + 1)]\n\nfor _ in range(M):\n L, R = map(int, input().split())\n x[N - L][R] += 1\n\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n x[i][j] += x[i][j - 1]\n\nfor j in range(1, N + 1):\n for i in range(1, N + 1):\n x[i][j] += x[i - 1][j]\n\nfor _ in range(Q):\n p, q = map(int, input().split())\n print(x[N - p][q])\n","change":"replace","i1":3,"i2":16,"j1":3,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\nfrom itertools import accumulate\n\ninput = sys.stdin.readline\n\n\ndef main():\n N, M, Q = map(int, input().split())\n LR = [None] * M\n for i in range(M):\n LR[i] = tuple(map(int, input().split()))\n pq = [None] * Q\n for i in range(Q):\n pq[i] = tuple(map(int, input().split()))\n\n S = [[0] * (N + 1) for _ in range(N + 1)]\n for L, R in LR:\n S[L][R] += 1\n for i in range(N + 1):\n S[i] = list(accumulate(S[i]))\n\n ans = [0] * Q\n for i, (p, q) in enumerate(pq):\n for j in range(p, q + 1):\n ans[i] += S[j][q] - S[j][p - 1]\n\n print(\"\\\\n\".join(map(str, ans)))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\n\nimport numba as nb\nimport numpy as np\n\ninput = sys.stdin.readline\n\n\n@nb.njit(\"i8[:](i8,i8,i8,i8[:,:],i8[:,:])\", cache=True)\ndef solve(N, M, Q, LR, pq):\n S = np.zeros(shape=(N + 1, N + 1), dtype=np.int64)\n for i in range(M):\n L, R = LR[i]\n S[L][R] += 1\n for i in range(N + 1):\n S[i] = np.cumsum(S[i])\n\n ans = np.zeros(shape=Q, dtype=np.int64)\n for i in range(Q):\n p, q = pq[i]\n for j in range(p, q + 1):\n ans[i] += S[j][q] - S[j][p - 1]\n\n return ans\n\n\ndef main():\n N, M, Q = map(int, input().split())\n LR = np.zeros(shape=(M, 2), dtype=np.int64)\n for i in range(M):\n LR[i] = input().split()\n pq = np.zeros(shape=(Q, 2), dtype=np.int64)\n for i in range(Q):\n pq[i] = input().split()\n\n ans = solve(N, M, Q, LR, pq)\n\n print(\"\\\\n\".join(map(str, ans)))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":1,"i2":25,"j1":1,"j2":36,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M, Q = map(int, input().split())\n\nLR = [[0 for i in range(2)] for j in range(M)]\npq = [[0 for i in range(2)] for j in range(Q)]\n\nfor i in range(M):\n LR[i] = list(map(int, input().split()))\n\nfor i in range(Q):\n pq[i] = list(map(int, input().split()))\n\nx = [[0 for i in range(N)] for j in range(N)]\n\n# print(LR[0][0])\n\nfor i in range(M):\n # x[LR[i][1] - 1][LR[i][0] - 1] = x[LR[i][1] - 1][LR[i][0] - 1] + 1\n x[LR[i][1] - 1][LR[i][0] - 1] += 1\n\nxacu = [[0 for i in range(N)] for j in range(N)]\n\nfor i in range(N):\n for j in range(N):\n if j == 0:\n xacu[i][j] = x[i][j]\n else:\n xacu[i][j] = xacu[i][j - 1] + x[i][j]\n\n# print(xacu)\n\nfor i in range(Q):\n count = 0\n p = pq[i][0]\n for j in range(pq[i][1]):\n if p == 1:\n count = count + xacu[j][N - 1]\n else:\n count = count + xacu[j][N - 1] - xacu[j][p - 2]\n\n print(count)\n","fail":"N, M, Q = map(int, input().split())\n\nx = [[0 for i in range(N + 1)] for j in range(N + 1)]\n\nfor i in range(M):\n l, r = map(int, input().split())\n x[l][r] += 1\n\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n x[i][j] += x[i - 1][j] + x[i][j - 1] - x[i - 1][j - 1]\n\nfor i in range(Q):\n p, q = map(int, input().split())\n\n ans = x[N][q] - x[p - 1][q]\n print(ans)\n","change":"replace","i1":2,"i2":40,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03283","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nimport bisect\nimport array\n\n\ndef solve():\n n, m, q = map(int, input().split())\n nl = [[] for j in range(n + 1)]\n for e in (input().split() for _ in [0] * m):\n l, r = int(e[0]), int(e[1])\n bisect.insort_left(nl[l], r)\n table = [array.array(\"i\", [0] * (n + 1)) for j in range(n + 1)]\n ran = array.array(\"i\", range(n + 1))\n for i in ran:\n table[i] = [bisect.bisect_right(nl[i], j) for j in ran]\n\n a = [0] * q\n s = array.array(\"i\", a)\n for i, e in enumerate(input().split() for _ in a):\n l, r = int(e[0]), int(e[1])\n s[i] = sum(table[j][r] - table[j][l - 1] for j in range(l, r + 1))\n print(\"\\\\n\".join(str(e) for e in s))\n\n\nif __name__ == \"__main__\":\n solve()\n","fail":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nimport bisect\nimport array\n\n\ndef solve():\n n, m, q = map(int, input().split())\n nl = [[0 for i in range(n + 1)] for j in range(n + 1)]\n for e in [input().split() for _ in range(m)]:\n l, r = int(e[0]), int(e[1])\n nl[l][r] += 1\n table = [array.array(\"i\", [0] * (n + 2)) for j in range(n + 2)]\n ran = array.array(\"i\", range(n + 1))\n for i in ran:\n for j in ran:\n table[i][j + 1] = table[i][j] + nl[i][j]\n\n for i, e in enumerate([input().split() for _ in range(q)]):\n l, r = int(e[0]), int(e[1])\n ans = 0\n for j in range(l, r + 1):\n ans += table[j][r + 1] - table[j][l]\n print(ans)\n\n\nif __name__ == \"__main__\":\n solve()\n","change":"replace","i1":9,"i2":24,"j1":9,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03284","language":"Python","original_status":"Runtime Error","pass":"import bisect\n\nN = int(input())\nroot = [4, 7]\n\nif bisect.bisect_right(root, N):\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"N, K = map(int, input().split())\n\nif N % K == 0:\n print(0)\n\nelse:\n print(1)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":7,"error":"ValueError: invalid literal for int() with base 10: '7 3'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03284\/Python\/s894069046.py\", line 3, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '7 3'\n","stdout":null} {"problem_id":"p03284","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int(input().split()))\nif N % K == 0:\n print(\"0\")\nelse:\n print(\"1\")\n","fail":"N, K = map(int, (input().split()))\nif N % K == 0:\n print(\"0\")\nelse:\n print(\"1\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03284\/Python\/s928688987.py\", line 1, in \n N, K = map(int(input().split()))\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p03284","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int, input().split())\nprint([0, 1][N % K])\n","fail":"N, K = map(int, input().split())\nprint([0, 1][0 < N % K])\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03284","language":"Python","original_status":"Runtime Error","pass":"(numSenbei, numPeople) = input().split()\n\nif numSenbei % numPeople == 0:\n print(1)\nelse:\n print(0)\n","fail":"numSenbei, numPeople = [int(i) for i in str(input()).split()]\n\nif numSenbei % numPeople == 0:\n print(0)\nelse:\n print(1)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":6,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03284\/Python\/s122237530.py\", line 3, in \n if numSenbei % numPeople == 0:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03286","language":"Python","original_status":"Runtime Error","pass":"# -2\u9032\u6570\u3092\u6c42\u3081\u308b\nN = int(input())\n\nif N == 0:\n print(0)\nelse:\n ans = \"\"\n while N != 0:\n if N % 2 != 0:\n N -= 1\n ans = \"1\" + ans\n else:\n ans = \"0\" + ans\n N = N \/\/ (-2)\nprint(ans)\n","fail":"# -2\u9032\u6570\u3092\u6c42\u3081\u308b\nN = int(input())\n\nif N == 0:\n print(0)\nelse:\n ans = \"\"\n while N != 0:\n if N % 2 != 0:\n N -= 1\n ans = \"1\" + ans\n else:\n ans = \"0\" + ans\n N = N \/\/ (-2)\n print(ans)\n","change":"replace","i1":14,"i2":15,"j1":14,"j2":15,"error":0,"stderr":null,"stdout":1011} {"problem_id":"p03287","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\nfrom collections import defaultdict\n\nN, M = map(int, input().split())\nA_list = list(map(int, input().split()))\n\nx = defaultdict(int)\ny = defaultdict(int)\n\nfor i in range(N):\n temp = x.copy()\n x.clear()\n r = A_list[i] % M\n for t in temp.items():\n y[t[0]] = y[t[0]] + t[1]\n x[int(t[0] + r) % M] = t[1]\n x[r] += 1\n\nprint(int(x[0] + y[0]))\n","fail":"from collections import Counter\nimport numpy as np\n\n\nN, M = map(int, input().split())\nA = np.array(list(map(int, input().split())))\n\nA = np.cumsum(A) % M\nC = Counter(A)\n\nres = 0\nfor c in C.items():\n if c[1] > 1:\n res += (c[1] * (c[1] - 1)) \/\/ 2\n if c[0] == 0:\n res += c[1]\n\nprint(res)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03287","language":"Python","original_status":"Time Limit Exceeded","pass":"from sys import stdin\nimport numpy as np\n\nN, M = [int(x) for x in stdin.readline().split()]\nA = np.array([int(a) for a in stdin.readline().split()], dtype=np.int64)\n\ncumsum_remainders = (np.hstack([0, A]) % M).cumsum() % M\n\ntotal = 0\nfor remainder in np.unique(cumsum_remainders):\n count = (cumsum_remainders == remainder).sum()\n total += count * (count - 1) \/\/ 2\nprint(total)\n","fail":"from sys import stdin\nfrom collections import Counter\nimport numpy as np\n\nN, M = [int(x) for x in stdin.readline().split()]\nA = np.array([int(a) for a in stdin.readline().split()], dtype=np.int64)\n\ncum_remainders = (np.hstack([0, A]) % M).cumsum() % M\n\nremainder_counts = Counter(cum_remainders)\ncombinations = 0\nfor count in remainder_counts.values():\n combinations += count * (count - 1) \/\/ 2\nprint(combinations)\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03287","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nN, M = map(int, input().split())\naN = list(map(int, input().split()))\n\ncnt = 0\nfor i in range(N):\n ans = 0\n for j in range(i, N):\n ans += aN[j]\n if ans % M == 0:\n cnt += 1\nprint(cnt)\n","fail":"# -*- coding: utf-8 -*-\n\n\"\"\"\n\u53c2\u8003\uff1ahttps:\/\/img.atcoder.jp\/abc105\/editorial.pdf\n\u3000\u3000\u3000http:\/\/drken1215.hatenablog.com\/entry\/2018\/08\/13\/125300\n\u3000\u3000\u3000https:\/\/www.hamayanhamayan.com\/entry\/2018\/08\/12\/010816\n\u30fb\u5de6\u7aef\u56fa\u5b9a\u3067\u53f3\u7aef\u52d5\u304b\u3059\u30eb\u30fc\u30d7\u306e\u7d2f\u7a4d\u548c\u3060\u3051\u53d6\u308c\u3070\u3001\n\u3000(\u53f3\u7aef\u306e\u7d2f\u7a4d\u548c)-(\u5de6\u7aef-1\u306e\u7d2f\u7a4d\u548c)\u3067\u3001\u3069\u3053\u3067\u3082\u5206\u304b\u308b\u3088\u3046\u306b\u306a\u308b\u3002\n\u30fbB-A\u304cM\u306e\u500d\u6570 \u2192 B\u3068A\u306emod M\u304c\u7b49\u3057\u3044(\u3084\u3063\u3066\u307f\u308c\u3070\u5206\u304b\u308b)\n\u30fb\u5404\u30eb\u30fc\u30d7\u5185\u3067\u3001\u305d\u308c\u307e\u3067\u306b\u96c6\u8a08\u3057\u305f\u7d2f\u7a4d\u548cmod M\u304b\u3089\u5de6\u7aef\u3068\u3057\u3066\u4f7f\u3048\u308b\u5834\u6240\u3092\u6570\u3048\u308b\u3002\n\"\"\"\n\nfrom collections import defaultdict\n\nN, M = map(int, input().split())\naN = list(map(int, input().split()))\n\n# \u7d2f\u7a4d\u548c\u3092\u4e00\u6642\u7684\u306b\u683c\u7d0d\u3059\u308b\u5909\u6570\nsm = 0\nans = 0\n# \u7d2f\u7a4d\u548c\u306emod M\u3092\u683c\u7d0d\u3059\u308bdict\nd = defaultdict(int)\n# \u4f55\u3082\u306a\u3044\u7d2f\u7a4d\u548c0\u306e\u5206\u3092\u8db3\u3057\u3066\u304a\u304f\nd[0] = 1\nfor i in range(N):\n sm += +aN[i]\n # \u4eca\u56de\u306esm%M\u3092\u53f3\u7aef\u3068\u3057\u3066\u3001mod M\u304c\u540c\u5024\u306b\u306a\u308b\u5de6\u7aef\u5019\u88dc\u306e\u6570\u3092\u7b54\u3048\u306b\u52a0\u7b97\n ans += d[sm % M]\n # \u4eca\u56de\u306esm%M\u306f\u3053\u306e\u5f8c\u5de6\u7aef\u5019\u88dc\u3068\u3057\u3066\u4f7f\u3046\u306e\u3067+1\n d[sm % M] += 1\nprint(ans)\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":31,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03287","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\nfrom itertools import accumulate, combinations\nfrom collections import defaultdict\n\nn, m = map(int, input().split())\nary = [int(_) for _ in input().split()]\n\nsum_ary = accumulate(ary, lambda x, y: x + y)\nmod_table = defaultdict(int)\nfor mod in [s % m for s in (ary[0], *sum_ary)]:\n mod_table[mod] += 1\n\nprint(sum([len(list(combinations(range(v), 2))) for v in mod_table.values()]))\n","fail":"# -*- coding: utf-8 -*-\nfrom itertools import accumulate\nfrom collections import defaultdict\n\nn, m = map(int, input().split())\nary = [int(_) for _ in input().split()]\n\nsum_ary = list(accumulate(ary, lambda x, y: x + y))\nmod_ary = [s % m for s in sum_ary]\nmod_table = defaultdict(int)\nfor mod in mod_ary:\n mod_table[mod] += 1\nmod_table[0] += 1\n\nprint(sum([mod * (mod - 1) \/\/ 2 for mod in mod_table.values()]))\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":15,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03287","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nt = {}\nc = 0\nfor a in A:\n c += a\n c %= M\n if c in t:\n t[c] += 1\n else:\n t[c] = 1\n\nresult = t[0]\nc = 0\nfor a in A:\n c += a\n c %= M\n t[c] -= 1\n result += t[c]\nprint(result)\n","fail":"N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nt = {}\nc = 0\nfor a in A:\n c += a\n c %= M\n if c in t:\n t[c] += 1\n else:\n t[c] = 1\n\nresult = 0\nif 0 in t:\n result += t[0]\nc = 0\nfor a in A:\n c += a\n c %= M\n t[c] -= 1\n result += t[c]\nprint(result)\n","change":"replace","i1":13,"i2":14,"j1":13,"j2":16,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03287","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n\nimport numpy as np\nfrom scipy.special import comb\n\nn, m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\na_sum = np.cumsum(a)\n\n\nre_list = {}\nfor i in a_sum:\n re = i % m\n if re in re_list:\n re_list[re] += 1\n else:\n re_list[re] = 1\nre_list[0] += 1\n# print(re_list)\nans = 0\nfor value in re_list.values():\n ans += comb(value, 2, exact=True)\n\nprint(ans)\n","fail":"#!\/usr\/bin\/env python3\n\nimport numpy as np\nfrom scipy.special import comb\n\nn, m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\na_sum = np.cumsum(a)\n\n\nre_list = {}\nre_list[0] = 1\nfor i in a_sum:\n re = i % m\n if re in re_list:\n re_list[re] += 1\n else:\n re_list[re] = 1\n\n# print(re_list)\nans = 0\nfor value in re_list.values():\n ans += comb(value, 2, exact=True)\n\nprint(ans)\n","change":"replace","i1":12,"i2":19,"j1":12,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03287","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nsumList = [0] * n\nsumList[0] = a[0] % m\nnumber = {}\n\nfor i in range(1, n):\n sumList[i] = (sumList[i - 1] + a[i]) % m\n number[sumList[i]] = 0\n\nfor i in range(n):\n number[sumList[i]] += 1\n\nans = 0\n\nfor key, value in number.items():\n ans += value * (value - 1) \/\/ 2\n if key == 0:\n ans += value\n\nprint(ans)\n","fail":"n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nsumList = [0] * n\nsumList[0] = a[0] % m\nnumber = {}\nnumber[sumList[0]] = 0\n\nfor i in range(1, n):\n sumList[i] = (sumList[i - 1] + a[i]) % m\n number[sumList[i]] = 0\n\nfor i in range(n):\n number[sumList[i]] += 1\n\nans = 0\n\nfor key, value in number.items():\n ans += value * (value - 1) \/\/ 2\n if key == 0:\n ans += value\n\nprint(ans)\n","change":"insert","i1":6,"i2":6,"j1":6,"j2":7,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03288","language":"Python","original_status":"Runtime Error","pass":"r = input()\n\nif r < 1200:\n print(\"ABC\")\nelif r < 2800:\n print(\"ARC\")\nelse:\n print(\"AGC\")\n","fail":"r = int(input())\n\nif r < 1200:\n print(\"ABC\")\nelif r < 2800:\n print(\"ARC\")\nelse:\n print(\"AGC\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: '<' not supported between instances of 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03288\/Python\/s301962316.py\", line 3, in \n if r < 1200:\nTypeError: '<' not supported between instances of 'str' and 'int'\n","stdout":null} {"problem_id":"p03289","language":"Python","original_status":"Runtime Error","pass":"S = input()\nflag = True\nCflag = False\nfor i, c in enumerate(S):\n if i == 0:\n if c == \"A\":\n continue\n else:\n flag = False\n break\n\n if c == \"C\" and i >= 2:\n if Cflag:\n flag = False\n cflag = True\n elif not (97 <= ord(c) <= 122):\n flag = False\n\nif flag and cflag:\n print(\"AC\")\nelse:\n print(\"WA\")\n","fail":"S = input()\nflag = True\ncflag = False\nfor i, c in enumerate(S):\n if i == 0:\n if c == \"A\":\n continue\n else:\n flag = False\n break\n\n if c == \"C\" and 2 <= i < len(S) - 1:\n if cflag:\n flag = False\n cflag = True\n\n elif not (97 <= ord(c) <= 122):\n flag = False\n\n\nif flag and cflag:\n print(\"AC\")\nelse:\n print(\"WA\")\n","change":"replace","i1":2,"i2":17,"j1":2,"j2":19,"error":"0","stderr":null,"stdout":"AC\n"} {"problem_id":"p03289","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ns = input()\n\nif s[0] != \"A\":\n print(\"WA\")\n sys.exit(0)\n\nif s[1] < \"a\" or s[1] > \"z\":\n print(\"WA\")\n sys.exit(1)\n\n\nsub = s[2:-1]\nhas = False\nfor c in sub:\n if not has and c == \"C\":\n has = True\n\n elif \"a\" <= c <= \"z\":\n continue\n\n else:\n has = False\n break\n\nif not has:\n print(\"wA\")\n sys.exit(0)\n\nif \"a\" <= s[len(s) - 1] <= \"z\":\n print(\"AC\")\nelse:\n print(\"WA\")\n","fail":"import sys\n\ns = input()\n\nif s[0] != \"A\":\n print(\"WA\")\n sys.exit(0)\n\nif s[1] < \"a\" or s[1] > \"z\":\n print(\"WA\")\n sys.exit(0)\n\n\nsub = s[2:-1]\nhas = False\nfor c in sub:\n if not has and c == \"C\":\n has = True\n\n elif \"a\" <= c <= \"z\":\n continue\n\n else:\n has = False\n break\n\nif not has:\n print(\"WA\")\n sys.exit(0)\n\nif \"a\" <= s[-1] <= \"z\":\n print(\"AC\")\nelse:\n print(\"WA\")\n","change":"replace","i1":10,"i2":31,"j1":10,"j2":31,"error":"0","stderr":null,"stdout":"AC\n"} {"problem_id":"p03289","language":"Python","original_status":"Runtime Error","pass":"import string\n\ns = list(input())\nflag = True\nif s[0] != \"A\":\n flag = False\ns.pop(0)\nif s.count(\"C\") > 1:\n flag = False\ns_index = s.index(\"C\")\nif 2 >= s_index or s_index <= (len(s) - 3):\n flag = False\ns.pop(s_index)\nfor i in s:\n if i not in string.ascii_lowercase:\n flag = False\n\nif flag:\n print(\"AC\")\nelse:\n print(\"WA\")\n","fail":"import string\n\ns = list(input())\nflag = True\nif s[0] != \"A\":\n flag = False\ncount = 0\nfor i in range(1, len(s)):\n if s[i] in string.ascii_uppercase:\n if i == 1 or i == len(s) - 1 or s[i] != \"C\":\n flag = False\n count += 1\n\nif flag and count == 1:\n print(\"AC\")\nelse:\n print(\"WA\")\n","change":"replace","i1":6,"i2":18,"j1":6,"j2":14,"error":"WA","stderr":null,"stdout":"WA\n"} {"problem_id":"p03290","language":"Python","original_status":"Runtime Error","pass":"# \u89e3\u6cd5\u306f\u6b63\u3057\u3044\u306f\u305a\u3060\u304c\u30b3\u30fc\u30ca\u30fc\u30b1\u30fc\u30b9\u306b\u5f15\u3063\u304b\u304b\u308b\u3089\u3057\u304fWA\u304c1\u500b\u51fa\u308b\n\nimport itertools\nimport math\n\nD, G = map(int, input().split())\n\np = {}\nc = {}\ns = {}\nfor i in range(1, D + 1):\n pi, ci = map(int, input().split())\n score = 100 * i * pi + ci\n s[i] = score\n p[i] = pi\n c[i] = ci\n\n\ndef complete(pset):\n score = 0\n solved = 0\n comped_max = 0\n for b in pset:\n if b:\n score += s[i]\n solved += p[i]\n comped_max = max(comped_max, i)\n return score, solved, comped_max\n\n\ndef left(norm, i):\n if norm <= 0:\n return 0\n res = int(math.floor(norm \/ (100 * i)))\n if res < p[i]:\n return res\n return float(\"inf\")\n\n\nans = float(\"inf\")\nfor pset in itertools.product((True, False), repeat=D):\n score, solved, comped_max = complete(pset)\n solved += left(G - score, comped_max)\n ans = min(ans, solved)\n\nprint(ans)\n","fail":"import itertools\nimport math\n\nD, G = map(int, input().split())\n\np = {}\nc = {}\ns = {}\nfor i in range(1, D + 1):\n pi, ci = map(int, input().split())\n score = 100 * i * pi + ci\n s[i] = score\n p[i] = pi\n c[i] = ci\n\n\ndef complete(pset):\n score = 0\n solved = 0\n comped = set()\n for i, b in zip(range(1, D + 1), pset):\n if b:\n score += s[i]\n solved += p[i]\n comped.add(i)\n leftset = set(list(range(1, D + 1))) - comped\n return score, solved, leftset\n\n\ndef left(norm, leftset):\n if norm <= 0 or len(leftset) == 0:\n return 0\n i = max(leftset)\n res = int(math.ceil(norm \/ (100 * i)))\n if res < p[i]:\n return res\n return float(\"inf\")\n\n\nans = float(\"inf\")\nfor pset in itertools.product((True, False), repeat=D):\n score, solved, leftset = complete(pset)\n solved += left(G - score, leftset)\n ans = min(ans, solved)\n\nprint(ans)\n","change":"replace","i1":0,"i2":43,"j1":0,"j2":43,"error":"ZeroDivisionError: division by zero","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03290\/Python\/s095921582.py\", line 43, in \n solved += left(G - score, comped_max)\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03290\/Python\/s095921582.py\", line 34, in left\n res = int(math.floor(norm \/ (100 * i)))\nZeroDivisionError: division by zero\n","stdout":null} {"problem_id":"p03291","language":"Python","original_status":"Time Limit Exceeded","pass":"mod = 1000000007\n\nS = input()\nn = 1\na = 0\nab = 0\nabc = 0\nfor s in S:\n if s in \"A\":\n a += n\n if s in \"B\":\n ab += a\n if s == \"C\":\n abc += ab\n if s in \"?\":\n n, a, ab, abc = 3 * n, 3 * a + n, 3 * ab + a, 3 * abc + ab\n\nprint(abc % mod)\n","fail":"mod = 1000000007\n\nS = input()\nn = 1\na = 0\nab = 0\nabc = 0\nfor s in S:\n if s in \"A\":\n a += n\n if s in \"B\":\n ab += a\n if s == \"C\":\n abc += ab\n if s in \"?\":\n n, a, ab, abc = 3 * n, 3 * a + n, 3 * ab + a, 3 * abc + ab\n n %= mod\n a %= mod\n ab %= mod\n abc %= mod\n\nprint(abc % mod)\n","change":"insert","i1":16,"i2":16,"j1":16,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03291","language":"Python","original_status":"Time Limit Exceeded","pass":"mod = 1000000007\n\nS = input()\nn = 1\na = 0\nab = 0\nabc = 0\nfor s in S:\n if s in \"A\":\n a += n\n if s in \"B\":\n ab += a\n if s == \"C\":\n abc += ab\n if s in \"?\":\n n, a, ab, abc = 3 * n, 3 * a + n, 3 * ab + a, 3 * abc + ab\n\nprint(abc % mod)\n","fail":"mod = 1000000007\n\nS = input()\nn = 1\na = 0\nab = 0\nabc = 0\nfor s in S:\n if s in \"A\":\n a += n\n if s in \"B\":\n ab += a\n if s == \"C\":\n abc += ab\n if s in \"?\":\n n, a, ab, abc = 3 * n, 3 * a + n, 3 * ab + a, 3 * abc + ab\n n %= mod\n a %= mod\n ab %= mod\n abc %= mod\n\nprint(abc % mod)\n","change":"insert","i1":16,"i2":16,"j1":16,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03292","language":"Python","original_status":"Runtime Error","pass":"A = [map(int, input().split())]\n\nprint(max(A) - min(A))\n","fail":"A = [int(x) for x in input().split()]\n\nprint(max(A) - min(A))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for -: 'map' and 'map'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03292\/Python\/s076740739.py\", line 3, in \n print(max(A) - min(A))\nTypeError: unsupported operand type(s) for -: 'map' and 'map'\n","stdout":null} {"problem_id":"p03292","language":"Python","original_status":"Runtime Error","pass":"*a = map(int, input().split())\nprint(max(a) - min(a))\n","fail":"(*a,) = map(int, input().split())\nprint(max(a) - min(a))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"SyntaxError: starred assignment target must be in a list or tuple","stderr":" File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03292\/Python\/s292492907.py\", line 1\n *a = map(int, input().split())\n ^^\nSyntaxError: starred assignment target must be in a list or tuple\n","stdout":null} {"problem_id":"p03292","language":"Python","original_status":"Runtime Error","pass":"a = map(int, input().split())\nprint(max(a) - min(a))\n","fail":"a = list(map(int, input().split()))\nprint(max(a) - min(a))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: min() arg is an empty sequence","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03292\/Python\/s403760215.py\", line 2, in \n print(max(a) - min(a))\nValueError: min() arg is an empty sequence\n","stdout":null} {"problem_id":"p03292","language":"Python","original_status":"Runtime Error","pass":"A = map(int, input())\nA = sorted(A)\nans = 0\nfor i in range(1, 3):\n ans += abs(A[i - 1] - A[i])\nprint(ans)\n","fail":"A = map(int, input().split())\nA = sorted(A)\nans = 0\nfor i in range(1, 3):\n ans += abs(A[i - 1] - A[i])\nprint(ans)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03292\/Python\/s889909183.py\", line 2, in \n A = sorted(A)\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03292","language":"Python","original_status":"Runtime Error","pass":"s1 = input()\nprint(\"Yes\" if input() in tuple(s1[i:] + s1[:i] for i in range(len(s1))) else \"No\")\n","fail":"import numpy as np\n\nA = np.array(sorted(map(int, input().split())))\nprint((A[1:] - A[:-1]).sum())\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":4,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03292\/Python\/s772178766.py\", line 2, in \n print(\"Yes\" if input() in tuple(s1[i:] + s1[:i] for i in range(len(s1))) else \"No\")\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03294","language":"Python","original_status":"Runtime Error","pass":"# Modulo Summation\nimport math\nfrom functools import reduce\n\n\ndef lcm(x, y):\n return (x * y) \/\/ math.gcd(x, y)\n\n\nn = int(input())\na = list(map(int, input().split()))\nm = reduce(lcm, a, 1) - 1\nprint(sum(map(lambda x: m % x, a)))\n","fail":"# Modulo Summation\ninput()\na = list(map(int, input().split()))\nx = 1\nfor i in a:\n x *= i\nprint(sum(list(map(lambda j: (x - 1) % j, a))))\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":7,"error":"0","stderr":null,"stdout":10.0} {"problem_id":"p03294","language":"Python","original_status":"Runtime Error","pass":"import math\nfrom functools import reduce\n\nn = int(input())\na = list(map(int, input().split()))\n\na_lcm = reduce(lambda x, y: (x * y) \/\/ math.gcd(x, y), a)\nm = a_lcm - 1\na_mod = [m % ax for ax in a]\n\nprint(sum(a_mod))\n","fail":"from functools import reduce\n\nn = int(input())\na = list(map(int, input().split()))\n\n\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n if b == 0:\n return a\n c = a % b\n return gcd(b, c)\n\n\na_lcm = reduce(lambda x, y: (x * y) \/\/ gcd(x, y), a)\nm = a_lcm - 1\na_mod = [m % ax for ax in a]\n\nprint(sum(a_mod))\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":16,"error":"0","stderr":null,"stdout":10.0} {"problem_id":"p03294","language":"Python","original_status":"Time Limit Exceeded","pass":"from functools import reduce\n\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef lcm_base(x, y):\n return (x * y) \/\/ gcd(x, y)\n\n\ndef lcm(numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nN = int(input())\na = list(map(int, input().split()))\n\nmod = []\nfor m in range(lcm(a)):\n k = [m % a[i] for i in range(N)]\n mod.append(sum(k))\nprint(max(mod))\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\nf = sum(a) - N\nprint(f)\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03294","language":"Python","original_status":"Runtime Error","pass":"from fractions import gcd\n\n\ndef lcm(a, b):\n return int(a * b \/ gcd(a, b))\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\ncumlcm = A[0]\nfor a in A[1:]:\n cumlcm = lcm(cumlcm, a)\nm = cumlcm - 1\nf = sum(map(lambda a: m % a if a != 0 else m, A))\nprint(f)\n","fail":"from fractions import gcd\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\ncumlcm = A[0]\nfor a in A[1:]:\n cumlcm = lcm(cumlcm, a)\nm = cumlcm - 1\nf = sum(map(lambda a: m % a, A))\nprint(f)\n","change":"replace","i1":4,"i2":15,"j1":4,"j2":15,"error":"ImportError: cannot import name 'gcd' from 'fractions' (\/usr\/lib\/python3.10\/fractions.py)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03294\/Python\/s783858120.py\", line 1, in \n from fractions import gcd\nImportError: cannot import name 'gcd' from 'fractions' (\/usr\/lib\/python3.10\/fractions.py)\n","stdout":null} {"problem_id":"p03294","language":"Python","original_status":"Runtime Error","pass":"def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b)\n\n\nn = int(input())\narr = list(map(int, input().split()))\nlcm = 1\nfor e in arr:\n lcm = int(lcm * e \/ gcd(lcm, e))\nlcm -= 1\nres = 0\nfor e in arr:\n res += lcm % e\nprint(res)\n","fail":"n = int(input())\narr = list(map(int, input().split()))\nlcm = 0\nfor e in arr:\n lcm += e - 1\nprint(lcm)\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":6,"error":"0","stderr":null,"stdout":10.0} {"problem_id":"p03295","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\n\nab = [0] * M\nfor _ in range(M):\n a, b = map(int, input().split())\n ab[a].append(b)\n\ndp = [0] * (N + 1)\nfor i in range(1, N + 1):\n dp[i] = max(dp[i], dp[i - 1])\n for j in ab[i]:\n dp[j] = max(dp[j], dp[i] + 1)\n\nprint(dp[N])\n","fail":"N, M = map(int, input().split())\n\nab = [[] for _ in range(N + 1)]\nfor _ in range(M):\n a, b = map(int, input().split())\n ab[a].append(b)\n\ndp = [0] * (N + 1)\nfor i in range(1, N + 1):\n dp[i] = max(dp[i], dp[i - 1])\n for j in ab[i]:\n dp[j] = max(dp[j], dp[i] + 1)\n\nprint(dp[N])\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"AttributeError: 'int' object has no attribute 'append'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03295\/Python\/s787059904.py\", line 6, in \n ab[a].append(b)\nAttributeError: 'int' object has no attribute 'append'\n","stdout":null} {"problem_id":"p03295","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\nreq = [tuple(map(int, input().split())) for _ in range(M)]\nreq.sort(key=lambda x: x[1])\n\nres = 0\ni = 1\nwhile i <= N:\n remain = [x for x in req if i <= x[0]]\n if len(remain):\n i = remain[0][1]\n res += 1\n else:\n break\n\nprint(res)\n","fail":"N, M = map(int, input().split())\nreq = [tuple(map(int, input().split())) for _ in range(M)]\nreq.sort(key=lambda x: x[1])\n\nres = 0\ni = 1\nfor m in range(M):\n if req[m][0] >= i:\n i = req[m][1]\n res += 1\n\nprint(res)\n","change":"replace","i1":6,"i2":13,"j1":6,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03296","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nN = int(input())\nA = [list(map(int, input().split())) for _ in range(N)]\n\ncount = 0\ntmp = 1\nfor i in range(1, N):\n if A[i] == A[i - 1]:\n tmp += 1\n else:\n # \u7b49\u3057\u304f\u306a\u304f\u306a\u3063\u305f\u3089\n count += tmp \/\/ 2\n tmp = 1 # tmp \u306e\u30ea\u30bb\u30c3\u30c8\n\nprint(count)\n","fail":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nN = int(input())\nA = [int(i) for i in input().split()] + [0]\n\ncount = 0\ntmp = 1\nfor i in range(1, N + 1):\n if A[i] == A[i - 1]:\n tmp += 1\n else:\n # \u7b49\u3057\u304f\u306a\u304f\u306a\u3063\u305f\u3089\n count += tmp \/\/ 2\n tmp = 1 # tmp \u306e\u30ea\u30bb\u30c3\u30c8\n\nprint(count)\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":9,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03296\/Python\/s729658845.py\", line 5, in \n A = [list(map(int, input().split())) for _ in range(N)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03296\/Python\/s729658845.py\", line 5, in \n A = [list(map(int, input().split())) for _ in range(N)]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03296","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = list(map(int, input().split()))\n\ncount = 0\n\nfor x in range(N):\n if x != N - 1:\n if a[x] == a[x + 1]:\n if x + 1 < N:\n if a[x + 2] == 10000:\n a[x + 1] = 9999\n count += 1\n else:\n a[x + 1] = 10000\n count += 1\n else:\n a[x + 1] = 10000\n count += 1\nprint(count)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\ncount = 0\n\nfor x in range(N):\n if x != N - 1:\n if a[x] == a[x + 1]:\n if x < N - 2:\n if a[x + 2] == 10000:\n a[x + 1] = 9999\n count += 1\n else:\n a[x + 1] = 10000\n count += 1\n else:\n a[x + 1] = 10000\n count += 1\nprint(count)\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03297","language":"Python","original_status":"Time Limit Exceeded","pass":"T = int(input())\nfor i in range(T):\n A, B, C, D = [int(i) for i in input().split()]\n\n memo = set()\n while True:\n if A in memo:\n print(\"Yes\")\n break\n\n if A - B < 0:\n print(\"No\")\n break\n\n if D - B == 0:\n if C - A + B < 0:\n print(\"No\")\n break\n else:\n print(\"Yes\")\n break\n\n if D - B < 0:\n print(\"No\")\n break\n\n n = 1 + (C - A + B) \/\/ (D - B)\n r = (A - B) + n * (D - B)\n if r < B:\n print(\"No\")\n break\n else:\n memo.add(A)\n A = B + r % B\n\n else:\n print(\"Yes\")\n\n # print(A, B, C, D)\n","fail":"from fractions import gcd\n\n\ndef solve(a, b, c, d):\n if a < b or d < b:\n return False\n\n if c >= b - 1:\n return True\n\n g = gcd(b, d)\n return (b + a % g - g) <= c\n\n\nT, *L = map(int, open(0).read().split())\n\nfor t in zip(*[iter(L)] * 4):\n if solve(*t):\n print(\"Yes\")\n else:\n print(\"No\")\n","change":"replace","i1":0,"i2":39,"j1":0,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03302","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input())\nif a + b == 15:\n print(\"+\")\nelif a * b == 15:\n print(\"*\")\nelse:\n print(\"x\")\n","fail":"a, b = map(int, input().split())\nif a + b == 15:\n print(\"+\")\nelif a * b == 15:\n print(\"*\")\nelse:\n print(\"x\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03302\/Python\/s877853063.py\", line 1, in \n a, b = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03302","language":"Python","original_status":"Runtime Error","pass":"a, b = input().split()\n\nif a + b == 15:\n print(\"+\")\nelif a * b == 15:\n print(\"*\")\nelse:\n print(\"x\")\n","fail":"a, b = map(int, input().split())\n\nif a + b == 15:\n print(\"+\")\nelif a * b == 15:\n print(\"*\")\nelse:\n print(\"x\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: can't multiply sequence by non-int of type 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03302\/Python\/s883899606.py\", line 5, in \n elif a * b == 15:\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"def solve():\n n = int(input())\n i = n\n while True:\n if i % 2 == 0 and i % n == 0:\n print(i)\n exit()\n\n\nif __name__ == \"__main__\":\n solve()\n","fail":"def solve():\n n = int(input())\n i = n\n while True:\n if i % 2 == 0:\n print(i)\n exit()\n i += n\n\n\nif __name__ == \"__main__\":\n solve()\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\ni = N\nwhile True:\n if i % 2 == 0 and i % N == 0:\n print(i)\n break\n i += 1\n","fail":"N = int(input())\n\ni = N\nwhile True:\n if i % 2 == 0 and i % N == 0:\n print(i)\n break\n i += N\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Runtime Error","pass":"number = int(input())\nnums = list(map(int, input().split(\" \")))\n\nprint(max(nums) - min(nums))\n","fail":"n = int(input())\nprint(n + n * (n % 2))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":2,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03307\/Python\/s884311780.py\", line 2, in \n nums = list(map(int, input().split(\" \")))\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nif n < 1 or n > 10:\n raise ValueError\n\nprint(2 * n if n % 2 != 0 else n)\n","fail":"n = int(input())\n\nprint(2 * n if n % 2 != 0 else n)\n","change":"delete","i1":2,"i2":5,"j1":2,"j2":2,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nans = 1\n\nwhile True:\n if ans % n == 0 and ans % 2 == 0:\n print(ans)\n break\n ans += 1\n","fail":"n = int(input())\n\n# a,b\u306e\u6700\u5927\u516c\u7d04\u6570\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\n# a,b\u306e\u6700\u5c0f\u516c\u500d\u6570\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\nprint(lcm(2, n))\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nN1 = []\n\nfor n in range(1, (N + 1)):\n N1.append(2 * n)\n\nfor i in N1:\n if i % N == 0:\n print(i)\n break\n","fail":"N = int(input())\nif N % 2 == 0:\n print(N)\nelse:\n print(2 * N)\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nnum = n\n\nwhile num % 2 != 0 or num % n != 0:\n num += 1\n\nprint(num)\n","fail":"a = int(input())\nb = 2\nx = a * b\n\nif a < b:\n tmp = a\n a = b\n b = tmp\n\nr = a % b\nwhile r != 0:\n a = b\n b = r\n r = a % b\n\nprint(int(x \/ b))\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\nfor i in range(2, 10**9, 2):\n if i % n == 0:\n print(i)\n","fail":"n = int(input())\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Runtime Error","pass":"N = input()\n\nif N % 2 != 0:\n answer = N * 2\n print(answer)\nelse:\n print(N)\n","fail":"N = int(input())\n\nif N % 2 != 0:\n answer = N * 2\n print(answer)\nelse:\n print(N)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03307\/Python\/s937616807.py\", line 3, in \n if N % 2 != 0:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03307","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nA = list(map(int, input().split()))\n\nprint(max(A) - min(A))\n","fail":"N = int(input())\n\nif N % 2 == 0:\n print(N)\nelse:\n print(N * 2)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":6,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03307\/Python\/s608756496.py\", line 3, in \n A = list(map(int, input().split()))\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03308","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = map(int, input().split())\nprint(max(a) - min(a))\n","fail":"n = int(input())\na = list(map(int, input().split()))\nprint(max(a) - min(a))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: min() arg is an empty sequence","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03308\/Python\/s261566864.py\", line 3, in \n print(max(a) - min(a))\nValueError: min() arg is an empty sequence\n","stdout":null} {"problem_id":"p03308","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = list(map(int, input().spllit()))\nprint(max(A) - min(A))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nprint(max(A) - min(A))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"AttributeError: 'str' object has no attribute 'spllit'. Did you mean: 'split'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03308\/Python\/s562647525.py\", line 2, in \n A = list(map(int, input().spllit()))\nAttributeError: 'str' object has no attribute 'spllit'. Did you mean: 'split'?\n","stdout":null} {"problem_id":"p03309","language":"Python","original_status":"Runtime Error","pass":"import math\n\nN = int(input())\nA = list(map(int, input().split()))\n# print(N, A)\n\n_A = [A[i] - (i + 1) for i in range(len(A))]\n_A.sort()\nmedian = _A[math.ceil(len(A) \/ 2)]\n\nsadness = 0\nfor i in range(len(A)):\n sadness += abs(A[i] - (i + 1 + median))\n\nprint(sadness)\n","fail":"import math\n\nN = int(input())\nA = list(map(int, input().split()))\n# print(N, A)\n\n_A = [A[i] - (i + 1) for i in range(len(A))]\n_A.sort()\nmedian = _A[math.floor(len(A) \/ 2)]\n\nsadness = 0\nfor i in range(len(A)):\n sadness += abs(A[i] - (i + 1 + median))\n\nprint(sadness)\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"WA","stderr":null,"stdout":3.0} {"problem_id":"p03309","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(i) for i in input().split()]\n\nsum = 0\nans = []\n\nfor b in range(-int(N \/ 2), int(N \/ 2)):\n for i in range(N):\n sum += abs(A[i] - (b + i))\n else:\n ans.append(sum)\n sum = 0\n\nprint(min(ans))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\n\nB = [A[i] - (i + 1) for i in range(N)]\n\nB.sort()\n\nb = B[len(B) \/\/ 2]\n\nans = 0\n\nfor j in range(N):\n ans += abs(A[j] - (b + j + 1))\n\nprint(ans)\n","change":"replace","i1":1,"i2":14,"j1":1,"j2":15,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03309","language":"Python","original_status":"Runtime Error","pass":"n = int(input().strip())\na = list(map(int, input().split()))\nb = [(a[i] - (i + 1)) for i in range(n)]\nb.sort()\nmid = 0\nif n % 2 == 1:\n mid = b[(n - 1) \/\/ 2 + 1]\nelse:\n mid = (b[(n - 1) \/\/ 2] + b[(n - 1) \/\/ 2]) \/\/ 2\n\nans = 0\nfor i in range(n):\n ans += abs(b[i] - mid)\nprint(ans)\n","fail":"n = int(input().strip())\na = list(map(int, input().split()))\nb = [(a[i] - (i + 1)) for i in range(n)]\nb.sort()\nmid = 0\nif n == 1:\n mid = b[0]\nelif n % 2 == 1:\n mid = b[(n - 1) \/\/ 2]\nelse:\n mid = (b[(n - 1) \/\/ 2] + b[(n - 1) \/\/ 2 + 1]) \/\/ 2\nans = 0\nfor i in range(n):\n ans += abs(b[i] - mid)\nprint(ans)\n","change":"replace","i1":5,"i2":10,"j1":5,"j2":11,"error":"WA","stderr":null,"stdout":3.0} {"problem_id":"p03309","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\nINF = 10**10\nn = int(input())\na = [int(_) - (i + 1) for i, _ in enumerate(input().split())]\n\ngrief = INF\nfor b in set(a):\n tmp = sum([abs(ai - b) for ai in a])\n if tmp < grief:\n bb = b\n grief = tmp\n\nprint(grief)\n","fail":"# -*- coding: utf-8 -*-\nn = int(input())\na = [int(_) - (i + 1) for i, _ in enumerate(input().split())]\n\n# INF = 10**10\n# grief = INF\n# for b in set(a):\n# tmp = sum([abs(ai - b) for ai in a])\n# if tmp < grief:\n# bb = b\n# grief = tmp\n\n# print(grief) # running time limit error\n\na.sort()\nmed = a[len(a) \/\/ 2]\ngrief = sum([abs(ai - med) for ai in a])\nprint(grief)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03310","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nS = [0] * N\nS[0] = A[0]\nfor i in range(1, N):\n S[i] = S[i - 1] + A[i]\n\nnum = float(\"inf\")\na = 0\nb = 0\nfor i in range(1, N - 2):\n while S[a] < S[i] - S[a + 1]:\n a += 1\n b = i\n while S[b] - S[i] < S[N - 1] - S[b + 1]:\n b += 1\n\n P = [S[a], S[i] - S[a], S[b] - S[i], S[N - 1] - S[b]]\n num = min(num, abs(max(P) - min(P)))\n\nprint(num)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nS = [0] * N\nS[0] = A[0]\nfor i in range(1, N):\n S[i] = S[i - 1] + A[i]\n\nnum = float(\"inf\")\na = 0\nb = 2\nfor i in range(1, N - 2):\n while S[a] < S[i] - S[a + 1]:\n a += 1\n b = max(b, i + 1)\n while S[b] - S[i] < S[N - 1] - S[b + 1]:\n b += 1\n\n P = [S[a], S[i] - S[a], S[b] - S[i], S[N - 1] - S[b]]\n num = min(num, abs(max(P) - min(P)))\n\nprint(num)\n","change":"replace","i1":9,"i2":14,"j1":9,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03311","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(i) for i in input().split()]\nA = [A[i] - i - 1 for i in range(N)]\nA.sort()\n# for a in [A[N \/\/ 2], A[N \/\/ 2 + 1]]:\nsum_A = [0, 0]\nfor i in range(N):\n sum_A[0] += abs(A[i] - A[N \/\/ 2])\nsum_2 = 0\nfor i in range(N):\n sum_A[1] += abs(A[i] - A[N \/\/ 2 + 1])\nprint(min(sum_A))\n","fail":"N = int(input())\nif N == 1:\n print(0)\n exit()\nA = [int(i) for i in input().split()]\nA = [A[i] - i - 1 for i in range(N)]\nA.sort()\nif N == 2:\n print(abs(A[0] - A[1]))\n exit()\n\nsum_A = [0, 0]\nfor i in range(N):\n sum_A[0] += abs(A[i] - A[N \/\/ 2])\nsum_2 = 0\nfor i in range(N):\n sum_A[1] += abs(A[i] - A[N \/\/ 2 + 1])\nprint(min(sum_A))\n","change":"replace","i1":1,"i2":5,"j1":1,"j2":11,"error":0,"stderr":null,"stdout":2} {"problem_id":"p03313","language":"Python","original_status":"Runtime Error","pass":"from heapq import nlargest\n\nn = int(input())\naaa = list(map(int, input().split()))\nn2 = 1 << n\ndp = [[0, a] for a in aaa]\n\nfor j in range(n):\n b = 1 << j\n for i in range(n2):\n if not i & b:\n dp[i | b] = nlargest(2, dp[i] + dp[i | b])\n\nans = []\ntmp = 0\nfor a in dp[1:]:\n tmp = max(tmp, a)\n ans.append(tmp)\nprint(*ans)\n","fail":"n = int(input())\naaa = list(map(int, input().split()))\nn2 = 1 << n\ndp = [[a, 0] for a in aaa]\n\nfor j in range(n):\n b = 1 << j\n for i in range(n2):\n if not i & b:\n dpi, dpk = dp[i], dp[i | b]\n if dpk[0] < dpi[0]:\n dpk[1] = max(dpk[0], dpi[1])\n dpk[0] = dpi[0]\n elif dpk[1] < dpi[0]:\n dpk[1] = dpi[0]\n\nans = []\ntmp = 0\nfor a in dp[1:]:\n tmp = max(tmp, a[0] + a[1])\n ans.append(tmp)\nprint(*ans)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":20,"error":"TypeError: '>' not supported between instances of 'list' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03313\/Python\/s524712776.py\", line 17, in \n tmp = max(tmp, a)\nTypeError: '>' not supported between instances of 'list' and 'int'\n","stdout":null} {"problem_id":"p03316","language":"Python","original_status":"Runtime Error","pass":"N = input()\nif int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"N = input()\nif int(N) % sum([int(N[i]) for i in range(len(N))]) == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'generator'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03316\/Python\/s036030936.py\", line 2, in \n if int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'generator'\n","stdout":null} {"problem_id":"p03316","language":"Python","original_status":"Runtime Error","pass":"# N\u306f\u6700\u59279\u6841\nn = input()\nsn = 0\nfor ni in n:\n sn += int(ni)\nif n % sn == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"# N\u306f\u6700\u59279\u6841\nn = input()\nsn = 0\nfor ni in n:\n sn += int(ni)\nif int(n) % sn == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03316\/Python\/s956814127.py\", line 6, in \n if n % sn == 0:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03316","language":"Python","original_status":"Runtime Error","pass":"N = input()\nS = 0\nfor i in N:\n S += int(i)\nprint(\"Yes\" if N % S == 0 else \"No\")\n","fail":"N = input()\nS = 0\nfor i in N:\n S += int(i)\nprint(\"Yes\" if int(N) % S == 0 else \"No\")\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03316\/Python\/s175898024.py\", line 5, in \n print(\"Yes\" if N % S == 0 else \"No\")\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03317","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input())\nprint(((n - 1) + (k - 2)) \/\/ (k - 1))\n","fail":"n, k = map(int, input().split())\nprint(((n - 1) + (k - 2)) \/\/ (k - 1))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03317\/Python\/s270349250.py\", line 1, in \n n, k = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03319","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\nprint((n - 2) \/\/ (k - 2) + 1)\n","fail":"n, k = map(int, input().split())\nprint((n - 2) \/\/ (k - 1) + 1)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"WA","stderr":null,"stdout":3} {"problem_id":"p03323","language":"Python","original_status":"Runtime Error","pass":"A = int(input())\nB = int(input())\n\nif A > 8 or B > 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","fail":"A, B = map(int, input().split())\n\nif A > 8 or B > 8:\n print(\":(\")\nelse:\n print(\"Yay!\")\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":6,"error":"ValueError: invalid literal for int() with base 10: '5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03323\/Python\/s618480523.py\", line 1, in \n A = int(input())\nValueError: invalid literal for int() with base 10: '5 4'\n","stdout":null} {"problem_id":"p03323","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\n\nif a >= 9 or b >= 9:\n print(\":(\")\nelse:\n print(\"Yay!\")\n","fail":"a, b = map(int, input().split())\n\nif a >= 9 or b >= 9:\n print(\":(\")\nelse:\n print(\"Yay!\")\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03323\/Python\/s393600205.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '5 4'\n","stdout":null} {"problem_id":"p03323","language":"Python","original_status":"Runtime Error","pass":"a, b = int(input()), int(input())\nif a <= 8 and b <= 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","fail":"a, b = map(int, input().split())\nif a <= 8 and b <= 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03323\/Python\/s102805982.py\", line 1, in \n a, b = int(input()), int(input())\nValueError: invalid literal for int() with base 10: '5 4'\n","stdout":null} {"problem_id":"p03323","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\na = int(input())\nb = int(input())\nif a <= 8 and b <= 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\na, b = map(int, input().split())\nif a <= 8 and b <= 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","change":"replace","i1":3,"i2":5,"j1":3,"j2":4,"error":"ValueError: invalid literal for int() with base 10: '5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03323\/Python\/s149144463.py\", line 4, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '5 4'\n","stdout":null} {"problem_id":"p03323","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\n# \u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u306e\u6574\u6570\u306e\u5165\u529b\nN = int(input())\nan = list(map(int, input().split()))\n\nsum_cnt = 0\nfor a in an:\n tmp = a\n cnt = 0\n while tmp % 2 == 0:\n cnt += 1\n tmp = tmp \/ 2\n\n sum_cnt += cnt\n\nprint(sum_cnt)\n","fail":"# -*- coding: utf-8 -*-\n\n# \u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u306e\u6574\u6570\u306e\u5165\u529b\nA, B = map(int, input().split())\n\nif A <= 8 and B <= 8:\n print(\"Yay!\")\nelse:\n print(\":(\")\n","change":"replace","i1":3,"i2":17,"j1":3,"j2":9,"error":"ValueError: invalid literal for int() with base 10: '5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03323\/Python\/s032769715.py\", line 4, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '5 4'\n","stdout":null} {"problem_id":"p03324","language":"Python","original_status":"Runtime Error","pass":"#!\/Library\/Frameworks\/Python.framework\/Versions\/3.5\/bin\/python3\n\nn = int(input())\na = list(map(int, input().split()))\n\nt = 0\nfor i in a:\n m = i\n while m % 2 == 0:\n t += 1\n m \/= 2\n\nprint(t)\n","fail":"#!\/Library\/Frameworks\/Python.framework\/Versions\/3.5\/bin\/python3\n\nd, n = map(int, input().split())\n\na = 0\nif d == 0:\n a = n\n if n == 100:\n a += 1\nelif d == 1:\n a = 100 * n\n if n == 100:\n a += 100\nelif d == 2:\n a = 100 * 100 * n\n if n == 100:\n a += 100 * 100\n\nprint(a)\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":19,"error":"ValueError: invalid literal for int() with base 10: '0 5'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03324\/Python\/s686916597.py\", line 3, in \n n = int(input())\nValueError: invalid literal for int() with base 10: '0 5'\n","stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"input()\n\na = list(map(int, input().split()))\n\ncount = 0\nflag = True\nwhile flag:\n flag = False\n for i, aa in enumerate(a):\n if aa % 2 == 0:\n a[i] = int(a[i] \/ 2)\n flag = True\n break\n if flag:\n count += 1\nprint(count)\n","fail":"input()\n\na = list(map(int, input().split()))\n\ncount = 0\nfor i, aa in enumerate(a):\n while aa % 2 == 0:\n aa = int(aa \/ 2)\n count += 1\nprint(count)\n","change":"replace","i1":5,"i2":14,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nans, cnt = 0, 0\nb = True\n\nwhile b:\n cnt = 0\n for i in range(len(a)):\n if cnt == 0:\n if a[i] % 2 == 0:\n a[i] = a[i] \/\/ 2\n cnt = 1\n else:\n a[i] = a[i] * 3\n else:\n a[i] = a[i] * 3\n if cnt == 1:\n ans += 1\n else:\n b = False\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nans = 0\n\nfor i in a:\n while i % 2 == 0:\n i \/\/= 2\n ans += 1\nprint(ans)\n","change":"replace","i1":2,"i2":20,"j1":2,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nans = 0\nm = 1\nfor i in a:\n m *= i\n\nwhile True:\n if m % 2 == 0:\n ans += 1\n m \/\/= 2\n else:\n break\n\nprint(ans)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\nans = 0\nfor i in a:\n count = 0\n while True:\n if i % 2 ** (count + 1) == 0:\n count += 1\n else:\n ans += count\n break\n\nprint(ans)\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"N, *a = map(int, open(0).read().split())\nans = 0\nflag = True\nwhile flag:\n cnt = 0\n for i in range(N):\n if a[i] % 2 != 0:\n continue\n elif a[i] % 2 == 0 and cnt == 0:\n a[i] \/\/= 2\n cnt += 1\n break\n\n if cnt == 0:\n flag = False\n else:\n ans += 1\n\nprint(ans)\n","fail":"N, *a = map(int, open(0).read().split())\nans = 0\nfor i in range(N):\n while a[i] % 2 == 0:\n a[i] \/\/= 2\n ans += 1\n\nprint(ans)\n","change":"replace","i1":2,"i2":16,"j1":2,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"N, *a = map(int, open(0).read().split())\nans = 0\nflag = True\nwhile flag:\n cnt = 0\n for i in range(N):\n if a[i] % 2 == 0 and cnt == 0:\n a[i] \/\/= 2\n cnt += 1\n else:\n a[i] *= 3\n else:\n if cnt == 0:\n flag = False\n else:\n ans += 1\n\nprint(ans)\n","fail":"N, *a = map(int, open(0).read().split())\nans = 0\nfor i in range(N):\n ans += len(bin(a[i])) - bin(a[i]).rfind(\"1\") - 1\nprint(ans)\n","change":"replace","i1":2,"i2":17,"j1":2,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"def judge():\n four = []\n even = []\n odd = []\n for a in a_list:\n if a % 2 == 1:\n odd.append(a * 3)\n else:\n if a % 4 == 0:\n four.append(a)\n else:\n even.append(a)\n if len(four) > 0:\n odd.append(four.pop() \/\/ 2)\n four = [i * 3 for i in four]\n odd.extend(four)\n even = [i * 3 for i in even]\n odd.extend(even)\n else:\n if even:\n odd.append(even.pop() \/\/ 2)\n even = [i * 3 for i in even]\n odd.extend(even)\n else:\n return False\n global a_list\n a_list = odd\n return True\n\n\nN = int(input())\na_list = list(map(int, input().split()))\ncnt = 0\nwhile True:\n if judge():\n cnt += 1\n else:\n break\nprint(cnt)\n","fail":"N = int(input())\na_list = list(map(int, input().split()))\ncnt = 0\nfor a in a_list:\n if a % 2 == 0:\n while a % 2 == 0:\n a \/= 2\n cnt += 1\nprint(cnt)\n","change":"replace","i1":0,"i2":38,"j1":0,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = list(map(int, input().split()))\n\nans = 0\nwaru = 0\ncnt = 0\n\nwhile True:\n for i in range(n):\n if A[i] % 2 == 0:\n if waru == 1:\n A[i] *= 3\n else:\n A[i] \/\/= 2\n waru = 1\n else:\n A[i] *= 3\n if waru == 0:\n print(ans)\n exit()\n else:\n ans += 1\n waru = 0\n","fail":"n = int(input())\nA = list(map(int, input().split()))\n\nans = 0\n\nfor a in A:\n while a % 2 == 0:\n a \/= 2\n ans += 1\n\nprint(ans)\n","change":"replace","i1":4,"i2":23,"j1":4,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\n\nwhile True:\n has_divided = False\n for i in range(N):\n if not has_divided and a[i] % 2 == 0:\n a[i] = a[i] \/\/ 2\n has_divided = True\n else:\n a[i] *= 3\n if has_divided:\n cnt += 1\n else:\n break\nprint(cnt)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\n\nfor i in range(N):\n while True:\n if a[i] % 2 == 0:\n a[i] \/\/= 2\n cnt += 1\n else:\n break\nprint(cnt)\n","change":"replace","i1":5,"i2":17,"j1":5,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03325","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\ns = 0\nwhile True:\n divided = False\n for i in range(n):\n if a[i] % 2 == 0:\n a[i] \/\/= 2\n divided = True\n break\n if divided:\n s += 1\n else:\n break\nprint(s)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\ns = 0\nfor i in range(n):\n while a[i] % 2 == 0:\n a[i] \/\/= 2\n s += 1\nprint(s)\n","change":"replace","i1":4,"i2":15,"j1":4,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03326","language":"Python","original_status":"Time Limit Exceeded","pass":"from itertools import combinations\n\nn, m = map(int, input().split())\nxyz = [list(map(int, input().split())) for _ in range(n)]\nans = 0\n\nfor elem in combinations(xyz, m):\n x = abs(sum([e[0] for e in elem]))\n y = abs(sum([e[1] for e in elem]))\n z = abs(sum([e[2] for e in elem]))\n ans = max(ans, x + y + z)\nprint(ans)\n","fail":"from itertools import product\n\nn, m = map(int, input().split())\nxyz = [list(map(int, input().split())) for _ in range(n)]\nans = 0\n\nfor e in product([1, -1], [1, -1], [1, -1]):\n xyz.sort(key=lambda v: (v[0] * e[0]) + (v[1] * e[1]) + (v[2] * e[2]))\n tmp = xyz[:m]\n ans = max(\n ans,\n abs(sum([e[0] for e in tmp]))\n + abs(sum([e[1] for e in tmp]))\n + abs(sum([e[2] for e in tmp])),\n )\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03326","language":"Python","original_status":"Time Limit Exceeded","pass":"from itertools import combinations\n\n\ndef abs_sum(xyz_list):\n s1 = abs(sum([xyz[0] for xyz in xyz_list]))\n s2 = abs(sum([xyz[1] for xyz in xyz_list]))\n s3 = abs(sum([xyz[2] for xyz in xyz_list]))\n return s1 + s2 + s3\n\n\nn, m = list(map(int, input().split(\" \")))\nxyz_list = []\nfor _ in range(n):\n xyz_list.append(list(map(int, input().split(\" \"))))\n\ncombs = combinations(xyz_list, m)\nprint(max([abs_sum(comb) for comb in combs]))\n","fail":"from itertools import product\n\nimport numpy as np\n\nn, m = list(map(int, input().split(\" \")))\nif m == 0:\n print(0)\n exit()\nxyz_list = []\nfor _ in range(n):\n xyz_list.append(np.array(list(map(int, input().split(\" \")))))\narrs = [np.array(x) for x in product([1, -1], repeat=3)]\nans = max([sum(sorted([sum(arr * xyz) for xyz in xyz_list])[-m:]) for arr in arrs])\nprint(ans)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03326","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\n\nN, M = map(int, input().split())\nlst = [list(map(int, input().rstrip().split())) for n in range(N)]\nnum = [i for i in range(N)]\nmaximum = -float(\"inf\")\nfor p in itertools.combinations(num, M):\n m = sum(abs(sum(lst[n][i] for n in p)) for i in range(3))\n maximum = max(maximum, m)\n\nprint(maximum)\n","fail":"N, M = map(int, input().split())\nlst = [list(map(int, input().rstrip().split())) for n in range(N)]\nmaximum = -float(\"inf\")\nfor i in [-1, 1]:\n for j in [-1, 1]:\n for k in [-1, 1]:\n sum_lst = []\n for n in range(N):\n num = lst[n][0] * i + lst[n][1] * j + lst[n][2] * k\n sum_lst.append(num)\n maximum = max(abs(sum(sorted(sum_lst)[:M])), maximum)\n\nprint(maximum)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03327","language":"Python","original_status":"Runtime Error","pass":"N = input()\nif N < 1000:\n print(\"ABC\")\nelse:\n print(\"ABD\")\n","fail":"N = int(input())\nif N < 1000:\n print(\"ABC\")\nelse:\n print(\"ABD\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: '<' not supported between instances of 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03327\/Python\/s497455145.py\", line 2, in \n if N < 1000:\nTypeError: '<' not supported between instances of 'str' and 'int'\n","stdout":null} {"problem_id":"p03328","language":"Python","original_status":"Runtime Error","pass":"def main():\n a, b = map(int, input().split())\n\n h = b - a\n\n i, ans = 0\n while True:\n i += 1\n ans += i\n\n if h == i:\n break\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n a, b = map(int, input().split())\n\n h = 0\n ans = 0\n for i in range(1, 1000):\n h += i\n\n if h > b:\n b_h = h - b\n if a_h == b_h:\n ans = b_h\n break\n if h > a:\n a_h = h - a\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":3,"i2":12,"j1":3,"j2":15,"error":"TypeError: cannot unpack non-iterable int object","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03328\/Python\/s567662645.py\", line 18, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03328\/Python\/s567662645.py\", line 6, in main\n i, ans = 0\nTypeError: cannot unpack non-iterable int object\n","stdout":null} {"problem_id":"p03328","language":"Python","original_status":"Runtime Error","pass":"a, b = list(map(int, input()))\nanswer = (b - a) * (b - a + 1) \/ 2 - b\nprint(int(answer))\n","fail":"a, b = list(map(int, input().split()))\nanswer = (b - a) * (b - a + 1) \/ 2 - b\nprint(int(answer))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03328\/Python\/s337385384.py\", line 1, in \n a, b = list(map(int, input()))\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03328","language":"Python","original_status":"Runtime Error","pass":"def func(x):\n if x == 1:\n return 1\n else:\n return x + func(x - 1)\n\n\na, b = map(int, input().split())\n\nfor i in range(1, 999):\n if func(i) - a == func(i + 1) - b:\n print(func(i) - a)\n break\n","fail":"H = [1]\nfor i in range(2, 1000):\n H.append(H[-1] + i)\n\na, b = map(int, input().split())\n\nfor i in range(998):\n if H[i] - a == H[i + 1] - b:\n print(H[i] - a)\n break\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":9,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03329","language":"Python","original_status":"Runtime Error","pass":"from collections import deque\n\n\nmax_n = 11000\ndp = [-1] * max_n # -1\u3092\u672a\u63a2\u7d22\u3068\u3059\u308b\ndp[0] = 0 # \u521d\u671f\u6761\u4ef6\u306e\u8a2d\u5b9a\nn = int(input())\nque = deque([])\nque.append(dp[0])\nwhile que:\n v = que.popleft()\n pow = 1\n while v + pow <= n:\n if dp[v + pow] == -1:\n dp[v + pow] = dp[v] + 1\n que.append(v + pow)\n pow *= 6\n pow = 1\n while v + pow <= n:\n if dp[v + pow] == -1:\n dp[v + pow] = dp[v] + 1\n que.append(v + pow)\n pow *= 9\n# print(dp)\nprint(dp[n])\n","fail":"from collections import deque\n\n\nmax_n = 110000\ndp = [-1] * max_n # -1\u3092\u672a\u63a2\u7d22\u3068\u3059\u308b\ndp[0] = 0 # \u521d\u671f\u6761\u4ef6\u306e\u8a2d\u5b9a\nn = int(input())\nque = deque([])\nque.append(dp[0])\nwhile que:\n v = que.popleft()\n pow = 1\n while v + pow <= n:\n if dp[v + pow] == -1:\n dp[v + pow] = dp[v] + 1\n que.append(v + pow)\n pow *= 6\n pow = 1\n while v + pow <= n:\n if dp[v + pow] == -1:\n dp[v + pow] = dp[v] + 1\n que.append(v + pow)\n pow *= 9\n# print(dp)\nprint(dp[n])\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03329","language":"Python","original_status":"Runtime Error","pass":"import math\n\nmoney = int(input())\n\nsix = [6**i for i in range(1, 8)]\nnine = [9**i for i in range(1, 7)]\n\nall = [1] + sorted(six + nine)\n\ndp = [float(math.inf) for i in range(100001)]\ndp[0] = 0\n\nfor i in range(0, 100001):\n for el in all:\n temp = i + el\n if temp < 100001:\n dp[temp] = min(dp[temp], dp[i] + 1)\n\nprint(dp[money])\n","fail":"money = int(input())\n\nsix = [6**i for i in range(1, 8)]\nnine = [9**i for i in range(1, 7)]\n\nall = [1] + sorted(six + nine)\n\ndp = [100000 for i in range(100001)]\ndp[0] = 0\n\nfor i in range(0, 100001):\n for el in all:\n temp = i + el\n if temp < 100001:\n dp[temp] = min(dp[temp], dp[i] + 1)\n\nprint(dp[money])\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":8,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03329","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nnum = [1]\n\nx = 6\nwhile x < 100000:\n num.append(x)\n x *= 6\n\nx = 9\nwhile x < 100000:\n num.append(x)\n x *= 9\n\ndp = [n] * 110000\ndp[0] = 0\n\nfor i in range(n):\n for j in num:\n dp[i + j] = min(dp[i + j], dp[i] + 1)\n\nprint(dp[n])\n","fail":"n = int(input())\nnum = [1]\n\nx = 6\nwhile x < 100000:\n num.append(x)\n x *= 6\n\nx = 9\nwhile x < 100000:\n num.append(x)\n x *= 9\n\ndp = [n] * 1100000\ndp[0] = 0\n\nfor i in range(n):\n for j in num:\n dp[i + j] = min(dp[i + j], dp[i] + 1)\n\nprint(dp[n])\n","change":"replace","i1":13,"i2":14,"j1":13,"j2":14,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03330","language":"Python","original_status":"Runtime Error","pass":"import itertools\n\nN, C = map(int, input().split())\nD = []\nfor _ in range(C):\n D.append(list(map(int, input().split())))\n\ndiff_by_pos_color_pair = [[0 for _ in range(C)] for _ in range(3)]\nfor i in range(N):\n for j, color_from in enumerate(map(lambda x: int(x) - 1, input().split())):\n pos = (i + j) % 3\n for color_to in range(C):\n diff_by_pos_color_pair[pos][color_to] += D[color_from][color_to]\n\n\nmin_diff = float(\"inf\")\nfor ccs in itertools.permutations(range(C), 3):\n diff = 0\n for pos, color in enumerate(ccs):\n diff += diff_by_pos_color_pair[pos][ccs[color]]\n min_diff = min(min_diff, diff)\n\nprint(min_diff)\n","fail":"import itertools\n\nN, C = map(int, input().split())\n# N, C = 500, 30\n\nD = []\nfor _ in range(C):\n D.append(list(map(int, input().split())))\n # D.append([100] * C)\n\ndiff_by_pos_color_pair = [[0 for _ in range(C)] for _ in range(3)]\nfor i in range(N):\n for j, color_from in enumerate(map(lambda x: int(x) - 1, input().split())):\n # for j, color_from in enumerate([0] * N):\n pos = (i + j) % 3\n for color_to in range(C):\n diff_by_pos_color_pair[pos][color_to] += D[color_from][color_to]\n\n\nmin_diff = float(\"inf\")\nfor ccs in itertools.permutations(range(C), 3):\n diff = 0\n for pos, color in enumerate(ccs):\n diff += diff_by_pos_color_pair[pos][color]\n min_diff = min(min_diff, diff)\n\nprint(min_diff)\n","change":"replace","i1":3,"i2":20,"j1":3,"j2":24,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03330","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\n\ndef get_discomfort(group, color, D):\n s = 0\n for c in group:\n s += D[c - 1][color - 1]\n return s\n\n\nN, C = map(int, input().split())\nD = [list(map(int, input().split())) for _ in range(C)]\n\n\ngrids = [[], [], []]\nfor i in range(N):\n c = list(map(int, input().split()))\n for j in range(N):\n grids[(i + j) % 3].append(c[j])\n\nans = float(\"inf\")\nfor colors in itertools.permutations(list(range(C)), 3):\n colors = list(colors)\n s = 0\n for i, c in enumerate(colors):\n s += get_discomfort(grids[i], c, D)\n ans = min(ans, s)\n\nprint(ans)\n","fail":"import itertools\n\n\ndef get_discomfort(group_dic, color, D):\n s = 0\n for c, num in group_dic.items():\n s += D[c - 1][color - 1] * num\n return s\n\n\nN, C = map(int, input().split())\nD = [list(map(int, input().split())) for _ in range(C)]\n\n\nfrom collections import Counter\n\n\ngrids = [Counter() for _ in range(3)]\n\nfor i in range(N):\n c = list(map(int, input().split()))\n for j in range(N):\n grids[(i + j) % 3][c[j]] += 1\n\n\nans = float(\"inf\")\nfor colors in itertools.permutations(list(range(C)), 3):\n colors = list(colors)\n s = 0\n for i, c in enumerate(colors):\n s += get_discomfort(grids[i], c, D)\n ans = min(ans, s)\n\nprint(ans)\n","change":"replace","i1":3,"i2":19,"j1":3,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03331","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\ns = []\nfor i in range(2, n + 1):\n j = n - i\n if j >= 2 and i + j == n:\n a = sum(map(int, str(i)))\n b = sum(map(int, str(j)))\n s.append(a + b)\nprint(min(s))\n","fail":"n = int(input())\n\ns = []\nfor i in range(1, n):\n j = n - i\n if i + j == n:\n a = sum(map(int, str(i)))\n b = sum(map(int, str(j)))\n s.append(a + b)\nprint(min(s))\n","change":"replace","i1":3,"i2":6,"j1":3,"j2":6,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03331","language":"Python","original_status":"Runtime Error","pass":"n = input().split()\nif n[0] == 1 and sum(n):\n print(10)\nelse:\n print(sum(n))\n","fail":"n = list(map(int, list(input())))\n\nif n[0] == 1 and sum(n) == 1:\n print(10)\nelse:\n print(sum(n))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":3,"error":"TypeError: unsupported operand type(s) for +: 'int' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03331\/Python\/s509317721.py\", line 5, in \n print(sum(n))\nTypeError: unsupported operand type(s) for +: 'int' and 'str'\n","stdout":null} {"problem_id":"p03331","language":"Python","original_status":"Runtime Error","pass":"N = input()\n\nans = 0\nfor n in N:\n ans += n\n\nprint(ans)\n","fail":"N = input()\n\nans = 0\nfor n in N:\n ans += int(n)\n\nif ans == 1:\n ans = 10\n\nprint(ans)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":8,"error":"TypeError: unsupported operand type(s) for +=: 'int' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03331\/Python\/s099321384.py\", line 5, in \n ans += n\nTypeError: unsupported operand type(s) for +=: 'int' and 'str'\n","stdout":null} {"problem_id":"p03331","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nprint(min([sum(map(int, str(i) + str(n - i))) for i in range(1, n \/\/ 2)]))\n","fail":"n = int(input())\nprint(min([sum(map(int, str(i) + str(n - i))) for i in range(1, n \/\/ 2 + 1)]))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03332","language":"Python","original_status":"Time Limit Exceeded","pass":"N, A, B, K = map(int, input().split())\n\nmod = 998244353\nF = [1]\nRF = []\n\n\ndef inv(x):\n res = 1\n k = mod - 2\n y = x\n while k:\n if k & 1:\n res = (res * y) % mod\n y = (y * y) % mod\n k \/\/= 2\n return res\n\n\ndef init():\n for i in range(N):\n F.append((F[i] * (i + 1)) % mod)\n for i in F:\n RF.append(inv(i))\n\n\ndef comb(x, y):\n if y < 0 or x < y:\n return 0\n return (F[x] * ((inv(F[x - y]) * inv(F[y])) % mod)) % mod\n\n\nans = 0\ninit()\nfor a in range(N):\n b = (K - a * A) \/ B\n if b < 0:\n break\n if b.is_integer():\n ans += (comb(N, a) * (comb(N, int(b)))) % mod\nprint(ans % mod)\n","fail":"N, A, B, K = map(int, input().split())\n\nmod = 998244353\nfact = [1] * (N + 1)\nifact = [1] * (N + 1)\n\n\ndef init():\n for i in range(N):\n fact[i + 1] = fact[i] * (i + 1) % mod\n ifact[i + 1] = pow(fact[i + 1], mod - 2, mod)\n\n\ndef comb(x, y):\n if y < 0 or y > x:\n return 0\n return (fact[x] * ifact[x - y] * ifact[y]) % mod\n\n\nans = 0\ninit()\nfor a in range(N + 1):\n n = K - a * A\n if n < 0:\n break\n if n % B == 0:\n ans += (comb(N, a) * (comb(N, n \/\/ B))) % mod\nprint(ans % mod)\n","change":"replace","i1":3,"i2":40,"j1":3,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03337","language":"Python","original_status":"Runtime Error","pass":"A, B = map(int, input())\n\nprint(max([A + B, A - B, A * B]))\n","fail":"A, B = map(int, input().split())\n\nprint(max([A + B, A - B, A * B]))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03337\/Python\/s268424429.py\", line 1, in \n A, B = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03337","language":"Python","original_status":"Runtime Error","pass":"A, B = list(map(int, input().split()))\nprint(max(A + B, max(A - B.A * B)))\n","fail":"A, B = list(map(int, input().split()))\nprint(max(A + B, max(A - B, A * B)))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"AttributeError: 'int' object has no attribute 'A'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03337\/Python\/s852904721.py\", line 2, in \n print(max(A + B, max(A - B.A * B)))\nAttributeError: 'int' object has no attribute 'A'\n","stdout":null} {"problem_id":"p03337","language":"Python","original_status":"Runtime Error","pass":"X = input().split()\n\nA = int(X[0])\nB = int(X[1])\n\np = A + B\nm = A - B\nk = A * B\n\nif p > m and p > k:\n max_s = p\nelif m > p and m > k:\n max_s = m\nelif k > p and k > m:\n max_s = k\nelif A == B and A == 0:\n max_s = p\n\nprint(max_s)\n","fail":"N = input().split()\nfor i in range(2):\n if i == 0:\n A = int(N[i])\n elif i == 1:\n B = int(N[i])\n\nX_1 = A + B\nX_2 = A - B\nX_3 = A * B\n\nmax = X_1\n\nif max < X_2:\n max = X_2\nif max < X_3:\n max = X_3\n\nprint(max)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":19,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03338","language":"Python","original_status":"Runtime Error","pass":"def cut_and_count(N: int, S: str) -> int:\n l, r = set([]), set([])\n for c in S:\n r.add(c)\n\n max_len = 0\n for c in S:\n l.add(c)\n r.discard(c)\n\n temp = len(l & r)\n max_len = max(max, temp)\n\n return max_len\n\n\nif __name__ == \"__main__\":\n N = int(input())\n S = input()\n ans = cut_and_count(N, S)\n print(ans)\n","fail":"def cut_and_count(N: int, S: str) -> int:\n l, r = {}, {}\n for c in S:\n if c not in r:\n r[c] = 1\n else:\n r[c] += 1\n\n max_len = 0\n for c in S:\n if c not in l:\n l[c] = 1\n else:\n l[c] += 1\n r[c] -= 1\n\n ls = set(k for k, v in l.items() if v > 0)\n rs = set(k for k, v in r.items() if v > 0)\n\n temp = len(ls & rs)\n max_len = max(max_len, temp)\n\n return max_len\n\n\nif __name__ == \"__main__\":\n N = int(input())\n S = input()\n ans = cut_and_count(N, S)\n print(ans)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":21,"error":"TypeError: '>' not supported between instances of 'int' and 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03338\/Python\/s105927214.py\", line 20, in \n ans = cut_and_count(N, S)\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03338\/Python\/s105927214.py\", line 12, in cut_and_count\n max_len = max(max, temp)\nTypeError: '>' not supported between instances of 'int' and 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p03338","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nS = input()\n\nprint(max(len(set(S[:i]) & set(S[i:])) for i in range(1, N - 1)))\n","fail":"N = int(input())\nS = input()\n\nprint(max(len(set(S[:i]) & set(S[i:])) for i in range(1, N)))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03338","language":"Python","original_status":"Runtime Error","pass":"N = input()\nS = list(input())\n\nans = 0\nfor i in range(1, N):\n left = set(S[:i])\n right = set(S[:i])\n\n both = left & right\n ans = max(len(both), ans)\n\n\nprint(ans)\n","fail":"N = int(input())\nS = list(input())\n\nans = 0\nfor i in range(1, N):\n left = set(S[:i])\n right = set(S[i:])\n both = left & right\n ans = max(len(both), ans)\n\n\nprint(ans)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":7,"error":"TypeError: 'str' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03338\/Python\/s796551276.py\", line 5, in \n for i in range(1, N):\nTypeError: 'str' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03338","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ns = input()\nans = max(len(set(s[:i]) & set(s[i:])) for i in range(1, n - 1))\nprint(ans)\n","fail":"n = int(input())\ns = input()\nans = max(len(set(s[:i]) & set(s[i:])) for i in range(1, n))\nprint(ans)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03339","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nS = input()\n\nret = N\nfor i in range(N):\n a = S[:i]\n b = S[i + 1 :]\n n = a.count(\"W\") + b.count(\"E\")\n if n == 0:\n continue\n ret = min(ret, n)\nprint(ret)\n","fail":"N = int(input())\nS = input()\nx = 0\na = 0\nidx = 0\n\nfor i in range(N):\n if S[i] == \"W\":\n x += 1\n else:\n x -= 1\n\n if x < a:\n a = x\n idx = i\n\nw = S[0:idx].count(\"W\")\ne = S[idx + 1 : N].count(\"E\")\nprint(w + e)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Time Limit Exceeded","pass":"# coding: utf-8\n\nn = int(input())\ns = list(input())\n\nfor (i, x) in enumerate(s):\n if x == \"E\":\n s[i] = 1\n elif x == \"W\":\n s[i] = 0\n\nmin_changed_num = sum(s[1:n])\n\nfor i in range(1, n):\n left = i - sum(s[0:i])\n right = sum(s[i:n])\n changed_num = left + right\n if min_changed_num > changed_num:\n min_changed_num = changed_num\n\nprint(min_changed_num)\n","fail":"# coding: utf-8\n\nn = int(input())\ns = list(input())\n\nfor (i, x) in enumerate(s):\n if x == \"E\":\n s[i] = 1\n elif x == \"W\":\n s[i] = 0\n\nleft = 0\nright = sum(s[1:n])\ncenter = s[0]\nmin_changed_num = right\n\nfor i in range(1, n):\n left = left + (1 - center)\n center = s[i]\n right = right - center\n changed_num = left + right\n if min_changed_num > changed_num:\n min_changed_num = changed_num\n\nprint(min_changed_num)\n","change":"replace","i1":11,"i2":16,"j1":11,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\ns = input()\nwhile s.count(\"WE\"):\n s = s.replace(\"WE\", \"\")\nans = (n - len(s)) \/\/ 2\nprint(ans)\n","fail":"n = int(input())\ns = input()\nwcount = 0\nwecount = 0\nprev = \"\"\nfor c in s:\n if c == \"W\":\n if prev == \"E\":\n wcount = 0\n wcount += 1\n if wcount and c == \"E\":\n wcount -= 1\n wecount += 1\nprint(wecount)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Time Limit Exceeded","pass":"def inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n persons = list(map(lambda x: x, inputs[0]))\n N = len(persons)\n counts = []\n for leader, _ in enumerate(persons):\n count = 0\n for p in range(0, leader):\n if persons[p] == \"W\":\n count += 1\n for p in range(leader + 1, N):\n if persons[p] == \"E\":\n count += 1\n counts.append(count)\n min = counts[0]\n for count in counts:\n if min > count:\n min = count\n\n return min\n\n\nif __name__ == \"__main__\":\n input()\n ret = solve(inputs(1))\n print(ret)\n","fail":"import sys\nfrom functools import reduce\nimport copy\nimport math\n\n\nsys.setrecursionlimit(4100000)\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n persons = list(inputs[0])\n\n count = [persons[1:].count(\"E\")]\n\n for i in range(1, len(persons)):\n if i == 0:\n continue\n\n tmp = count[-1]\n if persons[i - 1] == \"W\":\n tmp += 1\n if persons[i] == \"E\":\n tmp -= 1\n count.append(tmp)\n\n return min(count)\n\n\ndef string_to_int(string):\n return list(map(int, string.split()))\n\n\nif __name__ == \"__main__\":\n input()\n ret = solve(inputs(1))\n print(ret)\n","change":"replace","i1":0,"i2":24,"j1":0,"j2":35,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nS = input()\ns = [0 for i in range(n)]\n\nfor i in range(n):\n if S[i] == \"E\":\n s[i] = 1\nmin = n\n\nfor i in range(n):\n count = 0\n for j in range(n):\n if i < j and s[j] == 1:\n count += 1\n elif i > j and s[j] == 0:\n count += 1\n if count < min:\n min = count\nprint(min)\n","fail":"n = int(input())\nS = input()\ns = [0 for i in range(n)]\n\nfor i in range(n):\n if S[i] == \"E\":\n s[i] = 1\nmin = n\n\ncount = 0\nfor j in range(n):\n i = 0\n if i < j and s[j] == 1:\n count += 1\n elif i > j and s[j] == 0:\n count += 1\nif count < min:\n min = count\n\nfor i in range(1, n):\n if s[i - 1] == 0:\n count += 1\n if s[i] == 1:\n count -= 1\n if count < min:\n min = count\nprint(min)\n","change":"replace","i1":9,"i2":16,"j1":9,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Runtime Error","pass":"s = input().split()\n\nWtoE = []\nwtoec = 0\nEtoW = []\netowc = 0\n\nfor c in s[1]:\n if c == \"W\":\n wtoec = wtoec + 1\n WtoE.append(wtoec)\n\nfor c in s[1][::-1]:\n if c == \"E\":\n etowc = etowc + 1\n EtoW.append(etowc)\nEtoW.reverse()\nprint(WtoE)\nprint(EtoW)\n\na = []\nfor i in range(0, int(s[0])):\n ans = WtoE[i] + EtoW[i]\n if WtoE[i] != 0 and s[1][i] == \"W\" or EtoW[i] != 0 and s[1][i] == \"E\":\n ans = ans - 1\n\n a.append(ans)\n\nprint(min(a))\n","fail":"s = [\"\", \"\"]\n\ns[0] = input()\ns[1] = input()\n\nWtoE = []\nwtoec = 0\nEtoW = []\netowc = 0\n\nfor c in s[1]:\n if c == \"W\":\n wtoec = wtoec + 1\n WtoE.append(wtoec)\n\nfor c in s[1][::-1]:\n if c == \"E\":\n etowc = etowc + 1\n EtoW.append(etowc)\nEtoW.reverse()\n\na = []\nfor i in range(0, int(s[0])):\n ans = WtoE[i] + EtoW[i]\n if WtoE[i] != 0 and s[1][i] == \"W\" or EtoW[i] != 0 and s[1][i] == \"E\":\n ans = ans - 1\n\n a.append(ans)\n\nprint(min(a))\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":20,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03339\/Python\/s685616573.py\", line 8, in \n for c in s[1]:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03339","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nS = input()\nS_list = list(S)\nface = [-1, 1]\nans_index = N \/\/ 2\nwhile ans_index != N - 1 and S[ans_index] == S[ans_index + face[S[ans_index] == \"E\"]]:\n ans_index += face[S[ans_index] == \"E\"]\n# print(ans_index)\nans = 0\nfor i in range(len(S)):\n if i < ans_index and S[i] == \"W\":\n ans += 1\n elif ans_index == i:\n continue\n elif i > ans_index and S[i] == \"E\":\n ans += 1\nprint(ans)\n","fail":"N = int(input())\nS = input()\nE_cost = S.count(\"E\")\nW_cost = 0\nans = N\nfor s in S:\n if s == \"E\":\n E_cost -= 1\n ans = min(ans, E_cost + W_cost)\n if s == \"W\":\n W_cost += 1\nprint(ans)\n","change":"replace","i1":2,"i2":16,"j1":2,"j2":11,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03341","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\ns = list(input())\ncmin = n + 1\nfor i in range(n):\n c = s[:i].count(\"W\") + s[i:].count(\"E\")\n if cmin > c:\n cmin = c\nprint(cmin)\n","fail":"n = int(input())\ns = list(input())\nc = s[1:].count(\"E\")\nans = c\nfor i in range(1, n):\n c -= 1 if s[i] == \"E\" else 0\n c += 1 if s[i - 1] == \"W\" else 0\n ans = min(c, ans)\nprint(ans)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03346","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\nN = int(sys.stdin.readline())\nP = [int(sys.stdin.readline()) for _ in range(N)]\nQ = [P.index(i) for i in range(1, N + 1)]\nans = 0\nprv_q = 0\nnow = 0\nfor i in range(N):\n if prv_q > Q[i]:\n now = 0\n now += 1\n prv_q = Q[i]\n ans = max(ans, now)\nprint(N - ans)\n","fail":"import sys\n\nN = int(sys.stdin.readline())\nP = {int(sys.stdin.readline()): i for i in range(N)}\nQ = [P[i] for i in range(1, N + 1)]\n\nans = 0\nprv_q = 0\nnow = 0\nfor i in range(N):\n if prv_q > Q[i]:\n now = 0\n now += 1\n prv_q = Q[i]\n ans = max(ans, now)\nprint(N - ans)\n","change":"replace","i1":3,"i2":5,"j1":3,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03346","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\np = [0 for i in range(n)]\nfor i in range(n):\n p[i] = int(input())\n\nvisited = [0 for i in range(n)]\nn_range = range(n)\nfor i in reversed(n_range):\n if visited[i] == 0:\n visited[i] = 1\n count = 1\n target = p[i] - 1\n for j in reversed(range(i)):\n if p[j] == target:\n count += 1\n visited[j] = count\n target -= 1\nprint(n - max(visited))\n","fail":"n = int(input())\np = [0 for i in range(n)]\nfor i in range(n):\n p[i] = int(input())\n\nvisited = [0 for i in range(n + 1)]\n\n\"\"\"\nfor i in reversed(range(n)):\n if visited[i] == 0:\n visited[i] = 1\n count = 1\n target = p[i] - 1\n\n for j in reversed(range(i)):\n if p[j] == target:\n count += 1\n visited[j] = count\n target -= 1\n\"\"\"\nfor i in range(n):\n visited[p[i]] = visited[p[i] - 1] + 1\nprint(n - max(visited))\n","change":"replace","i1":5,"i2":17,"j1":5,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03346","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nppp = list(map(int, (input() for _ in range(n))))\n\ntmp = [0] * n\nfor p in ppp:\n tmp[p] = tmp[p - 1] + 1\n\nprint(n - max(tmp))\n","fail":"n = int(input())\nppp = list(map(int, (input() for _ in range(n))))\n\ntmp = [0] * (n + 1)\nfor p in ppp:\n tmp[p] = tmp[p - 1] + 1\n\nprint(n - max(tmp))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"IndexError: list assignment index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03346\/Python\/s389965586.py\", line 6, in \n tmp[p] = tmp[p - 1] + 1\nIndexError: list assignment index out of range\n","stdout":null} {"problem_id":"p03347","language":"Python","original_status":"Time Limit Exceeded","pass":"def solve(n, aaa):\n if aaa[0] > 0:\n return -1\n if any(a1 - a0 > 1 for a0, a1 in zip(aaa, aaa[1:])):\n return -1\n ans = 0\n aaa.reverse()\n\n while any(aaa):\n while aaa[-1] == 0:\n aaa.pop()\n aaa.reverse()\n while aaa[-1] == 0:\n aaa.pop()\n aaa.reverse()\n\n new = [0] * (len(aaa) - 1)\n a1 = aaa[0]\n ap = 0\n for i, a0 in enumerate(aaa[1:]):\n if a1 == 0:\n a1 = a0\n continue\n ans += 1\n if a1 - a0 < 1:\n new[i] = ap = max(a1 - 1, ap)\n else:\n new[i] = ap\n a1 = a0\n if ap:\n ap -= 1\n if a1:\n ans += 1\n aaa = new\n return ans\n\n\nn = int(input())\naaa = list(map(int, (input() for _ in range(n))))\nprint(solve(n, aaa))\n","fail":"def solve(n, aaa):\n if aaa[0] > 0:\n return -1\n if any(a1 - a0 > 1 for a0, a1 in zip(aaa, aaa[1:])):\n return -1\n ans = 0\n a0 = 0\n\n for a1 in aaa[1:]:\n if a1 - a0 != 1:\n ans += a0\n a0 = a1\n\n return ans + a0\n\n\nn = int(input())\naaa = list(map(int, (input() for _ in range(n))))\nprint(solve(n, aaa))\n","change":"replace","i1":6,"i2":35,"j1":6,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03351","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d = map(int, input().split())\nx = sorted(a, b)\ny = sorted(c, b)\n\nif (x[-1] - x[0]) <= d and (y[-1] - y[0]) <= d:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"a, b, c, d = map(int, input().split())\nx = sorted([a, b])\ny = sorted([c, b])\n\nif (max(a, c) - min(a, c)) <= d:\n print(\"Yes\")\nelif (x[-1] - x[0]) <= d and (y[-1] - y[0]) <= d:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":1,"i2":5,"j1":1,"j2":7,"error":"TypeError: sorted expected 1 argument, got 2","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03351\/Python\/s078991385.py\", line 2, in \n x = sorted(a, b)\nTypeError: sorted expected 1 argument, got 2\n","stdout":null} {"problem_id":"p03352","language":"Python","original_status":"Time Limit Exceeded","pass":"x = int(input())\nans = 1\nfor i in range(2, 1000):\n j = 2\n while i**j <= x:\n ans = max(ans, i**j)\n j += 1\n if i > x:\n break\nprint(ans)\n","fail":"x = int(input())\nans = 1\nfor i in range(2, 1000):\n j = 2\n while i**j <= x:\n ans = max(ans, i**j)\n j += 1\nprint(ans)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03352","language":"Python","original_status":"Time Limit Exceeded","pass":"def pow(x, n):\n if n == 0:\n return 1\n value = pow(x, int(n \/ 2))\n value *= value\n if n % 2 == 1:\n value *= x\n return value\n\n\nx = int(input())\nli = [False] * (x + 1)\nli[1] = True\n\nfor i in range(x):\n for j in range(2, x):\n idx = pow(i, j)\n if idx < x + 1:\n li[idx] = True\n\nfor i in reversed(range(x + 1)):\n if li[i]:\n print(i)\n break\n","fail":"x = int(input())\nli = [False] * (x + 1)\nli[1] = True\n\nfor i in range(x):\n for j in range(2, x):\n if i**j > x:\n break\n li[i**j] = True\n\nfor i in reversed(range(x + 1)):\n if li[i]:\n print(i)\n break\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03352","language":"Python","original_status":"Time Limit Exceeded","pass":"X = int(input())\n\nfor i in range(X, 0, -1):\n tmp = i\n if X % tmp:\n continue\n while tmp <= X:\n tmp *= tmp\n if tmp == X:\n print(i)\n","fail":"X = int(input())\n\nans = 1\nfor i in range(1, X):\n for j in range(2, X):\n tmp = i**j\n if tmp > X:\n break\n ans = max(tmp, ans)\nprint(ans)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03352","language":"Python","original_status":"Time Limit Exceeded","pass":"x = int(input())\n\nif x == 1:\n print(\"1\")\n exit()\n\n\ndef func(p):\n q = p\n while q < x:\n q *= p\n if q == x:\n return q\n break\n\n if q \/ p == p:\n return 1\n else:\n return q \/ p\n\n\nz = []\na = 1\n\nwhile a <= x:\n z.append(func(a))\n a += 1\n\nprint(max(z))\n","fail":"x = int(input())\n\nif x == 1:\n print(\"1\")\n exit()\n\n\ndef func(p):\n q = p\n while q < x:\n q *= p\n if q == x:\n return q\n if q \/ p == p:\n return 1\n else:\n return q \/\/ p\n\n\nz = []\na = 2\n\nwhile a <= x:\n z.append(func(a))\n a += 1\n\nprint(max(z))\n","change":"replace","i1":13,"i2":23,"j1":13,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03352","language":"Python","original_status":"Time Limit Exceeded","pass":"X = int(input())\n\nans = []\nfor i in range(1000):\n for j in range(1000):\n if i**j > X:\n continue\n ans.append(i**j)\nprint(max(ans))\n","fail":"X = int(input())\n\nans = []\nfor i in range(1, 1000):\n for j in range(2, 11):\n if i**j > X:\n continue\n ans.append(i**j)\nprint(max(ans))\n","change":"replace","i1":3,"i2":5,"j1":3,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n S = input()\n K = int(input())\n result = set()\n\n for i in range(len(S) + 1):\n for j in range(i + 1, len(S) + 1):\n result.add(S[i:j])\n\n print(sorted(result)[K - 1])\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n S = input()\n K = int(input())\n result = set()\n\n for i in range(5):\n for j in range(len(S)):\n result.add(S[j : j + i + 1])\n\n print(sorted(result)[K - 1])\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":9,"i2":12,"j1":9,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"s = str(input())\nK = int(input())\n# s\u304cabcac \u306e\u5834\u5408\u3001a,bca,ac \u306a\u3069\u306f\u90e8\u5206\u5217(substring\n# abc \u3068ab\u306e\u5834\u5408\u3001ab\u306e\u65b9\u304c\u8f9e\u66f8\u9806\u3067\u5c0f\u3055\u3044\u3068\u5224\u65ad\u3059\u308b\u3002\n# abc \u3068aba\u306e\u5834\u5408\u3001aba\u306e\u65b9\u304c\u5c0f\u3055\u3044\n\nsubstrings = set([])\nfor i in range(len(s) + 1):\n for j in range(i + 1, len(s) + 1):\n # print(i, j)\n substrings.add(s[i:j])\n\nprint(sorted(substrings)[K - 1])\n","fail":"s = str(input())\nK = int(input())\n# s\u304cabcac \u306e\u5834\u5408\u3001a,bca,ac \u306a\u3069\u306f\u90e8\u5206\u5217(substring\n# abc \u3068ab\u306e\u5834\u5408\u3001ab\u306e\u65b9\u304c\u8f9e\u66f8\u9806\u3067\u5c0f\u3055\u3044\u3068\u5224\u65ad\u3059\u308b\u3002\n# abc \u3068aba\u306e\u5834\u5408\u3001aba\u306e\u65b9\u304c\u5c0f\u3055\u3044\n\nsubstrings = set([])\nfor i in range(5):\n for j in range(len(s) - i):\n # print(i, j)\n substrings.add(s[j : j + i + 1])\n# print(substrings)\nprint(sorted(substrings)[K - 1])\n","change":"replace","i1":7,"i2":12,"j1":7,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"str_s = input()\nint_k = int(input())\n\nresult = list()\nfor f in range(len(str_s)):\n pattern = set()\n if len(result) == int_k and str_s[f] > result[-1][0]:\n continue\n for t in range(f + 1, len(str_s) + 1):\n pattern.add(str_s[f:t])\n result = sorted(set(result + sorted(list(pattern))[:int_k]))[:int_k]\n\nprint(result[-1])\n","fail":"str_s = input()\nint_k = int(input())\n\nresult = list()\nfor f in range(len(str_s)):\n pattern = set()\n for t in range(f + 1, f + 1 + int_k):\n pattern.add(str_s[f:t])\n result = sorted(set(result + list(pattern)))[:int_k]\n\nprint(result[-1])\n","change":"replace","i1":6,"i2":11,"j1":6,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"# https:\/\/atcoder.jp\/contests\/abc097\/tasks\/arc097_a\n# \u307e\u305a\u306f\u611a\u76f4\u306b\u5b9f\u88c5\u3057\u3066\u307f\u308b\n\nS = input()\nK = int(input())\ncandi = []\nfor s in range(len(S)):\n for e in range(s + 1, len(S) + 1):\n candi.append(S[s:e])\ncandi = list(set(candi))\ncandi.sort()\nprint(candi[K - 1])\n","fail":"# https:\/\/atcoder.jp\/contests\/abc097\/tasks\/arc097_a\n\n\n# \u8f9e\u66f8\u9806\u306b\u7f6e\u3044\u3066\u306f\u6587\u5b57\u306e\u5148\u982d\u304c\u91cd\u8981\u3002\n# \u4e00\u6587\u5b57\u76ee\u304c\u901f\u3044\u3084\u3064\u304b\u3089\u6ce8\u76ee\u3057\u3066\u3044\u304f\u3002\n# \u4e00\u6587\u5b57\u76ee\u304c\u540c\u3058\u3060\u3063\u305f\u3089\u3055\u3089\u306b\u305d\u306e\u6b21\u306e\u6587\u5b57\u3092\u6ce8\u76ee\u3059\u308b\u3002\n\n# atcoderandatcodeer\n# a a a # 1\u7a2e\n# at an at # 1\u7a2e #t\u306f\u4ee5\u4e0b\u306e\u3059\u3079\u3066\u3088\u308a\u3082\u8f9e\u66f8\u9806\u304c\u3042\u3068\n# and # 1\u7a2e\n# anda # 1\u7a2e\n# andat #\n\nS = input()\nK = int(input())\n\n# \u4e00\u756a\u901f\u3044\u6587\u5b57\u3092\u691c\u7d22\u3057\u3066\u304b\u3089\u305d\u3053\u304b\u3089K\u6587\u5b57\u898b\u308b\u306e\u304c\u4e00\u756a\u65e9\u305d\u3046\u3002\n# \u305f\u3060\u3057\u3001K\u6587\u5b57\u306a\u3044\u5834\u5408\u306f\u8fbb\u8904\u5408\u308f\u305b\u304c\u5fc5\u8981\n# \u3066\u304b\u8a08\u7b97\u91cf\u7684\u306b\u3001\u3053\u3093\u306a\u3053\u3068\u3057\u306a\u304f\u3066\u3082K\u6587\u5b57\u76ee\u307e\u3067\u5168\u5217\u6319\u3059\u308c\u3070\u3088\u304f\u306d\uff1f\n\n# mi = min(S)\ncandi = []\nfor s in range(len(S)):\n for add in range(1, K + 1):\n candi.append(S[s : s + add])\n\ncandi = list(set(candi))\ncandi.sort()\nprint(candi[K - 1])\n","change":"replace","i1":1,"i2":9,"j1":1,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Runtime Error","pass":"s = input()\nK = int(input())\nresult = []\nalphabet = list(\"abcdefghijklmnopqrstuvwxyz\")\n\nfor u in alphabet:\n for i in range(len(s)):\n if s[i] == u:\n for j in range(i + 1, min(i + K + 1, len(s) + 1)):\n result.append(s[i:j])\n if len(result) > K:\n break\n\nresult = list(set(result))\nresult.sort()\n# print(result)\n# print(len(result))\nprint(result[K - 1])\n","fail":"s = input()\nK = int(input())\nsubs = []\nfor i in range(0, len(s)):\n for j in range(i + 1, K + i + 1 if i + K <= len(s) else len(s) + 1):\n subs.append(s[i:j])\n\n\nsubs = list(set(subs))\n\nsubs.sort()\nprint(subs[K - 1])\n","change":"replace","i1":2,"i2":18,"j1":2,"j2":12,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03353","language":"Python","original_status":"Runtime Error","pass":"s = input()\nk = int(input())\nn = len(list(s))\nkouho = set()\nfor i in range(n):\n for d in range(1, k + 1):\n if i + d < n:\n kouho.add(s[i : i + d])\nans = list(kouho)\nans.sort()\nprint(ans[k - 1])\n","fail":"s = input()\nk = int(input())\nn = len(list(s))\nkouho = set()\nfor i in range(n):\n for d in range(1, k + 1):\n if i + d <= n:\n kouho.add(s[i : i + d])\nans = list(kouho)\nans.sort()\n# print(ans)\nprint(ans[k - 1])\n","change":"replace","i1":6,"i2":10,"j1":6,"j2":11,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03353\/Python\/s674016265.py\", line 11, in \n print(ans[k - 1])\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nK = int(input())\n\nS = set([])\nfor i in range(len(s)):\n for j in range(i + 1, len(s) + 1):\n # print(f'{s[i:j]=}')\n S.add(s[i:j])\n# print(f'{S=}')\n# print(f'{sorted(S)=}')\nans = sorted(S)[K - 1]\nprint(ans)\n","fail":"s = input()\nK = int(input())\n\nS = set([])\nfor i in range(len(s)):\n for j in range(i + 1, i + 1 + K):\n # print(f'{s[i:j]=}')\n S.add(s[i:j])\n# print(f'{S=}')\n# print(f'{sorted(S)=}')\nans = sorted(S)[K - 1]\nprint(ans)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Runtime Error","pass":"s = input()\nK = int(input())\nalphabet = list(\"abcdefghijklmnopqrstuvwxyz\")\nresult = []\n\nfor u in alphabet:\n for i in range(len(s)):\n if s[i] == u:\n for j in range(i + 1, min(i + K + 1, len(s) + 1)):\n result.append(s[i:j])\n if len(result) > K:\n break\n\nresult = list(set(result))\nresult.sort()\n# print(result)\n# print(len(result))\nprint(result[K - 1])\n","fail":"s = input()\nK = int(input())\nalphabet = list(\"abcdefghijklmnopqrstuvwxyz\")\nresult = []\n\nfor u in alphabet:\n for i in range(len(s)):\n if s[i] == u:\n for j in range(i + 1, min(i + K + 1, len(s) + 1)):\n result.append(s[i:j])\n result = list(set(result))\n if len(result) > K:\n break\n\nresult.sort()\nprint(result[K - 1])\n","change":"replace","i1":10,"i2":17,"j1":10,"j2":15,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nK = int(input())\n\ns_set = set()\nfor i in range(len(s) + 1):\n for j in range(i + 1, len(s) + 1):\n s_set.add(s[i:j])\ns_list = list(s_set)\ns_list.sort()\nprint(s_list[K - 1])\n","fail":"s = input()\nK = int(input())\n\ns_set = set()\nfor i in range(len(s)):\n for j in range(i + 1, i + K + 1):\n if j > len(s) + 1:\n break\n s_set.add(s[i:j])\ns_list = list(s_set)\ns_list.sort()\nprint(s_list[K - 1])\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nk = int(input())\na = set()\nfor i in range(len(s)):\n for j in range(i + 1, len(s) + 1):\n a.add(s[i:j])\nprint(sorted(list(a))[k - 1])\n","fail":"s = input()\nk = int(input())\na = set()\nfor i in range(len(s) + 1):\n for j in range(1, 6):\n a.add(s[i : i + j])\nprint(sorted(list(a))[k])\n","change":"replace","i1":3,"i2":7,"j1":3,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"from heapq import nsmallest\n\ns = input()\nK = int(input())\nsubs = set()\nfor i in range(len(s)):\n for j in range(i + 1, len(s) + 1):\n subs.add(s[i:j])\narr = list(subs)\nprint(nsmallest(K, arr)[-1])\n","fail":"from heapq import nsmallest\n\ns = input()\nK = int(input())\nsubs = set()\nfor i in range(len(s)):\n for j in range(i + 1, min(i + 6, len(s) + 1)):\n subs.add(s[i:j])\narr = list(subs)\nprint(nsmallest(K, arr)[-1])\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"S = input()\nK = int(input())\nN = len(S)\nsubstrs = set()\n\nfor i in range(N):\n cur = S[i]\n if cur not in substrs:\n substrs.add(cur)\n for j in range(i + 1, N):\n cur += S[j]\n if cur not in substrs:\n substrs.add(cur)\n\nsubstrs = sorted(substrs)\nprint(substrs[K - 1])\n","fail":"S = input()\nK = int(input())\nN = len(S)\nsubstrs = set()\n\nfor i in range(N):\n cur = S[i]\n if cur not in substrs:\n substrs.add(cur)\n for j in range(i + 1, min(N, i + 6)):\n cur += S[j]\n if cur not in substrs:\n substrs.add(cur)\n\nsubstrs = sorted(substrs)\nprint(substrs[K - 1])\n","change":"replace","i1":9,"i2":10,"j1":9,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Time Limit Exceeded","pass":"s = str(input())\nk = int(input())\nsubs = set()\nfor i in range(len(s)):\n for j in range(i + 1, len(s) + 1):\n subs.add(s[i:j])\nprint(sorted(list(subs))[k - 1])\n","fail":"s = str(input())\nk = int(input())\nsubs = set()\nfor i in range(len(s)):\n for j in range(i + 1, i + k + 1):\n subs.add(s[i:j])\nprint(sorted(list(subs))[k - 1])\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03353","language":"Python","original_status":"Runtime Error","pass":"import os\nimport sys\n\nif os.getenv(\"LOCAL\"):\n sys.stdin = open(\"_in.txt\", \"r\")\n\nS = sys.stdin.readline().rstrip()\nK = int(sys.stdin.readline())\n\n\ndef prune(it):\n hist = set()\n ret = []\n for s, l in it:\n if s not in hist:\n hist.add(s)\n if len(hist) > K:\n break\n ret.append((s, l))\n return ret\n\n\ncollections = prune(sorted([(c, L) for L, c in enumerate(S)]))\nfor size in range(1, len(S)):\n threshold, _ = collections[-1]\n for s, left in collections:\n r = left + size + 1\n if len(s) == size and r <= len(S):\n t = S[left:r]\n if t <= threshold:\n collections.append((t, left))\n collections = prune(sorted(collections))\n\nstrings = list(set([s for s, _ in collections]))\nstrings.sort()\nprint(strings[K - 1])\n","fail":"import os\nimport sys\n\nif os.getenv(\"LOCAL\"):\n sys.stdin = open(\"_in.txt\", \"r\")\n\nS = sys.stdin.readline().rstrip()\nK = int(sys.stdin.readline())\n\ns = set()\nfor k in range(1, K + 1):\n for i in range(len(S)):\n s.add(S[i : i + k])\n\ns = list(sorted(list(s)))\nprint(s[K - 1])\n","change":"replace","i1":9,"i2":36,"j1":9,"j2":16,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03354","language":"Python","original_status":"Time Limit Exceeded","pass":"# UnionFind\u3067\u53c2\u8003\u306b\u3057\u305f\u30da\u30fc\u30b8\n# http:\/\/www.geocities.jp\/m_hiroi\/light\/pyalgo61.html\n\n\n# \u96c6\u5408\u306e\u4ee3\u8868\u3092\u6c42\u3081\u308b\ndef find(x):\n while link[x] >= 0:\n x = link[x]\n return x\n\n\n# \u4f75\u5408\ndef union(x, y):\n s1 = find(x)\n s2 = find(y)\n if s1 != s2:\n if link[s1] >= link[s2]:\n # \u5c0f\u3055\u3044\u307b\u3046\u304c\u500b\u6570\u304c\u591a\u3044\n link[s1] += link[s2]\n link[s2] = s1\n else:\n link[s2] += link[s1]\n link[s1] = s2\n return True\n return False\n\n\nN, M = map(int, input().split())\np = list(map(int, input().split()))\nlink = [-1 for _ in range(N + 1)]\n\nfor _ in range(M):\n x, y = map(int, input().split())\n union(x, y)\n\ncnt = 0\nfor i in range(1, N + 1):\n a = find(i)\n b = find(p[i - 1])\n if a == b:\n cnt += 1\nprint(cnt)\n","fail":"# UnionFind\u3067\u53c2\u8003\u306b\u3057\u305f\u30da\u30fc\u30b8\n# http:\/\/www.geocities.jp\/m_hiroi\/light\/pyalgo61.html\n\n\n# \u96c6\u5408\u306e\u4ee3\u8868\u3092\u6c42\u3081\u308b\ndef find(x):\n if link[x] < 0:\n return x\n else:\n # \u7d4c\u8def\u306e\u5727\u7e2e\n link[x] = find(link[x])\n return link[x]\n\n\n# \u4f75\u5408\ndef union(x, y):\n s1 = find(x)\n s2 = find(y)\n if s1 != s2:\n if link[s1] >= link[s2]:\n # \u5c0f\u3055\u3044\u307b\u3046\u304c\u500b\u6570\u304c\u591a\u3044\n link[s1] += link[s2]\n link[s2] = s1\n else:\n link[s2] += link[s1]\n link[s1] = s2\n return True\n return False\n\n\nN, M = map(int, input().split())\np = list(map(int, input().split()))\nlink = [-1 for _ in range(N + 1)]\n\nfor _ in range(M):\n x, y = map(int, input().split())\n union(x, y)\n\ncnt = 0\nfor i in range(1, N + 1):\n if find(i) == find(p[i - 1]):\n cnt += 1\nprint(cnt)\n","change":"replace","i1":6,"i2":40,"j1":6,"j2":41,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03354","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\np = list(map(int, input().split()))\nxy = [list(map(int, input().split())) for _ in range(m)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if x == par[x]:\n return x\n par[x] = root(par[x]) # \u7d4c\u8def\u5727\u7e2e\n return par[x]\n\n\ndef is_same(x, y):\n return root(x) == root(y)\n\n\ndef unite(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n par[x] = y\n\n\nfor x, y in xy:\n unite(x - 1, y - 1)\n\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i - 1) else 0\nprint(count)\n","fail":"n, m = map(int, input().split())\np = list(map(int, input().split()))\nxy = [list(map(int, input().split())) for _ in range(m)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if x == par[x]:\n return x\n par[x] = root(par[x]) # \u7d4c\u8def\u5727\u7e2e\n return par[x]\n\n\ndef is_same(x, y):\n return root(x) == root(y)\n\n\ndef unite(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n\n\nfor x, y in xy:\n unite(x - 1, y - 1)\n\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i - 1) else 0\nprint(count)\n","change":"delete","i1":30,"i2":31,"j1":30,"j2":30,"error":"RecursionError: maximum recursion depth exceeded in comparison","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 40, in \n count += 1 if is_same(i, p_i - 1) else 0\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 17, in is_same\n return root(x) == root(y)\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 12, in root\n par[x] = root(par[x]) # \u7d4c\u8def\u5727\u7e2e\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 12, in root\n par[x] = root(par[x]) # \u7d4c\u8def\u5727\u7e2e\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 12, in root\n par[x] = root(par[x]) # \u7d4c\u8def\u5727\u7e2e\n [Previous line repeated 994 more times]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s246289030.py\", line 10, in root\n if x == par[x]:\nRecursionError: maximum recursion depth exceeded in comparison\n","stdout":null} {"problem_id":"p03354","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\np = list(map(lambda x: int(x) - 1, input().split()))\nxy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(m)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if par[x] == x:\n return x\n par[x] = root(x)\n return par[x]\n\n\ndef is_same(x, y):\n return par[x] == par[y]\n\n\ndef union(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[y] == rank[x]:\n rank[x] += 1\n\n\nfor x, y in xy:\n union(x, y)\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i) else 0\nprint(count)\n","fail":"n, m = map(int, input().split())\np = list(map(lambda x: int(x) - 1, input().split()))\nxy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(m)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if par[x] == x:\n return x\n par[x] = root(par[x])\n return par[x]\n\n\ndef is_same(x, y):\n return root(x) == root(y)\n\n\ndef union(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[y] == rank[x]:\n rank[x] += 1\n\n\nfor x, y in xy:\n union(x, y)\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i) else 0\nprint(count)\n","change":"replace","i1":11,"i2":17,"j1":11,"j2":17,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03354","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\np = list(map(lambda x: int(x) - 1, input().split()))\nxy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if par[x] == x:\n return x\n par[x] = root(par[x])\n return par[x]\n\n\ndef is_same(x, y):\n return root(x) == root(y)\n\n\ndef union(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n\n\nfor x, y in xy:\n union(x, y)\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i) else 0\nprint(count)\n","fail":"n, m = map(int, input().split())\np = list(map(lambda x: int(x) - 1, input().split()))\nxy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(m)]\n\npar = [i for i in range(n)]\nrank = [0 for _ in range(n)]\n\n\ndef root(x):\n if par[x] == x:\n return x\n par[x] = root(par[x])\n return par[x]\n\n\ndef is_same(x, y):\n return root(x) == root(y)\n\n\ndef union(x, y):\n x = root(x)\n y = root(y)\n if x == y:\n return\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n\n\nfor x, y in xy:\n union(x, y)\n\ncount = 0\nfor i, p_i in enumerate(p):\n count += 1 if is_same(i, p_i) else 0\nprint(count)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s721322256.py\", line 3, in \n xy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s721322256.py\", line 3, in \n xy = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03354","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\np = [0] + list(map(int, input().split()))\nx, y = zip(*(map(int, input().split()) for _ in range(M)))\nE = [[] for _ in range(N + 1)]\nfor a, b in zip(x, y):\n E[a].append(b)\n E[b].append(a)\nv = [True for _ in range(N + 1)]\n\n\ndef f(i, P, Q):\n v[i] = False\n P.add(i)\n Q.add(p[i])\n for a in E[i]:\n if v[a]:\n f(a, P, Q)\n\n\nans = 0\nfor i in range(1, N + 1):\n if v[i]:\n P = set()\n Q = set()\n f(i, P, Q)\n ans += len(P & Q)\nprint(ans)\n","fail":"import sys\n\nsys.setrecursionlimit(2 * 10**5)\n\nN, M = map(int, input().split())\np = [0] + list(map(int, input().split()))\nx, y = zip(*(map(int, input().split()) for _ in range(M)))\nE = [[] for _ in range(N + 1)]\nfor a, b in zip(x, y):\n E[a].append(b)\n E[b].append(a)\nv = [True for _ in range(N + 1)]\n\n\ndef f(i, P, Q):\n v[i] = False\n P.add(i)\n Q.add(p[i])\n for a in E[i]:\n if v[a]:\n f(a, P, Q)\n\n\nans = 0\nfor i in range(1, N + 1):\n if v[i]:\n P = set()\n Q = set()\n f(i, P, Q)\n ans += len(P & Q)\nprint(ans)\n","change":"insert","i1":0,"i2":0,"j1":0,"j2":4,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03354","language":"Python","original_status":"Runtime Error","pass":"# ABC097D - Equals (ARC097D)\n\"\"\"\nUnion-Find: O(\u03b1(N))\n\nVerified:\n https:\/\/onlinejudge.u-aizu.ac.jp\/courses\/library\/3\/DSL\/1\/DSL_1_A\n https:\/\/judge.yosupo.jp\/problem\/unionfind\n\"\"\"\n\n\nclass UnionFind:\n __slots__ = [\"_data_size\", \"_first_index\", \"_parents\"]\n\n def __init__(self, data_size: int, is_zero_indexed: bool = True) -> None:\n self._data_size = data_size\n self._first_index = 0 if is_zero_indexed else 1\n self._parents = [-1] * (data_size + self._first_index)\n\n def find(self, x: int) -> int:\n \"\"\"Find the group (root) of vertex x\"\"\"\n if self._parents[x] < 0:\n return x\n self._parents[x] = self.find(self._parents[x])\n return self._parents[x]\n\n def is_same(self, x: int, y: int) -> bool:\n \"\"\"Return whether two vertices x and y are in the same group or not.\"\"\"\n return self.find(x) == self.find(y)\n\n def unite(self, x: int, y: int) -> None:\n \"\"\"Unite two groups of vertices x and y.\"\"\"\n x, y = self.find(x), self.find(y)\n if x == y:\n return\n if self._parents[x] > self._parents[y]:\n x, y = y, x\n self._parents[x] += self._parents[y]\n self._parents[y] = x\n\n\ndef main():\n N, _, *PXY = open(0).read().split()\n P, XY = PXY[:N], PXY[N:]\n uf = UnionFind(N, is_zero_indexed=False)\n for x, y in zip(*[iter(XY)] * 2):\n uf.unite(x, y)\n ans = sum(uf.is_same(i, p) for i, p in enumerate(P, 1))\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"# ABC097D - Equals (ARC097D)\nclass UnionFind:\n __slots__ = [\"_data_size\", \"_first_index\", \"_parents\"]\n\n def __init__(self, data_size: int, is_zero_indexed: bool = True) -> None:\n self._data_size = data_size\n self._first_index = 0 if is_zero_indexed else 1\n self._parents = [-1] * (data_size + self._first_index)\n\n def find(self, x: int) -> int:\n \"\"\"Find the group (root) of vertex x\"\"\"\n if self._parents[x] < 0:\n return x\n self._parents[x] = self.find(self._parents[x])\n return self._parents[x]\n\n def is_same(self, x: int, y: int) -> bool:\n \"\"\"Return whether two vertices x and y are in the same group or not.\"\"\"\n return self.find(x) == self.find(y)\n\n def unite(self, x: int, y: int) -> None:\n \"\"\"Unite two groups of vertices x and y.\"\"\"\n x, y = self.find(x), self.find(y)\n if x == y:\n return\n if self._parents[x] > self._parents[y]:\n x, y = y, x\n self._parents[x] += self._parents[y]\n self._parents[y] = x\n\n\ndef main():\n N, _, *PXY = map(int, open(0).read().split())\n P, XY = PXY[:N], PXY[N:]\n uf = UnionFind(N, is_zero_indexed=False)\n for x, y in zip(*[iter(XY)] * 2):\n uf.unite(x, y)\n ans = sum(uf.is_same(i, p) for i, p in enumerate(P, 1))\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":1,"i2":42,"j1":1,"j2":33,"error":"TypeError: slice indices must be integers or None or have an __index__ method","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s667971540.py\", line 52, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03354\/Python\/s667971540.py\", line 43, in main\n P, XY = PXY[:N], PXY[N:]\nTypeError: slice indices must be integers or None or have an __index__ method\n","stdout":null} {"problem_id":"p03355","language":"Python","original_status":"Time Limit Exceeded","pass":"if __name__ == \"__main__\":\n s = input()\n subsrings = []\n K = int(input())\n for i in range(len(s)):\n subsrings.append(s[i:])\n subsrings.sort()\n\n first = set()\n\n for s in subsrings:\n for i in range(1, len(s) + 1):\n if s[:i] not in first:\n first.add(s[:i])\n if len(first) == K:\n print(s[:i])\n break\n","fail":"if __name__ == \"__main__\":\n s = input()\n\n K = int(input())\n\n subsrings = [s[i : i + K + 1] for i in range(len(s))]\n subsrings.sort()\n\n first = set()\n\n for s in subsrings:\n\n for i in range(1, len(s) + 1):\n if s[:i] not in first:\n first.add(s[:i])\n if len(first) == K:\n print(s[:i])\n break\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03355","language":"Python","original_status":"Time Limit Exceeded","pass":"S = input()\nK = int(input())\nn = len(S)\n\nans = []\nst = set()\n\nfor i in range(n):\n for j in range(i + 1, n + 1):\n sub = S[i:j]\n # print(sub)\n if sub in st:\n continue\n st.add(sub)\n ans.append(sub)\n ans.sort()\n # print(ans)\n if len(ans) > K:\n ans = ans[:K]\n\nprint(ans[-1])\n","fail":"S = input()\nK = int(input())\nn = len(S)\n\nans = []\nst = set()\n\nfor i in range(n):\n for j in range(i + 1, min(n + 1, i + 1 + K)):\n sub = S[i:j]\n # print(sub)\n if sub in st:\n continue\n st.add(sub)\n ans.append(sub)\n ans.sort()\n # print(ans)\n if len(ans) > K:\n ans = ans[:K]\n\nprint(ans[-1])\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03355","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nK = int(input())\ns_dic = {c: [] for c in \"abcdefghijklmnopqrstuvwxyz\"}\nfor i, c in enumerate(s):\n s_dic[c].append(i)\nsubstrings = set()\nfor lc in \"abcdefghijklmnopqrstuvwxyz\":\n for i in s_dic[lc]:\n for j in range(i + 1, len(s) + 1):\n substrings.add(s[i:j])\n if len(substrings) >= K:\n break\nprint(sorted(list(substrings))[K - 1])\n","fail":"s = input()\nK = int(input())\ns_dic = {c: [] for c in \"abcdefghijklmnopqrstuvwxyz\"}\nfor i, c in enumerate(s):\n s_dic[c].append(i)\nsubstrings = set()\nfor indices in s_dic.values():\n for i in indices:\n for j in range(i + 1, i + K + 1):\n substrings.add(s[i:j])\nprint(sorted(list(substrings))[K - 1])\n","change":"replace","i1":6,"i2":12,"j1":6,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03355","language":"Python","original_status":"Time Limit Exceeded","pass":"S = input()\nN = len(S)\nK = int(input())\nans = set()\nfor c in \"abcdefghijklmnopqrstuvwxyz\":\n for i in range(N):\n if S[i] == c:\n for j in range(i + 1, N + 1):\n ans.add(S[i:j])\n if len(ans) >= K:\n break\nprint(sorted(list(ans))[K - 1])\n","fail":"S = input()\nN = len(S)\nK = int(input())\nans = set()\nfor c in \"abcdefghijklmnopqrstuvwxyz\":\n for i in range(N):\n if S[i] == c:\n for j in range(i + 1, i + K + 1):\n ans.add(S[i:j])\n if len(ans) >= K:\n break\nprint(sorted(list(ans))[K - 1])\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03355","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nk = int(input())\n\narray = set()\nn = len(s)\n\nfor i in range(n):\n for j in range(i + 1, n + 1):\n ss = s[i:j]\n array.add(ss)\n if len(array) > k:\n array = sorted(array)\n array.pop()\n array = set(array)\n\narray = sorted(array)\nprint(array[k - 1])\n","fail":"s = input()\nk = int(input())\n\nn = len(s)\narray = []\n\nfor i in range(n):\n for j in range(i + 1, i + 6):\n end = min(n, j)\n ss = s[i:end]\n array.append(ss)\n\narray = set(array)\narray = sorted(array)\nprint(array[k - 1])\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03356","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python\n\n\nclass UnionFind:\n def __init__(self, size):\n self.table = list(range(size))\n\n def find(self, x):\n return self.table[x]\n\n def union(self, x, y):\n x1 = self.find(x)\n y1 = self.find(y)\n if x1 == y1:\n return False\n for i in range(len(self.table)):\n if self.table[i] == y1:\n self.table[i] = x1\n return True\n\n\nn, m = map(int, input().split())\nps = list(map(int, input().split()))\nuf = UnionFind(n)\nfor _ in range(m):\n x, y = map(int, input().split())\n uf.union(x - 1, y - 1)\nprint(sum([uf.find(i) == uf.find(p - 1) for i, p in enumerate(ps)]))\n","fail":"#!\/usr\/bin\/env python\n\n\nclass UnionFind:\n def __init__(self, n):\n self.par = [i for i in range(n)]\n self.rank = [0 for _ in range(n)]\n\n def find(self, x):\n if self.par[x] == x:\n return x\n else:\n self.par[x] = self.find(self.par[x])\n return self.par[x]\n\n def unite(self, x, y):\n x = self.find(x)\n y = self.find(y)\n\n if x == y:\n return\n\n if self.rank[x] < self.rank[y]:\n self.par[x] = y\n else:\n self.par[y] = x\n if self.rank[x] == self.rank[y]:\n self.rank[x] += 1\n\n def same(self, x, y):\n return self.find(x) == self.find(y)\n\n\nn, m = map(int, input().split())\nps = list(map(int, input().split()))\nuf = UnionFind(n + 1)\nfor _ in range(m):\n x, y = map(int, input().split())\n uf.unite(x, y)\nprint(sum([uf.same(i + 1, p) for i, p in enumerate(ps)]))\n","change":"replace","i1":4,"i2":28,"j1":4,"j2":40,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03359","language":"Python","original_status":"Runtime Error","pass":"a, b = int(input())\n\nif b >= a:\n print(a)\nelse:\n print(a)\n","fail":"a, b = map(int, input().split())\n\nif b >= a:\n print(a)\nelse:\n print(a - 1)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":6,"error":"ValueError: invalid literal for int() with base 10: '5 5'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03359\/Python\/s441621370.py\", line 1, in \n a, b = int(input())\nValueError: invalid literal for int() with base 10: '5 5'\n","stdout":null} {"problem_id":"p03359","language":"Python","original_status":"Runtime Error","pass":"a, b = int(input().split())\nprint(a if a <= b else a - 1)\n","fail":"a, b = map(int, input().split())\nprint(a if a <= b else a - 1)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03359\/Python\/s022785363.py\", line 1, in \n a, b = int(input().split())\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p03360","language":"Python","original_status":"Runtime Error","pass":"def f(a, b, c, k):\n abc = sorted([a, b, c])\n abc[2] *= 2 * k\n print(sum(abc))\n\n\nf(map(int, input().split()), int(input()))\n","fail":"def f(a, b, c, k):\n abc = sorted([a, b, c])\n if k != 0:\n abc[2] *= 2**k\n print(sum(abc))\n\n\na, b, c = map(int, input().split())\nk = int(input())\nf(a, b, c, k)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":10,"error":"TypeError: f() missing 2 required positional arguments: 'c' and 'k'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03360\/Python\/s048419312.py\", line 7, in \n f(map(int, input().split()), int(input()))\nTypeError: f() missing 2 required positional arguments: 'c' and 'k'\n","stdout":null} {"problem_id":"p03360","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input().split())\nK = int(input())\nresult = sum(A, B, C)\nt = max(A, B, C)\nresult += (t << K) - t\nprint(result)\n","fail":"A, B, C = map(int, input().split())\nK = int(input())\nresult = sum([A, B, C])\nt = max(A, B, C)\nresult += (t << K) - t\nprint(result)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: sum() takes at most 2 arguments (3 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03360\/Python\/s848836757.py\", line 3, in \n result = sum(A, B, C)\nTypeError: sum() takes at most 2 arguments (3 given)\n","stdout":null} {"problem_id":"p03360","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split())\nk = int(input())\n\nm = max(a, b, c)\nans = sum(a, b, c) - m + (2**k) * m\n\nprint(ans)\n","fail":"a, b, c = map(int, input().split())\nk = int(input())\n\nm = max(a, b, c)\nans = a + b + c - m + (2**k) * m\n\nprint(ans)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TypeError: sum() takes at most 2 arguments (3 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03360\/Python\/s177658372.py\", line 5, in \n ans = sum(a, b, c) - m + (2**k) * m\nTypeError: sum() takes at most 2 arguments (3 given)\n","stdout":null} {"problem_id":"p03361","language":"Python","original_status":"Runtime Error","pass":"def inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n field = []\n for row in inputs:\n line = []\n for c in row:\n line.append(c)\n field.append(line)\n\n if len(field) == 1:\n if len(field[0]) == 1:\n return \"No\"\n\n for i, row in enumerate(field):\n for j, _ in enumerate(row):\n available = False\n if field[i][j] == \".\":\n continue\n if i - 1 >= 0:\n available |= field[i - 1][j] == \"#\"\n\n if j - 1 >= 0:\n available |= field[i][j - 1] == \"#\"\n if j + 1 < len(row):\n available |= field[i][j + 1] == \"#\"\n\n if i + 1 < len(row):\n available |= field[i + 1][j] == \"#\"\n if not available:\n return \"No\"\n\n return \"Yes\"\n\n\nif __name__ == \"__main__\":\n [N, _] = map(lambda x: int(x), input().split())\n ret = solve(inputs(N))\n print(ret)\n","fail":"def inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n field = []\n for row in inputs:\n line = []\n for c in row:\n line.append(c)\n field.append(line)\n\n if len(field) == 1:\n if len(field[0]) == 1:\n return \"No\"\n\n for i, row in enumerate(field):\n for j, _ in enumerate(row):\n available = False\n if field[i][j] == \".\":\n continue\n if i - 1 >= 0:\n available |= field[i - 1][j] == \"#\"\n\n if j - 1 >= 0:\n available |= field[i][j - 1] == \"#\"\n if j + 1 < len(row):\n available |= field[i][j + 1] == \"#\"\n\n if i + 1 < len(field):\n available |= field[i + 1][j] == \"#\"\n if not available:\n return \"No\"\n\n return \"Yes\"\n\n\nif __name__ == \"__main__\":\n [N, _] = map(lambda x: int(x), input().split())\n ret = solve(inputs(N))\n print(ret)\n","change":"replace","i1":30,"i2":31,"j1":30,"j2":31,"error":0,"stderr":null,"stdout":"Yes\n"} {"problem_id":"p03361","language":"Python","original_status":"Runtime Error","pass":"H, W = map(int, input().split())\nS = [list(input()) for _ in range(H)]\n\nds = [(1, 0), (-1, 0), (0, 1), (0, -1)]\n\nfor i in range(H):\n for j in range(W):\n if S[i][j] == \".\":\n continue\n\n flag = False\n for dx, dy in ds:\n x, y = i + dx, j + dy\n if x < 0 or W <= x or y < 0 or H <= y:\n continue\n\n if S[x][y] == \"#\":\n flag = True\n break\n\n if not flag:\n print(\"No\")\n exit()\nprint(\"Yes\")\n","fail":"H, W = map(int, input().split())\nS = [list(input()) for _ in range(H)]\n\nd = [(-1, 0), (1, 0), (0, -1), (0, 1)]\n\nfor i in range(H):\n for j in range(W):\n if S[i][j] == \".\":\n continue\n\n flag = False\n for dx, dy in d:\n i2, j2 = i + dx, j + dy\n if not (0 <= i2 < H and 0 <= j2 < W):\n continue\n\n if S[i2][j2] == \"#\":\n flag = True\n\n if not flag:\n print(\"No\")\n exit()\nprint(\"Yes\")\n","change":"replace","i1":3,"i2":19,"j1":3,"j2":18,"error":0,"stderr":null,"stdout":"Yes\n"} {"problem_id":"p03362","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nout = [i * 2 for i in range(1, N + 1)]\n\nprint(*out, \" \")\n","fail":"N = int(input())\n\nsosuu = []\n\n\ndef next_sosuu():\n if len(sosuu) == 0:\n sosuu.append(2)\n return 2\n if len(sosuu) == 1:\n sosuu.append(3)\n return 3\n curr = sosuu[-1] + 2\n\n while True:\n flag = True\n for s in sosuu:\n if curr % s == 0:\n flag = False\n break\n if flag:\n sosuu.append(curr)\n return curr\n curr += 2\n\n\nresults = []\nwhile len(results) < N:\n n = next_sosuu()\n if n % 5 == 1:\n results.append(n)\n\ntxt = \"\"\nfor r in results:\n txt += str(r) + \" \"\ntxt = txt[0:-1]\nprint(txt)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":37,"error":"WA","stderr":null,"stdout":"2 4 6 8 10 \n"} {"problem_id":"p03362","language":"Python","original_status":"Time Limit Exceeded","pass":"from itertools import combinations\n\n\ndef is_prime(n):\n if n < 2:\n return False\n elif n == 2:\n return True\n else:\n for p in range(2, n):\n if n % p == 0:\n return False\n else:\n return True\n\n\n# input\nN = int(input())\n\n# check\nprime_nums = [n for n in range(2, 55555) if is_prime(n)]\nfor case in combinations(prime_nums, N):\n fl = True\n for check_case in combinations(case, 5):\n if is_prime(sum(check_case)):\n fl = False\n break\n if fl:\n res = \" \".join([str(num) for num in case])\n print(res)\n exit(0)\n","fail":"def is_prime(n):\n if n < 2:\n return False\n else:\n for p in range(2, n):\n if n % p == 0:\n return False\n else:\n return True\n\n\n# input\nN = int(input())\n\n# check\nprime_nums = []\nappend = prime_nums.append\nfor n in range(2, 55555):\n if is_prime(n) and n % 5 == 1:\n append(n)\n if len(prime_nums) == N:\n break\n\nres = \" \".join([str(num) for num in prime_nums])\nprint(res)\nexit(0)\n","change":"replace","i1":0,"i2":31,"j1":0,"j2":26,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03362","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\n\ndef is_prime(n):\n for i in range(1, n):\n if i != 1 and n % i == 0:\n return False\n return True\n\n\ndef prime_numbers():\n num = 2\n while True:\n is_num_prime = is_prime(num)\n if is_num_prime:\n yield num\n num += 1\n\n\nprime_gene = prime_numbers()\nans = []\n\nwhile len(ans) < 5:\n prime = next(prime_gene)\n if prime_gene % 5 == 1:\n ans.append(prime)\nprint(ans)\n","fail":"N = int(input())\n\n\ndef is_prime(n):\n for i in range(1, n):\n if i != 1 and n % i == 0:\n return False\n return True\n\n\ndef prime_numbers():\n num = 5\n while True:\n is_num_prime = is_prime(num)\n if is_num_prime and num % 5 == 1:\n yield num\n num += 1\n\n\nprime_gene = prime_numbers()\nans = [next(prime_gene) for _ in range(N)]\nprint(*ans)\n","change":"replace","i1":11,"i2":27,"j1":11,"j2":22,"error":"TypeError: unsupported operand type(s) for %: 'generator' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03362\/Python\/s462787302.py\", line 25, in \n if prime_gene % 5 == 1:\nTypeError: unsupported operand type(s) for %: 'generator' and 'int'\n","stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(_) for _ in input().split()]\ncumsum = [0]\nfor a in A:\n cumsum += [cumsum[-1] + a]\nans = 0\nfor i in range(N):\n for j in range(i + 1, N + 1):\n ans += cumsum[j] - cumsum[i] == 0\nprint(ans)\n","fail":"import heapq\n\nN = int(input())\nA = [int(_) for _ in input().split()]\ncumsum = [0]\nfor a in A:\n cumsum += [cumsum[-1] + a]\nheapq.heapify(cumsum)\nbefore = 10**10\ncount = 0\nans = 0\nwhile cumsum:\n now = heapq.heappop(cumsum)\n count += before == now\n if not (before == now and cumsum):\n ans += count * (count + 1) \/\/ 2\n count = 0\n before = now\nprint(ans)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\ninputs = [int(i) for i in input().split()]\n\nans = 0\n\nfor i in range(N):\n total = 0\n for item in inputs[i:]:\n total += item\n if total == 0:\n ans += 1\n\nprint(ans)\n","fail":"from collections import Counter\n\nN = int(input())\ninputs = [int(i) for i in input().split()]\n\nans = 0\nruisekiwa = [0] * (N + 1)\n\nfor i in range(N):\n ruisekiwa[i + 1] = ruisekiwa[i] + inputs[i]\n\nruisekiwa = ruisekiwa[1:]\nruisekiwa.sort()\ncounter_ruiseki = Counter(ruisekiwa)\n\nfor key, value in counter_ruiseki.items():\n if key == 0 and value == 1:\n ans += value\n continue\n elif key == 0 and value > 1:\n ans += value\n if value > 1:\n ans += sum(list(range(value)))\n\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nnum_list = list(map(int, input().split()))\ncumulative_sum_list = [0]\nc_s = 0\nfor i in num_list:\n c_s += i\n cumulative_sum_list.append(c_s)\ncumulative_sum_list.sort()\ncumulative_sum_set = set(cumulative_sum_list)\ns = 0\nfor i in cumulative_sum_set:\n c = cumulative_sum_list.count(i)\n s += c * (c - 1) \/\/ 2\nprint(s)\n","fail":"from itertools import accumulate\nfrom collections import Counter\n\nN = int(input())\nnum_list = list(map(int, input().split()))\ncumulative_sum_list = list(accumulate(num_list))\ncumulative_sum_list.append(0)\n\nc = Counter(cumulative_sum_list)\ns = 0\nfor i in c.values():\n s += i * (i - 1) \/\/ 2\nprint(s)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\ncnt = 0\n\nfor i in range(0, N):\n for j in range(i + 1, N + 1):\n if sum(A[i:j]) == 0:\n cnt += 1\n\nprint(cnt)\n","fail":"from collections import Counter\n\nN = int(input())\nA = list(map(int, input().split()))\n\nS = [0]\n\nfor i, a in enumerate(A):\n S.append(S[i] + a)\n\nS = sorted(S)\na = Counter(S).most_common()\ncnt = 0\n\nfor i in range(len(a)):\n cnt += ((a[i][1] - 1) * a[i][1]) \/\/ 2\n\nprint(cnt)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nc = list(map(int, input().split()))\n","fail":"a = int(input())\nc = list(map(int, input().split()))\nd = {0: 1}\ne = 0\nfor i in range(len(c)):\n e += c[i]\n if e not in d:\n d[e] = 1\n else:\n d[e] += 1\nans = 0\nfor v in d.values():\n if v >= 2:\n ans += v * (v - 1) \/\/ 2\nprint(ans)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":15,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03363\/Python\/s063469917.py\", line 1, in \n a, b = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = map(int, input().split())\n\nS = [0]\n\nfor a in A:\n S.append(S[len(S) - 1] + a)\n\nS = sorted(S)\n\nret = 0\nfor s in set(S):\n cnt = S.count(s)\n ret += cnt * (cnt - 1) \/ 2\nprint(int(ret))\n","fail":"N = int(input())\nA = map(int, input().split())\n\nS = [0]\n\nfor a in A:\n S.append(S[len(S) - 1] + a)\n\nS = sorted(S) + [None]\nret = 0\ncnt = 1\nfor i in range(1, N + 2):\n if S[i] != S[i - 1]:\n ret += cnt * (cnt - 1) \/\/ 2\n cnt = 1\n else:\n cnt += 1\n\nprint(ret)\n","change":"replace","i1":8,"i2":15,"j1":8,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03363","language":"Python","original_status":"Time Limit Exceeded","pass":"import bisect\n\nn = int(input())\nnums = list(map(int, input().split(\" \")))\nsigma = []\ntemp = 0\nfor num in nums:\n temp += num\n sigma.append(temp)\n\nans = 0\nfor i, s in enumerate(sigma):\n if s == 0:\n ans += 1\n beforeSums = sorted(sigma[:i])\n li = bisect.bisect_left(beforeSums, s)\n if li >= i:\n continue\n while beforeSums[li] == s:\n ans += 1\n li += 1\n if li >= i:\n break\nprint(ans)\n","fail":"from collections import Counter\n\nN = int(input())\nA = list(map(int, input().split(\" \")))\nS = [\n 0,\n]\nnow = 0\nfor n in A:\n now += n\n S.append(now)\nScounter = Counter(S)\nans = 0\nfor c, n in Scounter.most_common():\n if n >= 2:\n ans += n * (n - 1) \/\/ 2\n else:\n break\nprint(ans)\n","change":"replace","i1":0,"i2":23,"j1":0,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03364","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\ncnt = 0\nS_list = [input() for _ in range(N)]\n\n\ndef count_symmetry(S_symmetry):\n for i in range(N):\n for j in range(N):\n if S_symmetry[i][j] != S_symmetry[j][i]:\n return False\n return True\n\n\nfor k in range(N):\n S_symmetry = S_list[k:] + S_list[:k]\n if count_symmetry(S_symmetry):\n cnt += 1\n\nprint(cnt * N)\n","fail":"N = int(input())\nS_list = [input() for _ in range(N)]\ncnt = 0\n\n\ndef count_symmetry(S_symmetry):\n for i in range(N):\n for j in range(i + 1, N):\n if S_symmetry[i][j] != S_symmetry[j][i]:\n return False\n return True\n\n\nfor k in range(N):\n S_symmetry = S_list[k:] + S_list[:k]\n if count_symmetry(S_symmetry):\n cnt += 1\n\nprint(cnt * N)\n","change":"replace","i1":1,"i2":9,"j1":1,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03370","language":"Python","original_status":"Time Limit Exceeded","pass":"N, X = map(int, input().split())\nm = [int(i) for i in range(N)]\nm.sort()\nans = 3\n\nX -= sum(m)\n\n\nwhile X >= m[0]:\n X -= m[0]\n ans += 1\n\nprint(ans)\n","fail":"N, X = map(int, input().split())\nans = N\nm_list = []\n\nfor i in range(N):\n m = int(input())\n m_list.append(m)\n\nm_list.sort()\nX -= sum(m_list)\n\nans += X \/\/ m_list[0]\n\nprint(ans)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03370","language":"Python","original_status":"Runtime Error","pass":"N, X = map(int, input().split())\nM = [int(input()) for _ in range(N)]\nans = 0\nfor m in range(M):\n X -= m\n ans += 1\nans += X \/\/ min(M)\nprint(ans)\n","fail":"N, X = map(int, input().split())\nM = [int(input()) for _ in range(N)]\nans = 0\nfor m in M:\n X -= m\n ans += 1\nans += X \/\/ min(M)\nprint(ans)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TypeError: 'list' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03370\/Python\/s961847795.py\", line 4, in \n for m in range(M):\nTypeError: 'list' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03371","language":"Python","original_status":"Runtime Error","pass":"A, B, C, X, Y = map(int, input().split())\n\nwhile X > 0 or Y > 0:\n if A + B > C:\n sum += C\n X -= 1\n Y -= 1\n else:\n sum += A + B\n X -= 1\n Y -= 1\n if X > 0 and Y > 0:\n continue\n if X > 0:\n if A > C:\n sum += C\n X -= 1\n Y -= 1\n else:\n sum += A\n X -= 1\n else:\n if B > C:\n sum += C\n X -= 1\n Y -= 1\n else:\n sum += B\n Y -= 1\n\nprint(sum)\n","fail":"A, B, C, X, Y = map(int, input().split())\nsum = 0\n\nwhile X > 0 or Y > 0:\n if X > 0 and Y > 0:\n if A + B > 2 * C:\n sum += 2 * C\n X -= 1\n Y -= 1\n else:\n sum += A + B\n X -= 1\n Y -= 1\n else:\n if X > 0:\n if A > 2 * C:\n sum += 2 * C\n X -= 1\n Y -= 1\n else:\n sum += A\n X -= 1\n else:\n if B > 2 * C:\n sum += 2 * C\n X -= 1\n Y -= 1\n else:\n sum += B\n Y -= 1\n\nprint(sum)\n","change":"replace","i1":1,"i2":29,"j1":1,"j2":30,"error":"TypeError: unsupported operand type(s) for +=: 'builtin_function_or_method' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03371\/Python\/s190876666.py\", line 5, in \n sum += C\nTypeError: unsupported operand type(s) for +=: 'builtin_function_or_method' and 'int'\n","stdout":null} {"problem_id":"p03371","language":"Python","original_status":"Runtime Error","pass":"A, B, C, X, Y = list(map(int, input().split()))\n\n# A 1\u679a\u3001B 1\u679a\u30922C\u5186\u3067\u8cb7\u3046\u3068\u6349\u3048\u76f4\u3059\u3002\n# \u30d4\u30b6\u306f\u3001\u6700\u5927\u3067\u308210**5\u679a\uff08A, B\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\uff09\n# A, B\u306e\u30bb\u30c3\u30c8\u3092\u30011~10**\u30bb\u30c3\u30c8\u307e\u3067\u52d5\u304b\u3057\u3066\u4e00\u756a\u5b89\u3044\u7d44\u3092\u8003\u3048\u308b\n\ncheapest = float(\"inf\")\n\nfor i in range(max(X, Y) + 1):\n\n price = 2 * C * i + A * max(0, X - i) + B * max(Y - i)\n\n cheapest = min(cheapest, price)\n\nprint(cheapest)\n","fail":"A, B, C, X, Y = list(map(int, input().split()))\n\n# A 1\u679a\u3001B 1\u679a\u30922C\u5186\u3067\u8cb7\u3046\u3068\u6349\u3048\u76f4\u3059\u3002\n# \u30d4\u30b6\u306f\u3001\u6700\u5927\u3067\u308210**5\u679a\uff08A, B\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\uff09\n# A, B\u306e\u30bb\u30c3\u30c8\u3092\u30011~10**\u30bb\u30c3\u30c8\u307e\u3067\u52d5\u304b\u3057\u3066\u4e00\u756a\u5b89\u3044\u7d44\u3092\u8003\u3048\u308b\n\ncheapest = float(\"inf\")\n\nfor i in range(max(X, Y) + 1):\n\n price = 2 * C * i + A * max(0, X - i) + B * max(0, Y - i)\n\n cheapest = min(cheapest, price)\n\nprint(cheapest)\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03371\/Python\/s831575287.py\", line 11, in \n price = 2 * C * i + A * max(0, X - i) + B * max(Y - i)\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03371","language":"Python","original_status":"Runtime Error","pass":"A, B, C, X, Y = map(int, input().split())\nif A + B < 2 * C:\n ans = A * X + B * Y\nelif A + B >= 2 * C:\n nokori = abs(X - Y)\n if X >= Y and A >= 2 * C:\n ans = C * 2 * X\n if Y >= X and B >= 2 * C:\n ans = C * 2 * Y\n if X > Y and A < 2 * C:\n ans = C * 2 * Y + nokori * A\n if Y > X and B < 2 * C:\n ans = C * 2 * X + nokori * B\nprint(ans)\n","fail":"A, B, C, X, Y = map(int, input().split())\nif A + B <= 2 * C:\n ans = A * X + B * Y\nelif A + B > 2 * C:\n nokori = abs(X - Y)\n if X >= Y and A >= 2 * C:\n ans = C * 2 * X\n if Y >= X and B >= 2 * C:\n ans = C * 2 * Y\n if X >= Y and A <= 2 * C:\n ans = C * 2 * Y + nokori * A\n if Y >= X and B <= 2 * C:\n ans = C * 2 * X + nokori * B\nprint(ans)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":12,"error":"0","stderr":null,"stdout":7900.0} {"problem_id":"p03371","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n# coding: utf-8\n\"\"\"\npurpose\n\"\"\"\n\n\ndef main() -> None:\n \"\"\"\n main function\n \"\"\"\n (A, B, C, X, Y) = map(int, input().strip().split())\n\n if 2 * C <= B and 2 * C <= A:\n ans = (max(X, Y) * 2) * C\n elif 2 * C > A:\n ans = Y * 2 * C + max(X - Y, 0) * B\n elif 2 * C > B:\n ans = X * 2 * C + max(Y - X, 0) * A\n else:\n raise ValueError(f\"{A}, {B}, {C}\")\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python\n# coding: utf-8\n\"\"\"\npurpose\n\"\"\"\n\n\ndef main() -> None:\n \"\"\"\n main function\n \"\"\"\n (A, B, C, X, Y) = map(int, input().split())\n\n if 2 * C <= A + B:\n ans = C * min(X, Y) * 2 + min(\n max((X - Y) * A, (Y - X) * B), max(X - Y, Y - X) * C * 2\n )\n else:\n ans = A * X + B * Y\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":11,"i2":21,"j1":11,"j2":19,"error":"WA","stderr":null,"stdout":8400.0} {"problem_id":"p03372","language":"Python","original_status":"Time Limit Exceeded","pass":"N, C = map(int, input().split())\n\n# x = 0 \u306b v = 0 \u306e\u5bff\u53f8\u304c\u3042\u308b\u3068\u8003\u3048\u308b\nX = [0]\nV = [0]\n\nfor _ in range(N):\n x, v = map(int, input().split())\n X.append(x)\n V.append(v)\n# print(X)\n# print(V)\n\n# 0, v_1, v_1+v_2, v_1+v_2+v_3, ...\ncumsum1 = [0]\nfor i in range(1, N + 1):\n cumsum1.append(cumsum1[-1] + V[i])\n\n# 0, v_N, v_N+v_N-1, v_N+v_N-1+v_N-2, ...\ncumsum2 = [0]\nfor i in range(N, 0, -1):\n cumsum2.append(cumsum2[-1] + V[i])\n\n# print(cumsum1)\n# print(cumsum2)\n\n# \u6b69\u304f\u7bc4\u56f2\u3092\u5f27AB\u3068\u8003\u3048\u308b(A<=B)\n# x_A = 0, x_1, x_2, ..., x_N\n# x_B = x_A, ..., x_N\nans = 0\n\nfor i in range(N + 1):\n for j in range(i + 1, N + 1):\n # print(i, j)\n a = X[i]\n b = X[j]\n if i == 0:\n # \u53cd\u6642\u8a08\u56de\u308a(\u53cd\u8ee2\u3057\u306a\u3044)\n ans = max(ans, cumsum1[j] - b)\n # \u6642\u8a08\u56de\u308a(\u53cd\u8ee2\u3057\u306a\u3044)\n ans = max(ans, cumsum2[N + 1 - j] - (C - b))\n else:\n # O -> A -> B(\u53cd\u8ee2)\n ans = max(ans, cumsum1[i] + cumsum2[N + 1 - j] - 2 * a - (C - b))\n # O -> B -> A(\u53cd\u8ee2)\n ans = max(ans, cumsum1[i] + cumsum2[N + 1 - j] - 2 * (C - b) - a)\n\nprint(ans)\n","fail":"N, C = map(int, input().split())\n\n# x = 0 \u306b v = 0 \u306e\u5bff\u53f8\u304c\u3042\u308b\u3068\u8003\u3048\u308b\nX = [0]\nV = [0]\n\nfor _ in range(N):\n x, v = map(int, input().split())\n X.append(x)\n V.append(v)\n\n# 0, v_1, v_1+v_2, v_1+v_2+v_3, ...\ncumsum1 = [0]\nfor i in range(1, N + 1):\n cumsum1.append(cumsum1[-1] + V[i])\n\n# 0, v_N, v_N+v_N-1, v_N+v_N-1+v_N-2, ...\ncumsum2 = [0]\nfor i in range(N, 0, -1):\n cumsum2.append(cumsum2[-1] + V[i])\n\n# \u6b69\u304f\u7bc4\u56f2\u3092\u5f27AB\u3068\u8003\u3048\u308b(A<=B)\n# x_A = 0, x_1, x_2, ..., x_N\n# x_B = x_A, ..., x_N\n\n# 0, v_1-x_1, v_1+v_2-x_2, v_1+v_2+v_3-x_3, ...\nf1 = [0]\n# 0, v_1-2*x_1, v_1+v_2-2*x_2, v_1+v_2+v_3-2*x_3, ...\nf2 = [0]\nfor i in range(1, N + 1):\n f1.append(cumsum1[i] - X[i])\n f2.append(cumsum1[i] - 2 * X[i])\n\nf1_max = [0]\nfor i in range(1, N + 1):\n f1_max.append(max(f1_max[-1], f1[i]))\nf2_max = [0]\nfor i in range(1, N + 1):\n f2_max.append(max(f2_max[-1], f2[i]))\n\nans = 0\n# B\u3092\u5168\u63a2\u7d22\uff08\u56fa\u5b9a\u3059\u308b\uff09\nfor i in range(N + 1):\n if i == 0:\n continue\n else:\n # 0 -> B(\u53cd\u6642\u8a08\u56de\u308a\u3001\u53cd\u8ee2\u306a\u3057)\n ans = max(ans, cumsum1[i] - X[i])\n # 0 -> B(\u6642\u8a08\u56de\u308a\u3001\u53cd\u8ee2\u306a\u3057)\n ans = max(ans, cumsum2[N + 1 - i] - (C - X[i]))\n # 0 -> A -> B(\u53cd\u8ee2)\n ans = max(ans, f2_max[i - 1] + cumsum2[N + 1 - i] - (C - X[i]))\n # 0 -> B -> A(\u53cd\u8ee2)\n ans = max(ans, f1_max[i - 1] + cumsum2[N + 1 - i] - 2 * (C - X[i]))\n\nprint(ans)\n","change":"replace","i1":10,"i2":46,"j1":10,"j2":54,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03373","language":"Python","original_status":"Runtime Error","pass":"A, B, C, X, Y = map(int, input().split())\n\nif X >= 2 and Y >= 2:\n ans = A * X + B * Y\n if C * 2 < A + B:\n z = min(X \/\/ 2, Y \/\/ 2)\n ans = A * (X - z * 2) + B * (Y - z * 2) + C * (z * 4)\n\n z = max(X \/\/ 2, Y \/\/ 2)\n ans = min(ans, A * max(0, (X - z * 2)) + B * max(0, (Y - z * 2)) + C * (z * 4))\n\nprint(ans)\n","fail":"A, B, C, X, Y = map(int, input().split())\n\nans = A * X + B * Y\nif X >= 1 and Y >= 1:\n\n z = min(X, Y)\n ans = min(ans, A * (X - z) + B * (Y - z) + C * (z * 2))\n\n z = max(X, Y)\n ans = min(ans, A * max(0, (X - z)) + B * max(0, (Y - z)) + C * (z * 2))\n\nprint(ans)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":10,"error":0,"stderr":null,"stdout":7900} {"problem_id":"p03377","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\nx = int(input())\n\nif a <= x <= a + b:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"a, b, x = map(int, input().split())\n\nif a <= x <= a + b:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '3 5 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03377\/Python\/s414661619.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '3 5 4'\n","stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"import numpy as np\n\nN = int(input())\nX = list(map(int, input().split()))\n\nfor i in range(N):\n B = X.copy()\n B.pop(i)\n print(int(np.median(B)))\n","fail":"N = int(input())\nX = list(map(int, input().split()))\n\nY = sorted(X)\n\nl = Y[N \/\/ 2 - 1]\nr = Y[N \/\/ 2]\n\nfor x in X:\n if l >= x:\n print(r)\n else:\n print(l)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"import statistics\nimport copy\n\nn = int(input())\na = list(map(int, input().split()))\nao = copy.copy(a)\nfor i in range(n):\n a.pop(i)\n print(statistics.median(a))\n a = copy.copy(ao)\n","fail":"import statistics\n\nn = int(input())\nx = list(map(int, input().split()))\nxmd = statistics.median(x)\nxs = sorted(x)\nfor i in x:\n if i < xmd:\n print(xs[n \/\/ 2])\n else:\n print(xs[n \/\/ 2 - 1])\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"from statistics import median\n\nN = int(input())\nX = list(map(int, input().split()))\n\nfor i in range(N):\n Xx = [X[k] for k in range(N) if k != i]\n print(median(Xx))\n","fail":"N = int(input())\nX = list(map(int, input().split()))\n\nXs = sorted(X)\nmedian1 = Xs[int(N \/ 2) - 1]\nmedian2 = Xs[int(N \/ 2)]\n\nfor i in range(N):\n if X[i] >= median2:\n print(median1)\n else:\n print(median2)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"from copy import copy\n\nN = int(input())\nX = list(map(int, input().split()))\n\nfor xi in X:\n Y = copy(X)\n Y.remove(xi)\n print(sorted(Y)[N \/\/ 2 - 1])\n","fail":"N = int(input())\nX = list(map(int, input().split()))\n\nM_small = sorted(X)[N \/\/ 2 - 1]\nM_large = sorted(X)[N \/\/ 2]\n\nfor xi in X:\n if xi <= M_small:\n print(M_large)\n else:\n print(M_small)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"import copy\n\ninput = open(0).read\n\nN, *X = map(int, input().split())\n\n\ndef main():\n a = copy.copy(X)\n a.sort()\n\n for i in range(N):\n print(a[N \/\/ 2] if a.index(X[i]) < N \/\/ 2 else a[N \/\/ 2 - 1])\n\n return\n\n\nmain()\n","fail":"import copy\n\ninput = open(0).read\n\nN, *X = map(int, input().split())\n\n\ndef main():\n a = copy.copy(X)\n l, r = sorted(a)[N \/\/ 2 - 1 : N \/\/ 2 + 1]\n\n print(\"\\\\n\".join([str(r) if x < r else str(l) for x in X]))\n return\n\n\nmain()\n","change":"replace","i1":9,"i2":14,"j1":9,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nx = list(map(int, input().split()))\nx1 = []\nfor i, xi in enumerate(x):\n x1.append([i, xi])\n\nx_sort = sorted(x1, key=lambda x: x[1])\nt = int(n \/ 2)\nlxt = []\nfor i in range(n):\n if i < t:\n lxt.append(x_sort[i][0])\n else:\n break\n\nfor i in range(n):\n if i in lxt:\n print(x_sort[t][1])\n else:\n print(x_sort[t - 1][1])\n","fail":"n = int(input())\nx = list(map(int, input().split()))\nx1 = []\nfor i, xi in enumerate(x):\n x1.append([i, xi])\n\nx_sort = sorted(x1, key=lambda x: x[1])\nt = int(n \/ 2)\nlxt = []\nfor i in range(n):\n if i < t:\n x[x_sort[i][0]] = x_sort[t][1]\n else:\n x[x_sort[i][0]] = x_sort[t - 1][1]\n\nfor i in range(n):\n print(x[i])\n","change":"replace","i1":11,"i2":20,"j1":11,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nX = list(map(int, input().split()))\n\nargsort = [[x, i] for i, x in enumerate(X)]\nargsort.sort()\nargsort = [[i, j] for j, [_, i], in enumerate(argsort)]\nargsort.sort()\nranks = [j + 1 for _, j in argsort]\n\nindices = [[x, i] for i, x in enumerate(X)]\nindices.sort()\nindices = {(i + 1): x for i, (x, _) in enumerate(indices)}\n\n\nmedian = N \/\/ 2\nfor i in range(0, N):\n r = ranks[i]\n if r <= median:\n print(indices[median + 1])\n else:\n print(indices[median])\n","fail":"N = int(input())\nX = list(map(int, input().split()))\n\nargsort = [[x, i] for i, x in enumerate(X)]\nargsort.sort()\n\nindices = {(i + 1): x for i, (x, _) in enumerate(argsort)}\n\nargsort = [[i, j] for j, [_, i], in enumerate(argsort)]\nargsort.sort()\n\nranks = [j + 1 for _, j in argsort]\n\nmedian = N \/\/ 2\nfor i in range(0, N):\n r = ranks[i]\n if r <= median:\n print(indices[median + 1])\n else:\n print(indices[median])\n","change":"replace","i1":5,"i2":13,"j1":5,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\narray = list(map(int, input().split()))\nfor i in range(0, N):\n konichiwa = list(array)\n konichiwa.pop(i)\n konichiwa.sort()\n print(konichiwa[int(N \/ 2) - 1])\n","fail":"N = int(input())\narray = list(map(int, input().split()))\ntest = list(array)\ntest.sort()\nwow = test[int(N \/ 2) - 1 : int(N \/ 2) + 1]\nfor i in range(0, N):\n if array[i] > wow[0]:\n print(wow[0])\n else:\n print(wow[1])\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nX = [int(i) for i in input().split()]\nfor i in range(N):\n x = [int(X[j]) for j in range(N) if i != j]\n x.sort()\n print(x[(N - 1) \/\/ 2])\n","fail":"N = int(input())\nX = [int(i) for i in input().split()]\nx = sorted(X)\nn = N \/\/ 2\nfor i in range(N):\n if X[i] < x[n]:\n print(x[n])\n else:\n print(x[n - 1])\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nx = list(map(int, input().split()))\n\nfor i in range(N):\n tmp = x.pop(i)\n tmplst = sorted(x)\n print(tmplst[(N - 1) \/\/ 2])\n x.insert(i, tmp)\n","fail":"import statistics\n\nN = int(input())\nx = list(map(int, input().split()))\nsx = sorted(x)\ntmp = statistics.median(sx)\n\nfor i in range(N):\n if x[i] <= tmp:\n print(sx[((N - 1) \/\/ 2) + 1])\n else:\n print(sx[(N - 1) \/\/ 2])\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nx = list(map(int, input().split()))\n\nc = (n - 1) \/\/ 2\n\nfor i in range(len(x)):\n x2 = x.copy()\n x2.pop(i)\n x2.sort()\n print(x2[c])\n","fail":"n = int(input())\nx = list(map(int, input().split()))\n\nx2 = x.copy()\nx2.sort()\nc1 = x2[n \/\/ 2 - 1]\nc2 = x2[n \/\/ 2]\nfor i in x:\n if c1 >= i:\n print(c2)\n else:\n print(c1)\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03379","language":"Python","original_status":"Time Limit Exceeded","pass":"import numpy as np\n\nn = int(input())\nx = np.array(list(map(int, input().split(\" \"))))\n\nsorted_x = sorted(x)\nsorted_ind = list(np.argsort(x))\nhalf_n = int(n \/ 2)\n\n# print(x)\n# print(half_n)\n# print(sorted_ind)\n# print(sorted_x)\n\nfor i in range(n):\n # print(\"==========\")\n ind = sorted_ind.index(i)\n # print(\"ind: {}\".format(ind))\n if ind <= half_n - 1:\n print(sorted_x[half_n - 1 + 1])\n else:\n print(sorted_x[half_n - 1])\n","fail":"n = int(input())\nx = list(map(int, input().split()))\n\nsorted_x = sorted(x)\n\nmedian_1 = sorted_x[n \/\/ 2 - 1]\nmedian_2 = sorted_x[n \/\/ 2]\n\nfor i in range(n):\n if x[i] <= median_1:\n print(median_2)\n else:\n print(median_1)\n","change":"replace","i1":0,"i2":22,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03380","language":"Python","original_status":"Runtime Error","pass":"import scipy.misc as scm\n\nn = int(input())\na = list(map(int, input().split()))\n\na = sorted(a, reverse=True)\n\ncomb = -1\na_i = a[0]\ncomb = 0\nfor i in range(1, n):\n c = scm.comb(a_i, a[i])\n if comb > c:\n comb = c\n a_j = a[i]\n else:\n break\nprint(a_i, a_j)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\na = sorted(a, reverse=True)\n\ncomb = -1\na_i = a[0]\nif a_i % 2 == 0:\n mid = int(a_i \/ 2)\n dif = 10**9\n for i in range(1, n):\n if dif > abs(a[i] - mid):\n dif = abs(a[i] - mid)\n a_j = a[i]\nelse:\n mid = int(a_i \/ 2)\n dif = 10**9\n for i in range(1, n):\n if a[i] > mid:\n if dif > abs(a[i] - mid - 1):\n dif = abs(a[i] - mid - 1)\n a_j = a[i]\n else:\n if dif > abs(a[i] - mid):\n dif = abs(a[i] - mid)\n a_j = a[i]\n\nprint(a_i, a_j)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":27,"error":"ModuleNotFoundError: No module named 'scipy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03380\/Python\/s898511833.py\", line 1, in \n import scipy.misc as scm\nModuleNotFoundError: No module named 'scipy'\n","stdout":null} {"problem_id":"p03380","language":"Python","original_status":"Time Limit Exceeded","pass":"import math\n\n\ndef combinations_count(n, r):\n return math.factorial(n) \/\/ (math.factorial(n - r) * math.factorial(r))\n\n\nn = int(input())\na = list(map(int, input().split()))\na.sort(reverse=True)\n\nans = 0\na_i = a[0]\na_j = a[1]\nfor idx in range(1, n):\n if ans < combinations_count(a_i, a[idx]):\n ans = combinations_count(a_i, a[idx])\n a_j = a[idx]\n\nprint(\"%d %d\" % (a_i, a_j))\n","fail":"n = int(input())\na = list(map(int, input().split()))\na.sort(reverse=True)\n\nmax_a = max(a)\na.remove(max_a)\nda = [abs(ai - max_a \/ 2) for ai in a]\nmed_i = da.index(min(da))\n\nprint(\"%d %d\" % (max_a, a[med_i]))\n","change":"replace","i1":0,"i2":20,"j1":0,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03380","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n n = int(input())\n a = list(map(int, input().split()))\n if n == 2:\n print(a[0], a[1])\n ma = max(a)\n for i in range(n):\n if ma \/\/ 2 - i in a:\n print(ma, ma \/\/ 2 - i)\n exit()\n if ma \/\/ 2 - i + 1 in a:\n print(ma, ma \/\/ 2 - i + 1)\n exit()\n\n\nmain()\n","fail":"def main():\n n = int(input())\n a = list(map(int, input().split()))\n if n == 2:\n print(max(a), min(a))\n else:\n ma = max(a)\n sa = sorted([(i, abs(ma \/\/ 2 - a[i])) for i in range(n)], key=lambda x: x[1])\n print(ma, a[sa[0][0]])\n\n\nmain()\n","change":"replace","i1":4,"i2":13,"j1":4,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03380","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nans1 = max(a)\n\nflag = True\nif ans1 % 2 == 1:\n s1 = ans1 \/\/ 2\n s2 = ans1 \/\/ 2 + 1\nelse:\n if ans1 \/\/ 2 in a:\n flag = False\n ans2 = ans1 \/\/ 2\n else:\n s1 = ans1 \/\/ 2 - 1\n s2 = ans1 \/\/ 2 + 1\n\nwhile flag:\n if s1 in a:\n ans2 = s1\n break\n elif s2 in a:\n ans2 = s2\n break\n s1 -= 1\n s2 += 1\n\nprint(ans1, ans2)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\nans1 = max(a)\nsa = sorted(a)\n\nif n == 2:\n ans1 = a[0]\n ans2 = a[1]\nelse:\n idx = n \/\/ 2\n flag = True\n if sa[idx] == ans1 \/\/ 2:\n ans2 = ans1 \/\/ 2\n elif sa[idx] < ans1 \/\/ 2:\n while True:\n idx += 1\n if ans1 \/\/ 2 <= sa[idx]:\n if abs(sa[idx] - ans1 \/ 2) < abs(sa[idx - 1] - ans1 \/ 2):\n ans2 = sa[idx]\n else:\n ans2 = sa[idx - 1]\n break\n else:\n while True:\n idx -= 1\n if sa[idx] <= ans1 \/\/ 2:\n if abs(sa[idx] - ans1 \/ 2) < abs(sa[idx + 1] - ans1 \/ 2):\n ans2 = sa[idx]\n else:\n ans2 = sa[idx + 1]\n break\n\nprint(ans1, ans2)\n","change":"replace","i1":4,"i2":26,"j1":4,"j2":32,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03380","language":"Python","original_status":"Time Limit Exceeded","pass":"from math import factorial\n\n\ndef perm(n, r):\n return factorial(n) \/\/ factorial(n - r)\n\n\ndef comb(n, r):\n return perm(n, r) \/\/ factorial(r)\n\n\nn = int(input())\nA = list(map(int, input().split()))\nA.sort()\nm = A.pop()\nbiggest = 0\nbiggest_r = 0\nfor r in A:\n var = comb(m, r)\n if var > biggest:\n biggest = var\n biggest_r = r\nprint(m, biggest_r)\n","fail":"from bisect import bisect\n\nn = int(input())\nA = list(map(int, input().split()))\nA.sort()\nb = A.pop()\nm = b \/ 2\ni = bisect(A, m)\nA.insert(i, m)\n\nif i == 0:\n print(b, A[1])\nelif i == len(A) - 1:\n print(b, A[-2])\nelif A[i] - A[i - 1] < A[i + 1] - A[i]:\n print(b, A[i - 1])\nelse:\n print(b, A[i + 1])\n","change":"replace","i1":0,"i2":23,"j1":0,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03381","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nX = [int(x) for x in input().split()]\n\nX2 = sorted(X)\n\nfor i in range(0, N):\n idx = X2.index(X[i])\n if idx < N \/\/ 2:\n print(X2[N \/\/ 2])\n else:\n print(X2[N \/\/ 2 - 1])\n","fail":"import bisect\n\nN = int(input())\nX = [int(x) for x in input().split()]\n\nX2 = sorted(X)\n\nfor i in range(0, N):\n # idx = X2.index(X[i])\n idx = bisect.bisect_left(X2, X[i])\n if idx < N \/\/ 2:\n print(X2[N \/\/ 2])\n else:\n print(X2[N \/\/ 2 - 1])\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03382","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = sorted([int(_) for _ in input().split()])\n\n\ndef comb(n, r):\n res = 1\n for i in range(n - r + 1, n + 1):\n res *= i\n for i in range(1, r):\n res \/\/= i\n return res\n\n\nx = A.pop()\nN -= 1\nfor i in range(N):\n if A[i] > x \/\/ 2:\n break\nif comb(x, A[i]) > comb(x, A[i - 1]):\n y = A[i]\nelse:\n y = A[i - 1]\nprint(x, y)\n","fail":"N = int(input())\nA = sorted([int(_) for _ in input().split()])\n\n\ndef comb(n, r):\n res = 1\n for i in range(n - r + 1, n + 1):\n res *= i\n for i in range(1, r):\n res \/\/= i\n return res\n\n\nx = A.pop()\nN -= 1\nfor i in range(N):\n if A[i] > x \/\/ 2:\n break\nif abs(A[i] - x \/ 2) < abs(A[i - 1] - x \/ 2):\n print(x, A[i])\nelse:\n print(x, A[i - 1])\n","change":"replace","i1":18,"i2":23,"j1":18,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03385","language":"Python","original_status":"Runtime Error","pass":"S = str(input())\nans = {}\nans.add(S[0])\nans.add(S[1])\nans.add(S[2])\nif len(ans) == 3:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"S = str(input())\nif not (S[0] == S[1]) and not (S[1] == S[2]) and not (S[0] == S[2]):\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":2,"error":"AttributeError: 'dict' object has no attribute 'add'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03385\/Python\/s103059776.py\", line 3, in \n ans.add(S[0])\nAttributeError: 'dict' object has no attribute 'add'\n","stdout":null} {"problem_id":"p03385","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n s = str(input())\n if len(set(s[0], s[1], s[2])) == 3:\n print(\"Yes\")\n else:\n print(\"No\")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n s = str(input())\n if len(set([s[0], s[1], s[2]])) == 3:\n print(\"Yes\")\n else:\n print(\"No\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"TypeError: set expected at most 1 argument, got 3","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03385\/Python\/s179544392.py\", line 14, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03385\/Python\/s179544392.py\", line 7, in main\n if len(set(s[0], s[1], s[2])) == 3:\nTypeError: set expected at most 1 argument, got 3\n","stdout":null} {"problem_id":"p03385","language":"Python","original_status":"Runtime Error","pass":"s = input()\nL = [s[0], s[1], s[2]].sort().join()\nprint(\"Yes\") if L == \"abc\" else print(\"No\")\n","fail":"s = input()\nL = [s[0], s[1], s[2]]\nL.sort()\nS = \"\".join(L)\nprint(\"Yes\") if S == \"abc\" else print(\"No\")\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":5,"error":"AttributeError: 'NoneType' object has no attribute 'join'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03385\/Python\/s660041027.py\", line 2, in \n L = [s[0], s[1], s[2]].sort().join()\nAttributeError: 'NoneType' object has no attribute 'join'\n","stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"# https:\/\/atcoder.jp\/contests\/abc093\/tasks\/abc093_b\na, b, k = [int(x) for x in input().split()]\nr = list(range(a, b + 1))\nfor v in sorted(set(r[:k] + r[-k:])):\n print(v)\n","fail":"# https:\/\/atcoder.jp\/contests\/abc093\/tasks\/abc093_b\na, b, k = [int(x) for x in input().split()]\ns = list(range(a, b + 1)[:k])\nt = list(range(a, b + 1)[-k:])\nfor v in sorted(set(s + t)):\n print(v)\n","change":"replace","i1":2,"i2":4,"j1":2,"j2":5,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\nfor i in range(a, b + 1):\n if i < a + k or i > b - k:\n print(i)\n","fail":"a, b, k = map(int, input().split())\nfor i in range(a, min(a + k, b + 1)):\n print(i)\nfor i in range(max(a + k, b - k + 1), b + 1):\n print(i)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n A, B, K = map(int, input().split())\n\n for i in list(range(A, B + 1)):\n if A <= i <= A + K - 1 or B + 1 >= i >= B - K + 1:\n print(i)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n A, B, K = map(int, input().split())\n AK = [i for i in range(A, min(B + 1, A + K))]\n BK = [i for i in range(max(A, B - K + 1), B + 1)]\n\n result = list(set(AK) | set(BK))\n result.sort()\n\n for i in result:\n print(i)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":10,"j1":6,"j2":14,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\n\nfor i in range(a, b + 1):\n if i < a + k or i > b - k:\n print(i)\n","fail":"a, b, k = map(int, input().split())\n\nif b - a + 1 <= k * 2:\n for i in range(a, b + 1):\n print(i)\nelse:\n for i in range(a, a + k):\n print(i)\n for i in range(b - k + 1, b + 1):\n print(i)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"import copy\n\na, b, k = map(int, input().split())\n\nnum = copy.deepcopy(list(range(a, b + 1)))\n\na_k = num[:k]\nk_e = num[-k:]\n\n# print(a_k, k_e)\nans_set = set(a_k + k_e)\nans_list = copy.deepcopy(list(ans_set))\nans_list.sort()\nfor i in ans_list:\n print(i)\n","fail":"a, b, k = map(int, input().split())\n\nnum = range(a, b + 1)\n\na_k = num[:k]\nk_e = num[-k:]\n\n# print(a_k, k_e)\nans_set = set(a_k) | set(k_e)\nans_list = sorted(ans_set)\nfor i in ans_list:\n print(i)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":10,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"def resolve():\n a, b, k = list(map(int, input().split()))\n small = list(range(a, b))[:k]\n large = list(range(a, b + 1))[::-1][:k]\n ans = sorted(set(small + large))\n for i in ans:\n print(i)\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n a, b, k = list(map(int, input().split()))\n s = set()\n for i in range(a, min(a + k, b + 1)):\n s.add(i)\n for i in range(max(a, b - k + 1), b + 1):\n s.add(i)\n for i in sorted(s):\n print(i)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":8,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"def resolve():\n A, B, K = [int(i) for i in input().split()]\n numbers = [i for i in range(A, B + 1)]\n ans = numbers[:K]\n ans.extend(numbers[-K:])\n print(*sorted(set(ans)), sep=\"\\\\n\")\n\n\nresolve()\n","fail":"def resolve():\n A, B, K = [int(i) for i in input().split()]\n offset = 0\n while offset < K and A + offset <= B:\n print(A + offset)\n offset += 1\n begin = A + offset\n r = max(B - K + 1, begin)\n while r <= B:\n print(r)\n r += 1\n\n\nresolve()\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\nfor i in range(A, B + 1):\n if i - A < K or B - i < K:\n print(i)\n","fail":"A, B, K = map(int, input().split())\nret = range(A, B + 1)\nfor i in sorted(set(ret[:K]) | set(ret[-K:])):\n print(i)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\n\nans = []\n\nfor i in range(b - a + 1):\n n = a + i\n if n <= a + k - 1 or n >= b - k + 1:\n ans.append(n)\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])\n","fail":"a, b, k = map(int, input().split())\n\nans = []\n\nfor i in range(k):\n if a + i <= b and a <= b - i:\n ans.append(a + i)\n ans.append(b - i)\n\n# ans.sort()\nans = set(ans)\n\nfor i in sorted(ans):\n print(i)\n","change":"replace","i1":4,"i2":12,"j1":4,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\nfor n in sorted({*range(A, A + K), *range(B - K + 1, B + 1)}):\n print(n)\n","fail":"A, B, K = map(int, input().split())\nfor n in sorted(\n filter(lambda n: A <= n <= B, set(range(A, A + K)) | set(range(B - K + 1, B + 1)))\n):\n print(n)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":4,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"a, b, k = map(int, input().split())\nls = list(range(a, b + 1))\nlsRe = ls[::-1]\ns = set()\n\nif len(ls) > k:\n for i in range(k):\n s.add(ls[i])\n s.add(lsRe[i])\nelse:\n print(*ls, sep=\"\\\\n\")\n quit()\n\ns = sorted(s)\nprint(*s, sep=\"\\\\n\")\n","fail":"a, b, k = map(int, input().split())\ns = set()\nif b - a == 0:\n print(a)\nelif b - a + 1 <= k:\n print(*range(a, b + 1), sep=\"\\\\n\")\nelse:\n for i in range(k):\n s.add(a + i)\n s.add(b - i)\n s = sorted(s)\n print(*s, sep=\"\\\\n\")\n","change":"replace","i1":1,"i2":15,"j1":1,"j2":12,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\nfor i in range(A, B + 1):\n if abs(A - i) < K or abs(B - i) < K:\n print(i)\n","fail":"A, B, K = map(int, input().split())\nif B - A <= 2 * K - 1:\n for i in range(A, B + 1):\n print(i)\nelse:\n for i in range(A, A + K):\n print(i)\n for i in range(B - K + 1, B + 1):\n print(i)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"a, b, k = map(int, input().split())\n\nz = list(range(a, b + 1))\nans = sorted(list(set(z[:k]) | set(z[-k:])))\nfor x in ans:\n print(x)\n","fail":"a, b, k = map(int, input().split())\n\nfor i in range(a, min(a + k, b - k + 1)):\n print(i)\nfor i in range(max(a, b - k + 1), b + 1):\n print(i)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":6,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\nlst = [x for x in range(a, b + 1)]\nlst_small = lst[:k]\nlst_large = lst[-k:]\nans = list(set(lst_small) | set(lst_large))\nans = sorted(ans)\nfor i in range(len(ans)):\n print(ans[i])\n","fail":"a, b, k = map(int, input().split())\nif b - a > k:\n lst_small = [x for x in range(a, a + k)]\n lst_large = [x for x in range(b - k + 1, b + 1)]\n ans = list(set(lst_small) | set(lst_large))\n ans = sorted(ans)\nelse:\n ans = [x for x in range(a, b + 1)]\n\nfor i in range(len(ans)):\n print(ans[i])\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\nfor i in range(a, b + 1):\n if i <= a + (k - 1):\n print(i)\n elif i >= b - (k - 1):\n print(i)\n","fail":"a, b, k = map(int, input().split())\nfor i in range(a, min(b, a + k - 1) + 1):\n print(i)\nfor i in range(max(b - k + 1, a + k), b + 1):\n print(i)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\nfor i in range(a, b + 1):\n if i - a + 1 <= k or b - i + 1 <= k:\n print(i)\n","fail":"a, b, k = map(int, input().split())\nans = []\nfor i in range(a, min(a + k, b + 1)):\n ans.append(i)\nfor i in range(b, max(b - k, a - 1), -1):\n if i not in ans:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\nN = B - A + 1\nnums = list(range(A, B + 1))\nans = set()\n\nfor i in range(min(K, N)):\n ans.add(nums[i])\n\nnums.reverse()\nfor i in range(min(K, N)):\n ans.add(nums[i])\n\n\nans = list(ans)\nans.sort()\nfor i in ans:\n print(i)\n","fail":"A, B, K = map(int, input().split())\n\nans = set()\nfor i in range(A, min(B + 1, A + K)):\n ans.add(i)\n\nfor i in range(max(A, B - K + 1), B + 1):\n ans.add(i)\nans = sorted(list(ans))\nfor i in ans:\n print(i)\n","change":"replace","i1":1,"i2":15,"j1":1,"j2":9,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\nif B - A < 2 * K:\n ans = [*range(A, B + 1)]\nelse:\n ans = [*range(A, A + K), *range(B - K + 1, B + 1)]\nfor v in ans:\n print(v)\n","fail":"A, B, K = map(int, input().split())\nif B - A < 2 * K:\n # ans = [*range(A, B + 1)]\n ans = list(range(A, B + 1))\nelse:\n # ans = [*range(A, A + K), *range(B - K + 1, B + 1)]\n ans = list(range(A, A + K)) + list(range(B - K + 1, B + 1))\nfor v in ans:\n print(v)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":7,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"a, b, k = map(int, input().split())\n\nnum = list(range(a, b + 1))\n\na_k = num[:k]\nk_e = num[-k:]\n\n# print(a_k, k_e)\nans_set = set(a_k + k_e)\nans_list = list(ans_set)\nans_list.sort()\nfor i in ans_list:\n print(i)\n","fail":"a, b, k = map(int, input().split())\nr = range(a, b + 1)\nfor i in sorted(set(r[:k]) | set(r[-k:])):\n print(i)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":3,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\nprint(\n *sorted(\n list(set(range(A, min(B + 1, A + K))) | set(range(max(A, B - K) + 1, B + 1)))\n ),\n sep=\"\\\\n\",\n)\n","fail":"A, B, K = map(int, input().split())\nR = range(A, min(B + 1, A + K))\nS = range(max(A, B - K + 1), B + 1)\nL = list(set(R) | set(S))\nL.sort()\nprint(*L, sep=\"\\\\n\")\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":6,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\nr = [x for x in range(a, b + 1)]\nfor x in sorted(set(r[:k]) | set(r[-k:])):\n print(x)\n","fail":"a, b, k = map(int, input().split())\nr = range(a, b + 1)\nfor x in sorted(set(r[:k]) | set(r[-k:])):\n print(x)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\narr = range(A, B + 1)\nans = []\nfor i in range(K):\n ans[i] = arr[A + i]\nfor j in range(K):\n ans[j + K + 2] = arr[B + 1 - K + j]\nprint(set(ans))\n","fail":"A, B, K = map(int, input().split())\narr = range(A, B + 1)\nans = []\nfor i in range(K):\n ans.append(A + i)\nfor j in range(K):\n ans.append(B + 1 - K + j)\n\nanset = list(set(ans))\nanset.sort()\nif A + K <= B + 1:\n for ele in range(len(anset)):\n print(anset[ele])\nelse:\n for ele in range(A, B + 1):\n print(ele)\n","change":"replace","i1":4,"i2":8,"j1":4,"j2":16,"error":"IndexError: list assignment index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03386\/Python\/s604685648.py\", line 5, in \n ans[i] = arr[A + i]\nIndexError: list assignment index out of range\n","stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\nfor i in range(A, B + 1):\n if (i <= A + K - 1) or (i >= B - K + 1):\n print(i)\n continue\n","fail":"A, B, K = map(int, input().split())\nif B - A + 1 <= 2 * K:\n for i in range(A, B + 1):\n print(i)\n exit()\nfor i in range(A, A + K):\n print(i)\nfor i in range(B - K + 1, B + 1):\n print(i)\n","change":"replace","i1":1,"i2":5,"j1":1,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, k = map(int, input().split())\n\nfor i in range(a, b + 1):\n if i < a + k or i > b - k:\n print(i)\n","fail":"a, b, k = map(int, input().split())\n\nif b - a + 1 <= k * 2:\n for i in range(a, b + 1):\n print(i)\nelse:\n for i in range(a, a + k):\n print(i)\n for i in range((b - k + 1), (b + 1)):\n print(i)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"def abc():\n a, b, c = map(int, input().split())\n n = list(range(a, b + 1))\n for s in sorted(set(n[:c]) | set(n[-c:])):\n print(s)\n\n\nabc()\n","fail":"def abc():\n a, b, c = map(int, input().split())\n n = range(a, b + 1)\n for s in sorted(set(n[:c]) | set(n[-c:])):\n print(s)\n\n\nabc()\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\n\ns = set()\n\nfor i in range(A, B + 1):\n if i <= A + K - 1:\n s.add(i)\n elif B - K + 1 <= i:\n s.add(i)\n\ns = sorted(s)\n\nfor i in s:\n print(i)\n","fail":"A, B, K = map(int, input().split())\n\ns = set()\n\nfor i in range(A, min(A + K, B + 1)):\n s.add(i)\n\nfor i in range(B, max(A - 1, B - K), -1):\n s.add(i)\n\ns = sorted(s)\n\nfor i in s:\n print(i)\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"A, B, K = map(int, input().split())\nS = list(range(A, B + 1))\n\nans = sorted(set(S[:K] + S[-K:]))\nfor a in ans:\n print(a)\n","fail":"A, B, K = map(int, input().split())\nSA = list(range(A, min(B, A + K)))\nSB = list(range(max(A, B - K + 1), B + 1))\n\nans = sorted(set(SA + SB))\nfor a in ans:\n print(a)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":5,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\n\nfor i in range(A, B + 1):\n if i < A + K or i > B - K:\n print(i)\n","fail":"A, B, K = map(int, input().split())\n\nfor i in range(A, min(B + 1, A + K)):\n if i < A + K:\n print(i)\n\nfor i in range(max(B - K, A + K), B + 1):\n if i > B - K:\n print(i)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\nA, B, K = map(int, input().split())\nfor i in range(A, B + 1):\n if i < A + K or B - K < i:\n print(i)\n","fail":"#!\/usr\/bin\/env python3\nA, B, K = map(int, input().split())\nfor i in range(A, min(B + 1, A + K)):\n print(i)\nfor i in range(max(0, B - K + 1), B + 1):\n if i < A + K:\n continue\n print(i)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, K = map(int, input().split())\nfor num in range(A, B + 1):\n if num < A + K or num > B - K:\n print(num)\n","fail":"a, b, k = map(int, input().split())\n\nx = b - a\nif x < 2 * k:\n for i in range(a, b + 1):\n print(i)\nelse:\n for i in range(a, a + k):\n print(i)\n\n for i in range(b - k + 1, b + 1):\n print(i)\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03386","language":"Python","original_status":"Runtime Error","pass":"a, b, k = [int(x) for x in input().split()]\nlst = list(range(a, b + 1))\nres = []\nres.extend(lst[:k])\nres.extend(lst[-k:])\nres = sorted(set(res))\nfor i in res:\n print(i)\n","fail":"a, b, k = [int(x) for x in input().split()]\nr = range(a, b + 1)\nfor i in sorted(set(r[:k]) | set(r[-k:])):\n print(i)\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":3,"error":"0","stderr":null,"stdout":"3\n4\n7\n8\n"} {"problem_id":"p03387","language":"Python","original_status":"Runtime Error","pass":"A, B, C = sorted([int(x) for x in input().split()])\nif A == B and B == C:\n print(0)\n exit()\n\nret = 0\nwhile True:\n if A < B and B < C:\n A += 1\n B += 1\n elif A < B and B == C:\n A += 2\n elif A > B and B == C:\n B += 1\n C += 1\n else:\n # \u60f3\u5b9a\u5916\n exit(1)\n\n ret += 1\n if A == B and B == C:\n print(ret)\n exit()\n","fail":"A, B, C = map(int, input().split())\n\nret = 0\nwhile True:\n if A == B and B == C:\n print(ret)\n exit()\n\n ret += 1\n A, B, C = sorted([A, B, C])\n if B < C:\n A += 1\n B += 1\n elif B == C:\n A += 2\n","change":"replace","i1":0,"i2":23,"j1":0,"j2":15,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03387","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input().split())\ndiff = max(A, B, C) * 3 - sum(A, B, C)\nif diff % 2 == 0:\n print(diff \/\/ 2)\nelse:\n print(diff \/\/ 2 + 2)\n","fail":"A, B, C = map(int, input().split())\ndiff = max(A, B, C) * 3 - (A + B + C)\nif diff % 2 == 0:\n print(diff \/\/ 2)\nelse:\n print(diff \/\/ 2 + 2)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: sum() takes at most 2 arguments (3 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03387\/Python\/s401385664.py\", line 2, in \n diff = max(A, B, C) * 3 - sum(A, B, C)\nTypeError: sum() takes at most 2 arguments (3 given)\n","stdout":null} {"problem_id":"p03387","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input().split())\n\ncombi = [A, B, C]\nmax_ABC = max([A, B, C])\nother = [c for c in combi if c != max_ABC]\nmax_other = max(other)\nmin_other = min(other)\n\n# Operation (1st method)\nn_operation = max_ABC - max_other\nmax_other += n_operation\nmin_other += n_operation\n\nif max_other == min_other:\n print(n_operation)\n exit()\n\n# Operation (2nd method)\nif (max_ABC - min_other) % 2:\n n_add = (max_ABC - min_other) \/\/ 2 + 1\nelse:\n n_add = (max_ABC - min_other) \/\/ 2\nn_operation += n_add\n\nprint(n_operation)\n","fail":"# WIP\nA, B, C = map(int, input().split())\n\ncombi = [A, B, C]\nset_abc = set(combi)\n\nlen_set_abc = len(set_abc)\nmax_set = max(set_abc)\nmin_set = min(set_abc)\nif len_set_abc == 1:\n print(0)\nelif len_set_abc == 2:\n max_freq = combi.count(max_set)\n diff = max_set - min_set\n if max_freq == 2 and diff % 2:\n print((diff + 1) \/\/ 2 + 1)\n elif max_freq == 2:\n print(diff \/\/ 2)\n else:\n print(diff)\nelse:\n other = [c for c in combi if c != max_set]\n max_other = max(other)\n min_other = min(other)\n\n n_operation = max_set - max_other\n max_other += n_operation\n min_other += n_operation\n\n diff = max_set - min_other\n if diff % 2 and diff == 1:\n n_add = (max_set - min_other) \/\/ 2 + 2\n elif diff % 2:\n n_add = (max_set - min_other) \/\/ 2 + 2\n else:\n n_add = (max_set - min_other) \/\/ 2\n n_operation += n_add\n\n print(n_operation)\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":39,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03387","language":"Python","original_status":"Runtime Error","pass":"a = list(sorted(map(int, input().split())))\nif (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2)\nelif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 1)\nelse:\n if (a[2] - a[0]) % 2 == 1:\n a[0] += 3\n a[1] += 2\n a[2] += 1\n else:\n a[1] += 3\n a[0] += 2\n a[2] += 1\n a = sorted(a)\n if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 3)\n elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 1 + 3)\n else:\n raise\n","fail":"a = list(sorted(map(int, input().split())))\nif (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2)\nelif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 1)\nelse:\n if (a[2] - a[0]) % 2 == 1:\n a[0] += 2\n a[1] += 1\n a[2] += 1\n else:\n a[0] += 1\n a[1] += 2\n a[2] += 1\n a = sorted(a)\n if (a[2] - a[0]) % 2 == 0 and (a[2] - a[1]) % 2 == 0:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 2)\n elif (a[2] - a[0]) % 2 == 1 and (a[2] - a[1]) % 2 == 1:\n print((a[2] - a[0]) \/\/ 2 + (a[2] - a[1]) \/\/ 2 + 1 + 2)\n else:\n raise\n","change":"replace","i1":7,"i2":19,"j1":7,"j2":19,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03388","language":"Python","original_status":"Time Limit Exceeded","pass":"def solve(A, B):\n M = A * B\n cnt = 0\n\n x, y = A, B\n while y - x >= 1:\n x += 1\n y = M \/\/ x if M % x else M \/\/ x - 1\n cnt += 1\n cnt += y - 1\n\n x, y = B, A\n while y - x >= 1:\n x += 1\n y = M \/\/ x if M % x else M \/\/ x - 1\n cnt += 1\n cnt += y - 1\n\n return cnt\n\n\nQ = int(input())\nQuery = [tuple(map(int, input().split())) for _ in range(Q)]\n\nfor A, B in Query:\n print(solve(A, B))\n","fail":"def solve(A, B):\n from math import sqrt\n\n M = A * B\n cnt = 0\n\n x, y = A, B\n if y - x >= 1:\n z = int(sqrt(M))\n x = z\n y = M \/\/ x if M % x else M \/\/ x - 1\n cnt += z - A\n cnt += y - 1\n\n x, y = B, A\n if y - x >= 1:\n z = int(sqrt(M))\n x = z\n y = M \/\/ x if M % x else M \/\/ x - 1\n cnt += z - B\n cnt += y - 1\n\n return cnt\n\n\nQ = int(input())\nQuery = [tuple(map(int, input().split())) for _ in range(Q)]\n\nfor A, B in Query:\n print(solve(A, B))\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03391","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [0] * N\nB = [0] * N\nfor i in range(N):\n A[i], B[i] = map(int, input().split())\n\nc = 0\n\nif A == B:\n print(c)\n exit()\n\n# A[i] < B[i]\u306e\u3068\u3053\u308d\u306fA[i] == 0\u306b\u306a\u308b\u307e\u3067\u8ffd\u3044\u3064\u3051\u306a\u3044\nfor i in range(N):\n if A[i] < B[i]:\n c += A[i]\n B[i] -= A[i]\n A[i] = 0\n\nwhile A != B:\n x = 0\n for i in range(N):\n if A[i] == 0:\n continue\n x = i\n if A[i] < B[i]:\n break\n A[x] -= 1\n y = 0\n for i in range(N):\n if A[i] == B[i]:\n continue\n y = i\n if A[i] < B[i]:\n break\n B[y] -= 1\n c += 1\n\nprint(c)\n","fail":"N = int(input())\n\nsame = True\nsum_a = 0\nmin_b = None\n\nfor _ in range(N):\n a, b = map(int, input().split())\n # A\u306e\u7dcf\u548c\u3092\u6c42\u3081\u308b\n sum_a += a\n # A\u3068B\u304c\u7b49\u3057\u3044\u3069\u3046\u304b\u3092\u8abf\u3079\u308b\n if a != b:\n same = False\n # Ai > Bi\u306e\u4e2d\u3067\u6700\u5c0f\u306eb\u3092\u6c42\u3081\u308b\n if a > b and (min_b is None or b < min_b):\n min_b = b\n\n# \u521d\u3081\u304b\u3089\u540c\u3058\u306a\u3089\u624b\u6570\u306a\u3057\nif same:\n print(0)\n exit()\n\n# Ai > Bi\u306e\u4e2d\u3067\u6700\u5c0f\u306eb\u3092\u6c42\u3081\u308b\nif min_b is None:\n min_b = 0\n\nprint(sum_a - min_b)\n","change":"replace","i1":1,"i2":39,"j1":1,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03393","language":"Python","original_status":"Runtime Error","pass":"s = s0 = input()\nd = {chr(c) for c in range(97, 123)}\nfor c in s:\n d.remove(c)\nif d:\n s += min(d)\nelse:\n for c in reversed(s):\n s = s[:-1]\n if d and c < min(d):\n s += min(d)\n break\n d.add(c)\nprint(s if s else -1)\nassert s0 < s\n","fail":"s = s0 = input()\nd = {chr(c) for c in range(97, 123)}\nfor c in s:\n d.remove(c)\nif d:\n s += min(d)\nelse:\n for c in reversed(s):\n s = s[:-1]\n if d and any(c < e for e in d):\n s += min(e for e in d if c < e)\n break\n d.add(c)\nprint(s if s else -1)\nif s:\n assert s0 < s\n","change":"replace","i1":9,"i2":15,"j1":9,"j2":16,"error":0,"stderr":null,"stdout":"atcoderb\n"} {"problem_id":"p03393","language":"Python","original_status":"Runtime Error","pass":"S = input()\nS_set = set(list(S))\nC_set = set([chr(ord(\"a\") + i) for i in range(26)])\n\nif len(S_set) == len(C_set):\n S = list(S)\n p = None\n for i in range(len(S) - 2, -1, -1):\n if S[i] < S[i + 1]:\n p = i\n break\n else:\n print(-1)\n ans = S[:p].copy()\n rest = C_set - set(S[: p + 1])\n rest = sorted(rest)\n for r in rest:\n if S[p] < r:\n ans.append(r)\n break\n print(*ans, sep=\"\")\nelse:\n diff = C_set - S_set\n diff = sorted(diff)\n print(S + diff[0])\n","fail":"def main():\n S = input()\n S_set = set(list(S))\n C_set = set([chr(ord(\"a\") + i) for i in range(26)])\n\n if len(S_set) == len(C_set):\n S = list(S)\n p = None\n for i in range(len(S) - 2, -1, -1):\n if S[i] < S[i + 1]:\n p = i\n break\n else:\n print(-1)\n return\n\n ans = S[:p].copy()\n rest = C_set - set(S[: p + 1])\n rest = sorted(rest)\n for r in rest:\n if S[p] < r:\n ans.append(r)\n break\n print(*ans, sep=\"\")\n else:\n diff = C_set - S_set\n diff = sorted(diff)\n print(S + diff[0])\n return\n\n\nmain()\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":32,"error":0,"stderr":null,"stdout":"atcoderb\n"} {"problem_id":"p03395","language":"Python","original_status":"Runtime Error","pass":"from scipy.sparse.csgraph import floyd_warshall\nimport numpy as np\n\n\ndef make_graph(m):\n matrix = np.zeros([m + 1, m + 1, m + 1])\n for k in range(1, m + 1):\n for s in range(k, m + 1):\n matrix[k, s, s % k] = 1\n return matrix\n\n\ndef is_disable(matrix, subset, aaa, bbb):\n sub_matrix = matrix[list(subset)].max(axis=0)\n sp = floyd_warshall(sub_matrix)\n return any(sp[a, b] > 50 for a, b in zip(aaa, bbb))\n\n\ndef solve(aaa, bbb):\n for a, b in zip(aaa, bbb):\n if a < b:\n return -1\n m = max(aaa)\n matrix = make_graph(m)\n subset = set(range(1, m + 1))\n if is_disable(matrix, subset, aaa, bbb):\n return -1\n\n for k in range(m, 0, -1):\n subset.remove(k)\n if is_disable(matrix, subset, aaa, bbb):\n subset.add(k)\n return sum(1 << k for k in subset)\n\n\nn = int(input())\naaa = list(map(int, input().split()))\nbbb = list(map(int, input().split()))\nprint(solve(aaa, bbb))\n","fail":"from scipy.sparse.csgraph import floyd_warshall\nimport numpy as np\n\n\ndef make_graph(m):\n matrix = np.zeros([m + 1, m + 1, m + 1])\n for k in range(1, m + 1):\n for s in range(k, m + 1):\n matrix[k, s, s % k] = 1\n return matrix\n\n\ndef is_disable(matrix, subset, aaa, bbb):\n if subset:\n sub_matrix = matrix[list(subset)].max(axis=0)\n else:\n sub_matrix = matrix[0]\n sp = floyd_warshall(sub_matrix)\n return any(sp[a, b] > 50 for a, b in zip(aaa, bbb))\n\n\ndef solve(aaa, bbb):\n for a, b in zip(aaa, bbb):\n if a < b:\n return -1\n m = max(aaa)\n matrix = make_graph(m)\n subset = set(range(1, m + 1))\n if is_disable(matrix, subset, aaa, bbb):\n return -1\n\n for k in range(m, 0, -1):\n subset.remove(k)\n if is_disable(matrix, subset, aaa, bbb):\n subset.add(k)\n return sum(1 << k for k in subset)\n\n\nn = int(input())\naaa = list(map(int, input().split()))\nbbb = list(map(int, input().split()))\nprint(solve(aaa, bbb))\n","change":"replace","i1":13,"i2":14,"j1":13,"j2":17,"error":"ModuleNotFoundError: No module named 'scipy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03395\/Python\/s064671965.py\", line 1, in \n from scipy.sparse.csgraph import floyd_warshall\nModuleNotFoundError: No module named 'scipy'\n","stdout":null} {"problem_id":"p03399","language":"Python","original_status":"Runtime Error","pass":"A, B, C, D = map(int, input().split())\nprint(min(A, B) + min(C, D))\n","fail":"A, B, C, D = [int(input()) for _ in range(4)]\nprint(min(A, B) + min(C, D))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s715170976.py\", line 1, in \n A, B, C, D = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p03399","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d = map(int, input().split())\n\nab = [a, b]\ncd = [c, d]\n\nprint(min(ab) + min(cd))\n","fail":"a, b, c, d = [int(input()) for _ in range(4)]\n\nprint(min(a, b) + min(c, d))\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":3,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s272777471.py\", line 1, in \n a, b, c, d = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p03399","language":"Python","original_status":"Runtime Error","pass":"def main():\n A, B, C, D = map(int, input().split())\n print(min(A, B) + min(C, D))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n A, B, C, D = [int(input()) for _ in range(4)]\n print(min(A, B) + min(C, D))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s776051858.py\", line 7, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s776051858.py\", line 2, in main\n A, B, C, D = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p03399","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d = map(int, input().split())\n\nprint(min(a, b) + min(c, d))\n","fail":"a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a, b) + min(c, d))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":4,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s943981097.py\", line 1, in \n a, b, c, d = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p03399","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d = map(int, input().split())\n\nprint(min(a, b) + min(c, d))\n","fail":"a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a, b) + min(c, d))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":4,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03399\/Python\/s146264747.py\", line 1, in \n a, b, c, d = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p03400","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nD, X = map(int, input().split())\nA = list(input() for i in range(N))\nsum = 0\nfor i in range(N):\n B = 0\n while B * A[i] + 1 <= D:\n B += 1\n sum += 1\nprint(X + sum)\n","fail":"N = int(input())\nD, X = map(int, input().split())\nA = list(int(input()) for i in range(N))\nsum = 0\nfor i in range(N):\n B = 0\n while B * A[i] + 1 <= D:\n B += 1\n sum += 1\nprint(X + sum)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: can only concatenate str (not \"int\") to str","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03400\/Python\/s335777592.py\", line 7, in \n while B * A[i] + 1 <= D:\nTypeError: can only concatenate str (not \"int\") to str\n","stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nfor i in range(n):\n b = 0\n bud = 0\n for ai in a:\n if a[i] != ai:\n bud += abs(ai - b)\n b = ai\n bud += abs(b)\n print(bud)\n","fail":"n = int(input())\na = list(map(int, input().split()))\na.append(0)\na.insert(0, 0)\ncosts = []\nfor i in range(n + 1):\n costs.append(abs(a[i + 1] - a[i]))\n\ns = sum(costs)\nfor i in range(n):\n print(s - costs[i] - costs[i + 1] + abs(a[i] - a[i + 2]))\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nAs = list(map(int, input().split()))\n\n\nfor skip_num in range(N):\n sum = 0\n pos = 0\n for i in range(N):\n if i == skip_num:\n continue\n sum += abs(pos - As[i])\n pos = As[i]\n sum += abs(pos)\n print(sum)\n","fail":"N = int(input())\nAs = [0]\nAs.extend(map(int, input().split()))\nAs.append(0)\n\nsum = 0\npos = 0\nfor i in range(1, N + 2):\n sum += abs(pos - As[i])\n pos = As[i]\n\nfor i in range(1, N + 1):\n skip_pos = As[i]\n pre_pos = As[i - 1]\n post_pos = As[i + 1]\n\n if (pre_pos - skip_pos) * (post_pos - skip_pos) <= 0:\n print(sum)\n else:\n print(\n sum\n - abs(pre_pos - skip_pos)\n - abs(post_pos - skip_pos)\n + abs(pre_pos - post_pos)\n )\n","change":"replace","i1":1,"i2":14,"j1":1,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nSum = 0\na.insert(0, 0)\na.append(0)\ns = []\nb = []\nfor i in range(len(a) - 1):\n b.append(abs(a[i] - a[i + 1]))\nfor i in range(len(b) - 1):\n ans = sum(b) - (b[i] + b[i + 1]) + abs(a[i] - a[i + 2])\n print(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nSum = 0\na.insert(0, 0)\na.append(0)\ns = []\nb = []\nfor i in range(len(a) - 1):\n b.append(abs(a[i] - a[i + 1]))\nSum_b = sum(b)\nfor i in range(len(b) - 1):\n ans = Sum_b - (b[i] + b[i + 1]) + abs(a[i] - a[i + 2])\n print(ans)\n","change":"replace","i1":9,"i2":11,"j1":9,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import deque\n\nn = int(input())\na = deque(map(int, input().split()))\na.appendleft(0)\na.append(0)\na = list(a)\nkaisa = deque()\nans = list()\n\nfor i in range(len(a)):\n if i == 0:\n continue\n diff = a[i] - a[i - 1]\n kaisa.append(diff)\n\nfor i in range(n):\n ans = list(kaisa).copy()\n new_num = kaisa[i] + kaisa[i + 1]\n ans.remove(kaisa[i])\n ans.remove(kaisa[i + 1])\n ans.insert(i, new_num)\n print(sum([abs(n) for n in ans]))\n","fail":"from collections import deque\n\nn = int(input())\na = deque(map(int, input().split()))\na.appendleft(0)\na.append(0)\n\nsum = sum([abs(a[i + 1] - a[i]) for i in range(len(a) - 1)])\nans = 0\n\nfor i in range(n):\n ans = sum\n ans = ans - abs(a[i + 1] - a[i]) - abs(a[i + 2] - a[i + 1]) + abs(a[i + 2] - a[i])\n print(ans)\n","change":"replace","i1":6,"i2":23,"j1":6,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\nA.append(0)\nfor i in range(N):\n b, s = 0, 0\n for j, a in enumerate(A):\n if i != j:\n s += abs(b - a)\n b = a\n print(s)\n","fail":"from collections import deque\n\nN = int(input())\nA = [0] + list(map(int, input().split())) + [0]\n\ntotal = 0\nfor i in range(1, N + 2):\n total += abs(A[i - 1] - A[i])\n\nvisited = []\nfor i in range(1, N + 1):\n a = abs(A[i - 1] - A[i + 1])\n b = abs(A[i] - A[i - 1]) + abs(A[i] - A[i + 1])\n visited.append(total + (a - b))\n\nfor v in visited:\n print(v)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\nm = []\nfor i in range(n - 2):\n if a[i] < a[i + 1] < a[i + 2] or a[i + 2] < a[i + 1] < a[i]:\n m.append(0)\n if a[i + 1] < a[i] < a[i + 2] or a[i + 1] < a[i + 2] < a[i]:\n m.append(1)\n if a[i] < a[i + 2] < a[i + 1] or a[i + 2] < a[i] < a[i + 1]:\n m.append(-1)\n\ns = sum(abs(a[i] - a[i + 1]) for i in range(n - 1))\n\nprint(s - abs(a[0] - a[1]))\nfor i, m0 in enumerate(m):\n if m0 == 0:\n print(s)\n elif m0 > 0:\n print(s - 2 * abs(a[i + 1] - a[i + 2]))\n elif m0 < 0:\n print(s - 2 * abs(a[i + 2] - a[i + 3]))\nprint(s - abs(a[n - 1] - a[n]))\n","fail":"n = int(input())\na = [0] + list(map(int, input().split())) + [0]\nm = []\nfor i in range(n):\n if a[i] <= a[i + 1] <= a[i + 2] or a[i + 2] <= a[i + 1] <= a[i]:\n m.append(0)\n elif a[i] <= a[i + 2] <= a[i + 1] or a[i + 1] <= a[i + 2] <= a[i]:\n m.append(1)\n elif a[i + 1] <= a[i] <= a[i + 2] or a[i + 2] <= a[i] <= a[i + 1]:\n m.append(-1)\n\ns = sum(abs(a[i] - a[i + 1]) for i in range(n + 1))\n\nfor i, m0 in enumerate(m):\n if m0 == 0:\n print(s)\n elif m0 == 1:\n print(s - 2 * abs(a[i + 1] - a[i + 2]))\n elif m0 == -1:\n print(s - 2 * abs(a[i] - a[i + 1]))\n","change":"replace","i1":1,"i2":22,"j1":1,"j2":20,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03401\/Python\/s825783315.py\", line 21, in \n print(s - 2 * abs(a[i + 2] - a[i + 3]))\nIndexError: list index out of range\n","stdout":"6\n"} {"problem_id":"p03401","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = [0, *map(int, input().split()), 0]\n\ntotal = sum(abs(a[i] - a[i + 1]) for i in range(0, n + 1))\nfor i in range(1, n + 1):\n print(total - abs(a[i - 1] - a[i]) - abs(a[i] - a[i + 1]) + abs(a[i - 1] - a[i + 1]))\n","fail":"n = int(input())\na = [0] + list(map(int, input().split())) + [0]\n\ntotal = sum(abs(a[i] - a[i + 1]) for i in range(0, n + 1))\nfor i in range(1, n + 1):\n print(total - abs(a[i - 1] - a[i]) - abs(a[i] - a[i + 1]) + abs(a[i - 1] - a[i + 1]))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":"12\n8\n10\n"} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\nfor i in range(N):\n s = 0\n a = 0\n for j, b in enumerate(A):\n if i == j:\n continue\n s += abs(a - b)\n a = b\n s += abs(a)\n print(s)\n","fail":"N = int(input())\nA = [0] + list(map(int, input().split())) + [0]\n\n\ns = 0\nfor i in range(1, N + 2):\n x = abs(A[i - 1] - A[i])\n s += x\n\nfor i in range(1, N + 1):\n x = abs(A[i - 1] - A[i])\n y = abs(A[i] - A[i + 1])\n z = abs(A[i - 1] - A[i + 1])\n print(s - x - y + z)\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03401","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nfor i in range(n):\n ans = 0\n tmp = 0\n for j in range(n):\n if j != i:\n ans += abs(tmp - a[j])\n tmp = a[j]\n\n ans += abs(tmp - 0)\n print(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\ns = abs(a[0])\n\nfor i in range(n - 1):\n s += abs(a[i] - a[i + 1])\ns += abs(a[n - 1])\n\nfor i in range(n):\n if i == 0:\n print(s + abs(0 - a[i + 1]) - (abs(0 - a[i]) + abs(a[i] - a[i + 1])))\n elif i == n - 1:\n print(s + abs(a[i - 1] - 0) - (abs(a[i - 1] - a[i]) + abs(a[i])))\n else:\n print(\n s + abs(a[i - 1] - a[i + 1]) - (abs(a[i - 1] - a[i]) + abs(a[i] - a[i + 1]))\n )\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03407","language":"Python","original_status":"Runtime Error","pass":"x = input().split\nif x[2] <= x[0] + x[1]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"x = raw_input().split()\nif int(x[2]) <= int(x[0]) + int(x[1]):\n print(\"Yes\")\n\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":4,"error":"TypeError: 'builtin_function_or_method' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03407\/Python\/s586216421.py\", line 2, in \n if x[2] <= x[0] + x[1]:\nTypeError: 'builtin_function_or_method' object is not subscriptable\n","stdout":null} {"problem_id":"p03407","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input())\nprint(\"Yes\" if A + B >= C else \"No\")\n","fail":"A, B, C = map(int, input().split())\nprint(\"Yes\" if A + B >= C else \"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03407\/Python\/s505965538.py\", line 1, in \n A, B, C = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\ns = []\nt = []\nfor _ in range(N):\n s.append(input())\n\nfor _ in range(N):\n t.append(input())\n\nsets = set(s)\n\nans = []\nfor word in sets:\n tmp = 0\n tmp += s.count(word)\n tmp -= t.count(word)\n ans.append(tmp)\n\nprint(max(ans))\n","fail":"N = int(input())\ns = []\nfor _ in range(N):\n s.append(input())\n\nM = int(input())\nt = []\nfor _ in range(M):\n t.append(input())\n\nsets = set(s)\n\nans = [0]\nfor word in sets:\n tmp = 0\n tmp += s.count(word)\n tmp -= t.count(word)\n ans.append(tmp)\n\nprint(max(ans))\n","change":"replace","i1":1,"i2":13,"j1":1,"j2":13,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s032947728.py\", line 9, in \n t.append(input())\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"# ABC091B\n\nn = int(input)\ns = [0] * n\nfor i in range(n):\n s[i] = input()\nm = int(input)\nt = [0] * m\nfor i in range(m):\n t[i] = input()\n\nblue = {}\nfor c in s:\n if c in blue.keys():\n blue[c] += 1\n else:\n blue.setdefault(c, 1)\nred = {}\nfor c in t:\n if c in red.keys():\n red[c] += 1\n else:\n red.setdefault(c, 1)\n\nMax = 0\nfor blue_key, blue_value in blue.items():\n get = blue_value\n if blue_key in red.keys():\n for red_key, red_value in red.items():\n if blue_key == red_key:\n get -= red_value\n break\n Max = max(Max, get)\nprint(Max)\n","fail":"# ABC091B\n\nn = int(input())\ns = [0] * n\nfor i in range(n):\n s[i] = input()\nm = int(input())\nt = [0] * m\nfor i in range(m):\n t[i] = input()\n\nblue = {}\nfor c in s:\n if c in blue.keys():\n blue[c] += 1\n else:\n blue.setdefault(c, 1)\nred = {}\nfor c in t:\n if c in red.keys():\n red[c] += 1\n else:\n red.setdefault(c, 1)\n\nMax = 0\nfor blue_key, blue_value in blue.items():\n get = blue_value\n if blue_key in red.keys():\n for red_key, red_value in red.items():\n if blue_key == red_key:\n get -= red_value\n break\n Max = max(Max, get)\nprint(Max)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":7,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s487565189.py\", line 3, in \n n = int(input)\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nsys.setrecursionlimit(4100000)\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(blues, reds):\n blue_counts = {}\n red_counts = {}\n\n for b in blues:\n if b not in blue_counts:\n blue_counts[b] = 1\n else:\n blue_counts[b] += 1\n\n for r in reds:\n if r not in red_counts:\n red_counts[r] = 1\n else:\n red_counts[r] += 1\n\n max_count = 0\n for name, c in blue_counts.items():\n if name in red_counts:\n max_count = max(max_count, c - red_counts[name])\n else:\n max_count = max(max_count, c)\n return max_count\n\n\ndef string_to_int(string):\n return list(map(lambda x: int(x), string.split()))\n\n\nif __name__ == \"__main__\":\n [N] = string_to_int(inputs())\n blues = inputs(N)\n [M] = string_to_int(inputs())\n reds = inputs(M)\n ret = solve(blues, reds)\n print(ret)\n","fail":"import sys\n\nsys.setrecursionlimit(4100000)\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(blues, reds):\n blue_counts = {}\n red_counts = {}\n\n for b in blues:\n if b not in blue_counts:\n blue_counts[b] = 1\n else:\n blue_counts[b] += 1\n\n for r in reds:\n if r not in red_counts:\n red_counts[r] = 1\n else:\n red_counts[r] += 1\n\n max_count = 0\n for name, c in blue_counts.items():\n if name in red_counts:\n max_count = max(max_count, c - red_counts[name])\n else:\n max_count = max(max_count, c)\n return max_count\n\n\ndef string_to_int(string):\n return list(map(lambda x: int(x), string.split()))\n\n\nif __name__ == \"__main__\":\n [N] = string_to_int(input())\n blues = inputs(N)\n [M] = string_to_int(input())\n reds = inputs(M)\n ret = solve(blues, reds)\n print(ret)\n","change":"replace","i1":40,"i2":43,"j1":40,"j2":43,"error":"TypeError: inputs() missing 1 required positional argument: 'num_of_input'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s858924667.py\", line 41, in \n [N] = string_to_int(inputs())\nTypeError: inputs() missing 1 required positional argument: 'num_of_input'\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\nN = int(input())\nS = [input() for _ in range(N)]\n\nM = int(input())\nT = [input() for _ in range(M)]\n\ns_counter = Counter(S)\nt_counter = Counter(T)\n\nresult = 0\n\nfor k, v in s_counter:\n result = max(result, v - (t_counter[k] if t_counter[k] else 0))\n\nprint(result)\n","fail":"from collections import Counter\n\nN = int(input())\nS = [input() for _ in range(N)]\n\nM = int(input())\nT = [input() for _ in range(M)]\n\ns_counter = Counter(S)\nt_counter = Counter(T)\n\nresult = 0\n\nfor k, v in s_counter.items():\n result = max(result, v - (t_counter[k] if t_counter[k] else 0))\n\nprint(result if result > 0 else 0)\n","change":"replace","i1":13,"i2":17,"j1":13,"j2":17,"error":"ValueError: too many values to unpack (expected 2)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s472001842.py\", line 14, in \n for k, v in s_counter:\nValueError: too many values to unpack (expected 2)\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"from collections import defaultdict\n\nn = int(input())\nd = defaultdict()\nfor _ in range(n):\n s = input()\n d[s] += 1\nm = int(input())\nfor _ in range(m):\n s = input()\n d[s] -= 1\n\nanswer = sorted([d[k] for k in d.keys()])[-1]\nif answer < 0:\n answer = 0\nprint(answer)\n","fail":"from collections import defaultdict\n\nn = int(input())\nd = defaultdict(int)\nfor _ in range(n):\n s = input()\n d[s] += 1\nm = int(input())\nfor _ in range(m):\n s = input()\n d[s] -= 1\n\nanswer = sorted([d[k] for k in d.keys()])[-1]\nif answer < 0:\n answer = 0\nprint(answer)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"KeyError: 'apple'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s279183282.py\", line 7, in \n d[s] += 1\nKeyError: 'apple'\n","stdout":null} {"problem_id":"p03408","language":"Python","original_status":"Runtime Error","pass":"def main(n, s: list, m, t: list):\n choices = set(s + t)\n\n ans = [0]\n\n for choice in choices:\n ans_t = 0\n for _s in s:\n if choice == _s:\n ans_t += 1\n for _t in t:\n if choice == _t:\n ans_t -= 1\n\n ans.append(ans_t)\n\n print(max(ans))\n\n\nif __name__ == \"__main__\":\n n = int(input())\n s = [input() for _ in range(n)]\n m = int(input())\n t = [input() for _ in range(n)]\n\n main(n, s, m, t)\n","fail":"def main(n, s: list, m, t: list):\n choices = set(s + t)\n\n ans = [0]\n\n for choice in choices:\n ans_t = 0\n for _s in s:\n if choice == _s:\n ans_t += 1\n for _t in t:\n if choice == _t:\n ans_t -= 1\n\n ans.append(ans_t)\n\n print(max(ans))\n\n\nif __name__ == \"__main__\":\n n = int(input())\n s = [input() for _ in range(n)]\n m = int(input())\n t = [input() for _ in range(m)]\n\n main(n, s, m, t)\n","change":"replace","i1":23,"i2":24,"j1":23,"j2":24,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s871878822.py\", line 24, in \n t = [input() for _ in range(n)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03408\/Python\/s871878822.py\", line 24, in \n t = [input() for _ in range(n)]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03409","language":"Python","original_status":"Time Limit Exceeded","pass":"def f(blue, red, ans):\n c = 0\n for i, b in enumerate(blue):\n for j, r in enumerate(red):\n if b[0] >= r[0] and b[1] >= r[1]:\n blue.pop(i)\n red.pop(j)\n c = max(c, f(blue, red, ans + 1))\n blue.insert(i, b)\n red.insert(j, r)\n return max(c, ans)\n\n\ndef main():\n N = int(input())\n red = [list(map(int, input().split())) for _ in range(N)]\n blue = [list(map(int, input().split())) for _ in range(N)]\n print(f(blue, red, 0))\n\n\nmain()\n","fail":"def main():\n N = int(input())\n red = sorted(\n [list(map(int, input().split())) for _ in range(N)],\n key=lambda x: x[1],\n reverse=True,\n )\n blue = sorted(\n [list(map(int, input().split())) for _ in range(N)], key=lambda x: x[0]\n )\n ans = 0\n for b in blue:\n for i, r in enumerate(red):\n if b[0] > r[0] and b[1] > r[1]:\n ans += 1\n red.pop(i)\n break\n print(ans)\n\n\nmain()\n","change":"replace","i1":0,"i2":18,"j1":0,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03409","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nred_points = [[int(i) for i in input().split()] for j in range(N)]\n\nblue_points = [[int(i) for i in input().split()] for j in range(N)]\n\nred_points.sort()\nblue_points.sort()\ncount = 0\ndistance = 9999\nfor blue_point in blue_points:\n for red_point in red_points:\n if (blue_point[0] > red_point[0]) and (blue_point[1] > red_point[1]):\n if blue_point[1] - red_point[1] < distance:\n distance = blue_point[1] - red_point[1]\n tmp = red_point\n if tmp in red_points:\n red_points.remove(tmp)\n tmp.clear()\n count = count + 1\n distance = 9999\nprint(count)\n","fail":"N = int(input())\n\nred_points = [[int(i) for i in input().split()] for j in range(N)]\n\nblue_points = [[int(i) for i in input().split()] for j in range(N)]\n\nred_points.sort()\nblue_points.sort()\ncount = 0\ndistance = 9999\nfor blue_point in blue_points:\n tmp = [i for i in red_points if blue_point[0] > i[0] and blue_point[1] > i[1]]\n if tmp:\n for j in tmp:\n if (blue_point[1] - j[1]) < distance:\n distance = blue_point[1] - j[1]\n min_red = j\n count = count + 1\n red_points.remove(min_red)\n distance = 9999\n\nprint(count)\n","change":"replace","i1":11,"i2":21,"j1":11,"j2":21,"error":"NameError: name 'tmp' is not defined","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03409\/Python\/s895373765.py\", line 17, in \n if tmp in red_points:\nNameError: name 'tmp' is not defined\n","stdout":null} {"problem_id":"p03416","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input())\n\nres = 0\nfor i in range(a, b + 1):\n i_str = str(i)\n if i_str == i_str[::-1]:\n res += 1\nprint(res)\n","fail":"a, b = map(int, input().split())\n\nres = 0\nfor i in range(a, b + 1):\n i_str = str(i)\n if i_str == i_str[::-1]:\n res += 1\nprint(res)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: too many values to unpack (expected 2)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03416\/Python\/s354471054.py\", line 1, in \n a, b = map(int, input())\nValueError: too many values to unpack (expected 2)\n","stdout":null} {"problem_id":"p03419","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = list(map(int, input().split()))\nresult = 0\npos = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0), (1, 1)]\nfor i in range(N):\n for j in range(M):\n num = 0\n for p in pos:\n i_dest = i + p[0]\n j_dest = j + p[1]\n if 0 <= i_dest < N and 0 <= j_dest < M:\n num += 1\n if num % 2 != 0:\n result += 1\nprint(result)\n","fail":"N, M = list(map(int, input().split()))\nresult = 0\nif N == 1 and M == 1:\n result = 1\nelif N == 1:\n result = M - 2\nelif M == 1:\n result = N - 2\nelse:\n result = (N - 2) * (M - 2)\nprint(result)\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03420","language":"Python","original_status":"Time Limit Exceeded","pass":"import numpy as np\n\nn, k = map(int, input().split())\nans = 0\nfor m in range(k, n):\n nm = n - m\n sb = m + 1\n s = nm \/\/ sb\n ds = [nm \/\/ d + 1 for d in range(s, 0, -1)]\n ds = [sb] + ds + [n + 1]\n # print(m, nm, sb, s, ds)\n dd = np.diff(ds)\n pd = np.arange(s + 1, 0, -1) if m else np.arange(s, -1, -1)\n # print(dd, pd, dd * pd, sum(dd * pd))\n ans += sum(dd * pd)\nprint(ans)\n","fail":"import numpy as np\n\nn, k = map(int, input().split())\nans = 0\nfor m in range(k, n):\n nm = n - m\n sb = m + 1\n s = nm \/\/ sb\n p = s + 1 if m else s\n ps = sb\n for d in range(s, 0, -1):\n ds = nm \/\/ d + 1\n co = ds - ps\n ans += co * p\n ps = ds\n p -= 1\n ans += n + 1 - ps\n\n # ds = [nm \/\/ d + 1 for d in range(s, 0, -1)]\n # ds = [sb] + ds + [n + 1]\n # # print(m, nm, sb, s, ds)\n # dd = np.diff(ds)\n # pd = np.arange(s + 1, 0, -1) if m else np.arange(s, -1, -1)\n # # print(dd, pd, dd * pd, sum(dd * pd))\n # ans += sum(dd * pd)\nprint(ans)\n","change":"replace","i1":8,"i2":15,"j1":8,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03424","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nS = list(map(int, input().split()))\n\nif \"Y\" in S:\n print(\"Four\")\nelse:\n print(\"Three\")\n","fail":"N = int(input())\nS = list(map(str, input().split()))\n\nif \"Y\" in S:\n print(\"Four\")\nelse:\n print(\"Three\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'G'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03424\/Python\/s702937056.py\", line 2, in \n S = list(map(int, input().split()))\nValueError: invalid literal for int() with base 10: 'G'\n","stdout":null} {"problem_id":"p03424","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ns = list(map(int, input().split()))\n\nprint(\"Four\" if \"Y\" in s else \"Three\")\n","fail":"n = int(input())\ns = list(input().split())\n\nprint(\"Four\" if \"Y\" in s else \"Three\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'G'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03424\/Python\/s597514940.py\", line 2, in \n s = list(map(int, input().split()))\nValueError: invalid literal for int() with base 10: 'G'\n","stdout":null} {"problem_id":"p03424","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n n = int(input())\n s = list(map(str, input().split()))\n\n check = set()\n for i in range(n):\n check.append(s[i])\n\n if len(check) == 3:\n print(\"Three\")\n else:\n print(\"Four\")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n n = int(input())\n s = list(map(str, input().split()))\n\n check = set()\n for i in range(n):\n check.add(s[i])\n\n if len(check) == 3:\n print(\"Three\")\n else:\n print(\"Four\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"AttributeError: 'set' object has no attribute 'append'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03424\/Python\/s300014166.py\", line 20, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03424\/Python\/s300014166.py\", line 11, in main\n check.append(s[i])\nAttributeError: 'set' object has no attribute 'append'\n","stdout":null} {"problem_id":"p03424","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\ns = list(map(input().split()))\nprint(len(set(s)))\n","fail":"N = int(input())\ns = list(map(str, input().split()))\nprint([\"Four\", \"Three\"][len(set(s)) == 3])\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":3,"error":"TypeError: map() must have at least two arguments.","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03424\/Python\/s362939003.py\", line 2, in \n s = list(map(input().split()))\nTypeError: map() must have at least two arguments.\n","stdout":null} {"problem_id":"p03425","language":"Python","original_status":"Runtime Error","pass":"import itertools\n\nN = int(input())\nS = [input() for _ in range(N)]\n\ncnt = [0 for _ in range(5)]\nfor s in S:\n if s[0] == \"M\":\n cnt[0] += 1\n elif s[1] == \"A\":\n cnt[1] += 1\n elif s[2] == \"R\":\n cnt[2] += 1\n elif s[3] == \"C\":\n cnt[3] += 1\n elif s[4] == \"H\":\n cnt[4] += 1\n\nans = 0\nfor i, j, k in itertools.permutations(cnt, r=3):\n ans += i * j * k\n\nprint(ans)\n","fail":"import itertools\n\nN = int(input())\nS = [input() for _ in range(N)]\n\ncnt = [0 for _ in range(5)]\nfor s in S:\n if s[0] == \"M\":\n cnt[0] += 1\n elif s[0] == \"A\":\n cnt[1] += 1\n elif s[0] == \"R\":\n cnt[2] += 1\n elif s[0] == \"C\":\n cnt[3] += 1\n elif s[0] == \"H\":\n cnt[4] += 1\n\nans = 0\nfor i, j, k in itertools.combinations(cnt, r=3):\n ans += i * j * k\n\nprint(ans)\n","change":"replace","i1":9,"i2":20,"j1":9,"j2":20,"error":"WA","stderr":null,"stdout":6.0} {"problem_id":"p03425","language":"Python","original_status":"Time Limit Exceeded","pass":"from itertools import combinations\n\nN = int(input())\ns_li = []\nfor _ in range(N):\n s = input()\n if s[0] in \"MARCH\":\n s_li.append(s)\ns_set = set(s_li)\n# print(len(list(combinations(s_set, 3))))\nans = 0\nfor c in combinations(s_set, 3):\n initial = []\n for name in c:\n if name[0] in initial:\n break\n initial.append(name[0])\n else:\n ans += 1\nprint(ans)\n","fail":"N = int(input())\ncnt_li = [0, 0, 0, 0, 0]\ncomb = [\n [0, 1, 2],\n [0, 1, 3],\n [0, 1, 4],\n [0, 2, 3],\n [0, 2, 4],\n [0, 3, 4],\n [1, 2, 3],\n [1, 2, 4],\n [1, 3, 4],\n [2, 3, 4],\n]\nfor _ in range(N):\n s = input()\n if s[0] == \"M\":\n cnt_li[0] += 1\n if s[0] == \"A\":\n cnt_li[1] += 1\n if s[0] == \"R\":\n cnt_li[2] += 1\n if s[0] == \"C\":\n cnt_li[3] += 1\n if s[0] == \"H\":\n cnt_li[4] += 1\nans = 0\nfor i in range(len(comb)):\n one, two, three = comb[i]\n mid = cnt_li[one] * cnt_li[two] * cnt_li[three]\n ans += mid\nprint(ans)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":31,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03425","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\nimport itertools\n\n\ndef main():\n N = int(input())\n S = [input() for _ in range(N)]\n\n march = []\n for s in S:\n if s[0] in [\"M\", \"A\", \"R\", \"C\", \"H\"]:\n march.append(s[0])\n\n result = []\n for comb in list(itertools.combinations(march, 3)):\n if comb[0] != comb[1] and comb[0] != comb[2] and comb[1] != comb[2]:\n result.append(comb)\n\n print(len(result))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\nfrom itertools import combinations\n\n\ndef main():\n\n N = int(input())\n\n count = {x: 0 for x in \"MARCH\"}\n\n for _ in range(N):\n s = input()[0]\n if s in count:\n count[s] += 1\n\n result = 0\n for a, b, c in combinations(\"MARCH\", 3):\n result += count[a] * count[b] * count[c]\n\n print(result)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":3,"i2":21,"j1":3,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03425","language":"Python","original_status":"Time Limit Exceeded","pass":"import re\nimport itertools\n\nn = int(input())\nls = [input() for _ in range(n)]\nnew_ls = []\nans = 0\n\nfor name in ls:\n if re.match(r\"[MARCH]\", name):\n new_ls.append(name[:1])\n\ncomb_ls = list(itertools.combinations(new_ls, 3))\n\n\nif new_ls:\n for comb in comb_ls:\n s = set(comb)\n if len(s) == 3:\n ans += 1\n print(ans)\nelse:\n print(0)\n quit()\n","fail":"import itertools\n\nn = int(input())\nls = [input()[:1] for _ in range(n)]\nans = 0\ncmb = list(itertools.combinations(list(\"MARCH\"), 3))\n\nfor c in cmb:\n ans += ls.count(c[0]) * ls.count(c[1]) * ls.count(c[2])\n\nprint(ans)\n","change":"replace","i1":0,"i2":24,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n H, W, D = map(int, input().split())\n A = [list(map(int, input().split())) for _ in range(H)]\n Q = int(input())\n ans = []\n\n x = [0 for _ in range(90001)]\n y = [0 for _ in range(90001)]\n for i, row in enumerate(A):\n for j, a in enumerate(row):\n x[a] = j\n y[a] = i\n\n for _ in range(Q):\n L, R = map(int, input().split())\n if L == R:\n ans.append(0)\n continue\n m = 0\n while L != R:\n m += abs(x[L] - x[L + D]) + abs(y[L] - y[L + D])\n L += D\n ans.append(m)\n for a in ans:\n print(a)\n\n\nmain()\n","fail":"def main():\n H, W, D = map(int, input().split())\n A = [list(map(int, input().split())) for _ in range(H)]\n Q = int(input())\n ans = []\n\n x = [0 for _ in range(90001)]\n y = [0 for _ in range(90001)]\n dp = [0 for _ in range(90001)]\n\n for i, row in enumerate(A):\n for j, a in enumerate(row):\n x[a] = j\n y[a] = i\n for i in range(D + 1, H * W + 1):\n dp[i] = dp[i - D] + abs(x[i] - x[i - D]) + abs(y[i] - y[i - D])\n\n for _ in range(Q):\n L, R = map(int, input().split())\n ans.append(dp[R] - dp[L])\n for a in ans:\n print(a)\n\n\nmain()\n","change":"replace","i1":8,"i2":23,"j1":8,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\nd = dict()\nfor i in range(H):\n for j in range(W):\n d[A[i][j]] = (i, j)\nQ = int(input())\nLR = [tuple(map(int, input().split())) for _ in range(Q)]\nfor L, R in LR:\n pow = 0\n while L != R:\n i, j = d[L]\n L += D\n x, y = d[L]\n pow += abs(x - i) + abs(y - j)\n print(pow)\n","fail":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\n\nd = [None for _ in range(H * W + 1)]\nfor i in range(H):\n for j in range(W):\n d[A[i][j]] = (i, j)\n\ncumsum = [0 for _ in range(H * W + 1)]\nfor m in range(1, D + 1):\n i = m\n while i <= H * W:\n if i - D <= 0:\n i += D\n continue\n x1, y1 = d[i - D]\n x2, y2 = d[i]\n dist = abs(x2 - x1) + abs(y2 - y1)\n cumsum[i] = cumsum[i - D] + dist\n i += D\n\nQ = int(input())\nLR = [tuple(map(int, input().split())) for _ in range(Q)]\nfor L, R in LR:\n print(cumsum[R] - cumsum[L])\n","change":"replace","i1":2,"i2":16,"j1":2,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"h, w, d = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(h)]\n\nnc = dict()\nfor row in range(h):\n for col in range(w):\n v = A[row][col]\n nc[v] = (row, col)\n\nq = int(input())\nlrs = [list(map(int, input().split())) for _ in range(q)]\n\nfor lr in lrs:\n l, r = lr\n ans = 0\n while l != r:\n i, j = nc[l]\n x, y = nc[l + d]\n ans += abs(x - i) + abs(y - j)\n l += d\n print(ans)\n","fail":"h, w, d = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(h)]\n\nnc = dict()\nfor row in range(h):\n for col in range(w):\n v = A[row][col]\n nc[v] = (row, col)\n\nq = int(input())\nlrs = [list(map(int, input().split())) for _ in range(q)]\n\nc_sums = [[0] for _ in range(d)]\nfor r in range(d):\n k = 0\n if r == 0:\n k = 1\n while r + (k + 1) * d <= h * w:\n i, j = nc[r + k * d]\n x, y = nc[r + (k + 1) * d]\n t = c_sums[r][-1] + abs(x - i) + abs(y - j)\n c_sums[r].append(t)\n k += 1\n\nfor lr in lrs:\n l, r = lr\n ld, rest = divmod(l, d)\n rd = r \/\/ d\n if rest == 0:\n ld -= 1\n rd -= 1\n print(c_sums[rest][rd] - c_sums[rest][ld])\n","change":"replace","i1":12,"i2":21,"j1":12,"j2":32,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"h, w, d = map(int, input().split())\n\np = [[] for _ in range(h * w)]\n\nfor i in range(h):\n temp = list(map(int, input().split()))\n for j in range(w):\n p[temp[j] - 1] = [i, j]\n\nq = int(input())\na = [[int(x) - 1 for x in input().split()] for _ in range(q)]\n\nfor i in range(q):\n temp = 0\n j = a[i][1]\n while j > a[i][0]:\n temp += abs(p[j][0] - p[j - d][0]) + abs(p[j][1] - p[j - d][1])\n j -= d\n print(temp)\n","fail":"h, w, d = map(int, input().split())\n\np = [[] for _ in range(h * w)]\n\nfor i in range(h):\n temp = list(map(int, input().split()))\n for j in range(w):\n p[temp[j] - 1] = [i, j]\n\nq = int(input())\na = [[int(x) - 1 for x in input().split()] for _ in range(q)]\n\ns = [0 for _ in range(h * w)]\nfor i in range(d, h * w):\n s[i] = s[i - d] + abs(p[i][0] - p[i - d][0]) + abs(p[i][1] - p[i - d][1])\n\nfor i in range(q):\n print(s[a[i][1]] - s[a[i][0]])\n","change":"replace","i1":12,"i2":19,"j1":12,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\nimport numba as nb\nimport numpy as np\n\ninput = sys.stdin.readline\n\n\n@nb.njit(\"void(i8,i8,i8,i8[:,:],i8,i8[:,:],i8[:])\", cache=True)\ndef dfs(H, W, D, A, Q, LR, ans):\n position = [(-1, -1)] * (H * W + 1)\n for h in range(H):\n for w in range(W):\n position[A[h][w]] = (h, w)\n\n mp = np.zeros(shape=(H * W + 1), dtype=np.int64)\n\n for i in range(1, H * W + 1 - D):\n h, w = position[i]\n y, x = position[i + D]\n mp[i] = abs(x - w) + abs(y - h)\n\n for i in range(Q):\n l, r = LR[i]\n ans[i] = mp[l:r:D].sum()\n\n\ndef main():\n H, W, D = map(int, input().split())\n A = np.zeros(shape=(H, W), dtype=np.int64)\n for i in range(H):\n A[i] = tuple(map(int, input().split()))\n Q = int(input())\n LR = np.zeros(shape=(Q, 2), dtype=np.int64)\n for i in range(Q):\n LR[i] = tuple(map(int, input().split()))\n\n ans = np.zeros(shape=Q, dtype=np.int64)\n dfs(H, W, D, A, Q, LR, ans)\n\n print(\"\\\\n\".join(map(str, ans)))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\n\nimport numba as nb\nimport numpy as np\n\ninput = sys.stdin.readline\n\n\n@nb.njit(\"void(i8,i8,i8,i8[:,:],i8,i8[:,:],i8[:])\", cache=True)\ndef dfs(H, W, D, A, Q, LR, ans):\n position = [(-1, -1)] * (H * W + 1)\n for h in range(H):\n for w in range(W):\n position[A[h][w]] = (h, w)\n\n mp = np.zeros(shape=(H * W + 1), dtype=np.int64)\n\n for i in range(1, H * W + 1 - D):\n h, w = position[i]\n y, x = position[i + D]\n mp[i + D] = abs(x - w) + abs(y - h)\n\n for d in range(1, D + 1):\n mp[d::D] = np.cumsum(mp[d::D])\n\n for i in range(Q):\n l, r = LR[i]\n ans[i] = mp[r] - mp[l]\n\n\ndef main():\n H, W, D = map(int, input().split())\n A = np.zeros(shape=(H, W), dtype=np.int64)\n for i in range(H):\n A[i] = tuple(map(int, input().split()))\n Q = int(input())\n LR = np.zeros(shape=(Q, 2), dtype=np.int64)\n for i in range(Q):\n LR[i] = tuple(map(int, input().split()))\n\n ans = np.zeros(shape=Q, dtype=np.int64)\n dfs(H, W, D, A, Q, LR, ans)\n\n print(\"\\\\n\".join(map(str, ans)))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":20,"i2":25,"j1":20,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Runtime Error","pass":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\n\nd = {}\nfor y in range(H):\n Ay = A[y]\n for x in range(W):\n d[Ay[x]] = (y, x)\n\nt = [[0] * ((H * W + D - 1) \/\/ D) for _ in range(D)]\nfor i in range(D):\n ti = t[i]\n j = 0\n if i == 0:\n j = 1\n while i + (j + 1) * D <= H * W:\n y1, x1 = d[i + j * D]\n y2, x2 = d[i + (j + 1) * D]\n ti[j + 1] = abs(y1 - y2) + abs(x1 - x2)\n j += 1\n for j in range(len(ti) - 1):\n ti[j + 1] += ti[j]\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n i = L % D\n print(t[i][(R - i) \/\/ D] - t[i][(L - i) \/\/ D])\n","fail":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\n\nd = {}\nfor y in range(H):\n Ay = A[y]\n for x in range(W):\n d[Ay[x]] = (y, x)\n\nt = [[0] * ((H * W + D - 1) \/\/ D + 1) for _ in range(D)]\nfor i in range(D):\n ti = t[i]\n j = 0\n if i == 0:\n j = 1\n while i + (j + 1) * D <= H * W:\n y1, x1 = d[i + j * D]\n y2, x2 = d[i + (j + 1) * D]\n ti[j + 1] = abs(y1 - y2) + abs(x1 - x2)\n j += 1\n for j in range(len(ti) - 1):\n ti[j + 1] += ti[j]\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n i = L % D\n print(t[i][(R - i) \/\/ D] - t[i][(L - i) \/\/ D])\n","change":"replace","i1":9,"i2":10,"j1":9,"j2":10,"error":"0","stderr":null,"stdout":5.0} {"problem_id":"p03426","language":"Python","original_status":"Time Limit Exceeded","pass":"H, W, D = map(int, input().split())\nX, Y = [-1] * H * W, [-1] * H * W\n\nfor h in range(H):\n A = list(map(int, input().split()))\n for w in range(W):\n X[A[w] - 1], Y[A[w] - 1] = h, w\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n ans = 0\n while L != R:\n ans += abs(X[L - 1] - X[L + D - 1]) + abs(Y[L - 1] - Y[L + D - 1])\n L += D\n print(ans)\n","fail":"H, W, D = map(int, input().split())\nX, Y, ans = [-1] * H * W, [-1] * H * W, [0] * H * W\n\nfor h in range(H):\n A = list(map(int, input().split()))\n for w in range(W):\n X[A[w] - 1], Y[A[w] - 1] = h, w\n\nfor d in range(D):\n while d + D < H * W:\n ans[d + D] = ans[d] + abs(X[d] - X[d + D]) + abs(Y[d] - Y[d + D])\n d += D\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n print(ans[R - 1] - ans[L - 1])\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03426","language":"Python","original_status":"Runtime Error","pass":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\n\nd = {}\nfor y in range(H):\n for x in range(W):\n d[A[y][x]] = (y, x)\n\nt = [[0] * (H * W \/\/ D + 1) for _ in range(D)]\nfor i in range(D):\n j = 0\n if i == 0:\n j = 1\n while i + (j + 1) * D <= H * W:\n y1, x1 = d[i + j * D]\n y2, x2 = d[i + (j + 1) * D]\n t[i][j + 1] = abs(y1 - y2) + abs(x1 - x2)\n j += 1\n for j in range(len(H * W \/\/ D + 1) - 1):\n t[i][j + 1] += t[i][j]\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n i = L % D\n print(t[i][(R - i) \/\/ D] - t[i][(L - i) \/\/ D])\n","fail":"H, W, D = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(H)]\n\nd = {}\nfor y in range(H):\n for x in range(W):\n d[A[y][x]] = (y, x)\n\nt = [[0] * (H * W \/\/ D + 1) for _ in range(D)]\nfor i in range(D):\n j = 0\n if i == 0:\n j = 1\n while i + (j + 1) * D <= H * W:\n y1, x1 = d[i + j * D]\n y2, x2 = d[i + (j + 1) * D]\n t[i][j + 1] = abs(y1 - y2) + abs(x1 - x2)\n j += 1\n for j in range(H * W \/\/ D):\n t[i][j + 1] += t[i][j]\n\nQ = int(input())\nfor _ in range(Q):\n L, R = map(int, input().split())\n i = L % D\n print(t[i][(R - i) \/\/ D] - t[i][(L - i) \/\/ D])\n","change":"replace","i1":18,"i2":19,"j1":18,"j2":19,"error":"TypeError: object of type 'int' has no len()","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03426\/Python\/s565873746.py\", line 19, in \n for j in range(len(H * W \/\/ D + 1) - 1):\nTypeError: object of type 'int' has no len()\n","stdout":null} {"problem_id":"p03427","language":"Python","original_status":"Runtime Error","pass":"n = input()\n\nlst = list(map(int, list(n)))\nprint(sum(lst[0], lst[0] - 1 + 9 * (len(lst) - 1)))\n","fail":"n = input()\n\nlst = list(map(int, list(n)))\nprint(max(sum(lst), lst[0] - 1 + 9 * (len(lst) - 1)))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03427\/Python\/s873894440.py\", line 4, in \n print(sum(lst[0], lst[0] - 1 + 9 * (len(lst) - 1)))\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03427","language":"Python","original_status":"Runtime Error","pass":"N = list(input())\nif len(N) == 1:\n print(int(N))\nelse:\n print((len(N) - 1) * 9 + (int(N[0]) - 1))\n","fail":"def main():\n from itertools import dropwhile\n\n S = input()\n it = dropwhile(lambda char: char == \"9\", reversed(S))\n # \u672b\u5c3e\u304b\u3089\u898b\u30669\u4ee5\u5916\u306e\u6570\u5b57\u304c\u73fe\u308c\u305f\u3089\u3001\u4ee5\u964d\u3092iterate\n\n len_ = len(list(it))\n if len_ <= 1:\n print(sum(map(int, S)))\n else:\n head = S[0]\n body = str(int(head) - 1)\n body += \"9\" * (len(S) - 1)\n\n print(sum(map(int, body)))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":20,"error":"0","stderr":null,"stdout":18.0} {"problem_id":"p03427","language":"Python","original_status":"Runtime Error","pass":"s = input()\n\nif s < 10:\n print(s)\nelse:\n print(int(s[0]) - 1 + 9 * (len(s) - 1))\n","fail":"s = input()\n\nif int(s) < 10:\n print(int(s))\nelif all([x == \"9\" for x in s[1:]]):\n print(int(s[0]) + 9 * (len(s) - 1))\nelse:\n print(int(s[0]) - 1 + 9 * (len(s) - 1))\n","change":"replace","i1":2,"i2":4,"j1":2,"j2":6,"error":"TypeError: '<' not supported between instances of 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03427\/Python\/s576472986.py\", line 3, in \n if s < 10:\nTypeError: '<' not supported between instances of 'str' and 'int'\n","stdout":null} {"problem_id":"p03431","language":"Python","original_status":"Time Limit Exceeded","pass":"def solve(n, k):\n MOD = 998244353\n\n if n > k:\n return 0\n\n invs = [1] * (k + 1)\n pf, kf = 1, 1\n for m in range(2, k + 1):\n pf = kf\n kf *= m\n kf %= MOD\n invs[m] = pow(kf, MOD - 2, MOD)\n\n ans = 0\n if k & 1 == 0:\n if n == 1:\n ans = 1\n else:\n r = k >> 1\n t = r - n + 1\n ans = pf * (invs[r] * invs[r - 1] - invs[r + t] * invs[k - r - t - 1]) % MOD\n\n for r in range(k \/\/ 2 + 1, k + 1):\n if r * 2 >= n + k:\n ans += kf * invs[r] * invs[k - r]\n else:\n t = r - n + 1\n ans += kf * (invs[r] * invs[k - r] - invs[r + t] * invs[k - r - t])\n ans %= MOD\n return ans\n\n\nprint(solve(*map(int, input().split())))\n","fail":"def solve(n, k):\n MOD = 998244353\n\n if n > k:\n return 0\n if n == 1:\n return pow(2, k - 1, MOD)\n\n invs = [1] * (k + 1)\n pf, kf = 1, 1\n for m in range(2, k + 1):\n pf = kf\n kf *= m\n kf %= MOD\n invs[m] = pow(kf, MOD - 2, MOD)\n\n ans = 0\n if k & 1 == 0:\n r = k >> 1\n s = k - n + 1\n ans = pf * (invs[r] * invs[r - 1] - invs[s] * invs[k - s - 1]) % MOD\n\n for r in range(k \/\/ 2 + 1, k + 1):\n if r * 2 >= n + k:\n ans += kf * invs[r] * invs[k - r]\n else:\n s = r * 2 - n + 1\n ans += kf * (invs[r] * invs[k - r] - invs[s] * invs[k - s])\n ans %= MOD\n return ans\n\n\nprint(solve(*map(int, input().split())))\n","change":"replace","i1":5,"i2":29,"j1":5,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03433","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = int(input())\n\nans = N % A\n\nif A == 0:\n print(\"No\")\n exit()\nprint(\"Yes\" if ans <= A else \"No\")\n","fail":"N = int(input())\nA = int(input())\n\nprint(\"Yes\" if N % 500 <= A else \"No\")\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03433","language":"Python","original_status":"Runtime Error","pass":"N = input()\nA = input()\n\nif N % 500 <= A:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"n = int(input())\na = int(input())\n\nif n % 500 <= a:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03433\/Python\/s013245589.py\", line 4, in \n if N % 500 <= A:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03433","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nn = input()\na = input()\n\nif n % 500 <= a:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"# -*- coding: utf-8 -*-\n\nn = int(input())\na = int(input())\n\nif n % 500 <= a:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":2,"i2":4,"j1":2,"j2":4,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03433\/Python\/s074980758.py\", line 6, in \n if n % 500 <= a:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"_, *a = map(int, open(0).read().split())\na.sorted()\nprint(sum(a[-1::2]) - sum(a[-2::2]))\n","fail":"_, *a = map(int, open(0).read().split())\na.sort()\nprint(sum(a[-1::-2]) - sum(a[-2::-2]))\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":3,"error":"AttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s513111966.py\", line 2, in \n a.sorted()\nAttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'?\n","stdout":null} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = list(map(int, input().split()))\na.soat(reverse=True)\nA = sum([i for i in a[::2]])\nB = sum([j for j in a[1::2]])\nprint(A - B)\n","fail":"N = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nA = sum([i for i in a[::2]])\nB = sum([j for j in a[1::2]])\nprint(A - B)\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":2,"error":"AttributeError: 'list' object has no attribute 'soat'. Did you mean: 'sort'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s555410226.py\", line 3, in \n a.soat(reverse=True)\nAttributeError: 'list' object has no attribute 'soat'. Did you mean: 'sort'?\n","stdout":null} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"# https:\/\/atcoder.jp\/contests\/abc088\/tasks\/abc088_b?lang=ja\n\nN = int(input())\na = list(map(int, input().split()))\n\na.sort(reverse=True)\n\nalice_score = 0\nbob_score = 0\n\nfor i in range(len(a)):\n if i % 2 == 0:\n alice_score += a[i]\n else:\n bob_score += a[i]\n\nprint(alice_score - bob_score)\n# https:\/\/atcoder.jp\/contests\/abc088\/tasks\/abc088_b?lang=ja\n\nN = int(input())\na = list(map(int, input().split()))\n\na.sort(reverse=True)\n\nalice_score = 0\nbob_score = 0\n\nfor i in range(len(a)):\n if i % 2 == 0:\n alice_score += a[i]\n else:\n bob_score += a[i]\n\nprint(alice_score - bob_score)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\na.sort(reverse=True)\n\nalice_score = 0\nbob_score = 0\n\nfor i in range(len(a)):\n if i % 2 == 0:\n alice_score += a[i]\n else:\n bob_score += a[i]\n\nprint(alice_score - bob_score)\n","change":"replace","i1":0,"i2":34,"j1":0,"j2":15,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s375721705.py\", line 20, in \n N = int(input())\nEOFError: EOF when reading a line\n","stdout":2.0} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ns = list(map(int, input().split()))\ns.sort(reverse=True)\nprint(s[::2] - s[1::2])\n","fail":"n = int(input())\ns = list(map(int, input().split()))\ns.sort(reverse=True)\nprint(sum(s[::2]) - sum(s[1::2]))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TypeError: unsupported operand type(s) for -: 'list' and 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s552917295.py\", line 4, in \n print(s[::2] - s[1::2])\nTypeError: unsupported operand type(s) for -: 'list' and 'list'\n","stdout":null} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = sorted(list(map((int, input().split())), reverse=True))\nA = 0\nB = 0\nfor i in range(N):\n if i % 2 == 0:\n A += a[i]\n else:\n B += a[i]\n\nprint(A - B)\n","fail":"N = int(input())\na = list(map(int, input().split()))\nasort = sorted(a, reverse=True)\nA = 0\nB = 0\nfor i in range(N):\n if i % 2 == 0:\n A += asort[i]\n else:\n B += asort[i]\n\nprint(A - B)\n","change":"replace","i1":1,"i2":9,"j1":1,"j2":10,"error":"TypeError: map() must have at least two arguments.","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s148944674.py\", line 2, in \n a = sorted(list(map((int, input().split())), reverse=True))\nTypeError: map() must have at least two arguments.\n","stdout":null} {"problem_id":"p03434","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nnums = [int(i) for i in input().split()]\n\nnums.sort_values(reverse=True)\nprint(sum(nums[0::2]) - sum(nums[1::2]))\n","fail":"n = int(input())\nnums = [int(i) for i in input().split()]\n\nnums.sort(reverse=True)\nprint(sum(nums[0::2]) - sum(nums[1::2]))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"AttributeError: 'list' object has no attribute 'sort_values'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03434\/Python\/s337319572.py\", line 4, in \n nums.sort_values(reverse=True)\nAttributeError: 'list' object has no attribute 'sort_values'\n","stdout":null} {"problem_id":"p03435","language":"Python","original_status":"Runtime Error","pass":"C1 = list(map(int, input().split()))\nC2 = list(map(int, input().split()))\nC3 = list(map(int, input().split()))\n\nC = [C1, C2, C3]\nA = [0] * 3\nB = [0] * 3\n\nB = C1\nA[1] = C2[0] - B[0]\nA[2] = C3[0] - B[0]\n\nflg = True\nfor a in range(A[1], A[2]):\n for b in range(B[1], B[2]):\n if C[a][b] != a + b:\n flg = False\n\nif flg is True:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"C1 = list(map(int, input().split()))\nC2 = list(map(int, input().split()))\nC3 = list(map(int, input().split()))\n\nC = [C1, C2, C3]\nA = [0] * 3\nB = [0] * 3\n\nB = C1\nA[1] = C2[0] - B[0]\nA[2] = C3[0] - B[0]\nflg = True\nfor i, a in enumerate(A):\n for j, b in enumerate(B):\n if C[i][j] != a + b:\n flg = False\n\nif flg is True:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":11,"i2":16,"j1":11,"j2":15,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03435","language":"Python","original_status":"Runtime Error","pass":"c11, c12, c13 = map(int, input().split())\nc21, c22, c23 = map(int, input().split())\nc31, c32, c33 = map(int, input().split())\n\nbs = []\nfor a1 in range(0, 100):\n for b1 in range(0, 100):\n if a1 + b1 == c11:\n f1 = True\n break\n for b2 in range(0, 100):\n if a1 + b2 == c12:\n f2 = True\n break\n for b3 in range(0, 100):\n if a1 + b3 == c13:\n f3 = True\n break\n if f1 and f2 and f3:\n bs.append((b1, b2, b3))\n\nbss = []\nfor a2 in range(0, 100):\n for b1, b2, b3 in bs:\n if a2 + b1 == c21 and a2 + b2 == c22 and a2 + b3 == c23:\n bss.append((b1, b2, b3))\n\nfor a3 in range(0, 100):\n for b1, b2, b3 in bss:\n if a3 + b1 == c31 and a3 + b2 == c32 and a3 + b3 == c33:\n print(\"Yes\")\n break\n else:\n continue\n break\nelse:\n print(\"No\")\n","fail":"c11, c12, c13 = map(int, input().split())\nc21, c22, c23 = map(int, input().split())\nc31, c32, c33 = map(int, input().split())\n\nbs = []\nfor a1 in range(0, 101):\n for b1 in range(0, 101):\n if a1 + b1 == c11:\n f1 = True\n break\n for b2 in range(0, 101):\n if a1 + b2 == c12:\n f2 = True\n break\n for b3 in range(0, 101):\n if a1 + b3 == c13:\n f3 = True\n break\n if f1 and f2 and f3:\n bs.append((b1, b2, b3))\n\nbss = []\nfor a2 in range(0, 101):\n for b1, b2, b3 in bs:\n if a2 + b1 == c21 and a2 + b2 == c22 and a2 + b3 == c23:\n bss.append((b1, b2, b3))\n\nfor a3 in range(0, 101):\n for b1, b2, b3 in bss:\n if a3 + b1 == c31 and a3 + b2 == c32 and a3 + b3 == c33:\n print(\"Yes\")\n break\n else:\n continue\n break\nelse:\n print(\"No\")\n","change":"replace","i1":5,"i2":28,"j1":5,"j2":28,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03435","language":"Python","original_status":"Runtime Error","pass":"c = [list(map(int, input().split())) for _ in range(3)]\ntry:\n assert (sum(c[2]) - sum(c[1])) % 3 == 0\n assert (sum(c[1]) - sum(c[0])) % 3 == 0\n assert (sum([c[2] for line in c]) - sum([c[1] for line in c])) % 3 == 0\n assert (sum([c[1] for line in c]) - sum([c[0] for line in c])) % 3 == 0\n print(\"Yes\")\nexcept AssertionError:\n print(\"No\")\n","fail":"c = [list(map(int, input().split())) for _ in range(3)]\ntry:\n assert (sum(c[2]) - sum(c[1])) % 3 == 0\n assert (sum(c[1]) - sum(c[0])) % 3 == 0\n assert (sum([line[2] for line in c]) - sum([line[1] for line in c])) % 3 == 0\n assert (sum([line[1] for line in c]) - sum([line[0] for line in c])) % 3 == 0\n print(\"Yes\")\nexcept AssertionError:\n print(\"No\")\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":6,"error":"TypeError: unsupported operand type(s) for +: 'int' and 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03435\/Python\/s748241963.py\", line 5, in \n assert (sum([c[2] for line in c]) - sum([c[1] for line in c])) % 3 == 0\nTypeError: unsupported operand type(s) for +: 'int' and 'list'\n","stdout":null} {"problem_id":"p03436","language":"Python","original_status":"Runtime Error","pass":"# \u6700\u77ed\u3067\u30b4\u30fc\u30eb\u3057\u3066\u6b8b\u3063\u305f\u9ed2\u3092\u305c\u3093\u3076\u767d\u306b\u5909\u3048\u308c\u3070\u6700\u5927\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u3082\u3089\u3048\u305d\u3046\n# \u3063\u3066\u306a\u3075\u3046\u306b\u96d1\u306b\u8003\u3048\u3066\u305f\u3051\u3069\u3001\u63a2\u7d22\u30fb\u6700\u77ed\u7d4c\u8def\u5fa9\u5143\u30fb\u89e3\u7b54\u305d\u308c\u305e\u308c\u30671\u5ea6\u305a\u3064BFS\u3092\u3057\u306a\u304d\u3083\u306a\u3089\u3093\u306e\u304b\uff1f\uff1f\uff1f\uff1f\n\nh, w = map(int, input().split())\ntable = [[] for _ in range(h)]\nfor y in range(h):\n table[y] = list(input())\n# \u30b9\u30c6\u30c3\u30d7\u66f4\u65b0\u7528\nmy_table = [[-1 for _ in range(w)] for _ in range(h)]\nmy_table[0][0] = 0\nyo = [(0, 0)]\nsteps = [0, -1, 0, 1, 0]\nwhile len(yo) > 0:\n p = yo[0]\n yo = yo[1:]\n for i in range(4):\n next_x, next_y = steps[i + 1] + p[1], steps[i] + p[0]\n if next_x < 0 or w <= next_x or next_y < 0 or h <= next_y:\n continue\n if table[next_y][next_x] == \"#\":\n continue\n if my_table[next_y][next_x] >= 0:\n continue\n my_table[next_y][next_x] = my_table[p[0]][p[1]] + 1\n yo.append((next_y, next_x))\n\n# \u7d4c\u8def\u3092\u9006\u304b\u3089\u305f\u3069\u3063\u3066\u6700\u77ed\u7d4c\u8def\u5fa9\u5143\nrestore_table = [[\"o\" for _ in range(w)] for _ in range(h)]\nrestore_table[h - 1][w - 1] = \"x\"\nnow = my_table[h - 1][w - 1]\ncur = (h - 1, w - 1)\nwhile now != 0:\n for i in range(4):\n next_y, next_x = steps[i] + cur[0], steps[i + 1] + cur[1]\n if next_x < 0 or w <= next_x or next_y < 0 or h < next_y:\n continue\n if my_table[next_y][next_x] == now - 1:\n restore_table[next_y][next_x] = \"x\"\n cur = (next_y, next_x)\n now -= 1\n break\n\n# \u3084\u3063\u3068\u7b54\u3048\nans = 0\nfor y in range(h):\n for x in range(w):\n if restore_table[y][x] == \"o\" and table[y][x] == \".\":\n ans += 1\nprint(ans)\n","fail":"# \u6700\u77ed\u3067\u30b4\u30fc\u30eb\u3057\u3066\u6b8b\u3063\u305f\u9ed2\u3092\u305c\u3093\u3076\u767d\u306b\u5909\u3048\u308c\u3070\u6700\u5927\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u3082\u3089\u3048\u305d\u3046\n# \u3063\u3066\u306a\u3075\u3046\u306b\u96d1\u306b\u8003\u3048\u3066\u305f\u3051\u3069\u3001\u63a2\u7d22\u30fb\u6700\u77ed\u7d4c\u8def\u5fa9\u5143\u30fb\u89e3\u7b54\u305d\u308c\u305e\u308c\u30671\u5ea6\u305a\u3064BFS\u3092\u3057\u306a\u304d\u3083\u306a\u3089\u3093\u306e\u304b\uff1f\uff1f\uff1f\uff1f\n\nh, w = map(int, input().split())\ntable = [[] for _ in range(h)]\nfor y in range(h):\n table[y] = list(input())\n# \u30b9\u30c6\u30c3\u30d7\u66f4\u65b0\u7528\nmy_table = [[-1 for _ in range(w)] for _ in range(h)]\nmy_table[0][0] = 0\nyo = [(0, 0)]\nsteps = [0, -1, 0, 1, 0]\nwhile len(yo) > 0:\n p = yo[0]\n yo = yo[1:]\n for i in range(4):\n next_x, next_y = steps[i + 1] + p[1], steps[i] + p[0]\n if next_x < 0 or w <= next_x or next_y < 0 or h <= next_y:\n continue\n if table[next_y][next_x] == \"#\":\n continue\n if my_table[next_y][next_x] >= 0:\n continue\n my_table[next_y][next_x] = my_table[p[0]][p[1]] + 1\n yo.append((next_y, next_x))\nif my_table[h - 1][w - 1] == -1:\n print(-1)\n exit()\n\n# \u7d4c\u8def\u3092\u9006\u304b\u3089\u305f\u3069\u3063\u3066\u6700\u77ed\u7d4c\u8def\u5fa9\u5143\nrestore_table = [[\"o\" for _ in range(w)] for _ in range(h)]\nrestore_table[h - 1][w - 1] = \"x\"\nnow = my_table[h - 1][w - 1]\ncur = (h - 1, w - 1)\nwhile now != 0:\n for i in range(4):\n next_y, next_x = steps[i] + cur[0], steps[i + 1] + cur[1]\n if next_x < 0 or w <= next_x or next_y < 0 or h < next_y:\n continue\n if my_table[next_y][next_x] == now - 1:\n restore_table[next_y][next_x] = \"x\"\n cur = (next_y, next_x)\n now -= 1\n break\n\n# \u3084\u3063\u3068\u7b54\u3048\nans = 0\nfor y in range(h):\n for x in range(w):\n if restore_table[y][x] == \"o\" and table[y][x] == \".\":\n ans += 1\nprint(ans)\n","change":"insert","i1":25,"i2":25,"j1":25,"j2":28,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03436","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import deque\n\n\ndef bfs(start):\n q = deque([[start]])\n visited = set()\n while q:\n path = q.popleft()\n i, j = path[-1]\n if (i, j) == (H - 1, W - 1):\n return path\n for di, dj in [(1, 0), (-1, 0), (0, 1), (0, -1)]:\n ni, nj = i + di, j + dj\n if (\n 0 <= ni < H\n and 0 <= nj < W\n and field[ni][nj] != \"#\"\n and (ni, nj) not in visited\n ):\n new_path = list(path) + [(ni, nj)]\n q.append(new_path)\n visited.add((i, j))\n\n\nH, W = map(int, input().split())\nfield = [input() for _ in range(H)]\nshortest_path = bfs((0, 0))\nif shortest_path is None:\n print(-1)\n exit()\nans = 0\nfor i in range(H):\n for j in range(W):\n if field[i][j] == \".\" and (i, j) not in shortest_path:\n ans += 1\nprint(ans)\n","fail":"from collections import deque\n\n\ndef bfs(start):\n q = deque([[start]])\n visited = set()\n while q:\n path = q.popleft()\n i, j = path[-1]\n if (i, j) == (H - 1, W - 1):\n return path\n for di, dj in [(1, 0), (-1, 0), (0, 1), (0, -1)]:\n ni, nj = i + di, j + dj\n if (\n 0 <= ni < H\n and 0 <= nj < W\n and field[ni][nj] != \"#\"\n and (ni, nj) not in visited\n ):\n q.append(path + [(ni, nj)])\n visited.add((ni, nj))\n\n\nH, W = map(int, input().split())\nfield = [input() for _ in range(H)]\nshortest_path = bfs((0, 0))\nif shortest_path is None:\n print(-1)\n exit()\nans = 0\nfor i in range(H):\n for j in range(W):\n if field[i][j] == \".\" and (i, j) not in shortest_path:\n ans += 1\nprint(ans)\n","change":"replace","i1":19,"i2":22,"j1":19,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03437","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nX, Y = map(int, input().split())\n\nmax_num = 10**18 \/\/ X\n\nfor i in range(max_num + 1):\n if i == 0:\n continue\n else:\n if (i * X) % Y != 0:\n print(i * X)\n break\n else:\n if i == (max_num + 1):\n print(-1)\n else:\n continue\n","fail":"# -*- coding: utf-8 -*-\n\nX, Y = map(int, input().split())\n\nmax_num = 10**18 \/\/ X\n\n\nif X % Y == 0:\n print(-1)\nelse:\n for i in range(max_num + 1):\n if i == 0:\n continue\n else:\n if (i * X) % Y != 0:\n print(i * X)\n break\n else:\n continue\n","change":"replace","i1":6,"i2":16,"j1":6,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03437","language":"Python","original_status":"Runtime Error","pass":"from functools import reduce\n\nfrom math import gcd\n\nx, y = list(map(int, input().split()))\n\n\ndef lcm(*numbers):\n def lcm(a, b):\n return (a * b) \/\/ gcd(a, b)\n\n return reduce(lcm, numbers, 1)\n\n\na = lcm(x, y) - x\n\nprint(-1 if a == 0 else a)\n","fail":"x, y = list(map(int, input().split()))\n\n\ndef gcd(a, b):\n return a if b == 0 else gcd(b, a % b)\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\na = lcm(x, y) - x\n\nprint(-1 if a == 0 else a)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":9,"error":"0","stderr":null,"stdout":16.0} {"problem_id":"p03437","language":"Python","original_status":"Runtime Error","pass":"# 8 = 2 * 2 * 2\n# 6 = 2 * 3\nx = int(input())\ny = int(input())\nresult = 0\n\nif x % y == 0:\n result = -1\nelse:\n result = x * 2\n\n\nprint(result)\n","fail":"# 8 = 2 * 2 * 2\n# 6 = 2 * 3\nx, y = map(int, (input().split()))\n\nresult = 0\n\nif x % y == 0:\n result = -1\nelse:\n result = x\n\n\nprint(result)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":10,"error":"ValueError: invalid literal for int() with base 10: '8 6'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03437\/Python\/s229827899.py\", line 3, in \n x = int(input())\nValueError: invalid literal for int() with base 10: '8 6'\n","stdout":null} {"problem_id":"p03437","language":"Python","original_status":"Time Limit Exceeded","pass":"X, Y = map(int, input().split())\ni = 1\nif X % Y == 0:\n print(-1)\nelse:\n while True:\n if i % X == 0 and i % Y != 0:\n print(i)\n break\n else:\n i += 1\n","fail":"X, Y = map(int, input().split())\ni = 1\nif X % Y == 0:\n print(-1)\nelse:\n print(X)\n","change":"replace","i1":5,"i2":11,"j1":5,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03437","language":"Python","original_status":"Time Limit Exceeded","pass":"x, y = [int(i) for i in input().split()]\nif x % y == 0:\n print(-1)\nelse:\n i = 2\n while True:\n if i * x % y != 0:\n print(i * x)\n break\n","fail":"x, y = [int(i) for i in input().split()]\nif x % y == 0:\n print(-1)\nelse:\n i = 2\n while True:\n if i * x % y != 0:\n print(i * x)\n break\n i += 1\n","change":"insert","i1":9,"i2":9,"j1":9,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03437","language":"Python","original_status":"Time Limit Exceeded","pass":"X, Y = map(int, input().split())\n\nif X == Y:\n print(-1)\n exit()\nx = 2\nwhile True:\n if X * x % Y != 0:\n print(X * x)\n exit()\n x += 1\n","fail":"X, Y = map(int, input().split())\n\nif X % Y == 0:\n print(-1)\nelse:\n print(X)\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03438","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\ncnt_a, cnt_b = sum(a), sum(b)\nans = \"No\"\ni = 0\ncnt = 0\nwhile cnt < cnt_b - cnt_a:\n if a[i] < b[i]:\n cnt += int((b[i] - a[i]) \/ 2 + 0.5)\n else:\n cnt += a[i] - b[i]\n i += 1\n if i == n:\n ans = \"Yes\"\n\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nx, y = 0, 0\nfor i in range(n):\n dif = b[i] - a[i]\n if dif > 0:\n x += dif \/\/ 2\n else:\n y += -dif\n\nprint(\"Yes\" if x >= y else \"No\")\n","change":"replace","i1":4,"i2":18,"j1":4,"j2":13,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03438","language":"Python","original_status":"Time Limit Exceeded","pass":"from queue import PriorityQueue\n\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA_sum = sum(A)\nB_sum = sum(B)\ndiff = B_sum - A_sum\nif diff < 0:\n print(\"No\")\n exit()\n\nAq = PriorityQueue()\nBq = PriorityQueue()\nfor a in A:\n Aq.put((a, a))\nfor b in B:\n Bq.put((b, b))\n\ncnt = 0\n\nwhile cnt <= diff and (not Aq.empty()) and (not Bq.empty()):\n _, a = Aq.get()\n _, b = Bq.get()\n if a < b:\n ne_a = a + 2\n ne_b = b + 1\n Aq.put((ne_a, ne_a))\n Bq.put((ne_b, ne_b))\n cnt += 1\n\nif Aq.empty() and Bq.empty():\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"import math\nfrom queue import PriorityQueue\n\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA_sum = sum(A)\nB_sum = sum(B)\ndiff = B_sum - A_sum\nif diff < 0:\n print(\"No\")\n exit()\n\ncnt = 0\nfor a, b in zip(A, B):\n if a < b:\n cnt += math.ceil((b - a) \/ 2)\n\nif cnt > diff:\n print(\"No\")\nelse:\n print(\"Yes\")\n","change":"replace","i1":0,"i2":37,"j1":0,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03447","language":"Python","original_status":"Runtime Error","pass":"a, b, c, x = [int(input()) for i in range(4)]\ncounter = 0\n\nfor rep1 in range(a + 1):\n for rep2 in range(b + 1):\n for rep3 in range(c + 1):\n if rep1 * 500 + rep2 * 100 + rep3 * 50 == x:\n counter += 1\n\nprint(counter)\n","fail":"x, a, b = [int(input()) for i in range(3)]\n\nprint((x - a) % b)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":3,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03447\/Python\/s994669644.py\", line 1, in \n a, b, c, x = [int(input()) for i in range(4)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03447\/Python\/s994669644.py\", line 1, in \n a, b, c, x = [int(input()) for i in range(4)]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03448","language":"Python","original_status":"Runtime Error","pass":"x500 = int(input())\nx100 = int(input())\nx50 = int(input())\nxxx = int(input())\n\ni = 0\nj = 0\nk = 0\n\n\ndef judge(sum, xxx):\n sum = 500 * i + 100 * j + 50 * k\n return sum == xxx and sum <= 2000\n\n\ncount = 0\nfor i in range(x500):\n if judge(i, j, k):\n count += 1\n for j in range(x100):\n if judge(i, j, k):\n count += 1\n for k in range(x50):\n if judge(i, j, k):\n count += 1\nprint(count)\n","fail":"A, B, C, x = [int(input()) for i in range(4)]\nprint(\n sum(\n 500 * a + 100 * b + 50 * c == x\n for a in range(A + 1)\n for b in range(B + 1)\n for c in range(C + 1)\n )\n)\n","change":"replace","i1":0,"i2":26,"j1":0,"j2":9,"error":"TypeError: judge() takes 2 positional arguments but 3 were given","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03448\/Python\/s426003175.py\", line 18, in \n if judge(i, j, k):\nTypeError: judge() takes 2 positional arguments but 3 were given\n","stdout":null} {"problem_id":"p03448","language":"Python","original_status":"Runtime Error","pass":"a = input()\nb = input()\nc = input()\nx = input()\ncount = 0\nfor i in range(min(x \/\/ 500, a) + 1):\n for j in range(min((x - i * 500) \/\/ 100, b) + 1):\n if (x - i * 500 - j * 100) \/\/ 50 <= c:\n count += 1\nprint(count)\n","fail":"a, b, c, x = map(int, [input() for i in range(4)])\ncount = 0\nfor i in range(min(x \/\/ 500, a) + 1):\n for j in range(min((x - i * 500) \/\/ 100, b) + 1):\n if x - i * 500 - j * 100 <= c * 50:\n count += 1\nprint(count)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":5,"error":"TypeError: unsupported operand type(s) for \/\/: 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03448\/Python\/s960607681.py\", line 6, in \n for i in range(min(x \/\/ 500, a) + 1):\nTypeError: unsupported operand type(s) for \/\/: 'str' and 'int'\n","stdout":null} {"problem_id":"p03448","language":"Python","original_status":"Runtime Error","pass":"X = int(input())\nA, B, C = map(int, input().split())\n\nprice = 0\ncount = 0\nfor i in range(A + 1):\n for j in range(B + 1):\n for k in range(C + 1):\n price = i * 500 + j * 100 + k * 50\n if price == X:\n count += 1\n price = 0\n\nprint(count)\n","fail":"A = int(input())\nB = int(input())\nC = int(input())\nX = int(input())\n\ncount = 0\nfor i in range(A + 1):\n for j in range(B + 1):\n for k in range(C + 1):\n if i * 500 + j * 100 + k * 50 == X:\n count += 1\n\nprint(count)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":11,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03448\/Python\/s973416886.py\", line 2, in \n A, B, C = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"s = input().split()\na = s[0]\nb = s[1]\n\nif a % 2 == 0 or b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"s = input().split()\na = int(s[0])\nb = int(s[1])\n\nif a % 2 == 0 or b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":3,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s883692144.py\", line 5, in \n if a % 2 == 0 or b % 2 == 0:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"# Product\n# \u30b7\u30ab\u306eAtCoDeer\u304f\u3093\u306f\u4e8c\u3064\u306e\u6b63\u6574\u6570a,b\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002a\u3068b\u306e\u5e2d\u304c\u5076\u6570\u304b\u5947\u6570\u304b\u5224\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n# 1\n a = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"n1 = int(input())\nn2 = int(input())\n\ns = n1 * n2\n\nif s % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"a, b = map(int, input().split())\nif (a * b) % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":2,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s524849344.py\", line 1, in \n n1 = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\n\nc = a * b\n\nif c % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"t = input().split()\nfor i in range(len(t)):\n t[i] = int(t[i])\n\na = t[0]\nb = t[1]\n\nif (a * b) % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":8,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s493710900.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nans = [0, 1]\nprint(ans[(a + b) \/ 2])\n","fail":"a, b = map(int, input().split())\nans = [\"Even\", \"Odd\"]\nprint(ans[(a * b) % 2])\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":3,"error":"TypeError: list indices must be integers or slices, not float","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s996994010.py\", line 3, in \n print(ans[(a + b) \/ 2])\nTypeError: list indices must be integers or slices, not float\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"class Solution:\n def isEven(self, a, b):\n if (a * b) % 2 == 0:\n print(\"Even\")\n else:\n print(\"Odd\")\n\n\nif __name__ == \"__main__\":\n a, b = input(), input()\n solution = Solution()\n solution.isEven(a, b)\n","fail":"class Solution:\n def isEven(self, a: int, b: int):\n if (a * b) % 2 == 0:\n print(\"Even\")\n else:\n print(\"Odd\")\n\n\nif __name__ == \"__main__\":\n a, b = map(int, input().split())\n solution = Solution()\n solution.isEven(a, b)\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":10,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s957583073.py\", line 10, in \n a, b = input(), input()\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"i = input()\nsp = i.spint()\n\nmultid = sp[0] * sp[1]\n\nif multid % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"i = input()\nsp = i.split()\n\nmultid = int(sp[0]) * int(sp[1])\n\nif multid % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":4,"error":"AttributeError: 'str' object has no attribute 'spint'. Did you mean: 'split'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s527332902.py\", line 2, in \n sp = i.spint()\nAttributeError: 'str' object has no attribute 'spint'. Did you mean: 'split'?\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"# \u5165\u529b\na = int(input())\nb = int(input())\n\n# \u51e6\u7406\nif a * b % 2 == 0:\n answer = \"Even\"\nelse:\n answer = \"Odd\"\n\nprint(answer)\n","fail":"# 086A\n# \u5165\u529b\u5024\u306e\u7a4d\u304c\u5076\u6570\u304b\u5947\u6570\u304b\n\n\n# \u5165\u529b\na, b = map(int, input().split())\n\n# \u51e6\u7406\nx = a * b % 2\n\nif x == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":14,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s674205897.py\", line 2, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"from sys import stdin\n\na = stdin.readline().rstrip()\na = int(a)\n\nb = stdin.readline().rstrip()\nb = int(b)\n\nif a * b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"a, b = map(int, input().split())\n\nif a * b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s870286547.py\", line 4, in \n a = int(a)\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"a, b = list(map(int, input()).split())\n\nif a * b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"a, b = list(map(int, input().split()))\n\nif a * b % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"AttributeError: 'map' object has no attribute 'split'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s771135942.py\", line 1, in \n a, b = list(map(int, input()).split())\nAttributeError: 'map' object has no attribute 'split'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"num1 = int(input())\nnum2 = int(input())\n\nsum = num1 * num2\n\nif sum % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"num = input().split(\" \")\n\n\nsum = int(num[0]) * int(num[1])\n\nif sum % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s814776271.py\", line 1, in \n num1 = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03455","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\n\nmul = a * b\n\nif mul % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","fail":"# coding: utf-8\n\n# \uff11\u884c\u306e\u5165\u529b\u30c7\u30fc\u30bf\u3092\u5206\u5272\ndata = input().split(\" \")\n\n\na = int(data[0])\nb = int(data[1])\n\nmul = int(a * b)\n\nif mul % 2 == 0:\n print(\"Even\")\nelse:\n print(\"Odd\")\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":10,"error":"ValueError: invalid literal for int() with base 10: '3 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03455\/Python\/s038152468.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '3 4'\n","stdout":null} {"problem_id":"p03457","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\ntxy = [tuple() for _ in range(N)]\nfor i in range(N - 1):\n now = txy[i]\n next = txy[i + 1]\n root = abs(next[1] - now[1]) + abs(next[2] - now[2])\n time = next[0] - now[0]\n if time < root:\n print(\"No\")\n break\n else:\n if time == root:\n pass\n else:\n if (time - root) % 2 != 0:\n print(\"No\")\n break\nelse:\n print(\"Yes\")\n","fail":"N = int(input())\ntxy = [(0, 0, 0)] + [tuple(map(int, input().split())) for _ in range(N)]\n\n\nfor i in range(N):\n now = txy[i]\n next = txy[i + 1]\n root = abs(next[1] - now[1]) + abs(next[2] - now[2])\n time = next[0] - now[0]\n if time < root:\n print(\"No\")\n break\n else:\n if time == root:\n pass\n else:\n if (time - root) % 2 != 0:\n print(\"No\")\n break\nelse:\n if N == 1:\n root = txy[1][1] + txy[1][2]\n time = txy[1][0]\n if time < root:\n print(\"No\")\n else:\n if (time - root) % 2 == 0:\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"Yes\")\n","change":"replace","i1":1,"i2":19,"j1":1,"j2":32,"error":"IndexError: tuple index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03457\/Python\/s888307883.py\", line 6, in \n root = abs(next[1] - now[1]) + abs(next[2] - now[2])\nIndexError: tuple index out of range\n","stdout":null} {"problem_id":"p03465","language":"Python","original_status":"Time Limit Exceeded","pass":"from bisect import bisect_left\nfrom collections import defaultdict\nfrom itertools import accumulate\n\nn = int(input())\narr = list(map(int, input().split()))\narr.sort()\nsa = sum(arr)\nlim = sa \/\/ 2\ndp = defaultdict(int)\ndp[0] = 1\n\nfor a in arr:\n # print(a, dp)\n ndp = dp.copy()\n for i, v in dp.items():\n if i + a <= lim:\n ndp[i + a] += v\n dp = ndp\n # print(a, dp)\n\ndpk = list(dp.keys())\ndpk.sort()\ndpv = [dp[k] for k in dpk]\nadp = list(accumulate(dpv))\nk = 2 ** (n - 1)\nj = bisect_left(adp, k)\n\n# print(adp)\n# print(k)\n\nprint(sa - dpk[j])\n","fail":"n, arr, dp = int(input()), list(map(int, input().split())), 1\nfor a in arr:\n dp |= dp << a\nofs = (sum(arr) + 1) \/\/ 2\ndp >>= ofs\nprint((dp & -dp).bit_length() + ofs - 1)\n","change":"replace","i1":0,"i2":32,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"s = str(input())\ns[3] = \"7\"\nprint(s)\n","fail":"s = str(input())\ns = \"2018\/01\" + s[7:10]\nprint(s)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'str' object does not support item assignment","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s849843365.py\", line 2, in \n s[3] = \"7\"\nTypeError: 'str' object does not support item assignment\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"s = input()\ns[:4] = \"2018\"\nprint(s)\n","fail":"s = input()\nprint(s.replace(\"2017\", \"2018\"))\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":2,"error":"TypeError: 'str' object does not support item assignment","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s767798189.py\", line 2, in \n s[:4] = \"2018\"\nTypeError: 'str' object does not support item assignment\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = input()\n\nS[3] = 8\nprint(S)\n","fail":"S = input()\n\nS = S.replace(\"7\", \"8\", 1)\nprint(S)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: 'str' object does not support item assignment","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s675103813.py\", line 3, in \n S[3] = 8\nTypeError: 'str' object does not support item assignment\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = input()\nS[:4] = \"2018\"\nprint(S)\n","fail":"S = input()\nS = S.replace(\"2017\", \"2018\")\nprint(S)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'str' object does not support item assignment","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s998798459.py\", line 2, in \n S[:4] = \"2018\"\nTypeError: 'str' object does not support item assignment\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = str(input())\nS = S.replace(2017, 2018, 1)\nprint(S)\n","fail":"S = str(input())\nS = S.replace(\"2017\", \"2018\", 1)\nprint(S)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: replace() argument 1 must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s315077891.py\", line 2, in \n S = S.replace(2017, 2018, 1)\nTypeError: replace() argument 1 must be str, not int\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = input().split(\"\/\")\nS[0] = \"2018\"\nprint(S.join(\"\/\"))\n","fail":"S = input().split(\"\/\")\nS[0] = \"2018\"\nprint(\"\/\".join(S))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"AttributeError: 'list' object has no attribute 'join'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s679354678.py\", line 3, in \n print(S.join(\"\/\"))\nAttributeError: 'list' object has no attribute 'join'\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = input()\nS[3] = 8\nprint(S)\n","fail":"S = input()\nS = S[:3] + \"8\" + S[4:]\nprint(S)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'str' object does not support item assignment","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s780711657.py\", line 2, in \n S[3] = 8\nTypeError: 'str' object does not support item assignment\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = input()\n\nprint(S.replace(2017, 2018))\n","fail":"S = input()\nprint(S.replace(\"2017\", \"2018\"))\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":2,"error":"TypeError: replace() argument 1 must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s380335764.py\", line 3, in \n print(S.replace(2017, 2018))\nTypeError: replace() argument 1 must be str, not int\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"S = list(input())\nS[3] = 8\nprint(\"\".join(S))\n","fail":"S = list(input())\nS[3] = \"8\"\na = \"\".join(S)\nprint(a)\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":4,"error":"TypeError: sequence item 3: expected str instance, int found","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s280675216.py\", line 3, in \n print(\"\".join(S))\nTypeError: sequence item 3: expected str instance, int found\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"n, y = map(int, input().split())\n\na = 0\nb = 0\nc = n\nans = c * 1000\n\nwhile ans < y:\n if y - ans >= 9000:\n tmp = (y - ans) \/\/ 9000\n a += tmp\n c -= tmp\n elif y - ans >= 4000:\n tmp = (y - ans) \/\/ 4000\n b += tmp\n c -= tmp\n ans = a * 10000 + b * 5000 + c * 1000\n\nif ans != y:\n a = b = c = -1\n\nprint(a, b, c)\n","fail":"print(input().replace(\"2017\", \"2018\"))\n","change":"replace","i1":0,"i2":22,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '2017\/01\/07'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s711679119.py\", line 1, in \n n, y = map(int, input().split())\nValueError: invalid literal for int() with base 10: '2017\/01\/07'\n","stdout":null} {"problem_id":"p03469","language":"Python","original_status":"Runtime Error","pass":"s = input().rstrip()\n\ns1 = \"2018\" + s[4:] if s.startwith(\"2017\") else s\n","fail":"s = input().rstrip()\n\ns1 = \"2018\" + s[4:] if s.startswith(\"2017\") else s\nprint(s1)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":4,"error":"AttributeError: 'str' object has no attribute 'startwith'. Did you mean: 'startswith'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03469\/Python\/s739767122.py\", line 3, in \n s1 = \"2018\" + s[4:] if s.startwith(\"2017\") else s\nAttributeError: 'str' object has no attribute 'startwith'. Did you mean: 'startswith'?\n","stdout":null} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"n = input()\nls = [int(input()) for i in range(n)]\nls = list(set(ls))\nprint(len(ls))\n","fail":"n = int(input())\nls = [int(input()) for i in range(n)]\nls = set(ls)\nprint(len(ls))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":3,"error":"TypeError: 'str' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s164646605.py\", line 2, in \n ls = [int(input()) for i in range(n)]\nTypeError: 'str' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nList = sorted(list(set(list(int(input()) for i in range(N)))))\n\nprint(len(List()))\n","fail":"N = int(input())\n\nList = sorted(list(set(list(int(input()) for i in range(N)))))\n\nprint(len(List))\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TypeError: 'list' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s093646747.py\", line 5, in \n print(len(List()))\nTypeError: 'list' object is not callable\n","stdout":null} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nd = [int(input()) for i in range(N)]\n\nprint(list(set(d)))\ne = list(set(d))\nprint(len(e))\nN = int(input())\nd = [int(input()) for i in range(N)]\n\n# print(list(set(d)))\ne = list(set(d))\nprint(len(e))\n","fail":"N = int(input())\nd = [int(input()) for i in range(N)]\n\n# print(list(set(d)))\ne = list(set(d))\nprint(len(e))\n","change":"delete","i1":0,"i2":6,"j1":0,"j2":0,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s146380919.py\", line 7, in \n N = int(input())\nEOFError: EOF when reading a line\n","stdout":"[8, 10, 6]\n3\n"} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nlist = [int(input()) for i in range(n)]\ncheck = 101\ncount = 0\n\nlist.sorted(reverse=True)\n\nfor k in list:\n if k < check:\n count += 1\n check = k\n\nprint(count)\n","fail":"n = int(input())\nlist = [int(input()) for i in range(n)]\ncheck = 101\ncount = 0\n\nlist.sort(reverse=True)\n\nfor k in list:\n if k < check:\n count += 1\n check = k\n\nprint(count)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"AttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s066996346.py\", line 6, in \n list.sorted(reverse=True)\nAttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'?\n","stdout":null} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nnums = [int(input()) for _ in range(int(input()))]\nprint(len(set(nums)))\n","fail":"nums = [int(input()) for _ in range(int(input()))]\nprint(len(set(nums)))\n","change":"delete","i1":0,"i2":1,"j1":0,"j2":0,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s066397851.py\", line 2, in \n nums = [int(input()) for _ in range(int(input()))]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s066397851.py\", line 2, in \n nums = [int(input()) for _ in range(int(input()))]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03470","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nd = sorted([int(input()) for _ in range(n)])\ncnt = 1\nfor a, b in zip(cnt[1:], cnt):\n if a > b:\n cnt += 1\nprint(cnt)\n","fail":"n = int(input())\nd = sorted([int(input()) for _ in range(n)])\ncnt = 1\nfor a, b in zip(d[1:], d):\n if a > b:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TypeError: 'int' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03470\/Python\/s632286045.py\", line 4, in \n for a, b in zip(cnt[1:], cnt):\nTypeError: 'int' object is not subscriptable\n","stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Time Limit Exceeded","pass":"n, y = map(int, input().split())\n\na = 0\nb = 0\nc = n\nans = c * 1000\n\nwhile ans < y:\n if y - ans >= 9000:\n tmp = (y - ans) \/\/ 9000\n a += tmp\n c -= tmp\n elif y - ans >= 4000:\n tmp = (y - ans) \/\/ 4000\n b += tmp\n c -= tmp\n ans = a * 10000 + b * 5000 + c * 1000\n\nif ans != y:\n a = b = c = -1\n\nprint(a, b, c)\n","fail":"n, y = map(int, input().split())\n\na, b, c = (-1, -1, -1)\nfor i in range(n + 1):\n for j in range(n + 1 - i):\n k = n - (i + j)\n if 10000 * i + 5000 * j + 1000 * k == y:\n a, b, c = (i, j, k)\n break\nprint(a, b, c)\n","change":"replace","i1":2,"i2":21,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Time Limit Exceeded","pass":"N, Y = map(int, input().split())\nfor y in range(9):\n for x in range(N + 1):\n for z in range(N + 1):\n if Y == (10000 * x) + (5000 * y) + (1000 * z) and x + y + z == N:\n print(x, y, z)\n break\n else:\n continue\n break\n else:\n if y == 8:\n print(-1, -1, -1)\n continue\n break\n","fail":"N, Y = map(int, input().split())\nfor y in range(9):\n for x in range(N + 1):\n if Y == (10000 * x) + (5000 * y) + (1000 * (N - x - y)) and N >= x + y:\n print(x, y, N - x - y)\n break\n else:\n continue\n break\n else:\n if y == 8:\n print(-1, -1, -1)\n continue\n break\n","change":"replace","i1":3,"i2":7,"j1":3,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Time Limit Exceeded","pass":"n, y = map(int, input().split())\nmax_x = y \/\/ 10000\nmax_y = y \/\/ 5000\nmax_z = y \/\/ 1000\n\nfor i in range(max_x + 1):\n for j in range(max_y + 1):\n remain = y - 10000 * i - 5000 * j\n if remain < 0:\n continue\n if remain \/\/ 1000 == n - (i + j):\n print(i, j, (n - i - j))\n exit()\nprint(-1, -1, -1)\n","fail":"N, Y = list(map(int, input().split()))\nans = [-1, -1, -1]\nflag = False\nfor x in range(N, -1, -1):\n for y in range(N - x, -1, -1):\n if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:\n ans = [x, y, N - x - y]\n flag = True\n break\n if flag == True:\n break\n if flag == True:\n break\nprint(ans[0], ans[1], ans[2])\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Runtime Error","pass":"n, y = map(int, input().split())\n\nflag = False\n\nfor z in range(n + 1)[::-1]:\n rem1 = n - z + 1\n for y in range(rem1)[::-1]:\n x = n - z - y\n val = 10000 * x + 5000 * y + 1000 * z\n if val == y:\n flag = True\n break\n if flag:\n break\n\nif not flag:\n x, y, z = -1\n\nprint(x, y, z)\n","fail":"N, Y = map(int, input().split())\n\nflag = False\n\nfor z in range(N + 1)[::-1]:\n rem1 = N - z + 1\n for y in range(rem1)[::-1]:\n x = N - z - y\n val = 10000 * x + 5000 * y + 1000 * z\n if val == Y:\n flag = True\n break\n if flag:\n break\n\nif not flag:\n x = -1\n y = -1\n z = -1\n\nprint(x, y, z)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":19,"error":"TypeError: cannot unpack non-iterable int object","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03471\/Python\/s426671470.py\", line 17, in \n x, y, z = -1\nTypeError: cannot unpack non-iterable int object\n","stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Runtime Error","pass":"def judge(z):\n if z >= 0:\n remain = n - z\n pay = [[i, remain - i] for i in range(remain + 1)]\n\n for i in range(remain + 1):\n if 10 * pay[i][0] + 5 * pay[i][1] + z == m:\n print(pay[i][0], pay[i][1], z)\n exit()\n\n judge(z - 1)\n\n else:\n print(-1, -1, -1)\n\n\nn, M = list(map(int, input().split(\" \")))\nm = int(M \/ 1000)\n\njudge(n)\n","fail":"def pay(i: int, remain: int, z: int):\n for i in range(0, (n - z) + 1):\n if 10 * i + 5 * (remain - i) + z == m:\n print(i, remain - i, z)\n exit()\n\n return\n\n\nn, M = list(map(int, input().split(\" \")))\nm = int(M \/ 1000)\n\nfor z in range(n, -1, -1):\n pay(0, n - z, z)\n\nprint(-1, -1, -1)\n","change":"replace","i1":0,"i2":20,"j1":0,"j2":16,"error":"0","stderr":null,"stdout":"4 0 5\n"} {"problem_id":"p03471","language":"Python","original_status":"Runtime Error","pass":"N, Y = map(int, input().split())\nans = 0\nfound = False\nfor i in range(N + 1):\n for j in range(0, N - i + 1):\n k = N - i - j\n is_sum = i * 10_000 + j * 5_000 + k * 1_000 == Y\n if is_sum:\n print(i, j, k)\n found = True\n break\n if found:\n break\n # for k in range(N):\n # if i * 10_000 + j * 5_000 + k * 1_000 == Y and i + j + k == N:\n # print(i, j, k)\n # found = True\nif not found:\n print(\"-1 -1 -1\")\n","fail":"N, Y = map(int, input().split())\nans = 0\nfound = False\n\nY \/\/= 1000\n\nT = 0\nfor i in range(Y \/\/ 10 + 1):\n for j in range((Y - i * 10) \/\/ 5 + 1):\n T += 1\n x = Y - i * 10 - j * 5\n if x < 0:\n break\n if i + j + x == N:\n print(i, j, x)\n found = True\n break\n if found:\n break\nif not found:\n print(\"-1 -1 -1\")\n","change":"replace","i1":3,"i2":17,"j1":3,"j2":19,"error":"WA","stderr":null,"stdout":"0 9 0\n"} {"problem_id":"p03471","language":"Python","original_status":"Runtime Error","pass":"N, Y = input().split()\n\nfor x in range(1, N):\n for y in range(1, N):\n if (N - x - y < 0) and (10000 * x + 5000 * y + 1000(N - x - y)) == Y:\n print(x, y, N - x - y)\n","fail":"N, Y = map(int, input().split())\nfor x in range(N + 1):\n for y in range(N + 1):\n if (N - x - y >= 0) and (10000 * x + 5000 * y + 1000 * (N - x - y) == Y):\n print(x, y, N - x - y)\n break\n else:\n if x == N and y == N:\n print(-1, -1, -1)\n continue\n break\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":11,"error":"TypeError: 'str' object cannot be interpreted as an integer","stderr":"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03471\/Python\/s576925636.py:5: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?\n if (N - x - y < 0) and (10000 * x + 5000 * y + 1000(N - x - y)) == Y:\nTraceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03471\/Python\/s576925636.py\", line 3, in \n for x in range(1, N):\nTypeError: 'str' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03471","language":"Python","original_status":"Runtime Error","pass":"N, Y = list(map(int, input().split()))\nans = []\nfor i_yukichi in range(N + 1):\n for j_higuchi in range(N + 1 - i_yukichi):\n k_noguchi = N - i_yukichi - j_higuchi\n if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:\n ans.append(i_yukichi)\n ans.append(j_higuchi)\n ans.append(k_noguchi)\n break\nif len(ans) != 0:\n print(ans[0], ans[1], ans[3])\nelse:\n print(\"-1 -1 -1\")\n","fail":"N, Y = list(map(int, input().split()))\nans = []\nfor i_yukichi in range(N + 1):\n for j_higuchi in range(N + 1 - i_yukichi):\n k_noguchi = N - i_yukichi - j_higuchi\n if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:\n ans.append(i_yukichi)\n ans.append(j_higuchi)\n ans.append(k_noguchi)\n break\nif len(ans) != 0:\n print(ans[0], ans[1], ans[2])\nelse:\n print(\"-1 -1 -1\")\n","change":"replace","i1":11,"i2":12,"j1":11,"j2":12,"error":"WA","stderr":null,"stdout":"0 9 4\n"} {"problem_id":"p03471","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n\n\ndef main():\n args = input().split()\n N = int(args[0])\n Y = int(args[1])\n\n for num10000 in range(0, N + 1):\n for num5000 in range(0, N + 1 - num10000):\n for num1000 in range(0, N + 1 - num10000 - num5000):\n if num10000 + num5000 + num1000 != N:\n continue\n value = 10000 * num10000 + 5000 * num5000 + 1000 * num1000\n if value == Y:\n print(num10000, num5000, num1000)\n return\n\n print(-1, -1, -1)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n\n\ndef main():\n args = input().split()\n N = int(args[0])\n Y = int(args[1])\n\n for num10000 in range(0, N + 1):\n for num5000 in range(0, N + 1 - num10000):\n num1000 = N - num10000 - num5000\n value = 10000 * num10000 + 5000 * num5000 + 1000 * num1000\n if value == Y:\n print(num10000, num5000, num1000)\n return\n\n print(-1, -1, -1)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":10,"i2":17,"j1":10,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03472","language":"Python","original_status":"Time Limit Exceeded","pass":"N, H = map(int, input().split())\na, b = [0] * N, [0] * N\nfor i in range(N):\n a[i], b[i] = map(int, input().split())\na.sort(reverse=True)\nb.sort(reverse=True)\nans = 0\nwhile len(b) > 0 and b[0] > a[0]:\n H -= b[0]\n b = b[1:]\n ans += 1\nans += (H + a[0] - 1) \/\/ a[0]\nprint(ans)\n","fail":"N, H = map(int, input().split())\na, b = [0] * N, [0] * N\nfor i in range(N):\n a[i], b[i] = map(int, input().split())\nma = max(a)\nb.sort(reverse=True)\nans = 0\nindex = 0\nwhile H > 0 and len(b) > index and b[index] > ma:\n H -= b[index]\n index += 1\n ans += 1\nif H > 0:\n ans += (H + ma - 1) \/\/ ma\nprint(ans)\n","change":"replace","i1":4,"i2":12,"j1":4,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03472","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N, Y = [int(i) for i in input().split()]\n\n A = []\n B = []\n\n for i in range(N):\n a, b = [int(i) for i in input().split()]\n A.append(a)\n B.append(b)\n\n B.sort()\n B.reverse()\n A.sort()\n A.reverse()\n\n for i in range(1000000000):\n if Y <= 0:\n print(i)\n return\n\n b_m = max(B, default=0)\n a_m = max(A)\n if b_m > a_m:\n Y = Y - b_m\n B.remove(b_m)\n else:\n Y = Y - a_m\n\n\nmain()\n","fail":"def answer():\n import sys\n\n input = sys.stdin.readline\n wield = 0\n l = []\n N, H = map(int, input().split())\n for i in range(N):\n a, b = map(int, input().split())\n l.append(b)\n wield = max(a, wield)\n l.sort(reverse=True)\n ret = 0\n for a in l:\n if H <= 0:\n break\n if a > wield:\n ret += 1\n H -= a\n else:\n break\n if H > 0:\n ret += (H + wield - 1) \/\/ wield\n print(ret)\n\n\nanswer()\n","change":"replace","i1":0,"i2":31,"j1":0,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03472","language":"Python","original_status":"Time Limit Exceeded","pass":"n, h = [int(t) for t in input().split()]\naa = []\nbb = []\nfor _ in range(n):\n a, b = [int(t) for t in input().split()]\n aa.append(a)\n if b > a:\n bb.append(b)\naa.sort()\nbb.sort()\n\ncnt = 0\nwhile h > 0:\n if not bb:\n cnt += (h - 1) \/\/ aa[-1] + 1\n break\n elif bb[-1] > aa[-1]:\n h -= bb.pop()\n else:\n h -= aa[-1]\n cnt += 1\nprint(cnt)\n","fail":"n, h = [int(t) for t in input().split()]\naa = []\nbb = []\nfor _ in range(n):\n a, b = [int(t) for t in input().split()]\n aa.append(a)\n if b > a:\n bb.append(b)\naa.sort()\nbb.sort()\n\ncnt = 0\nwhile h > 0:\n if not bb or aa[-1] >= bb[-1]:\n cnt += (h - 1) \/\/ aa[-1] + 1\n break\n else:\n h -= bb.pop()\n cnt += 1\nprint(cnt)\n","change":"replace","i1":13,"i2":20,"j1":13,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03472","language":"Python","original_status":"Runtime Error","pass":"n, h = map(int, input().split())\na, b = [], []\nfor _ in range(n):\n ai, bi = map(int, input().split())\n a.append(ai), b.append(bi)\na.sort(), b.sort()\n\nans, amax = 0, a[-1]\nfor bi in b[::-1]:\n if bi <= amax or h <= 0:\n mod = (h + amax - 1) \/\/ amax\n break\n h -= bi\n ans += 1\nprint(ans + mod if h > 0 else ans)\n","fail":"n, h = map(int, input().split())\na, b = [], []\nfor _ in range(n):\n ai, bi = map(int, input().split())\n a.append(ai), b.append(bi)\na.sort(), b.sort()\n\nans, amax = 0, a[-1]\nfor bi in b[::-1]:\n if bi <= amax or h <= 0:\n break\n h -= bi\n ans += 1\nmod = (h + amax - 1) \/\/ amax\nprint(ans + mod if h > 0 else ans)\n","change":"replace","i1":10,"i2":14,"j1":10,"j2":14,"error":"NameError: name 'mod' is not defined","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03472\/Python\/s359965169.py\", line 15, in \n print(ans + mod if h > 0 else ans)\nNameError: name 'mod' is not defined\n","stdout":null} {"problem_id":"p03473","language":"Python","original_status":"Runtime Error","pass":"m = input()\nn = 48 - m\nprint(n)\n","fail":"m = int(input())\nn = 48 - m\nprint(n)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for -: 'int' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03473\/Python\/s581215127.py\", line 2, in \n n = 48 - m\nTypeError: unsupported operand type(s) for -: 'int' and 'str'\n","stdout":null} {"problem_id":"p03474","language":"Python","original_status":"Runtime Error","pass":"A, B = input().split()\nS1, S2 = input().split(\"-\")\nprint(\"Yes\" if len(S1) == A and len(S2) == B else \"No\")\n","fail":"A, B = map(int, input().split())\nS = input().split(\"-\")\nprint(\"Yes\" if len(S) == 2 and len(S[0]) == A and len(S[1]) == B else \"No\")\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":3,"error":"WA","stderr":null,"stdout":"No\n"} {"problem_id":"p03474","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\ns = input()\nfirst, second = s.split(\"-\")\nif len(first) == a and len(second) == b:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"a, b = map(int, input().split())\ns = input()\ntry:\n first, second = s.split(\"-\")\n if len(first) == a and len(second) == b:\n print(\"Yes\")\n else:\n print(\"No\")\nexcept:\n print(\"No\")\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":9,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03475","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nC, S, F = [0] * (N - 1), [0] * (N - 1), [0] * (N - 1)\nfor i in range(N - 1):\n C[i], S[i], F[i] = map(int, input().split())\n\n\ndef get_t(x, i):\n t = S[i]\n while x > t:\n t += F[i]\n return t\n\n\nfor i in range(N - 1):\n x = S[i] + C[i]\n for j in range(i + 1, N - 1):\n t = get_t(x, j)\n x = t + C[j]\n print(x)\nprint(0)\n","fail":"N = int(input())\nC, S, F = [0] * (N - 1), [0] * (N - 1), [0] * (N - 1)\nfor i in range(N - 1):\n C[i], S[i], F[i] = map(int, input().split())\n\nfor i in range(N):\n t = 0\n for j in range(i, N - 1):\n if t < S[j]:\n t = S[j]\n elif t % F[j] == 0:\n pass\n else:\n t += F[j] - t % F[j]\n t += C[j]\n print(t)\n","change":"replace","i1":5,"i2":20,"j1":5,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03475","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\ntrain_info = []\nfor _ in range(1, n):\n train_info.append(list(map(int, input().split())))\n\n# print(train_info)\n\nfor i in range(1, n + 1):\n # print(\"i = {}\".format(i))\n t = 0\n\n if i == n:\n print(0)\n else:\n for j in range(i, n):\n C_j, S_j, F_j = train_info[j - 1]\n while True:\n if (t >= S_j) & (t % F_j == 0):\n t += C_j\n break\n else:\n t += 1\n\n print(t)\n","fail":"n = int(input())\ntrain_info = []\nfor _ in range(1, n):\n train_info.append(list(map(int, input().split())))\n\n# print(train_info)\n\nfor i in range(1, n + 1):\n # print(\"i = {}\".format(i))\n t = 0\n\n if i == n:\n print(0)\n else:\n for j in range(i, n):\n # print(\"t = {}\".format(t))\n C_j, S_j, F_j = train_info[j - 1]\n if t <= S_j:\n t = S_j + C_j\n elif t % F_j == 0:\n t += C_j\n else:\n t += F_j - t % F_j\n t += C_j\n\n print(t)\n","change":"replace","i1":15,"i2":22,"j1":15,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03475","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\n_list = []\nfor _ in range(n - 1):\n a, b, c = map(int, input().split())\n _list.append([a, b, c])\n\nfor i in range(n - 1):\n num = i\n time = 0\n\n while num < n - 1:\n c, s, f = _list[num]\n\n if num == i:\n time += s + c\n num += 1\n continue\n\n while True:\n wait = s - time\n if wait >= 0:\n time += wait + c\n break\n\n s += f\n\n num += 1\n\n print(time)\n\n\nprint(0)\n","fail":"n = int(input())\n\n_list = []\nfor _ in range(n - 1):\n a, b, c = map(int, input().split())\n _list.append([a, b, c])\n\n\nfor i in range(n - 1):\n num = i\n time = 0\n\n while num < n - 1:\n c, s, f = _list[num]\n\n if num == i:\n time += s + c\n num += 1\n continue\n\n while True:\n wait = s - time\n\n if wait >= 0:\n time += wait + c\n break\n\n test = (wait * -1) \/\/ f\n s += int(f * test)\n\n if s - time < 0:\n s += f\n\n num += 1\n\n print(time)\n\n\nprint(0)\n","change":"replace","i1":6,"i2":26,"j1":6,"j2":32,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03475","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nC, S, F = [], [], []\nfor _ in range(N - 1):\n c, s, f = map(int, input().split())\n C.append(c)\n S.append(s)\n F.append(f)\n\n\ndef next_time(i, t):\n a = S[i]\n while a < t:\n a += F[i]\n return a\n\n\nfor i in range(N):\n time = 0\n for j in range(i, N - 1):\n time = next_time(j, time)\n time += C[j]\n\n print(time)\n","fail":"N = int(input())\nC, S, F = [], [], []\nfor _ in range(N - 1):\n c, s, f = map(int, input().split())\n C.append(c)\n S.append(s)\n F.append(f)\n\n\ndef next_time(i, t):\n a = S[i]\n if t - a < 0:\n return a\n if t % F[i] == 0:\n return t\n b = (t - a + F[i] - 1) \/\/ F[i]\n # print(i, t, a, b, t + b * F[i])\n assert (a + b * F[i]) % F[i] == 0\n return a + b * F[i]\n\n\nfor i in range(N):\n time = 0\n for j in range(i, N - 1):\n time = next_time(j, time)\n time += C[j]\n\n print(time)\n","change":"replace","i1":11,"i2":14,"j1":11,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03476","language":"Python","original_status":"Time Limit Exceeded","pass":"from math import ceil, sqrt\n\nQ = int(input())\nquerys = [tuple(map(int, input().split())) for i in range(Q)]\n\nN = max(map(max, querys))\n\nPrimes = [False] * 2 + [True] * (N - 1)\nfor i in range(3, N + 1):\n for j in range(2, ceil(sqrt(i)) + 1):\n if i % j == 0:\n Primes[i] = False\n\ns2017s = [False] * (N + 1)\nfor i in range(1, N + 1, 2):\n if Primes[i] and Primes[(i + 1) \/\/ 2]:\n s2017s[i] = True\n\nnums = [0] * (N + 1)\nfor i in range(1, N + 1, 2):\n nums[i] = nums[i - 2]\n if s2017s[i]:\n nums[i] += 1\n\nfor li, ri in querys:\n print(nums[ri] - nums[max(0, li - 2)])\n","fail":"from math import ceil, sqrt\n\nQ = int(input())\nquerys = [tuple(map(int, input().split())) for i in range(Q)]\n\nN = max(map(max, querys))\n\nPrimes = [False] * 2 + [True] * (N - 1)\nfor i in range(3, N + 1):\n for j in range(2, ceil(sqrt(i)) + 1):\n if i % j == 0:\n Primes[i] = False\n break\n\ns2017s = [False] * (N + 1)\nfor i in range(1, N + 1, 2):\n if Primes[i] and Primes[(i + 1) \/\/ 2]:\n s2017s[i] = True\n\nnums = [0] * (N + 1)\nfor i in range(1, N + 1, 2):\n nums[i] = nums[i - 2]\n if s2017s[i]:\n nums[i] += 1\n\nfor li, ri in querys:\n print(nums[ri] - nums[max(0, li - 2)])\n","change":"insert","i1":12,"i2":12,"j1":12,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03476","language":"Python","original_status":"Runtime Error","pass":"def primes(n):\n primes = []\n is_prime = [True] * (n + 1)\n is_prime[0] = False\n is_prime[1] = False\n for i in range(2, int(n**0.5) + 1):\n if not is_prime[i]:\n continue\n for j in range(i * 2, n + 1, i):\n is_prime[j] = False\n for i in range(len(is_prime)):\n if is_prime[i]:\n primes.append(i)\n return is_prime\n\n\nQ = int(input())\n\nps = primes(10000)\nlike_numbers = [False] * 10001\nfor i in range(3, 10001, 2):\n if ps[i] and ps[(i + 1) \/\/ 2]:\n like_numbers[i] = True\n\nlike_numbers_cnt = [0] * 10001\n\nfor i in range(1, 10001):\n if like_numbers[i]:\n like_numbers_cnt[i] = like_numbers_cnt[i - 1] + 1\n else:\n like_numbers_cnt[i] = like_numbers_cnt[i - 1]\n\nfor _ in range(Q):\n l, r = map(int, input().split())\n print(like_numbers_cnt[r] - like_numbers_cnt[l - 1])\n","fail":"def primes(n):\n primes = []\n is_prime = [True] * (n + 1)\n is_prime[0] = False\n is_prime[1] = False\n for i in range(2, int(n**0.5) + 1):\n if not is_prime[i]:\n continue\n for j in range(i * 2, n + 1, i):\n is_prime[j] = False\n for i in range(len(is_prime)):\n if is_prime[i]:\n primes.append(i)\n return is_prime\n\n\nQ = int(input())\n\nps = primes(100000)\nlike_numbers = [False] * 100001\nfor i in range(3, 100001, 2):\n if ps[i] and ps[(i + 1) \/\/ 2]:\n like_numbers[i] = True\n\nlike_numbers_cnt = [0] * 100001\n\nfor i in range(1, 100001):\n if like_numbers[i]:\n like_numbers_cnt[i] = like_numbers_cnt[i - 1] + 1\n else:\n like_numbers_cnt[i] = like_numbers_cnt[i - 1]\n\nfor _ in range(Q):\n l, r = map(int, input().split())\n print(like_numbers_cnt[r] - like_numbers_cnt[l - 1])\n","change":"replace","i1":18,"i2":27,"j1":18,"j2":27,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03477","language":"Python","original_status":"Runtime Error","pass":"n, a, b = map(int, input().split())\ncounter = 0\n\nfor i in range(1, n):\n str_i = str(i)\n sum_i = sum(map(int, str_i))\n if a <= sum_i <= b:\n counter += i\n\nprint(counter)\n","fail":"a, b, c, d = map(int, input().split())\n\nprint(\"Left\" if a + b > c + d else \"Balanced\" if a + b == c + d else \"Right\")\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":3,"error":"ValueError: too many values to unpack (expected 3)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03477\/Python\/s233397764.py\", line 1, in \n n, a, b = map(int, input().split())\nValueError: too many values to unpack (expected 3)\n","stdout":null} {"problem_id":"p03477","language":"Python","original_status":"Runtime Error","pass":"A, B, C, D = map(input().split())\n\nif A + B > C + D:\n print(\"Left\")\nelif A + B == C + D:\n print(\"Balanced\")\nelse:\n print(\"Right\")\n","fail":"A, B, C, D = map(int, input().split())\n\nif A + B > C + D:\n print(\"Left\")\nelif A + B == C + D:\n print(\"Balanced\")\nelse:\n print(\"Right\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: map() must have at least two arguments.","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03477\/Python\/s591114327.py\", line 1, in \n A, B, C, D = map(input().split())\nTypeError: map() must have at least two arguments.\n","stdout":null} {"problem_id":"p03478","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n# Input\nlist = []\nfor _ in range(3):\n list += [int(input())]\n\ntotal = 0\nfor ii in range(1, list[0] + 1):\n sum = 0\n tmp = ii\n while tmp > 0:\n sum += tmp % 10\n tmp = tmp \/\/ 10\n\n if sum >= list[1] and sum <= list[2]:\n total += ii\nprint(total)\n","fail":"# -*- coding: utf-8 -*-\n# Input\nlist = []\nn, a, b = map(int, input().split())\n\ntotal = 0\nfor ii in range(1, n + 1):\n sum = 0\n tmp = ii\n while tmp > 0:\n sum += tmp % 10\n tmp = tmp \/\/ 10\n\n if sum >= a and sum <= b:\n total += ii\nprint(total)\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":14,"error":"ValueError: invalid literal for int() with base 10: '20 2 5'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03478\/Python\/s606181373.py\", line 5, in \n list += [int(input())]\nValueError: invalid literal for int() with base 10: '20 2 5'\n","stdout":null} {"problem_id":"p03478","language":"Python","original_status":"Runtime Error","pass":"n, b, c = map(int, input().split(\"\"))\nans = 0\nfor i in range(n + 1):\n if b <= sum(list(map(int, list(str(i))))) <= c:\n ans += i\nprint(ans)\n","fail":"n, b, c = map(int, input().split())\nans = 0\nfor i in range(n + 1):\n if b <= sum(list(map(int, list(str(i))))) <= c:\n ans += i\nprint(ans)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: empty separator","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03478\/Python\/s330413525.py\", line 1, in \n n, b, c = map(int, input().split(\"\"))\nValueError: empty separator\n","stdout":null} {"problem_id":"p03478","language":"Python","original_status":"Runtime Error","pass":"N, A, B = map(input, input().split())\n\nans = 0\nfor i in range(N + 1):\n if A <= sum(map(int, list(str(i)))) <= B:\n ans += 1\nprint(ans)\n","fail":"N, A, B = map(int, input().split())\n\nans = 0\nfor i in range(N + 1):\n if A <= sum(list(map(int, list(str(i))))) <= B:\n map(int, list(str(i)))\n ans += i\nprint(ans)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":7,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03478\/Python\/s203322622.py\", line 1, in \n N, A, B = map(input, input().split())\nEOFError: EOF when reading a line\n","stdout":20.0} {"problem_id":"p03480","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nS = input()\ncenter = len(S) \/\/ 2\nb = S[center]\n\nif len(S) % 2 == 1:\n for i in range(1, center + 1):\n if S[center + i] != b or S[center - i] != b:\n print(center + i)\n sys.exit()\nelse:\n for i in range(center + 1):\n if S[center - i] != b or S[center + 1 + i] != b:\n print(center)\n sys.exit()\n","fail":"import sys\n\nS = input()\ncenter = len(S) \/\/ 2\n\nif len(S) % 2 == 1:\n b = S[center]\n for i in range(1, center + 1):\n if S[center + i] != b or S[center - i] != b:\n print(center + i)\n sys.exit()\nelse:\n b = S[center - 1]\n for i in range(center):\n if S[center - 1 - i] != b or S[center + i] != b:\n print(center + i)\n sys.exit()\nprint(len(S))\n","change":"replace","i1":4,"i2":16,"j1":4,"j2":18,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03480","language":"Python","original_status":"Runtime Error","pass":"# coding=utf-8\nS = int(input())\n\n# 0\u30681\u306e\u500b\u6570\u306e\u3046\u3061\u3001\u5927\u304d\u3044\u65b9\ncnt = 0\nfor i in range(len(S)):\n if S[i] == \"0\":\n cnt += 1\ncnt = max(cnt, len(S) - cnt)\nprint(cnt)\n","fail":"S = input()\n\nans = len(S)\nfor i in range(1, len(S)):\n if S[i - 1] != S[i]:\n ans = min(ans, max(i, len(S) - i))\n\nprint(ans)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":8,"error":"TypeError: object of type 'int' has no len()","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03480\/Python\/s330718076.py\", line 6, in \n for i in range(len(S)):\nTypeError: object of type 'int' has no len()\n","stdout":null} {"problem_id":"p03485","language":"Python","original_status":"Runtime Error","pass":"a, b = map(float, input().split())\nprint(int(round((a + b) \/ 2), 0))\n","fail":"a, b = map(float, input().split())\nif int((a + b) \/ 2) < ((a + b) \/ 2):\n print(int((a + b) \/ 2) + 1)\nelse:\n print(int((a + b) \/ 2))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":5,"error":"TypeError: int() can't convert non-string with explicit base","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03485\/Python\/s451038837.py\", line 2, in \n print(int(round((a + b) \/ 2), 0))\nTypeError: int() can't convert non-string with explicit base\n","stdout":null} {"problem_id":"p03486","language":"Python","original_status":"Runtime Error","pass":"s = [*input()]\nt = [*input()]\ns.sort()\nt.sort()\nt.reverse()\nprint(\"Yes\" if s < t else \"No\")\n","fail":"S = input()\nT = input()\ns = list(S)\nt = list(T)\ns.sort()\nt.sort()\nt.reverse()\nprint(\"Yes\" if s < t else \"No\")\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":4,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03486","language":"Python","original_status":"Runtime Error","pass":"s = list(input())\nt = list(input())\na = 0\n\ns.sort()\nt.sort()\nt = t[::-1]\n\nif len(s) < len(t):\n for i in range(len(s)):\n if s[i] < t[i]:\n print(\"Yes\")\n break\n elif s[i] == t[i]:\n a += 1\n continue\n else:\n print(\"No\")\n break\n if a == len(s):\n print(\"Yes\")\n\nelse:\n for i in range(len(s)):\n if s[i] < t[i]:\n print(\"Yes\")\n break\n elif s[i] == t[i]:\n a += 1\n continue\n else:\n print(\"No\")\n break\n if a == len(s):\n print(\"No\")\n","fail":"s = list(input())\nt = list(input())\na = 0\n\ns.sort()\nt.sort()\nt = t[::-1]\n\nif len(s) < len(t):\n for i in range(len(s)):\n if s[i] < t[i]:\n print(\"Yes\")\n break\n elif s[i] == t[i]:\n a += 1\n continue\n else:\n print(\"No\")\n break\n if a == len(s):\n print(\"Yes\")\n\nelse:\n for i in range(len(t)):\n if s[i] < t[i]:\n print(\"Yes\")\n break\n elif s[i] == t[i]:\n a += 1\n continue\n else:\n print(\"No\")\n break\n if a == len(t):\n print(\"No\")\n","change":"replace","i1":23,"i2":34,"j1":23,"j2":34,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03486","language":"Python","original_status":"Runtime Error","pass":"s = sorted(input())\nt = sorted(input()).reverse()\nprint(\"Yes\" if s < t else \"No\")\n","fail":"s = sorted(input())\nt = sorted(input())[::-1]\nprint(\"Yes\" if s < t else \"No\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: '<' not supported between instances of 'list' and 'NoneType'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03486\/Python\/s804213311.py\", line 3, in \n print(\"Yes\" if s < t else \"No\")\nTypeError: '<' not supported between instances of 'list' and 'NoneType'\n","stdout":null} {"problem_id":"p03486","language":"Python","original_status":"Runtime Error","pass":"print(\"Yes\" if print(sorted(input())) < print(sorted(input())[::-1]) else \"No\")\n","fail":"print(\"Yes\" if sorted(input()) < sorted(input())[::-1] else \"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03486\/Python\/s649784028.py\", line 1, in \n print(\"Yes\" if print(sorted(input())) < print(sorted(input())[::-1]) else \"No\")\nTypeError: '<' not supported between instances of 'NoneType' and 'NoneType'\n","stdout":"['x', 'y']\n['y', 'x', 'a']\n"} {"problem_id":"p03487","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\nmax = max(a) + 1\nnum = [0] * max\nfor i in a:\n num[i] += 1\nans = 0\nfor i in range(max):\n if i > num[i]:\n ans += num[i]\n else:\n ans += num[i] - i\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\na.sort()\ncnt = 1\nans = 0\nfor i in range(len(a) - 1):\n if a[i] == a[i + 1]:\n cnt += 1\n continue\n\n if cnt >= a[i]:\n ans += cnt - a[i]\n else:\n ans += cnt\n cnt = 1\nif cnt >= a[-1]:\n ans += cnt - a[-1]\nelse:\n ans += cnt\nprint(ans)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":20,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = input()\narr = list(map(int, input().split()))\nar = [0 for i in range(max(arr))]\nfor i in arr:\n ar[i - 1] += 1\nres = 0\nfor i in range(len(ar)):\n if ar[i] > i + 1:\n res += ar[i] - i - 1\n if ar[i] < i + 1:\n res += ar[i]\nprint(res)\n","fail":"n = input()\narr = list(map(int, input().split()))\nar = [0 for i in range(100001)]\nres = 0\nfor i in arr:\n if i > 100000:\n res += 1\n else:\n ar[i] += 1\nfor i in range(len(ar)):\n if ar[i] > i:\n res += ar[i] - i\n if ar[i] < i:\n res += ar[i]\nprint(res)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"# Good Sequence\nn = int(input())\na = list(map(int, input().split()))\na_ = set(a)\np = 0\nfor i in a_:\n if a.count(i) < i:\n p += a.count(i)\n elif a.count(i) > i:\n p += a.count(i) - i\nprint(p)\n","fail":"# Good Sequence\nn = int(input())\na = list(map(int, input().split()))\ncount = {}\nans = 0\nfor i in a:\n if i not in count:\n count[i] = 1\n else:\n count[i] += 1\nfor i, c in count.items():\n if i > c:\n ans += c\n elif i < c:\n ans += c - i\nprint(ans)\n","change":"replace","i1":3,"i2":11,"j1":3,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\na.sort()\nans = 0\n\nfor i in list(set(a)):\n count_of_i = a.count(i)\n if count_of_i < i:\n ans += count_of_i\n else:\n ans += count_of_i - i\nprint(ans)\n","fail":"from collections import Counter\n\nn = int(input())\na = list(map(int, input().split()))\nans = 0\ncounter = Counter(a)\nfor i in set(a):\n if counter[i] < i:\n ans += counter[i]\n else:\n ans += counter[i] - i\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nlist_a = list(set(a))\n\nresult = 0\nfor i in list_a:\n cnt = a.count(i)\n if cnt != i:\n result = result + cnt if cnt < i else result + cnt - i\n\nprint(result)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\ncount_a = {}\nfor n in range(N):\n if a[n] in count_a.keys():\n count_a[a[n]] += 1\n else:\n count_a[a[n]] = 1\n\nresult = 0\nfor n in list(count_a.keys()):\n if count_a[n] != n:\n result = result + count_a[n] if count_a[n] < n else result + count_a[n] - n\n\nprint(result)\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na_list = list(map(int, sorted(input().split())))\n\nsum = 0\n\nfor a in set(a_list):\n cnt = a_list.count(a)\n if a > cnt:\n sum += cnt\n else:\n sum += cnt - a\n\nprint(sum)\n","fail":"from collections import Counter\n\nN = int(input())\ncounter = Counter(map(int, input().split()))\n\nsum = 0\n\nfor a, cnt in counter.most_common():\n if a > cnt:\n sum += cnt\n else:\n sum += cnt - a\n\nprint(sum)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA_LI = sorted(map(int, input().split()))\nA_SET = set(A_LI)\nans = 0\nfor a in A_SET:\n cnt = A_LI.count(a)\n if cnt < a:\n ans += cnt\n else:\n ans += cnt - a\nprint(ans)\n","fail":"N = int(input())\nA_LI = sorted(map(int, input().split()))\na_dict = {}\nans = 0\npre = None\nfor a in A_LI:\n if a not in a_dict:\n if pre in a_dict:\n # \u51fa\u63c3\u3063\u305f\u5024\u306b\u3064\u3044\u3066\u53d6\u308a\u9664\u304f\u500b\u6570\u3092\u6c42\u3081\u308b\n if a_dict[pre] < pre:\n ans += a_dict[pre]\n else:\n ans += a_dict[pre] - pre\n pre = a\n a_dict[a] = 1\n else:\n a_dict[a] += 1\n# \u6700\u5f8c\u306e\u5024\u306b\u3064\u3044\u3066\u53d6\u308a\u9664\u304f\u500b\u6570\u3092\u6c42\u3081\u308b\nif a_dict[pre] < pre:\n ans += a_dict[pre]\nelse:\n ans += a_dict[pre] - pre\nprint(ans)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nans = 0\nfor s in sorted(set(a))[::-1]:\n cnt = a.count(s)\n tmp = cnt - s\n ans += (tmp > 0) * tmp + (tmp < 0) * cnt\nprint(ans)\n","fail":"from collections import Counter\n\nN = int(input())\na = list(map(int, input().split()))\ncnt = Counter(a)\nans = 0\nfor k, v in cnt.items():\n if k > v:\n ans += v\n elif k < v:\n ans += v - k\nprint(ans)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\ns = set(a)\n\nans = 0\n\nfor x in s:\n c = a.count(x)\n if c > x:\n ans += c - x\n if c < x:\n ans += c\n\nprint(ans)\n","fail":"import collections\n\nn = int(input())\na = list(map(int, input().split()))\n\nc = collections.Counter(a)\nans = 0\n\nfor k, v in c.items():\n if k > v:\n ans += v\n if k < v:\n ans += v - k\n\nprint(ans)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nn = int(input())\n\nalist = list(map(int, input().split()))\nresult = 0\n\nfor i in set(alist):\n if alist.count(i) > i:\n result += alist.count(i) - i\n elif alist.count(i) < i:\n result += alist.count(i)\nprint(result)\n","fail":"from collections import Counter\n\ninput()\nA = map(int, input().split())\nB = Counter(A)\n\ncount = 0\nfor key, value in B.items():\n count += value - key if value >= key else value\n\nprint(count)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nans = 0\n_a = set(a)\nfor x in _a:\n y = a.count(x)\n if y < x:\n ans += y\n elif y > x:\n ans += y - x\nprint(ans)\n","fail":"from collections import Counter\n\nn = int(input())\na = list(map(int, input().split()))\nans = 0\nc = Counter(a)\nfor key in c:\n if c[key] < key:\n ans += c[key]\n elif c[key] > key:\n ans += c[key] - key\nprint(ans)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nA = {a: A.count(a) for a in set(A)}\nans = 0\nfor k, v in A.items():\n if k > v:\n ans += v\n elif k < v:\n ans += v - k\nprint(ans)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nS = {}\nfor a in A:\n if a in S:\n S[a] += 1\n else:\n S[a] = 1\nans = 0\nfor k, v in S.items():\n if k > v:\n ans += v\n elif k < v:\n ans += v - k\nprint(ans)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = list(map(int, input().split()))\n\nA_set = set(A)\nans = 0\n\nfor a in A_set:\n count = A.count(a)\n if count >= a:\n ans += count - a\n else:\n ans += count\n\nprint(ans)\n","fail":"import collections\n\nn = int(input())\nA = list(map(int, input().split()))\n\nB = collections.Counter(A)\nans = 0\n\nfor key, val in B.items():\n if val > key:\n ans += val - key\n elif val < key:\n ans += val\n\nprint(ans)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\naList = list(map(int, input().split()))\naSet = list(set(aList))\naSum = 0\nfor a in aSet:\n aCount = aList.count(a)\n if aCount > a:\n aSum += aCount - a\n continue\n if aCount == a:\n continue\n if aCount < a:\n aSum += aCount\n continue\nprint(aSum)\n","fail":"n = int(input())\naList = list(map(int, input().split()))\naLen = len(aList)\naSet = sorted(list(set(aList)))\naSum = 0\nfor a in aSet:\n aCount = aList.count(a)\n if aCount > a:\n aSum += aCount - a\n if aCount < a:\n aSum += aCount\n aLen -= aCount\n if a > aLen:\n aSum += aLen\n break\n\nprint(aSum)\n","change":"replace","i1":2,"i2":14,"j1":2,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [int(i) for i in input().split()]\n\ncheck = []\n\nans = 0\nfor i in a:\n if i not in check:\n check.append(i)\n tmp = a.count(i)\n if tmp < i:\n ans += tmp\n else:\n ans += tmp - i\n\nprint(ans)\n","fail":"from collections import Counter as ct\n\nN = int(input())\na = [int(i) for i in input().split()]\nc = ct(a)\n\nans = 0\nfor i, j in c.items():\n if i <= j:\n ans += j - i\n else:\n ans += j\n\nprint(ans)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nli_a = input().split()\n\nresult = 0\nfor i in set(li_a):\n cnt = li_a.count(i)\n if cnt > int(i):\n result += cnt - int(i)\n elif cnt < int(i):\n result += cnt\n\nprint(result)\n","fail":"from collections import defaultdict\n\nn = int(input())\nli_a = input().split()\n\nndict = defaultdict(int)\n\nfor i in li_a:\n ndict[i] += 1\n\nresult = 0\nfor k in ndict.keys():\n if ndict[k] > int(k):\n result += ndict[k] - int(k)\n elif ndict[k] < int(k):\n result += ndict[k]\n\nprint(result)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\ncounter_remove = 0\ncounter = dict()\ncounter_keys = []\nfor i in range(n):\n if a[i] not in counter_keys:\n counter_keys.append(a[i])\n counter[str(a[i])] = 1\n else:\n if counter[str(a[i])] < a[i]:\n counter[str(a[i])] += 1\n else:\n counter_remove += 1\n\n# remove small\nfor key in counter_keys:\n if counter[str(key)] < int(key):\n counter_remove += int(counter[str(key)])\n\nprint(counter_remove)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\nfrom collections import Counter\n\nb = Counter(a)\n\ncounter = 0\nfor key in b.keys():\n if b[key] < key:\n counter += b[key]\n elif b[key] > key:\n counter += b[key] - key\nprint(counter)\n","change":"replace","i1":3,"i2":22,"j1":3,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03487","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(zz) for zz in input().split()]\nB = set(A)\n\nans = 0\nfor i in B:\n p = A.count(i)\n if i > p:\n ans += p\n elif i < p:\n ans += p - i\n\nprint(ans)\n","fail":"import bisect\n\nN = int(input())\nA = [int(zz) for zz in input().split()]\nB = set(A)\nA.sort()\nans = 0\nfor i in B:\n p = bisect.bisect_right(A, i) - bisect.bisect_left(A, i)\n if i > p:\n ans += p\n elif i < p:\n ans += p - i\n\nprint(ans)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03488","language":"Python","original_status":"Runtime Error","pass":"S = input()\nX, Y = map(int, input().split())\n\nif S.find(\"F\") < 0:\n if X != 0 or Y != 0:\n print(\"No\")\n exit()\n\nn = len(S)\nd = list(map(len, S.split(\"T\")))\nxs = d[::2]\nys = d[1::2]\n\ndpx = [[False] * (2 * n + 1) for _ in range(len(xs))]\nfor i in range(len(xs)):\n if i == 0:\n d = (-1) ** S.find(\"F\")\n dpx[i][d * xs[i] + n] = True\n continue\n\n for j in range(2 * n + 1):\n if j + xs[i] <= 2 * n:\n dpx[i][j] |= dpx[i - 1][j + xs[i]]\n if 0 <= j - xs[i] <= 2 * n:\n dpx[i][j] |= dpx[i - 1][j - xs[i]]\n\ndpy = [[False] * (2 * n + 1) for _ in range(len(ys) + 1)]\ndpy[0][n] = True\nfor i in range(len(ys)):\n for j in range(2 * n + 1):\n if j + ys[i] <= 2 * n:\n dpy[i + 1][j] |= dpy[i][j + ys[i]]\n if 0 <= j - ys[i] <= 2 * n:\n dpy[i + 1][j] |= dpy[i][j - ys[i]]\n\nans = dpx[-1][X + n] & dpy[-1][Y + n]\nprint(\"Yes\" if ans else \"No\")\n","fail":"S = input()\nX, Y = map(int, input().split())\n\nif S.find(\"F\") < 0:\n if X != 0 or Y != 0:\n print(\"No\")\n else:\n print(\"Yes\")\n exit()\n\nn = len(S)\nd = list(map(len, S.split(\"T\")))\nxs = d[::2]\nys = d[1::2]\n\ndpx = [set() for _ in range(len(xs))]\nfor i in range(len(xs)):\n if i == 0:\n d = (-1) ** S.find(\"F\")\n dpx[i].add(d * xs[i] + n)\n continue\n\n for j in dpx[i - 1]:\n dpx[i].add(j + xs[i])\n dpx[i].add(j - xs[i])\n\ndpy = [set() for _ in range(len(ys) + 1)]\ndpy[0].add(n)\nfor i in range(len(ys)):\n for j in dpy[i]:\n dpy[i + 1].add(j + ys[i])\n dpy[i + 1].add(j - ys[i])\n\nans = (X + n in dpx[-1]) & (Y + n in dpy[-1])\nprint(\"Yes\" if ans else \"No\")\n","change":"replace","i1":6,"i2":36,"j1":6,"j2":34,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03488","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nx, y = map(int, input().split())\n\n# T\u3067\u533a\u5207\u308a\u3001\u5404T\u306e\u524d\u306bF\u304c\u4f55\u6587\u5b57\u3042\u308b\u304b\u6570\u3048\u308b\nsteps = []\ncnt = 0\nfor i in range(len(s)):\n if s[i] == \"F\":\n cnt += 1\n elif s[i] == \"T\":\n steps.append(cnt)\n cnt = 0\n# \u6700\u5f8c\u306e\u30d6\u30ed\u30c3\u30af\u306b\u3064\u3044\u3066\nif cnt > 0:\n steps.append(cnt)\nAX = steps[0::2]\nAY = steps[1::2]\n\n# dpX[i][j] = X\u8ef8\u65b9\u5411\u306e\u79fb\u52d5\u3092i\u56de\u884c\u3063\u3066\u3001j\u306b\u5230\u9054\u3067\u304d\u308b\u304b\n# j = 0, 1, ..., 16000 \u3060\u304c\u3001\u5b9f\u969b\u306eX\u5ea7\u6a19\u306f -8000, ..., 0, ..., 8000\n# \u539f\u70b9(x=0)\u306f\u3001j = 8000\u306b\u76f8\u5f53\u3059\u308b\ndpX = [[0 for _ in range(2 * 8000 + 1)] for _ in range(len(AX) + 1)]\ndpX[0][8000] = 1\n# \u6700\u521d\u306b\u53f3\u3078\u79fb\u52d5\u3059\u308b\u5834\u5408\nif s[0] == \"F\":\n dpX[1][8000 + AX[0]] = 1\n for i in range(1, len(AX)):\n for j in range(2 * 8000 + 1):\n if dpX[i][j] == 1:\n # +X\u65b9\u5411\u306b\u79fb\u52d5\n if j + AX[i] <= 2 * 8000:\n dpX[i + 1][j + AX[i]] = 1\n # -X\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AX[i]:\n dpX[i + 1][j - AX[i]] = 1\n# \u6700\u521d\u306b\u56de\u8ee2\u3059\u308b\u5834\u5408\nelse:\n for i in range(len(AX)):\n for j in range(2 * 8000 + 1):\n if dpX[i][j] == 1:\n # +X\u65b9\u5411\u306b\u79fb\u52d5\n if j + AX[i] <= 2 * 8000:\n dpX[i + 1][j + AX[i]] = 1\n # -X\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AX[i]:\n dpX[i + 1][j - AX[i]] = 1\n\n# dpY[i][j] = Y\u8ef8\u65b9\u5411\u306e\u79fb\u52d5\u3092i\u56de\u884c\u3063\u3066\u3001j\u306b\u5230\u9054\u3067\u304d\u308b\u304b\n# j = 0, 1, ..., 16000 \u3060\u304c\u3001\u5b9f\u969b\u306eY\u5ea7\u6a19\u306f -8000, ..., 0, ..., 8000\n# \u539f\u70b9(y=0)\u306f\u3001j = 8000\u306b\u76f8\u5f53\u3059\u308b\ndpY = [[0 for _ in range(2 * 8000 + 1)] for _ in range(len(AY) + 1)]\ndpY[0][8000] = 1\nfor i in range(len(AY)):\n for j in range(2 * 8000 + 1):\n if dpY[i][j] == 1:\n # +Y\u65b9\u5411\u306b\u79fb\u52d5\n if j + AY[i] <= 2 * 8000:\n dpY[i + 1][j + AY[i]] = 1\n # -Y\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AY[i]:\n dpY[i + 1][j - AY[i]] = 1\n\nif dpX[-1][x + 8000] == 1 and dpY[-1][y + 8000] == 1:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"s = input()\nx, y = map(int, input().split())\n\n# T\u3067\u533a\u5207\u308a\u3001\u5404T\u306e\u524d\u306bF\u304c\u4f55\u6587\u5b57\u3042\u308b\u304b\u6570\u3048\u308b\nsteps = []\ncnt = 0\nfor i in range(len(s)):\n if s[i] == \"F\":\n cnt += 1\n elif s[i] == \"T\":\n steps.append(cnt)\n cnt = 0\n# \u6700\u5f8c\u306e\u30d6\u30ed\u30c3\u30af\u306b\u3064\u3044\u3066\nif cnt > 0:\n steps.append(cnt)\nAX = steps[0::2]\nAY = steps[1::2]\n\n# X\u8ef8\u65b9\u5411\u306e\u6700\u5927\u5024\nmax_X = sum(AX)\n# dpX[i][j] = X\u8ef8\u65b9\u5411\u306e\u79fb\u52d5\u3092i\u56de\u884c\u3063\u3066\u3001j\u306b\u5230\u9054\u3067\u304d\u308b\u304b\n# j = 0, 1, ..., 2*max_X \u3060\u304c\u3001\u5b9f\u969b\u306eX\u5ea7\u6a19\u306f -max_X, ..., 0, ..., max_X\n# \u539f\u70b9(x=0)\u306f\u3001j = max_X\u306b\u76f8\u5f53\u3059\u308b\ndpX = [[0 for _ in range(2 * max_X + 1)] for _ in range(len(AX) + 1)]\ndpX[0][max_X] = 1\n# \u6700\u521d\u306b\u53f3\u3078\u79fb\u52d5\u3059\u308b\u5834\u5408\nif s[0] == \"F\":\n dpX[1][max_X + AX[0]] = 1\n for i in range(1, len(AX)):\n for j in range(2 * max_X + 1):\n if dpX[i][j] == 1:\n # +X\u65b9\u5411\u306b\u79fb\u52d5\n if j + AX[i] <= 2 * max_X:\n dpX[i + 1][j + AX[i]] = 1\n # -X\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AX[i]:\n dpX[i + 1][j - AX[i]] = 1\n# \u6700\u521d\u306b\u56de\u8ee2\u3059\u308b\u5834\u5408\nelse:\n for i in range(len(AX)):\n for j in range(2 * max_X + 1):\n if dpX[i][j] == 1:\n # +X\u65b9\u5411\u306b\u79fb\u52d5\n if j + AX[i] <= 2 * max_X:\n dpX[i + 1][j + AX[i]] = 1\n # -X\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AX[i]:\n dpX[i + 1][j - AX[i]] = 1\n# Y\u8ef8\u65b9\u5411\u306e\u6700\u5927\u5024\nmax_Y = sum(AY)\n# dpY[i][j] = Y\u8ef8\u65b9\u5411\u306e\u79fb\u52d5\u3092i\u56de\u884c\u3063\u3066\u3001j\u306b\u5230\u9054\u3067\u304d\u308b\u304b\n# j = 0, 1, ..., 2*max_Y \u3060\u304c\u3001\u5b9f\u969b\u306eY\u5ea7\u6a19\u306f -max_Y, ..., 0, ..., max_Y\n# \u539f\u70b9(y=0)\u306f\u3001j = max_Y\u306b\u76f8\u5f53\u3059\u308b\ndpY = [[0 for _ in range(2 * max_Y + 1)] for _ in range(len(AY) + 1)]\ndpY[0][max_Y] = 1\nfor i in range(len(AY)):\n for j in range(2 * max_Y + 1):\n if dpY[i][j] == 1:\n # +Y\u65b9\u5411\u306b\u79fb\u52d5\n if j + AY[i] <= 2 * max_Y:\n dpY[i + 1][j + AY[i]] = 1\n # -Y\u65b9\u5411\u306b\u79fb\u52d5\n if 0 <= j - AY[i]:\n dpY[i + 1][j - AY[i]] = 1\n\nif -max_X <= x <= max_X and -max_Y <= y <= max_Y:\n if dpX[-1][x + max_X] == 1 and dpY[-1][y + max_Y] == 1:\n print(\"Yes\")\n exit()\nprint(\"No\")\n","change":"replace","i1":18,"i2":66,"j1":18,"j2":70,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03488","language":"Python","original_status":"Runtime Error","pass":"s = input()\nx, y = map(int, input().split())\ncommand = s.split(\"T\")\n\ncommand_length = len(command)\nx_command = command_length \/\/ 2\ny_command = command_length \/\/ 2\nif command_length % 2 != 0:\n x_command += 1\n\ndpx = [[False for _ in range(8000 + 1)] for _ in range(x_command + 1)]\ndpx[0][4000] = True\ndpy = [[False for _ in range(8000 + 1)] for _ in range(y_command + 1)]\ndpy[0][4000] = True\n\nfor i in range(1, x_command + 1):\n f = len(command[2 * (i - 1)])\n for j in range(f, 8000 + 1 - f):\n if dpx[i - 1][j - f] or dpx[i - 1][j + f]:\n dpx[i][j] = True\n\nfor i in range(1, y_command + 1):\n f = len(command[2 * (i - 1) + 1])\n for j in range(f, 8000 + 1 - f):\n if dpy[i - 1][j - f] or dpy[i - 1][j + f]:\n dpy[i][j] = True\n\nif dpx[x_command][4000 + x] and dpy[y_command][4000 + y]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"s = input()\nx, y = map(int, input().split())\ncommand = s.split(\"T\")\n\ncommand_length = len(command)\n\nx_command = []\ny_command = []\nfor i in range(command_length):\n c = len(command[i])\n if i % 2 == 0:\n x_command.append(c)\n\n else:\n y_command.append(c)\nx -= x_command.pop(0)\nx_command.sort(reverse=True)\ny_command.sort(reverse=True)\n\nc_x = 0\nc_y = 0\nfor c in x_command:\n if x - c_x >= 0:\n c_x += c\n else:\n c_x -= c\n\nfor c in y_command:\n if y - c_y > 0:\n c_y += c\n else:\n c_y -= c\nif c_x == x and c_y == y:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":5,"i2":28,"j1":5,"j2":33,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03488","language":"Python","original_status":"Runtime Error","pass":"s = list(input().split(\"T\"))\nx, y = map(int, input().split())\ns2 = [len(x) for x in s]\npos = [0, 0]\nLR = [s2[i] for i in range(len(s2)) if i % 2 == 0]\nUD = [s2[i] for i in range(len(s2)) if i % 2 == 1]\n\nflag = False\ntmp = 1\ntmp = tmp << sum(LR)\nfor d in LR:\n tmp = tmp << d | tmp >> d\n\nif x >= 0:\n tmp = tmp >> sum(LR)\n if (tmp >> x) % 2 == 1:\n flag = True\nelse:\n if (tmp >> (sum(LR) + x)) % 2 == 1:\n flag = True\nif flag:\n\n tmp = 1\n tmp = tmp << sum(UD)\n flag = False\n for d in UD:\n tmp = tmp << d | tmp >> d\n if y >= 0:\n tmp = tmp >> sum(UD)\n if (tmp >> y) % 2 == 1:\n flag = True\n else:\n if (tmp >> (sum(UD) + y)) % 2 == 1:\n flag = True\n\nif flag:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"s = list(input().split(\"T\"))\nx, y = map(int, input().split())\ns2 = [len(x) for x in s]\nLR = [s2[i] for i in range(len(s2)) if i % 2 == 0]\nUD = [s2[i] for i in range(len(s2)) if i % 2 == 1]\n\nflag = False\ntmp = 1\ntmp = tmp << sum(LR)\nfor i, d in enumerate(LR):\n if i != 0:\n tmp = tmp << d | tmp >> d\n else:\n tmp = tmp << d\n\nif x >= 0:\n tmp = tmp >> sum(LR)\n if (tmp >> x) % 2 == 1:\n flag = True\nelse:\n if sum(LR) + x >= 0:\n if (tmp >> (sum(LR) + x)) % 2 == 1:\n flag = True\nif flag:\n\n tmp = 1\n tmp = tmp << sum(UD)\n flag = False\n for d in UD:\n tmp = tmp << d | tmp >> d\n if y >= 0:\n tmp = tmp >> sum(UD)\n if (tmp >> y) % 2 == 1:\n flag = True\n else:\n if sum(UD) + y >= 0:\n if (tmp >> (sum(UD) + y)) % 2 == 1:\n flag = True\n\nif flag:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":3,"i2":34,"j1":3,"j2":38,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03489","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\ncnt = 0\nS = 0\nfor i in range(100000):\n tmp = a.count(i + 1)\n S += tmp\n if tmp > i + 1:\n cnt += tmp - i - 1\n elif tmp < i + 1:\n cnt += tmp\ncnt += N - S\nprint(cnt)\n","fail":"N = int(input())\na = list(map(int, input().split()))\ntmp = 1\ncnt = 0\nS = 0\na.sort()\na.append(0)\nfor i in range(N):\n if a[i] == a[i + 1]:\n tmp += 1\n else:\n if tmp > a[i]:\n cnt += tmp - a[i]\n elif tmp < a[i]:\n cnt += tmp\n tmp = 1\nprint(cnt)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03489","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\na.sort()\n\ncount = 0\n\nwhile a:\n k = a.pop(0)\n k_count = 1\n while (len(a) > 0) and (a[0] == k):\n a.pop(0)\n k_count += 1\n if k_count < k:\n count += k_count\n else:\n count += k_count - k\nprint(count)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\na.sort()\n\ncount = 0\n\nwhile a:\n k = a.pop(-1)\n k_count = 1\n while (len(a) > 0) and (a[-1] == k):\n a.pop(-1)\n k_count += 1\n if k_count < k:\n count += k_count\n else:\n count += k_count - k\nprint(count)\n","change":"replace","i1":8,"i2":12,"j1":8,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"print(sum([int(x) for x in input().split()]))\n","fail":"print(sum([int(x) for x in input()]))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"WA","stderr":null,"stdout":101.0} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"print(input().cont(\"1\"))\n","fail":"print(input().count(\"1\"))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"AttributeError: 'str' object has no attribute 'cont'. Did you mean: 'count'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s523943434.py\", line 1, in \n print(input().cont(\"1\"))\nAttributeError: 'str' object has no attribute 'cont'. Did you mean: 'count'?\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"print(input.count(\"1\"))\n","fail":"print(input().count(\"1\"))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"AttributeError: 'builtin_function_or_method' object has no attribute 'count'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s893573368.py\", line 1, in \n print(input.count(\"1\"))\nAttributeError: 'builtin_function_or_method' object has no attribute 'count'\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"print(input().count(1))\n","fail":"print(input().count(\"1\"))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s568979144.py\", line 1, in \n print(input().count(1))\nTypeError: must be str, not int\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"sss = input()\nprint(sss.count(1))\n","fail":"sss = input()\nprint(sss.count(\"1\"))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s769249601.py\", line 2, in \n print(sss.count(1))\nTypeError: must be str, not int\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"s = input()\nprint(s.count(1))\n","fail":"s = input()\nprint(s.count(\"1\"))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s417747495.py\", line 2, in \n print(s.count(1))\nTypeError: must be str, not int\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = a.count(int(1))\nprint(b)\n","fail":"a = input()\nb = a.count(\"1\")\nprint(b)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"AttributeError: 'int' object has no attribute 'count'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s056240522.py\", line 2, in \n b = a.count(int(1))\nAttributeError: 'int' object has no attribute 'count'\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"s = list(map(int, input().split()))\nans = 0\nfor i in range(3):\n if s[i] == 1:\n ans += 1\n\nprint(ans)\n","fail":"s = list(input())\nans = 0\nfor i in range(3):\n if s[i] == \"1\":\n ans += 1\n\nprint(ans)\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s116744075.py\", line 4, in \n if s[i] == 1:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"a = list(str(int(input)))\nprint(a.count(\"1\"))\n","fail":"a = list(str(int(input())))\nprint(a.count(\"1\"))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s840199366.py\", line 1, in \n a = list(str(int(input)))\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"a = map(int, input().split())\nprint(a.count(1))\n","fail":"a = list(input())\nprint(a.count(\"1\"))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"AttributeError: 'map' object has no attribute 'count'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s330524274.py\", line 2, in \n print(a.count(1))\nAttributeError: 'map' object has no attribute 'count'\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n# \u6574\u6570\u306e\u5165\u529b\na = int(input())\nprint(sum(list(map(int, list(a)))))\n","fail":"# -*- coding: utf-8 -*-\n# \u6574\u6570\u306e\u5165\u529b\na = int(input())\ns = str(a)\nprint(sum(list(map(int, list(s)))))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":5,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s452121313.py\", line 4, in \n print(sum(list(map(int, list(a)))))\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"print(input().count(1))\n","fail":"print(input().count(\"1\"))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s325538655.py\", line 1, in \n print(input().count(1))\nTypeError: must be str, not int\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"marbles = input()\nnum = marbles.count(1)\nprint(num)\n","fail":"ans = input().count(\"1\")\nprint(ans)\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":2,"error":"TypeError: must be str, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s142159490.py\", line 2, in \n num = marbles.count(1)\nTypeError: must be str, not int\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split())\nprint(a + b + c)\n","fail":"a, b, c = map(int, input())\nprint(a + b + c)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s603960512.py\", line 1, in \n a, b, c = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"s = list(input())\n\nfor i in s:\n sum += int(i)\n\nprint(sum)\n","fail":"s = list(input())\nball = 0\nfor i in s:\n ball = ball + int(i)\n\nprint(ball)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":6,"error":"TypeError: unsupported operand type(s) for +=: 'builtin_function_or_method' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s247381986.py\", line 4, in \n sum += int(i)\nTypeError: unsupported operand type(s) for +=: 'builtin_function_or_method' and 'int'\n","stdout":null} {"problem_id":"p03493","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n# \u5165\u529b\na = list(str(input))\n# String to Int\nnum = [int(s) for s in a]\n# Output\nprint(sum(num))\n","fail":"# -*- coding: utf-8 -*-\na = list(str(input()))\nnum = [int(s) for s in a]\nprint(sum(num))\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":3,"error":"ValueError: invalid literal for int() with base 10: '<'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s488211323.py\", line 5, in \n num = [int(s) for s in a]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03493\/Python\/s488211323.py\", line 5, in \n num = [int(s) for s in a]\nValueError: invalid literal for int() with base 10: '<'\n","stdout":null} {"problem_id":"p03494","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nAs = [int(input()) for _ in range(N)]\n\nsunuke = 0\nwhile all([a % 2 == 0 for a in As]):\n sunuke += 1\n As = [a \/ 2 for a in As]\nprint(sunuke)\n","fail":"N = int(input())\nAs = [int(x) for x in input().split()]\n\nsunuke = 0\nwhile all([a % 2 == 0 for a in As]):\n sunuke += 1\n As = [a \/\/ 2 for a in As]\nprint(sunuke)\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":7,"error":"ValueError: invalid literal for int() with base 10: '8 12 40'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03494\/Python\/s383170291.py\", line 2, in \n As = [int(input()) for _ in range(N)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03494\/Python\/s383170291.py\", line 2, in \n As = [int(input()) for _ in range(N)]\nValueError: invalid literal for int() with base 10: '8 12 40'\n","stdout":null} {"problem_id":"p03494","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nN = int(input())\nA = list(map(int, input().split()))\n\nans = 0\nwhile 1:\n new_a = [a \/\/ 2 if a % 2 == 0 else -1 for a in A]\n if -1 in new_a:\n break\n ans += 1\n\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\n\nN = int(input())\nA = list(map(int, input().split()))\n\nans = 0\nnew_a = A.copy()\nwhile 1:\n new_a = [a \/\/ 2 if a % 2 == 0 else -1 for a in new_a]\n if -1 in new_a:\n print(ans)\n exit()\n ans += 1\n\nprint(ans)\n","change":"replace","i1":6,"i2":10,"j1":6,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03494","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(x) for x in input().split()]\n\nDA = []\nfor v in A:\n d = 0\n while v & 1 == 0:\n v = v << 2\n d += 1\n DA.append(d)\n\nprint(min(DA))\n","fail":"N = int(input())\nA = [int(x) for x in input().split()]\n\nDA = []\nfor v in A:\n d = 0\n while v & 1 == 0:\n v = v >> 1\n d += 1\n DA.append(d)\n\nprint(min(DA))\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03494","language":"Python","original_status":"Runtime Error","pass":"kazu = int(input())\nnumbers_list = list(map(int, input().split()))\ncount = 0\nseisu = 0\nwhile True:\n for index in range(kazu):\n if numbers_list[index] % 2 != 0:\n seisu = 1\n break\n else:\n numbers_list[index] = numbers_list \/ 2\n if seisu == 1:\n break\n count += 1\nprint(count)\n","fail":"kazu = int(input())\nnumbers_list = list(map(int, input().split()))\ncount = 0\nseisu = 0\nwhile True:\n for index in range(kazu):\n if numbers_list[index] % 2 != 0:\n seisu = 1\n break\n else:\n numbers_list[index] = numbers_list[index] \/ 2\n if seisu == 1:\n break\n count += 1\nprint(count)\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"TypeError: unsupported operand type(s) for \/: 'list' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03494\/Python\/s612541287.py\", line 11, in \n numbers_list[index] = numbers_list \/ 2\nTypeError: unsupported operand type(s) for \/: 'list' and 'int'\n","stdout":null} {"problem_id":"p03494","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nans = 0\nwhile all(A % 2 == 0 for A in a):\n A = [i \/ 2 for i in a]\n ans += 1\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nans = 0\nwhile all(A % 2 == 0 for A in a):\n a = [i \/ 2 for i in a]\n ans += 1\nprint(ans)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nnumlist = {}\nfor i in A:\n if i in numlist:\n numlist[i] += 1\n else:\n numlist[i] = 1\nnumbers = numlist.values()\nnumbers = sorted(numbers)\n\nchange = 0\nwhile len(numbers) > K:\n change += numbers[0]\n del numbers[0]\nprint(change)\n","fail":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nnumlist = {}\nfor i in A:\n if i in numlist:\n numlist[i] += 1\n else:\n numlist[i] = 1\nnumbers = numlist.values()\nnumbers = sorted(numbers)\n\nchange = 0\nvari = len(numbers)\nfor i in range(vari):\n if K >= vari - i:\n break\n change += numbers[i]\n\nprint(change)\n","change":"replace","i1":13,"i2":16,"j1":13,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\na = list(map(int, input().split()))\ncnt_list = []\ncnt_dict = {}\nfor i in a:\n if i in cnt_dict:\n cnt_dict[i] += 1\n else:\n cnt_dict[i] = 1\ncnt_dict_sorted = sorted(cnt_dict.items(), key=lambda x: x[1])\nfor i in set(a):\n cnt_list.append(a.count(i))\nans = 0\nif len(cnt_dict_sorted) <= k:\n ans = 0\nelse:\n tmp = len(cnt_dict_sorted) - k\n for j in range(tmp):\n ans += cnt_dict_sorted[j][1]\nprint(ans)\n","fail":"n, k = map(int, input().split())\na = list(map(int, input().split()))\ncnt_dict = {}\nfor i in a:\n if i in cnt_dict:\n cnt_dict[i] += 1\n else:\n cnt_dict[i] = 1\ncnt_dict_sorted = sorted(cnt_dict.items(), key=lambda x: x[1])\nans = 0\nif len(cnt_dict_sorted) <= k:\n ans = 0\nelse:\n tmp = len(cnt_dict_sorted) - k\n for j in range(tmp):\n ans += cnt_dict_sorted[j][1]\nprint(ans)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\naList = list(map(int, input().split()))\nnum = [0 for _ in range(n)]\nfor i in aList:\n num[i] += 1\nnum.sort()\nnum = num[:-k]\nprint(sum(num))\n","fail":"n, k = map(int, input().split())\naList = list(map(int, input().split()))\nnum = [0 for _ in range(n + 1)]\nfor i in aList:\n num[i] += 1\nnum.sort()\nnum = num[:-k]\nprint(sum(num))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03495\/Python\/s233266704.py\", line 5, in \n num[i] += 1\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA_dict = {}\nrewrite = 0\n\nfor a in A:\n if a in A_dict:\n A_dict[a] += 1\n else:\n A_dict[a] = 1\n\nwhile len(A_dict) > K:\n rewrite_key = min(A_dict, key=A_dict.get)\n rewrite += A_dict[rewrite_key]\n del A_dict[rewrite_key]\n\nprint(rewrite)\n","fail":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA_dict = {}\nfor a in A:\n if a in A_dict:\n A_dict[a] += 1\n else:\n A_dict[a] = 1\n\nA_sorted = sorted(A_dict.items(), key=lambda x: x[1], reverse=True)\nrewrite = 0\nwhile len(A_sorted) > K:\n tmp = A_sorted.pop()\n rewrite += tmp[1]\n\nprint(rewrite)\n","change":"replace","i1":4,"i2":16,"j1":4,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\na = list(map(int, input().split()))\n\na_cnt = {}\nfor i in a:\n if i in a_cnt:\n a_cnt[i] += 1\n else:\n a_cnt[i] = 1\n\ncnt_list = [0] * len(a_cnt)\nfor i, value in enumerate(a_cnt.values()):\n cnt_list[i] = value\n\ncnt_list.sort()\n\nans = 0\nwhile len(cnt_list) > K:\n ans += cnt_list[0]\n cnt_list.pop(0)\nprint(ans)\n","fail":"N, K = map(int, input().split())\na = list(map(int, input().split()))\n\na_cnt = {}\nfor i in a:\n if i in a_cnt:\n a_cnt[i] += 1\n else:\n a_cnt[i] = 1\nfrom operator import itemgetter\n\na_cnt = sorted(a_cnt.items(), key=itemgetter(1))\n\nfrom collections import deque\n\ncnt_list = deque([])\nfor i, j in a_cnt:\n cnt_list.append(j)\n\nans = 0\nwhile len(cnt_list) > K:\n ans += cnt_list[0]\n cnt_list.popleft()\nprint(ans)\n","change":"replace","i1":9,"i2":20,"j1":9,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = (int(i) for i in input().split())\nballs = list(int(i) for i in input().split())\nball_set = set(balls)\nfreqs = list(balls.count(i) for i in ball_set)\nfreqs.sort(reverse=True)\nprint(sum(freqs[k:]))\n","fail":"n, k = (int(i) for i in input().split())\nballs = (int(i) for i in input().split())\nfreqs = {}\nfor ball in balls:\n freqs[ball] = freqs[ball] + 1 if ball in freqs else 1\nfreq_hist = list(freqs.values())\nfreq_hist.sort(reverse=True)\nprint(sum(freq_hist[k:]))\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03495","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nA = map(int, input().split())\n\nT = [0] * (N + 1)\n\nfor a in A:\n T[a] += 1\n\nns = []\nfor t in T:\n if t > 0:\n ns.append(t)\nns.sort()\nans = 0\nwhile len(ns) > K:\n ans += ns[0]\n ns = ns[1:]\nprint(ans)\n","fail":"import heapq\n\nN, K = map(int, input().split())\nA = map(int, input().split())\n\nT = [0] * (N + 1)\n\nfor a in A:\n T[a] += 1\n\nns = []\nfor t in T:\n if t > 0:\n heapq.heappush(ns, t)\nans = 0\nwhile len(ns) > K:\n ans += heapq.heappop(ns)\nprint(ans)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03496","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na_list = list(map(int, input().split()))\nplus = True\nminus = True\n\nfor a in a_list:\n if a > 0:\n minus = False\n\n if a < 0:\n plus = False\n\nif plus:\n result = []\n for i in range(N - 1):\n if a_list[i] < a_list[i + 1]:\n result.append((i + 1, i + 2))\n a_list[i + 1] += a_list[i]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n\nif minus:\n result = []\n for i in reversed(range(N - 1)):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 2, i + 1))\n a_list[i] += a_list[i + 1]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n\nmax_num = max(a_list)\nmin_num = min(a_list)\nresult = []\nif abs(max_num) >= abs(min_num):\n max_index = a_list.index(max_num)\n for i, a in enumerate(a_list):\n if a < 0:\n a_list[i] += max_num\n result.append((max_index + 1, i + 1))\n for i in range(N):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 1, i + 2))\n a_list[i + 1] += a_list[i]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n\nelse:\n min_index = a_list.index(min_num)\n for i, a in enumerate(a_list):\n if a > 0:\n a_list[i] += min_num\n result.append((min_index + 1, i + 1))\n for i in reversed(range(N - 1)):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 2, i + 1))\n a_list[i] += a_list[i + 1]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n","fail":"N = int(input())\na_list = list(map(int, input().split()))\nplus = True\nminus = True\n\nfor a in a_list:\n if a > 0:\n minus = False\n\n if a < 0:\n plus = False\n\nif plus:\n result = []\n for i in range(N - 1):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 1, i + 2))\n a_list[i + 1] += a_list[i]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n\nif minus:\n result = []\n for i in reversed(range(N - 1)):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 2, i + 1))\n a_list[i] += a_list[i + 1]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n\nmax_num = max(a_list)\nmin_num = min(a_list)\nresult = []\nif abs(max_num) >= abs(min_num):\n max_index = a_list.index(max_num)\n for i, a in enumerate(a_list):\n if a < 0:\n a_list[i] += max_num\n result.append((max_index + 1, i + 1))\n\n for i in range(N - 1):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 1, i + 2))\n a_list[i + 1] += a_list[i]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n\nelse:\n min_index = a_list.index(min_num)\n for i, a in enumerate(a_list):\n if a > 0:\n a_list[i] += min_num\n result.append((min_index + 1, i + 1))\n\n for i in reversed(range(N - 1)):\n if a_list[i] > a_list[i + 1]:\n result.append((i + 2, i + 1))\n a_list[i] += a_list[i + 1]\n print(len(result))\n for v1, v2 in result:\n print(v1, v2)\n exit()\n","change":"replace","i1":15,"i2":57,"j1":15,"j2":59,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03496\/Python\/s118969968.py\", line 45, in \n if a_list[i] > a_list[i + 1]:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\na = list(map(int, input().split()))\nball = {}\n\nfor i in a:\n if i in ball.keys():\n ball[i] += 1\n else:\n ball[i] = 1\n\nball = sorted(ball.items(), key=lambda x: -x[1])\n\nans = 0\nif len(ball) > k:\n for i in range(k):\n ans += ball[i][1]\n ans = n - ans\nprint(ans)\n","fail":"n, k = map(int, input().split())\na = list(map(int, input().split()))\nball = [0] * n\n\nfor i in a:\n ball[i - 1] += 1\nball.sort(reverse=True)\n\nans = 0\nif len(ball) > k:\n for i in range(k):\n ans += ball[i]\n ans = n - ans\nprint(ans)\n","change":"replace","i1":2,"i2":16,"j1":2,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\na = list(map(int, input().split()))\ncnt = {}\n\nfor i in a:\n if i in cnt.keys():\n cnt[i] += 1\n else:\n cnt[i] = 1\n\nans, k = 0, len(cnt) - k\nfor i in range(len(cnt) + 1):\n if 0 >= k:\n print(ans)\n break\n ans += cnt[i][1]\n k -= 1\n","fail":"n, k = map(int, input().split())\na = list(map(int, input().split()))\n\nball = [0] * n\nfor i in a:\n ball[i - 1] += 1\nball.sort(reverse=True)\n\nans = n\nfor i in range(k):\n ans -= ball[i]\nprint(ans)\n","change":"replace","i1":2,"i2":17,"j1":2,"j2":12,"error":"KeyError: 0","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03497\/Python\/s544815203.py\", line 16, in \n ans += cnt[i][1]\nKeyError: 0\n","stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\nA = list(map(int, input().split()))\narray = []\nans = 0\n\nfor i in set(A):\n array.append(A.count(i))\n\narray.sort()\n\nif len(set(A)) > k:\n num = len(array) - k\n for i in range(num):\n ans += array[i]\n\nprint(ans)\n","fail":"n, k = map(int, input().split())\nA = list(map(int, input().split()))\narray = {}\nans = 0\n\nfor a in A:\n if a in array.keys():\n array[a] += 1\n else:\n array[a] = 1\n\narray = sorted(array.values())\n\nif len(set(A)) > k:\n num = len(array) - k\n for i in range(num):\n ans += array[i]\n\nprint(ans)\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\nc = Counter(A).most_common()[::-1]\n\nans = 0\nwhile len(c) > K:\n res = c.pop(0)\n ans += res[1]\nprint(ans)\n","fail":"from collections import Counter\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\nc = Counter(A).most_common()[::-1]\n\nans = 0\nif len(c) > K:\n for i in range(len(c) - K):\n ans += c[i][1]\n\nprint(ans)\n","change":"replace","i1":7,"i2":10,"j1":7,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nN, K = map(int, input().split())\ncounter = Counter(list(map(int, input().split())))\nans = 0\nif len(counter.keys()) > K:\n for i in range(len(counter.keys()) - K):\n ans += counter.most_common()[0 - i - 1][1]\n\nprint(ans)\n","fail":"import collections\n\nN, K = map(int, input().split())\narr = list(map(int, input().split()))\nans = 0\ncnt = collections.defaultdict(int)\nfor num in arr:\n cnt[num] += 1\n\nvals = sorted(cnt.values())\n\nif len(cnt) > K:\n for i in range(len(cnt) - K):\n ans += vals[i]\n\nprint(ans)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int, input().split())\nA = map(int, input().split())\n\ncnt = {}\n\nfor a in A:\n if a not in cnt:\n cnt[a] = 0\n cnt[a] += 1\n\ncnt = sorted(cnt.items(), key=lambda x: x[1])\nans = 0\ni = 0\n\nwhile len(cnt) > K:\n ans += cnt[i][1]\n i += 1\n\nprint(ans)\n","fail":"N, K = map(int, input().split())\nA = map(int, input().split())\n\ncnt = {}\n\nfor a in A:\n if a not in cnt:\n cnt[a] = 0\n cnt[a] += 1\n\ncnt = sorted(cnt.items(), key=lambda x: x[1])\nans = 0\n\nfor i in range(len(cnt)):\n if len(cnt) - i <= K:\n break\n ans += cnt[i][1]\n\nprint(ans)\n","change":"replace","i1":12,"i2":17,"j1":12,"j2":17,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03497\/Python\/s058327315.py\", line 16, in \n ans += cnt[i][1]\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03497","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\nn, m = map(int, input().split())\ndic = Counter(map(int, input().split()))\nlis = sorted(dic.items(), key=lambda x: x[1], reverse=True)\n\nres = 0\nfor i in range(m):\n res += lis[i][1]\nprint(n - res)\n","fail":"from collections import Counter\n\nn, m = map(int, input().split())\ndic = Counter(map(int, input().split()))\nlis = sorted(dic.items(), key=lambda x: x[1], reverse=True)\n\nres = 0\nfor i in range(min(m, len(lis))):\n res += lis[i][1]\nprint(n - res)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03498","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\nb, idx = zip(*sorted(zip(a, range(1, n))))\nif b[-1] < 0:\n print(n - 1)\n # \u5168\u3066\u8ca0\u306e\u6570\u306a\u306e\u3067\u5f8c\u308d\u304b\u3089\u7d2f\u7a4d\u548c\u3092\u3068\u308b\n for i in range(n - 1):\n print(n - i, n - i - 1)\nelif b[0] >= 0:\n print(n - 1)\n for i in range(n - 1):\n print(i + 1, i + 2)\nelse:\n # max or min \u3092\u8db3\u3057\u3066\u5168\u3066\u6b63\u306e\u6570\u306b\u76f4\u3059\n print(2 * n - 2)\n if b[-1] > abs(b[0]):\n # add max\n for i in range(n - 1):\n print(idx[n - 1], i + 1)\n for i in range(n - 1):\n print(i + 1, i + 2)\n else:\n for i in range(n - 1):\n print(idx[0], i + 2)\n for i in range(n - 1):\n print(n - i, n - i - 1)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nb, idx = zip(*sorted(zip(a, range(1, n + 1))))\nif b[-1] < 0:\n print(n - 1)\n # \u5168\u3066\u8ca0\u306e\u6570\u306a\u306e\u3067\u5f8c\u308d\u304b\u3089\u7d2f\u7a4d\u548c\u3092\u3068\u308b\n for i in range(n - 1):\n print(n - i, n - i - 1)\nelif b[0] >= 0:\n print(n - 1)\n for i in range(n - 1):\n print(i + 1, i + 2)\nelse:\n # max or min \u3092\u8db3\u3057\u3066\u5168\u3066\u6b63\u306e\u6570\u306b\u76f4\u3059\n print(2 * n - 2)\n if b[-1] > abs(b[0]):\n # add max\n for i in range(n):\n if i + 1 != idx[-1]:\n print(idx[-1], i + 1)\n for i in range(n - 1):\n print(i + 1, i + 2)\n else:\n for i in range(n):\n if i + 1 != idx[0]:\n print(idx[0], i + 1)\n for i in range(n - 1):\n print(n - i, n - i - 1)\n","change":"replace","i1":2,"i2":24,"j1":2,"j2":26,"error":"IndexError: tuple index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03498\/Python\/s089705711.py\", line 19, in \n print(idx[n - 1], i + 1)\nIndexError: tuple index out of range\n","stdout":4} {"problem_id":"p03501","language":"Python","original_status":"Runtime Error","pass":"N, A, B = map(int, input().split())\n\nprint(min(N * A), B)\n","fail":"N, A, B = map(int, input().split())\n\nprint(min(N * A, B))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03501\/Python\/s018233554.py\", line 3, in \n print(min(N * A), B)\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03501","language":"Python","original_status":"Runtime Error","pass":"n, a, b = map(int, input())\nprint(min(b, a * n))\n","fail":"n, a, b = map(int, input().split())\nprint(min(b, a * n))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03501\/Python\/s605179246.py\", line 1, in \n n, a, b = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03502","language":"Python","original_status":"Runtime Error","pass":"N = input()\nx = sum(int(i) for i in N)\nprint(\"Yes\" if N % x == 0 else \"No\")\n","fail":"N = input()\nx = sum(int(i) for i in N)\nprint(\"Yes\" if int(N) % x == 0 else \"No\")\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03502\/Python\/s802256796.py\", line 3, in \n print(\"Yes\" if N % x == 0 else \"No\")\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03502","language":"Python","original_status":"Runtime Error","pass":"N = input()\nsum = 0\n\nfor i in N:\n sum += i\nif N % sum == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"N = input()\nsum = 0\n\nfor i in N:\n sum += int(i)\nif int(N) % sum == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":6,"error":"TypeError: unsupported operand type(s) for +=: 'int' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03502\/Python\/s766793657.py\", line 5, in \n sum += i\nTypeError: unsupported operand type(s) for +=: 'int' and 'str'\n","stdout":null} {"problem_id":"p03502","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\nN = int, input()\nnum = str(N[1])\nchar_list = list(num)\nsum = 0\nfor i in range(len(char_list)):\n sum += int(char_list[i])\n\nif N[1] % sum == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"# -*- coding: utf-8 -*-\nN = int, input()\nnum = str(N[1])\nchar_list = list(num)\nsum = 0\nfor i in range(len(char_list)):\n sum += int(char_list[i])\n\nif int(N[1]) % sum == 0:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03502\/Python\/s573872997.py\", line 9, in \n if N[1] % sum == 0:\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p03502","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nntmp = n\nsum = 0\n\nwhile ntmp >= 10:\n sum += ntmp % 10\n ntmp = ntmp \/\/ 10\n\nif n % sum == 0:\n print(\"Yes\")\n\nelse:\n print(\"No\")\n","fail":"n = int(input())\n\nntmp = n\nsum = 0\n\nwhile True:\n sum += ntmp % 10\n ntmp = ntmp \/\/ 10\n if ntmp == 0:\n break\n\nif n % sum == 0:\n print(\"Yes\")\n\nelse:\n print(\"No\")\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":10,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03504","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N, C = map(int, input().split())\n stc = [list(map(int, input().split())) for _ in range(N)]\n st = []\n mxt = 0\n mnt = 0\n while len(stc) > 0:\n s, t, c = stc.pop()\n for i, (ss, tt, cc) in enumerate(stc):\n if c == cc:\n if s == tt:\n stc.pop(i)\n stc.append((ss, t, c))\n break\n elif ss == t:\n stc.pop(i)\n stc.append((s, tt, c))\n break\n else:\n mnt = min(mnt, s - 1)\n mxt = max(mxt, t)\n st.append((s - 1, t))\n cs = [0] * (mxt + 1)\n for s, t in st:\n cs[s] += 1\n cs[t] += -1\n ans = 0\n cc = 0\n for c in cs:\n cc += c\n ans = max(ans, cc)\n print(ans)\n\n\nmain()\n","fail":"def main():\n N, C = map(int, input().split())\n stc = [[0] * (10**5) for _ in range(C)]\n for _ in range(N):\n s, t, c = map(int, input().split())\n stc[c - 1][s - 1 : t] = [1] * (t - s + 1)\n print(max(map(sum, zip(*stc))))\n\n\nmain()\n","change":"replace","i1":2,"i2":32,"j1":2,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03504","language":"Python","original_status":"Time Limit Exceeded","pass":"# N\u500b\u306eimos\u306a\u306e\u3067\u4e8c\u6b21\u5143\u3067\u3084\u308b 0.5\u304c\u3046\u3056\u3044\u306e\u3067*2\u3059\u308b( (2*10^5) * C )\n\n# \u306a\u305c\u304b2WA\u304c\u53d6\u308c\u306a\u3044\n\n# \u5618\u89e3\u6cd5\uff1f\n\nN, C = map(int, input().split())\nx = 2 * (10**5)\n# x = 30 # test\nimos = [[0 for _ in range(x)] for _ in range(C)]\nfor _ in range(N):\n s, t, c = map(int, input().split())\n s, t, c = s * 2 - 1, t * 2 - 1, c - 1\n imos[c][s - 1] += 1\n imos[c][t] -= 1\n\nfor i in range(C):\n for j in range(1, x):\n imos[i][j] += imos[i][j - 1]\n imos[i][j] = min(1, imos[i][j]) # test\n\nans = 0\nfor j in range(x):\n tmp = 0\n for i in range(C):\n tmp += imos[i][j]\n ans = max(ans, tmp)\n# print(\"-----------\")\n# for x in imos:\n# print(x)\nprint(ans)\n\n# 1 3\n# 3 4 2\n","fail":"# N\u500b\u306eimos\u306a\u306e\u3067\u4e8c\u6b21\u5143\u3067\u3084\u308b 0.5\u304c\u3046\u3056\u3044\u306e\u3067*2\u3059\u308b( (2*10^5) * C )\n\n# \u306a\u305c\u304b2WA\u304c\u53d6\u308c\u306a\u3044\n\n# \u3053\u308c\u5618\u89e3\u6cd5\u307d\u3044\u6c17\u304c\u3059\u308b\n\nN, C = map(int, input().split())\nx = 2 * (10**5)\n# x = 30 # test\nimos = [[0 for _ in range(x)] for _ in range(C)]\nfor _ in range(N):\n s, t, c = map(int, input().split())\n s, t, c = s * 2 - 1, t * 2 - 1, c - 1\n imos[c][s - 1] += 1\n imos[c][t] -= 1\n # imos[c][s - 1] = min(1, imos[c][s - 1]) # test\n\nfor i in range(C):\n for j in range(1, x):\n imos[i][j] += imos[i][j - 1]\n # imos[i][j] = min(1, imos[i][j]) # test\n\nans = 0\nfor j in range(x):\n tmp = 0\n for i in range(C):\n tmp += min(1, imos[i][j])\n ans = max(ans, tmp)\n# print(\"-----------\")\n# for x in imos:\n# print(x)\nprint(ans)\n\n# 1 3\n# 3 4 2\n","change":"replace","i1":4,"i2":26,"j1":4,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03523","language":"Python","original_status":"Runtime Error","pass":"s = input()\ncnt = 0\nidx = 0\ntarget = \"KIHBR\"\nfor i in range(len(s)):\n if s[i] == \"A\":\n cnt += 1\n if idx == 1 and cnt == 1:\n print(\"NO\")\n exit()\n if cnt >= 2:\n print(\"NO\")\n exit()\n else:\n if idx <= 5 and target[idx] == s[i]:\n idx += 1\n cnt = 0\n else:\n print(\"NO\")\n exit()\nif idx == 5:\n print(\"YES\")\n","fail":"s = input()\nt = \"AKIHABARA\"\nidx = 0\nng = 0\nfor i in range(len(t)):\n if t[i] == s[idx]:\n idx += 1\n elif t[i] != \"A\":\n ng = 1\n break\n if idx == len(s):\n if i < len(t) - 2:\n ng = 1\n\n break\n\nif idx != len(s):\n ng = 1\n\nif ng:\n print(\"NO\")\nelse:\n print(\"YES\")\n","change":"replace","i1":1,"i2":21,"j1":1,"j2":22,"error":"0","stderr":null,"stdout":"YES\n"} {"problem_id":"p03523","language":"Python","original_status":"Runtime Error","pass":"from itertools import product\n\n\ncandidates = []\nnon_as = [\"KIH\", \"B\", \"R\", \"\"]\nfor seps in product([\"A\", \"\"], repeat=4):\n candidates.add(\"\".append(sep + non_a for sep, non_a in zip(seps, non_as)))\n\nprint(\"YES\") if input() in candidates else print(\"NO\")\n","fail":"from itertools import product\n\n\ncandidates = []\nnon_as = [\"KIH\", \"B\", \"R\", \"\"]\nfor seps in product([\"A\", \"\"], repeat=4):\n candidates.append(\"\".join(sep + non_a for sep, non_a in zip(seps, non_as)))\n\nprint(\"YES\") if input() in candidates else print(\"NO\")\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"AttributeError: 'list' object has no attribute 'add'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03523\/Python\/s198624494.py\", line 7, in \n candidates.add(\"\".append(sep + non_a for sep, non_a in zip(seps, non_as)))\nAttributeError: 'list' object has no attribute 'add'\n","stdout":null} {"problem_id":"p03524","language":"Python","original_status":"Runtime Error","pass":"s = input()\nK = int(input())\ns_dic = {c: [] for c in \"abcdefghijklmnopqrstuvwxyz\"}\nfor i, c in enumerate(s):\n s_dic[c].append(i)\nsubstrings = set()\nfor lc in \"abcdefghijklmnopqrstuvwxyz\":\n for i in s_dic[lc]:\n for j in range(i + 1, len(s) + 1):\n substrings.add(s[i:j])\n if len(substrings) >= K:\n break\nprint(sorted(list(substrings))[K - 1])\n","fail":"from collections import Counter\n\n\nS = input()\nC = Counter(S)\nvs = sorted(list(C.values()))\nif len(vs) == 1:\n print(\"YES\") if vs[0] == 1 else print(\"NO\")\nelif len(vs) == 2:\n print(\"YES\") if vs[0] == vs[1] and vs[0] == 1 else print(\"NO\")\nelse:\n print(\"YES\") if vs[2] - 1 <= vs[0] and vs[2] - 1 <= vs[1] else print(\"NO\")\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":12,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03524\/Python\/s357391578.py\", line 2, in \n K = int(input())\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03525","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nd = sorted(list(map(int, input().split())) + [0])\n\nbit, cnt = [0] * 24, 1\nfor num in d:\n bit[(num - 12) * cnt + 12] += 1\n cnt *= -1\n\nif any(i > 1 for i in bit):\n print(0)\n exit()\nans = [i for i, li in enumerate(bit * 2) if li == 1]\ns = min(ans[i] - ans[i - 1] for i in range(1, len(ans)))\nprint(s)\n","fail":"n = int(input())\nd = sorted(list(map(int, input().split())) + [0])\n\nbit, cnt = [0] * 24, 1\nfor num in d:\n bit[((num - 12) * cnt + 12) % 24] += 1\n cnt *= -1\n\nif any(i > 1 for i in bit):\n print(0)\n exit()\nans = [i for i, li in enumerate(bit * 2) if li == 1]\ns = min(ans[i] - ans[i - 1] for i in range(1, len(ans)))\nprint(s)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03525","language":"Python","original_status":"Time Limit Exceeded","pass":"import numpy as np\nfrom numba import njit\n\n\n@njit(\"i1(i1,i1[:])\", cache=True)\ndef solve(N, D):\n ans = 0\n for i in range(1 << N):\n clocks = np.zeros((N + 2), dtype=np.int8)\n clocks[-1] = 24\n for j in range(N):\n if i >> j & 1:\n clocks[j + 1] = D[j]\n else:\n clocks[j + 1] = 24 - D[j]\n clocks.sort()\n ans = max(ans, np.min(np.diff(clocks)))\n return ans\n\n\nN = int(input())\nD = np.array(input().split(), dtype=np.int8)\nif N >= 24:\n print(0)\nelse:\n print(solve(N, D))\n","fail":"from collections import Counter\nfrom itertools import product\n\n\nN = int(input())\nD = list(map(int, input().split()))\nD_cnt = Counter(D)\nif N >= 24 or D_cnt[0] > 0 or D_cnt[12] > 1 or any(D_cnt[i] > 2 for i in range(1, 12)):\n print(0)\n exit()\nclock = [0, 24]\nundet = []\nif 12 in D_cnt:\n clock.append(12)\nfor i in range(1, 12):\n if D_cnt[i] == 2:\n clock.append(i)\n clock.append(24 - i)\n elif D_cnt[i] == 1:\n undet.append(i)\n\nans = 0\nfor rp in product([0, 1], repeat=len(undet)):\n candidate = clock[:]\n for j, is_flipped in enumerate(rp):\n candidate.append(undet[j]) if is_flipped else candidate.append(24 - undet[j])\n candidate.sort()\n ans = max(ans, min(ca - cb for cb, ca in zip(candidate, candidate[1:])))\nprint(ans)\n","change":"replace","i1":0,"i2":26,"j1":0,"j2":29,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03533","language":"Python","original_status":"Runtime Error","pass":"S = input()\nAcount = 0\ncount = 0\nAKIBA = [\"K\", \"I\", \"H\", \"B\", \"R\"]\nAKIBAcount = [1, 0, 0, 1, 1]\nflag = 1\nfor i in range(len(S)):\n if count == 5:\n if S[i] == \"A\":\n Acount += 1\n if Acount >= 2:\n flag = 0\n if S[i] == \"A\":\n Acount += 1\n else:\n if S[i] == AKIBA[count] and Acount <= AKIBAcount[count]:\n count += 1\n Acount = 0\n else:\n flag = 0\n break\n\nif flag == 1 and count == 5:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"S = input()\nAcount = 0\ncount = 0\nAKIBA = [\"K\", \"I\", \"H\", \"B\", \"R\"]\nAKIBAcount = [1, 0, 0, 1, 1]\nflag = 1\nfor i in range(len(S)):\n if count == 5:\n if S[i] == \"A\":\n Acount += 1\n else:\n flag = 0\n if Acount >= 2:\n flag = 0\n\n if S[i] == \"A\":\n Acount += 1\n else:\n if count <= 4:\n if S[i] == AKIBA[count] and Acount <= AKIBAcount[count]:\n count += 1\n Acount = 0\n else:\n flag = 0\n break\n\nif flag == 1 and count == 5:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":10,"i2":21,"j1":10,"j2":25,"error":0,"stderr":null,"stdout":"YES\n"} {"problem_id":"p03535","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\nfrom itertools import product, combinations\n\n\ndef solve(n, ds):\n if n >= 24:\n return 0\n freq = Counter(ds)\n if 0 in freq or freq[12] >= 2 or max(freq.values()) >= 3:\n return 0\n cmp = set()\n alt = []\n for d, l in freq.items():\n if l == 2 or d == 12:\n cmp.add(d)\n cmp.add(24 - d)\n else:\n alt.append((d, 24 - d))\n ans = min((abs(x - y) for x, y in combinations(cmp, 2)), default=0)\n for prd in product((0, 1), repeat=len(alt)):\n tmp_cmp = cmp.copy().union(x[i] for x, i in zip(alt, prd))\n tmp = min(abs(x - y) for x, y in combinations(tmp_cmp, 2))\n tmp = min(tmp, min(freq.keys()))\n ans = max(ans, tmp)\n return ans\n\n\nprint(solve(int(input()), list(map(int, input().split()))))\n","fail":"from collections import Counter\n\n\ndef solve(n, ds):\n if n >= 24:\n return 0\n freq = Counter(ds)\n if (0 in freq) or (freq[12] >= 2) or max(freq.values()) >= 3:\n return 0\n up_low = [0, 0]\n switch = 0\n ans = 25\n for d, s in sorted(freq.items()):\n if s == 2:\n ans = min(ans, d - up_low[0], d - up_low[1])\n up_low[0] = up_low[1] = d\n else:\n ans = min(ans, d - up_low[switch])\n up_low[switch] = d\n switch ^= 1\n ans = min(ans, 24 - sum(up_low))\n return ans\n\n\nprint(solve(int(input()), list(map(int, input().split()))))\n","change":"replace","i1":1,"i2":24,"j1":1,"j2":21,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03543","language":"Python","original_status":"Runtime Error","pass":"N = list(int(input()))\na = set(N)\na = list(a)\nif len(a) <= 2:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"N = list(input())\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":3,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03543\/Python\/s022209254.py\", line 1, in \n N = list(int(input()))\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03543","language":"Python","original_status":"Runtime Error","pass":"n = input\nprint(\"Yes\" if n[0] == n[1] == n[2] or n[1] == n[2] == n[3] else \"No\")\n","fail":"n = input()\nprint(\"Yes\" if n[0] == n[1] == n[2] or n[1] == n[2] == n[3] else \"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: 'builtin_function_or_method' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03543\/Python\/s404486327.py\", line 2, in \n print(\"Yes\" if n[0] == n[1] == n[2] or n[1] == n[2] == n[3] else \"No\")\nTypeError: 'builtin_function_or_method' object is not subscriptable\n","stdout":null} {"problem_id":"p03544","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\n\ndef lc():\n l0, l1 = 2, 1\n while 1:\n yield l0 + l1\n l0, l1 = l1, l0 + l1\n\n\nfor i, n in enumerate(lc()):\n if i == N - 2:\n print(n)\n break\n","fail":"N = int(input())\n\n\ndef lc():\n l0, l1 = 2, 1\n while 1:\n yield l0 + l1\n l0, l1 = l1, l0 + l1\n\n\nif N > 1:\n for i, n in enumerate(lc()):\n if i == N - 2:\n print(n)\n break\nelse:\n print(1)\n","change":"replace","i1":10,"i2":14,"j1":10,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03544","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nlucas_number = [0] * (n + 1)\nlucas_number[0] = 2\nlucas_number[1] = 1\nfor i in range(2, n + 1):\n lucas_number[i] = lucas_number[i - 1] + lucas_number[i - 2]\nprint(lucas_number[i])\n","fail":"n = int(input())\nlucas_number = [0] * (n + 1)\nlucas_number[0] = 2\nlucas_number[1] = 1\nfor i in range(2, n + 1):\n lucas_number[i] = lucas_number[i - 1] + lucas_number[i - 2]\nprint(lucas_number[n])\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"0","stderr":null,"stdout":11.0} {"problem_id":"p03544","language":"Python","original_status":"Runtime Error","pass":"from typing import List\n\n\nN = int(input())\n\nL: List[int] = [None] * (N + 1)\nL[0] = 2\nL[1] = 1\n\nfor i in range(2, N + 1):\n L[i] = L[i - 1] + L[i - 2]\n\nprint(L[N])\n","fail":"N = int(input())\n\nL = [None] * (N + 1)\nL[0] = 2\nL[1] = 1\n\nfor i in range(2, N + 1):\n L[i] = L[i - 1] + L[i - 2]\n\nprint(L[N])\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":3,"error":"0","stderr":null,"stdout":11.0} {"problem_id":"p03544","language":"Python","original_status":"Runtime Error","pass":"def main():\n N = int(input())\n la = 2\n lb = 1\n for _ in range(N - 1):\n lc = la + lb\n la = lb\n lb = lc\n print(lc)\n\n\nmain()\n","fail":"def main():\n N = int(input())\n la = 2\n lb = 1\n for _ in range(N):\n lc = la + lb\n la = lb\n lb = lc\n print(la)\n\n\nmain()\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":9,"error":"0","stderr":null,"stdout":11.0} {"problem_id":"p03544","language":"Python","original_status":"Runtime Error","pass":"N = input()\n# N = 86\n\n\ndef f(n):\n if n == 0:\n return 2\n elif n == 1:\n return 1\n elif n == 2:\n return 3\n return 2 * f(n - 2) + f(n - 3)\n\n\ndef g(n):\n L = [0] * (n + 1)\n L[0] = 2\n L[1] = 1\n for i in range(2, n + 1):\n L[i] = L[i - 1] + L[i - 2]\n\n return L[-1]\n\n\nprint(g(N))\n","fail":"N = int(input())\n# N = 86\n\n\ndef f(n):\n if n == 0:\n return 2\n elif n == 1:\n return 1\n elif n == 2:\n return 3\n return 2 * f(n - 2) + f(n - 3)\n\n\ndef g(n):\n L = [0] * (n + 1)\n L[0] = 2\n L[1] = 1\n for i in range(2, n + 1):\n L[i] = L[i - 1] + L[i - 2]\n\n return L[-1]\n\n\nprint(g(N))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: can only concatenate str (not \"int\") to str","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03544\/Python\/s962780069.py\", line 25, in \n print(g(N))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03544\/Python\/s962780069.py\", line 16, in g\n L = [0] * (n + 1)\nTypeError: can only concatenate str (not \"int\") to str\n","stdout":null} {"problem_id":"p03545","language":"Python","original_status":"Runtime Error","pass":"from itertools import product\n\nA, B, C, D = input()\nfor op1, op2, op3 in product(\"+-\", repeat=3):\n expr = f\"{A}{op1}{B}{op2}{C}{op3}{D}\"\n if eval(expr) == 7:\n print(f\"{A}{op1}{B}{op2}{C}{op3}{D}=7\")\n break\n","fail":"from itertools import product\n\nA, B, C, D = input()\nfor op1, op2, op3 in product(\"+-\", repeat=3):\n expr = \"{}{}{}{}{}{}{}\".format(A, op1, B, op2, C, op3, D)\n if eval(expr) == 7:\n print(\"{}{}{}{}{}{}{}=7\".format(A, op1, B, op2, C, op3, D))\n break\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":7,"error":"0","stderr":null,"stdout":"1+2+2+2=7\n"} {"problem_id":"p03545","language":"Python","original_status":"Runtime Error","pass":"num = list(map(int, input().split()))\nif sum(num) == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"+\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] + num[2] - num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"+\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] - num[2] - num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"-\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] - num[2] - num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"-\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] + num[2] + num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"+\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] + num[2] - num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"+\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] - num[2] + num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"-\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] - num[2] - num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"-\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\n","fail":"n = input()\nnum = [int(n[0]), int(n[1]), int(n[2]), int(n[3])]\nif sum(num) == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"+\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] + num[2] - num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"+\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] - num[2] + num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"-\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] + num[1] - num[2] - num[3] == 7:\n print(str(num[0]) + \"+\" + str(num[1]) + \"-\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] + num[2] + num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"+\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] + num[2] - num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"+\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] - num[2] + num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"-\" + str(num[2]) + \"+\" + str(num[3]) + \"=7\")\nelif num[0] - num[1] - num[2] - num[3] == 7:\n print(str(num[0]) + \"-\" + str(num[1]) + \"-\" + str(num[2]) + \"-\" + str(num[3]) + \"=7\")\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":7,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03545\/Python\/s160277968.py\", line 4, in \n elif num[0] + num[1] + num[2] - num[3] == 7:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03547","language":"Python","original_status":"Runtime Error","pass":"x, y = map(ord(), input().split())\nif x == y:\n print(\"=\")\nelif x < y:\n print(\"<\")\nelse:\n print(\">\")\n","fail":"x, y = map(ord, input().split())\nif x == y:\n print(\"=\")\nelif x < y:\n print(\"<\")\nelse:\n print(\">\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: ord() takes exactly one argument (0 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s065466728.py\", line 1, in \n x, y = map(ord(), input().split())\nTypeError: ord() takes exactly one argument (0 given)\n","stdout":null} {"problem_id":"p03547","language":"Python","original_status":"Runtime Error","pass":"X, Y = map(int, input().split())\nX = ord(X)\nY = ord(Y)\nif X < Y:\n print(\"<\")\nelif X > Y:\n print(\">\")\nelse:\n print(\"=\")\n","fail":"X, Y = input().split()\nX = ord(X)\nY = ord(Y)\nif X < Y:\n print(\"<\")\nelif X > Y:\n print(\">\")\nelse:\n print(\"=\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'A'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s221456569.py\", line 1, in \n X, Y = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'A'\n","stdout":null} {"problem_id":"p03547","language":"Python","original_status":"Runtime Error","pass":"X, Y = map(int, input().split(\" \"))\nprint(\"<\" if X < Y else \"=\" if X == Y else \">\")\n","fail":"X, Y = input().split(\" \")\nprint(\"<\" if X < Y else \"=\" if X == Y else \">\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'A'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s372452784.py\", line 1, in \n X, Y = map(int, input().split(\" \"))\nValueError: invalid literal for int() with base 10: 'A'\n","stdout":null} {"problem_id":"p03547","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n x, y = map(int, input().split())\n table = {\"A\": 1, \"B\": 2, \"C\": 3, \"D\": 4, \"E\": 5, \"F\": 6}\n x = table[x]\n y = table[y]\n if x < y:\n print(\"<\")\n elif x == y:\n print(\"=\")\n else:\n print(\">\")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n x, y = input().split()\n table = {\"A\": 1, \"B\": 2, \"C\": 3, \"D\": 4, \"E\": 5, \"F\": 6}\n x = table[x]\n y = table[y]\n if x < y:\n print(\"<\")\n elif x == y:\n print(\"=\")\n else:\n print(\">\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"ValueError: invalid literal for int() with base 10: 'A'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s204322259.py\", line 20, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s204322259.py\", line 7, in main\n x, y = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'A'\n","stdout":null} {"problem_id":"p03547","language":"Python","original_status":"Runtime Error","pass":"X, Y, Z = map(int, input().split())\nans = 0\n\nwhile X > Y + Z:\n X -= Y + Z\n ans += 1\nif X < Z:\n ans -= 1\nprint(ans)\n","fail":"X, Y = input().split()\n\nnum = {\"A\": 10, \"B\": 11, \"C\": 12, \"D\": 13, \"E\": 14, \"F\": 15}\n\nif num[X] > num[Y]:\n print(\">\")\n\nelif num[X] < num[Y]:\n print(\"<\")\n\nelse:\n print(\"=\")\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":12,"error":"ValueError: invalid literal for int() with base 10: 'A'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03547\/Python\/s743521997.py\", line 1, in \n X, Y, Z = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'A'\n","stdout":null} {"problem_id":"p03555","language":"Python","original_status":"Runtime Error","pass":"a = list(map(str, input().split()))\nb = list(map(str, input().split()))\nif a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"a = input()\nb = input()\nif a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03555\/Python\/s798720527.py\", line 3, in \n if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03555","language":"Python","original_status":"Runtime Error","pass":"a, b = input().split()\nif a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"word1, word2 = [input() for i in range(2)]\nif word1[0] == word2[2] and word1[1] == word2[1] and word1[2] == word2[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03555\/Python\/s482109922.py\", line 1, in \n a, b = input().split()\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03555","language":"Python","original_status":"Runtime Error","pass":"C1 = list(input().split())\nC2 = list(input().split())\n\nif C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"C1 = list(input())\nC2 = list(input())\n\nif C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03555\/Python\/s162905241.py\", line 4, in \n if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03556","language":"Python","original_status":"Runtime Error","pass":"import numpy as np\n\nn = input()\n\nfor i in range(n):\n a = int(np.sqrt(n - i))\n b = n - i\n if a**2 == b:\n print(b)\n break\n else:\n pass\n","fail":"import numpy\n\nn = int(input())\n\nfor i in range(n):\n a = int(numpy.sqrt(n - i))\n b = n - i\n if a**2 == b:\n print(b)\n break\n else:\n pass\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03556","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nfor i in range(1, n):\n if i**2 <= n:\n ans = min(n, i**2)\n else:\n break\n\nprint(ans)\n","fail":"n = int(input())\n\nfor i in range(1, n + 1):\n if i**2 <= n:\n ans = min(n, i**2)\n else:\n break\n\nprint(ans)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"0","stderr":null,"stdout":9.0} {"problem_id":"p03556","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nfor n in range(1, N + 1)[::-1]:\n if n * n <= N:\n print(str(n * n))\n break\n else:\n pass\n","fail":"import numpy as np\n\nN = int(input())\n\nans = int(np.sqrt(N))\nprint(ans**2)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03556","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nfor i in range(N):\n if i * i > N:\n ans = (i - 1) ** 2\n break\nprint(ans)\n","fail":"N = int(input())\nans = 1\nfor i in range(N):\n if i * i > N:\n ans = (i - 1) ** 2\n break\nprint(ans)\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":9.0} {"problem_id":"p03556","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nfor i in range(N, 1, -1):\n tmp = int(pow(i, 0.5))\n if tmp * tmp == i:\n break\nprint(i)\n","fail":"N = int(input())\ntmp = 1\nfor i in range(N, 1, -1):\n tmp = int(pow(i, 0.5))\n if tmp * tmp == i:\n break\nprint(tmp * tmp)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":7,"error":"0","stderr":null,"stdout":9.0} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\nq = deque()\nfor i in a:\n q.append([i])\n\nans = 0\nwhile q:\n now = q.popleft()\n n = len(now)\n if n == 3:\n ans += 1\n elif n == 2:\n for x in c:\n if now[-1] < x:\n q.append(now + [x])\n elif n == 1:\n for y in b:\n if now[-1] < y:\n q.append(now + [y])\n\nprint(ans)\n","fail":"import bisect\n\nn = int(input())\na = sorted(list(map(int, input().split())))\nb = list(map(int, input().split()))\nc = sorted(list(map(int, input().split())))\n\nans = 0\nfor i in b:\n a_pos = bisect.bisect_left(a, i)\n c_pos = n - bisect.bisect_right(c, i)\n ans += a_pos * c_pos\n\nprint(ans)\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"from bisect import bisect_right\n\nN = int(input())\nA = sorted(map(int, input().split()))\nB = sorted(map(int, input().split()))\nC = sorted(map(int, input().split()))\n\nans = 0\ny_low = {}\ni = 0\nfor x in A:\n y_low[i] = bisect_right(B, x)\n i += 1\nfor y_lowi in y_low.values():\n for y in B[y_lowi:]:\n z_low = bisect_right(C, y)\n ans += N - z_low\nprint(ans)\n","fail":"from bisect import bisect_left\nfrom bisect import bisect_right\n\n\nN = int(input())\nA = sorted(map(int, input().split()))\nB = sorted(map(int, input().split()))\nC = sorted(map(int, input().split()))\n\nans = 0\ny_low = {}\ni = 0\nfor y in B:\n x = bisect_left(A, y)\n z = bisect_right(C, y)\n ans += x * (N - z)\nprint(ans)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Runtime Error","pass":"# \u305d\u308c\u305e\u308c\u30bd\u30fc\u30c8\u6e08\u307f\u3068\u3057\u3066, \u6574\u6570\u3067Ai arr[-1]:\n return None\n left, right = 0, len(arr)\n while left < right:\n mid = (left + right) \/\/ 2\n if arr[mid] > target:\n right = mid\n else:\n left = mid + 1\n return right\n\n\ndef upper_bound(arr, target):\n # target\u4ee5\u4e0a\u306e\u6700\u5c0f\u306e\u5024\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\n if target < arr[0]:\n return None\n left, right = 0, len(arr)\n while left < right:\n mid = (left + right) \/\/ 2\n if arr[mid] >= target:\n right = mid\n else:\n left = mid + 1\n return right\n\n\ncount = 0\n\nfor b in B:\n ai = upper_bound(A, b)\n ci = N - lower_bound(C, b)\n if ai is not None and ci is not None:\n count += ai * ci\n\nprint(count)\n","fail":"# \u305d\u308c\u305e\u308c\u30bd\u30fc\u30c8\u6e08\u307f\u3068\u3057\u3066, \u6574\u6570\u3067Ai arr[-1]:\n return None\n left, right = 0, len(arr)\n while left < right:\n mid = (left + right) \/\/ 2\n if arr[mid] > target:\n right = mid\n else:\n left = mid + 1\n return right\n\n\ndef upper_bound(arr, target):\n # target\u4ee5\u4e0a\u306e\u6700\u5c0f\u306e\u5024\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\n if target < arr[0]:\n return None\n left, right = 0, len(arr)\n while left < right:\n mid = (left + right) \/\/ 2\n if arr[mid] >= target:\n right = mid\n else:\n left = mid + 1\n return right\n\n\ncount = 0\n\nfor b in B:\n ai = upper_bound(A, b)\n ci = lower_bound(C, b)\n if ai is not None and ci is not None:\n count += ai * (N - ci)\n\nprint(count)\n","change":"replace","i1":40,"i2":43,"j1":40,"j2":43,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03557","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nB = sorted(B)\nC = sorted(C)\n\n\ndef is_ok(array, index, value):\n if array[index] >= value:\n return True\n return False\n\n\ndef bs_general(array, value, is_ok):\n left = -1\n right = len(array)\n while abs(right - left) > 1:\n mid = (left + right) \/\/ 2\n if is_ok(array, mid, value):\n right = mid\n else:\n left = mid\n return right\n\n\nres = 0\nfor b in B:\n index_a = bs_general(A, b, is_ok)\n index_c = bs_general(C, b, is_ok)\n if C[index_c] == b:\n res += index_a * (N - index_c - 1)\n else:\n res += index_a * (N - index_c)\n\nprint(res)\n","fail":"#!\/usr\/bin\/env python3\n\nimport bisect\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nB = sorted(B)\nC = sorted(C)\n\nres = 0\nfor b in B:\n index_a = bisect.bisect_left(A, b)\n index_c = bisect.bisect_right(C, b)\n res += index_a * (N - index_c)\n\nprint(res)\n","change":"replace","i1":1,"i2":38,"j1":1,"j2":18,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"from bisect import bisect\n\nn = int(input())\na_list = sorted(map(int, input().split()))\nb_list = sorted(map(int, input().split()))\nc_list = sorted(map(int, input().split()))\n\nb_c_table = [n - bisect(c_list, b) for b in b_list]\n\nans = 0\nfor a in a_list:\n i = bisect(b_list, a)\n ans += sum(b_c_table[i:n])\nprint(ans)\n","fail":"from bisect import bisect\nfrom itertools import accumulate\n\nn = int(input())\na_list = sorted(map(int, input().split()))\nb_list = sorted(map(int, input().split()))\nc_list = sorted(map(int, input().split()))\n\nb_c_table_ = list(accumulate(reversed(tuple(n - bisect(c_list, b) for b in b_list))))\nb_c_table_.reverse()\nb_c_table_ += [0]\n\nprint(sum(b_c_table_[bisect(b_list, a)] for a in a_list))\n","change":"replace","i1":1,"i2":14,"j1":1,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\ncount = 0\nfor i in range(N):\n for j in range(N):\n if a[i] >= b[j]:\n continue\n for k in range(N):\n if b[j] < c[k]:\n count += 1\nprint(count)\n","fail":"from bisect import bisect_left, bisect_right # 2\u6587\u63a2\u7d22\u6cd5\u30e2\u30b8\u30e5\u30fc\u30eb\n\nN = int(input())\na = sorted(list(map(int, input().split()))) # \u30bd\u30fc\u30c8\u3057\u3066\u304a\u304f\nb = list(map(int, input().split()))\nc = sorted(list(map(int, input().split()))) # \u30bd\u30fc\u30c8\u3057\u3066\u304a\u304f\n\ncount = 0\nfor b_item in b:\n i = bisect_left(a, b_item) # \u30ea\u30b9\u30c8a\u306eb_item\u3088\u308a\u5c0f\u3055\u3044\u8981\u7d20\u306e\u6570\n j = N - bisect_right(c, b_item) # \u30ea\u30b9\u30c8c\u306eb_item\u3088\u308a\u5927\u304d\u3044\u8981\u7d20\u306e\u6570\n count += i * j\nprint(count)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\ncounter = 0\n\nfor a in A:\n for b in B:\n if a < b:\n for c in C:\n if b < c:\n counter = counter + 1\n else:\n pass\n else:\n pass\n\nprint(counter)\n","fail":"import bisect\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nC = sorted(C)\n\ncounter = 0\n\nfor k in range(N):\n i = bisect.bisect_left(A, B[k])\n j = N - bisect.bisect_right(C, B[k])\n counter += i * j\n\nprint(counter)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"import bisect\n\nn = int(input())\nal = sorted(list(map(int, input().split())))\nbl = sorted(list(map(int, input().split())))\ncl = sorted(list(map(int, input().split())))\n\na_len = len(al)\nb_len = len(bl)\nc_len = len(cl)\n\nans = 0\nfor a in al:\n b_index = bisect.bisect_right(bl, a)\n if b_index >= b_len:\n break\n tmp_bl = bl[b_index:]\n for b in tmp_bl:\n c_index = bisect.bisect_right(cl, b)\n if c_index >= c_len:\n break\n ans += c_len - c_index\n # print(f'a:{a}, b_index:{b_index}, c_index:{c_index}, ans:{ans}')\n\nprint(ans)\n","fail":"import bisect\n\nn = int(input())\nal = sorted(list(map(int, input().split())))\nbl = sorted(list(map(int, input().split())))\ncl = sorted(list(map(int, input().split())))\nans = 0\n\nfor b in bl:\n i = bisect.bisect_left(al, b)\n j = bisect.bisect_right(cl, b)\n ans += i * (n - j)\n\nprint(ans)\n","change":"replace","i1":6,"i2":23,"j1":6,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"from bisect import bisect_left\n\nN = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = list(map(int, input().split()))\n\nans = 0\nfor c in C:\n max_index_B = bisect_left(B, c)\n for i in range(max_index_B):\n ans += bisect_left(A, B[i])\n\nprint(ans)\n","fail":"from bisect import bisect_left, bisect_right\n\nN = int(input())\nA = sorted(list(map(int, input().split())))\nB = list(map(int, input().split()))\nC = sorted(list(map(int, input().split())))\n\nans = 0\nfor b in B:\n max_index_A = bisect_left(A, b)\n max_index_C = N - bisect_right(C, b)\n ans += (max_index_A) * (max_index_C)\n\nprint(ans)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"# https:\/\/atcoder.jp\/contests\/abc077\/tasks\/arc084_a\n# C - Snuke Festival\n\nN = int(input().split()[0])\na_list = sorted(list(map(int, input().split())))\nb_list = sorted(list(map(int, input().split())))\nc_list = sorted(list(map(int, input().split())))\n\ncomb_n = 0\n\nfor i in range(N): # 10 ** 5\n b = b_list[i]\n c_n = len([c for c in c_list if c > b]) # 10 ** 5\n a_n = len([a for a in a_list if a < b]) # 10 ** 5\n comb_n += a_n * c_n\n\nans = comb_n\nprint(ans)\n","fail":"# https:\/\/atcoder.jp\/contests\/abc077\/tasks\/arc084_a\n# C - Snuke Festival\nimport bisect\n\nN = int(input().split()[0])\na_list = sorted(list(map(int, input().split())))\nb_list = sorted(list(map(int, input().split())))\nc_list = sorted(list(map(int, input().split())))\n\ncomb_n = 0\ncomb_n_list = []\n\n# \u81ea\u5206\u3088\u308a\u5927\u304d\u3044\u500b\u6570\nstart_c_index = 0\nstart_a_index = 0\n\nfor i in range(N): # 10 ** 5\n b = b_list[i]\n a_n = bisect.bisect_left(a_list, b)\n c_n = N - bisect.bisect_right(c_list, b)\n comb_n += a_n * c_n\nans = comb_n\nprint(ans)\n","change":"replace","i1":2,"i2":16,"j1":2,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\ncnt = 0\n\nfor a in A:\n for b in B:\n for c in C:\n if a < b < c:\n cnt += 1\n\nprint(cnt)\n","fail":"import bisect\n\n\nn = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = sorted(list(map(int, input().split())))\n\n\ncnt = 0\n\nfor b in B:\n mid = bisect.bisect_left(A, b)\n bottom = n - bisect.bisect_right(C, b)\n cnt += mid * bottom\n\nprint(cnt)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Runtime Error","pass":"import sys\nfrom bisect import bisect\nfrom itertools import accumulate\n\n\ndef main():\n input = sys.stdin.buffer.readline\n n = int(input())\n a = sorted(map(int, input().split()))\n b = sorted(map(int, input().split()))\n c = sorted(map(int, input().split()))\n # \u5404\u4e2d\u90e8\u30d1\u30fc\u30c4\u3092\u4e57\u305b\u3089\u308c\u308b\u4e0b\u90e8\u30d1\u30fc\u30c4\u306e\u500b\u6570\n # b_c_cnt = [len(c[bisect(c, b[i]) :]) for i in range(n)]\n b_c_cnt = [0] * n\n past = 0\n for i in range(n):\n pos = bisect(c, b[i], lo=past)\n past = pos\n b_c_cnt[i] = n - pos\n\n # b_c_cnt\u306b\u5f8c\u308d\u304b\u3089\u7d2f\u7a4d\u548c\u3092\u3068\u308b\n acc = list(accumulate(b_c_cnt[::-1]))[::-1]\n ans = 0\n past = 0\n for i in range(n):\n pos = bisect(b, a[i], lo=past)\n ans += acc[pos]\n past = pos\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\nfrom bisect import bisect\nfrom itertools import accumulate\n\n\ndef main():\n input = sys.stdin.buffer.readline\n n = int(input())\n a = sorted(map(int, input().split()))\n b = sorted(map(int, input().split()))\n c = sorted(map(int, input().split()))\n # \u5404\u4e2d\u90e8\u30d1\u30fc\u30c4\u3092\u4e57\u305b\u3089\u308c\u308b\u4e0b\u90e8\u30d1\u30fc\u30c4\u306e\u500b\u6570\n # b_c_cnt = [len(c[bisect(c, b[i]) :]) for i in range(n)]\n b_c_cnt = [0] * n\n past = 0\n for i in range(n):\n pos = bisect(c, b[i], lo=past)\n past = pos\n b_c_cnt[i] = n - pos\n\n # b_c_cnt\u306b\u5f8c\u308d\u304b\u3089\u7d2f\u7a4d\u548c\u3092\u3068\u308b\n acc = list(accumulate(b_c_cnt[::-1]))[::-1] + [0]\n ans = 0\n past = 0\n for i in range(n):\n pos = bisect(b, a[i], lo=past)\n ans += acc[pos]\n past = pos\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":21,"i2":22,"j1":21,"j2":22,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03557\/Python\/s915162350.py\", line 33, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03557\/Python\/s915162350.py\", line 27, in main\n ans += acc[pos]\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"\"\"\"\n\u4e8c\u5206\u63a2\u7d22O(nlogn)\u3067\u304b\u3044\u3066\u307f\u305f\u3089TLE\u3057\u3066\u3001\u901a\u3063\u3066\u308b\u56de\u7b54\u307f\u305f\u3089\u7dda\u5f62\u63a2\u7d22O(n**2)\u3067\u3082\u3068\u304a\u3063\u3066\u3066\u306a\u3093\u3067\u3068\u3044\u3046\u6c17\u6301\u3061\n\u4e8c\u5206\u63a2\u7d22\u3067\u7b54\u3048\u304c\u3082\u3068\u307e\u3089\u305a\u7121\u9650\u30eb\u30fc\u30d7\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u30b1\u30fc\u30b9\u304c\u3042\u308b\u307d\u3044\uff1f\n\"\"\"\nN = int(input())\n\n\ndef binary_search(L, target):\n \"\"\"\n >>> binary_search([1,3,5],2)\n 2\n >>> binary_search([1,3,5],5)\n 0\n >>> binary_search([1,3,5],9)\n 0\n >>> binary_search([1,3,3,3,3,5],3)\n 1\n >>> binary_search([1,3,3,3,3,5],4)\n 1\n \"\"\"\n if L[0] > target:\n return len(L)\n if L[-1] <= target:\n return 0\n right_i = len(L) - 1\n left_i = 0\n j = 0\n while left_i + 1 != right_i and j != 10000000:\n j += 1\n med_i = (right_i + left_i) \/\/ 2\n if L[med_i] < target:\n left_i = med_i\n elif L[med_i] > target:\n right_i = med_i\n else:\n while L[med_i + 1] == target:\n med_i += 1\n return len(L) - med_i - 1\n return len(L) - right_i\n\n\nD = []\nfor _ in range(3):\n D.append(list(map(int, input().split())))\nA, B, C = D\nA.sort()\nA = [-a for a in A]\nA.sort()\nC.sort()\nans = 0\n\nfor b in B:\n ans += binary_search(A, -b) * binary_search(C, b)\n\nprint(ans)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\nA.sort()\nB.sort()\nC.sort()\n\n\ndef hoge():\n count = 0\n Ai = -1\n Ci = -1\n for i in range(N):\n if Ai < N - 1:\n while A[Ai + 1] < B[i]:\n Ai += 1\n if Ai == N - 1:\n break\n if Ci < N - 1:\n while C[Ci + 1] <= B[i]:\n Ci += 1\n if Ci == N - 1:\n break\n count += (Ai + 1) * (N - (Ci + 1))\n return count\n\n\nprint(hoge())\n","change":"replace","i1":0,"i2":55,"j1":0,"j2":29,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"import bisect\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA.sort()\nB.sort()\nC.sort()\n\nans = 0\nfor i in range(N):\n up = A[i]\n middleIndex = bisect.bisect(B, up)\n if middleIndex < N:\n for j in range(middleIndex, N):\n middle = B[j]\n lowIndex = bisect.bisect(C, middle)\n if lowIndex < N:\n cnt = N - lowIndex\n ans += cnt\n\nprint(ans)\n","fail":"import bisect\nimport itertools\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA.sort()\nB.sort()\nC.sort()\n\nans = 0\ndp = [0] * N\nfor i in range(N):\n up = A[i]\n middleIndex = bisect.bisect(B, up)\n if middleIndex < N:\n if i == 0:\n for j in range(middleIndex, N):\n middle = B[j]\n lowIndex = bisect.bisect(C, middle)\n if lowIndex < N:\n cnt = N - lowIndex\n dp[j] = cnt\n ans += cnt\n else:\n dp[j] = 0\n dp = list(itertools.accumulate(dp[::-1]))\n else:\n ans += dp[-middleIndex - 1]\n\nprint(ans)\n","change":"replace","i1":1,"i2":22,"j1":1,"j2":31,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"from bisect import bisect_left, bisect_right\n\nN = int(input())\nA = sorted(map(int, input().split()))\nB = sorted(map(int, input().split()))\nC = sorted(map(int, input().split()))\n\nanswer = 0\nfor b in B:\n ai = bisect_left(A, b)\n ci = bisect_right(C, b)\n answer += len(A[:ai]) * len(C[ci:])\nprint(answer)\n","fail":"from bisect import bisect_left, bisect_right\n\nN = int(input())\nA = sorted(map(int, input().split()))\nB = sorted(map(int, input().split()))\nC = sorted(map(int, input().split()))\n\nanswer = 0\nCL = len(C)\nfor b in B:\n ai = bisect_left(A, b)\n ci = bisect_right(C, b)\n answer += ai * (CL - ci)\nprint(answer)\n","change":"replace","i1":8,"i2":12,"j1":8,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"import bisect\n\nn = int(input())\naa = list(sorted(map(int, input().split())))\nbb = list(sorted(map(int, input().split())))\ncc = list(sorted(map(int, input().split())))\n\nans = 0\nfor a in aa:\n bi = bisect.bisect(bb, a)\n bx = len(bb) - bi\n for b in range(bi, len(bb)):\n ci = bisect.bisect(cc, bb[b])\n cx = len(cc) - ci\n ans += cx\n\nprint(ans)\n","fail":"import bisect\n\nn = int(input())\naa = list(sorted(map(int, input().split())))\nbb = list(sorted(map(int, input().split())))\ncc = list(sorted(map(int, input().split())))\n\nans = 0\nfor b in bb:\n ax = bisect.bisect_left(aa, b)\n ci = bisect.bisect(cc, b)\n cx = len(cc) - ci\n ans += ax * cx\nprint(ans)\n","change":"replace","i1":8,"i2":16,"j1":8,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = sorted(list(map(int, input().split())), reverse=True)\n\nans = 0\nfor b in B:\n a_num = 0\n c_num = 0\n for a in A:\n if a < b:\n a_num += 1\n else:\n break\n for c in C:\n if b < c:\n c_num += 1\n else:\n break\n ans += a_num * c_num\n\nprint(ans)\n","fail":"import bisect\n\nN = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = sorted(list(map(int, input().split())))\n\nans = 0\nfor b in B:\n a_num = bisect.bisect_left(A, b)\n c_num = N - bisect.bisect_right(C, b)\n ans += a_num * c_num\n\nprint(ans)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = []\nA = input()\nB = input()\nC = input()\na = sorted([int(i) for i in A.split()])\nb = sorted([int(i) for i in B.split()])\nc = sorted([int(i) for i in C.split()])\n\nans = 0\nfor i in b:\n a_small = len([x for x in a if x < i])\n c_large = len([x for x in c if x > i])\n ans += a_small * c_large\nprint(ans)\n","fail":"import math\nfrom math import modf\n\nn = int(input())\nA = input()\nB = input()\nC = input()\na = [(int(i) + 0.1) for i in A.split()]\nb = [int(i) for i in B.split()]\nc = [(int(i) - 0.1) for i in C.split()]\nal = sorted(a + b + c)\nans = 0\na_count = 0\nc_count = n\nfor i in al:\n decimal, integer = modf(i)\n if decimal > 0.8:\n c_count -= 1\n elif decimal > 0.05:\n a_count += 1\n else:\n ans += a_count * c_count\nprint(ans)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N = int(input())\n A = list(map(int, input().split()))\n B = sorted(list(map(int, input().split())), reverse=True)\n C = sorted(list(map(int, input().split())))\n\n ans = 0\n for a in A:\n for b in B:\n if a >= b:\n break\n for i, c in enumerate(C):\n if c > b:\n ans += N - i\n break\n print(ans)\n\n\nmain()\n","fail":"import bisect\n\n\ndef main():\n N = int(input())\n A = sorted(list(map(int, input().split())))\n B = sorted(list(map(int, input().split())))\n C = sorted(list(map(int, input().split())))\n\n ans = 0\n for b in B:\n ans += bisect.bisect_left(A, b) * (N - bisect.bisect_right(C, b))\n print(ans)\n\n\nmain()\n","change":"replace","i1":0,"i2":15,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03557","language":"Python","original_status":"Time Limit Exceeded","pass":"import bisect\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nB = sorted(B)\nC = sorted(C)\n\nans = 0\n\nfor a in A:\n for i in range(bisect.bisect_right(B, a), len(B)):\n cPtn = len(C) - bisect.bisect_right(C, B[i])\n ans += cPtn\n\nprint(ans)\n","fail":"import bisect\n\nN = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nB = sorted(B)\nC = sorted(C)\n\nans = 0\n\nfor b in B:\n aPtn = bisect.bisect_left(A, b)\n cPtn = len(C) - bisect.bisect_right(C, b)\n ans += aPtn * cPtn\n\nprint(ans)\n","change":"replace","i1":13,"i2":17,"j1":13,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03559","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\nfrom bisect import bisect_left\n\ninput = sys.stdin.buffer.readline\nN = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = sorted(list(map(int, input().split())))\n\nans = 0\nfor i in range(len(C)):\n c = C[i]\n b_idx = bisect_left(B, c)\n for j in range(b_idx):\n b = B[j]\n a_idx = bisect_left(A, b)\n ans += a_idx\nprint(ans)\n","fail":"import sys\nfrom bisect import bisect_left\n\ninput = sys.stdin.buffer.readline\nN = int(input())\nA = sorted(list(map(int, input().split())))\nB = sorted(list(map(int, input().split())))\nC = sorted(list(map(int, input().split())))\n\ncumsum = [0]\nfor i in range(len(B)):\n b = B[i]\n a_idx = bisect_left(A, b)\n cumsum.append(cumsum[i] + a_idx)\n# print('cumsum', cumsum)\n\nans = 0\nfor i in range(len(C)):\n c = C[i]\n b_idx = bisect_left(B, c)\n ans += cumsum[b_idx]\nprint(ans)\n","change":"replace","i1":9,"i2":17,"j1":9,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03559","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nN = int(input())\n\ncntA = Counter(map(int, input().split()))\ncntB = Counter(map(int, input().split()))\ncntC = Counter(map(int, input().split()))\n\nkeyA = sorted(list(cntA.keys()))\nkeyB = sorted(list(cntB.keys()))\nkeyC = sorted(list(cntC.keys()))\n\niA = 0\niC = 0\nnumA = 0\nnumC = N\nans = 0\nfor kB in keyB:\n for i, k in enumerate(keyA[iA:], iA):\n if k >= kB:\n iA = i\n break\n numA += cntA[k]\n else:\n iA = len(keyA)\n\n for i, k in enumerate(keyC[iC:], iC):\n if k > kB:\n iC = i\n break\n numC -= cntC[k]\n else:\n iC = len(keyC)\n\n ans += numA * numC * cntB[kB]\n\nprint(ans)\n","fail":"from collections import Counter\n\nN = int(input())\n\ncntA = Counter(map(int, input().split()))\ncntB = Counter(map(int, input().split()))\ncntC = Counter(map(int, input().split()))\n\nkeyA = sorted(list(cntA.keys()))\nkeyB = sorted(list(cntB.keys()))\nkeyC = sorted(list(cntC.keys()))\n\nlenA = len(keyA)\nlenC = len(keyC)\niA = 0\niC = 0\nnumA = 0\nnumC = N\nans = 0\nfor kB in keyB:\n for i in range(iA, lenA):\n if keyA[i] >= kB:\n iA = i\n break\n numA += cntA[keyA[i]]\n else:\n iA = lenA\n\n for i in range(iC, lenC):\n if keyC[i] > kB:\n iC = i\n break\n numC -= cntC[keyC[i]]\n else:\n iC = lenC\n\n ans += numA * numC * cntB[kB]\n\nprint(ans)\n","change":"replace","i1":12,"i2":33,"j1":12,"j2":35,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03559","language":"Python","original_status":"Time Limit Exceeded","pass":"raw_input = input()\nlength = len(raw_input)\ninput_number = int(raw_input)\ncount = 0\n\ntop_lane = input().split()\nmid_lane = input().split()\nbot_lane = input().split()\n\nfor i in range(input_number):\n top_lane[i] = int(top_lane[i])\n mid_lane[i] = int(mid_lane[i])\n bot_lane[i] = int(bot_lane[i])\n\ntop_lane.sort()\nmid_lane.sort()\nbot_lane.sort()\n\nfor i in range(input_number):\n top = top_lane[i]\n for j in range(input_number):\n mid = mid_lane[len(mid_lane) - j - 1]\n if top < mid:\n for k in range(input_number):\n bot = bot_lane[len(bot_lane) - k - 1]\n if mid < bot:\n count += 1\n else:\n break\n else:\n break\n\nprint(count)\n","fail":"import bisect\n\nraw_input = input()\ninput_number = int(raw_input)\ncounts = 0\n\ntop_lane = input().split()\nmid_lane = input().split()\nbot_lane = input().split()\n\nfor i in range(input_number):\n top_lane[i] = int(top_lane[i])\n mid_lane[i] = int(mid_lane[i])\n bot_lane[i] = int(bot_lane[i])\n\ntop_lane.sort()\nmid_lane.sort()\nbot_lane.sort()\n\nfor mid in mid_lane:\n top_index = bisect.bisect_left(top_lane, mid)\n bot_index = input_number - bisect.bisect_right(bot_lane, mid)\n counts += top_index * bot_index\n\nprint(counts)\n","change":"replace","i1":0,"i2":33,"j1":0,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03563","language":"Python","original_status":"Runtime Error","pass":"r, g = map(int, input().split())\nprint(2 * g - r)\n","fail":"r, g = eval(\"int(input()),\" * 2)\nprint(2 * g - r)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03563\/Python\/s202096216.py\", line 1, in \n r, g = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03563","language":"Python","original_status":"Runtime Error","pass":"r, g = map(int, input().split())\nprint((r + g) \/ 2)\n","fail":"r, g = [int(input()) for _ in range(2)]\nprint(2 * g - r)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03563\/Python\/s161415136.py\", line 1, in \n r, g = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03563","language":"Python","original_status":"Runtime Error","pass":"r, g = map(int, input().split())\nx = g * 2 - r\n\nprint(x)\n","fail":"r = int(input())\ng = int(input())\nx = g * 2 - r\n\nprint(x)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03563\/Python\/s298034029.py\", line 1, in \n r, g = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03563","language":"Python","original_status":"Runtime Error","pass":"from sys import stdin\n\ncurRate = stdin.readline()\ntargetRate = stdin.readline()\n\na = targetRate * 2 - curRate\n\nprint(a)\n","fail":"import sys\n\ncur = sys.stdin.readline()\ntarget = sys.stdin.readline()\n\na = int(target) * 2 - int(cur)\n\nprint(a)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":6,"error":"TypeError: unsupported operand type(s) for -: 'str' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03563\/Python\/s902747322.py\", line 6, in \n a = targetRate * 2 - curRate\nTypeError: unsupported operand type(s) for -: 'str' and 'str'\n","stdout":null} {"problem_id":"p03563","language":"Python","original_status":"Runtime Error","pass":"pres_rate = input()\ngoal_rate = input()\nnext_rate = goal_rate * 2 - pres_rate\nprint(next_rate)\n","fail":"pres_rate = int(input())\ngoal_rate = int(input())\nnext_rate = goal_rate * 2 - pres_rate\nprint(next_rate)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"TypeError: unsupported operand type(s) for -: 'str' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03563\/Python\/s849115631.py\", line 3, in \n next_rate = goal_rate * 2 - pres_rate\nTypeError: unsupported operand type(s) for -: 'str' and 'str'\n","stdout":null} {"problem_id":"p03565","language":"Python","original_status":"Runtime Error","pass":"s = list(input())\nt = list(input())\nans = [-1, -1]\nif len(t) <= len(s):\n for i in range(len(s) - len(t) + 1):\n c = 1\n for j in range(len(t)):\n if s[i + j] != \"?\" and t[j] != s[i + j]:\n c = 0\n break\n if c == 1:\n ans = [i, i + len(t)]\n\nif ans != [-1, -1]:\n k = []\n for i in range(len(s)):\n if ans[0] <= i <= ans[1]:\n k.append(t[i - ans[0]])\n else:\n if s[i] == \"?\":\n k.append(\"a\")\n else:\n k.append(s[i])\n print(\"\".join(k))\nelse:\n print(\"UNRESTORABLE\")\n","fail":"s = list(input())\nt = list(input())\nans = [-1, -1]\nif len(t) <= len(s):\n for i in range(len(s) - len(t) + 1):\n c = 1\n for j in range(len(t)):\n if s[i + j] != \"?\" and t[j] != s[i + j]:\n c = 0\n break\n if c == 1:\n ans = [i, i + len(t)]\n\nif ans != [-1, -1]:\n k = []\n for i in range(len(s)):\n if ans[0] <= i < ans[1]:\n k.append(t[i - ans[0]])\n else:\n if s[i] == \"?\":\n k.append(\"a\")\n else:\n k.append(s[i])\n print(\"\".join(k))\nelse:\n print(\"UNRESTORABLE\")\n","change":"replace","i1":16,"i2":17,"j1":16,"j2":17,"error":0,"stderr":null,"stdout":"atcoder\n"} {"problem_id":"p03567","language":"Python","original_status":"Runtime Error","pass":"S = input()\nfor i in range(len(S) - 1):\n if S[i, i + 1] == \"AC\":\n print(\"Yes\")\n exit()\nprint(\"No\")\n","fail":"S = input()\nfor i in range(len(S) - 1):\n if S[i : i + 2] == \"AC\":\n print(\"Yes\")\n exit()\nprint(\"No\")\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: string indices must be integers","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03567\/Python\/s809765582.py\", line 3, in \n if S[i, i + 1] == \"AC\":\nTypeError: string indices must be integers\n","stdout":null} {"problem_id":"p03567","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n\nimport sys\nfrom typing import List\n\n\ndef main(arg: List[str]):\n s = input()\n i = \"AC\" in s\n if i:\n print(\"Yes\")\n else:\n print(\"No\")\n # print(123)\n # b = [int(a) for a in input().split(\" \")]\n # print(b)\n # [input() for a in range(3)]\n\n\nif __name__ == \"__main__\":\n main(sys.argv)\n","fail":"def main():\n s = input()\n i = \"AC\" in s\n if i:\n print(\"Yes\")\n else:\n print(\"No\")\n # print(123)\n # b = [int(a) for a in input().split(\" \")]\n # print(b)\n # [input() for a in range(3)]\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":21,"j1":0,"j2":15,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03569","language":"Python","original_status":"Runtime Error","pass":"def is_valid():\n x_removed_S = S.replace(\"x\", \"\")\n M = len(x_removed_S)\n for i in range(M \/\/ 2):\n if x_removed_S[i] != x_removed_S[M - i - 1]:\n return False\n return True\n\n\nS = input()\nN = len(S)\nif is_valid():\n ans = 0\n left, right = 0, N - 1\n while left != right:\n if S[left] == S[right]:\n left += 1\n right -= 1\n continue\n elif S[left] == \"x\":\n ans += 1\n left += 1\n else:\n ans += 1\n right -= 1\n print(ans)\nelse:\n print(-1)\n","fail":"def is_valid():\n x_removed_S = S.replace(\"x\", \"\")\n M = len(x_removed_S)\n for i in range(M \/\/ 2):\n if x_removed_S[i] != x_removed_S[M - i - 1]:\n return False\n return True\n\n\nS = input()\nN = len(S)\nif is_valid():\n ans = 0\n left, right = 0, N - 1\n while left < right:\n if S[left] == S[right]:\n left += 1\n right -= 1\n continue\n elif S[left] == \"x\":\n ans += 1\n left += 1\n else:\n ans += 1\n right -= 1\n print(ans)\nelse:\n print(-1)\n","change":"replace","i1":14,"i2":15,"j1":14,"j2":15,"error":0,"stderr":null,"stdout":2} {"problem_id":"p03569","language":"Python","original_status":"Runtime Error","pass":"# x\u7121\u8996\u3057\u305f\u3084\u3064\u304c\u56de\u6587\u306a\u3063\u3066\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306d\uff1f\n# \u771f\u3093\u4e2d\u306b\u3057\u305f\u3044(x\u4ee5\u5916\u306e)\u6587\u5b57\u304c\u6c7a\u307e\u308c\u3070\u3001\u3082\u3068\u306es\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u9069\u5fdc\u3057\u3066\u3001\u5de6\u53f3\u306ex\u306e\u6570\u306e\u5dee\u3092\u3068\u308c\u3070\u3044\u3044\n# \u3068\u601d\u3063\u305f\u3051\u3069\u5dee\u3092\u3068\u3063\u305f\u3060\u3051\u3060\u3068\u99c4\u76ee\u3060\u306a xaaxxxbxxcxxxxbxaxxaxx \u306f\u3053\u306e\u8003\u3048\u3060\u30683\u3060\u3051\u3069\u5b9f\u969b\u306f7\u3060\u3057\n# \u3082\u3046\u3057\u304b\u305f\u306d\u3047\u304b\u3089\u7121\u7406\u3084\u308asplit\u3057\u305f\uff08\u30a2\u30db\u304b\uff1f\uff09\n\nimport re\n\ns = input()\nif len(set(s)) == 1:\n # 1\u6587\u5b57\u3067\u306e\u307f\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u5834\u5408\n print(0)\n exit()\nt = \"\"\nfor sv in s:\n if sv != \"x\":\n t += sv\n\nif t != t[::-1]:\n # \u56de\u6587\u306b\u306a\u3089\u306a\u3044\u5834\u5408\n print(-1)\n exit()\n\nmid_char = t[len(t) \/\/ 2]\nmid_count = t.count(mid_char) \/\/ 2\nmid_idx = -1\ntarget_idx = 0\nfor i in range(len(s)):\n if s[i] == mid_char:\n mid_idx += 1\n if mid_idx == mid_count:\n target_idx = i\n break\nss, tt = s[:target_idx], s[target_idx + 1 :]\ntt = tt[::-1]\n\nss = re.split(\"[abcdefghijklmnopqrstuvwyz]\", ss)\ntt = re.split(\"[abcdefghijklmnopqrstuvwyz]\", tt)\nans = 0\nfor i in range(len(ss)):\n ans += abs(len(ss[i]) - len(tt[i]))\n\nprint(ans)\n","fail":"# x\u7121\u8996\u3057\u305f\u3084\u3064\u304c\u56de\u6587\u306a\u3063\u3066\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306d\uff1f\n# \u771f\u3093\u4e2d\u306b\u3057\u305f\u3044(x\u4ee5\u5916\u306e)\u6587\u5b57\u304c\u6c7a\u307e\u308c\u3070\u3001\u3082\u3068\u306es\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u9069\u5fdc\u3057\u3066\u3001\u5de6\u53f3\u306ex\u306e\u6570\u306e\u5dee\u3092\u3068\u308c\u3070\u3044\u3044\n# \u3068\u601d\u3063\u305f\u3051\u3069\u5dee\u3092\u3068\u3063\u305f\u3060\u3051\u3060\u3068\u99c4\u76ee\u3060\u306a xaaxxxbxxcxxxxbxaxxaxx \u306f\u3053\u306e\u8003\u3048\u3060\u30683\u3060\u3051\u3069\u5b9f\u969b\u306f7\u3060\u3057\n# \u3082\u3046\u3057\u304b\u305f\u306d\u3047\u304b\u3089\u7121\u7406\u3084\u308asplit\u3057\u305f\uff08\u30a2\u30db\u304b\uff1f\uff09\n# \u3053\u308c\u3067\u3044\u3051\u308b\u3068\u601d\u3044\u304d\u3084\u99c4\u76ee abxxxba\u3068\u304b\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\n# \u8da3\u5411\u3092\u5909\u3048\u3066\u3001\u4e21\u8107\u304b\u3089\u6bd4\u8f03\u3057\u3066\u3044\u304f\u3053\u3068\u306b\u3057\u3066\u307f\u308b\n\ns = input()\n# \u3081\u3093\u3069\u304f\u3055\u3044\u3051\u3069\u3053\u3053\u3067\u78ba\u5b9f\u306b\u306a\u308b\u3068\u304d\u306e\u3084\u3064\u3068\u56de\u6587\u306b\u306a\u3089\u3093\u3068\u304d\u306e\u3084\u3064\u3092\u5224\u5b9a\u3059\u3063\u304b\nif len(s) == 1:\n print(0)\n exit()\nt = \"\"\nfor sv in s:\n if sv != \"x\":\n t += sv\nif t != t[::-1]:\n print(-1)\n exit()\n\nl, r = 0, len(s) - 1\nls, rs = \"\", \"\"\nans = 0\nx = False\nwhile l < r:\n if s[l] == s[r]:\n ls += s[l]\n rs += s[r]\n l += 1\n r -= 1\n else:\n if s[l] == \"x\":\n while l < r and s[l] != s[r]:\n l += 1\n ans += 1\n else:\n while l < r and s[r] != s[l]:\n r -= 1\n ans += 1\nprint(ans)\n","change":"replace","i1":4,"i2":41,"j1":4,"j2":39,"error":0,"stderr":null,"stdout":2} {"problem_id":"p03569","language":"Python","original_status":"Runtime Error","pass":"s = list(input())\nl, r = 0, len(s) - 1\nans = 0\nwhile l != r:\n if s[l] == s[r]:\n l += 1\n r -= 1\n else:\n if s[l] == \"x\":\n l += 1\n ans += 1\n elif s[r] == \"x\":\n r -= 1\n ans += 1\n else:\n ans = -1\n break\n\nprint(ans)\n","fail":"s = list(input())\nl, r = 0, len(s) - 1\nans = 0\nwhile l < r:\n if s[l] == s[r]:\n l += 1\n r -= 1\n else:\n if s[l] == \"x\":\n l += 1\n ans += 1\n elif s[r] == \"x\":\n r -= 1\n ans += 1\n else:\n ans = -1\n break\n\nprint(ans)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":0,"stderr":null,"stdout":2} {"problem_id":"p03573","language":"Python","original_status":"Runtime Error","pass":"a = list(map(int, input().split()))\nif a[0] == a[1]:\n print(a[3])\nelif a[0] == a[2]:\n print(a[1])\nelif a[1] == a[2]:\n print(a[0])\n","fail":"a = list(map(int, input().split()))\nif a[0] == a[1]:\n print(a[2])\nelif a[0] == a[2]:\n print(a[1])\nelif a[1] == a[2]:\n print(a[0])\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":0,"stderr":null,"stdout":7} {"problem_id":"p03574","language":"Python","original_status":"Runtime Error","pass":"H, W = map(int, input().split())\ngraph = [list(input()) for _ in range(H)]\n\n\ndef count_bomb(x, y):\n bomb = 0\n one_steps = ((1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (1, -1), (-1, 1), (-1, -1))\n for dx, dy in one_steps:\n nx, ny = x + dx, y + dy\n if (0 <= nx < H) and (0 <= ny <= W):\n if graph[nx][ny] == \"#\":\n bomb += 1\n return bomb\n\n\nfor x in range(H):\n for y in range(W):\n if graph[x][y] == \".\":\n graph[x][y] = count_bomb(x, y)\nfor line in graph:\n print(line)\n","fail":"H, W = map(int, input().split())\ngraph = [list(input()) for _ in range(H)]\n\n\ndef count_bomb(x, y):\n bomb = 0\n one_steps = ((1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (1, -1), (-1, 1), (-1, -1))\n for dx, dy in one_steps:\n nx, ny = x + dx, y + dy\n if (0 <= nx < H) and (0 <= ny < W):\n if graph[nx][ny] == \"#\":\n bomb += 1\n return bomb\n\n\nfor x in range(H):\n for y in range(W):\n if graph[x][y] == \".\":\n graph[x][y] = str(count_bomb(x, y))\nfor line in graph:\n print(\"\".join(line))\n","change":"replace","i1":9,"i2":21,"j1":9,"j2":21,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03574\/Python\/s499192926.py\", line 19, in \n graph[x][y] = count_bomb(x, y)\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03574\/Python\/s499192926.py\", line 11, in count_bomb\n if graph[nx][ny] == \"#\":\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03574","language":"Python","original_status":"Runtime Error","pass":"H, W = map(int, input().split())\nS = [[\".\"] * (W + 2)]\nfor _ in range(H):\n S.append([\".\", *list(input()), \".\"])\nS.append([\".\"] * (W + 2))\n\nans = [[-1] * W for _ in range(H)]\n\nfor i in range(1, H + 1):\n for j in range(1, W + 1):\n if S[i][j] == \"#\":\n continue\n cnt = 0\n if S[i - 1][j - 1] == \"#\":\n cnt += 1\n if S[i][j - 1] == \"#\":\n cnt += 1\n if S[i + 1][j - 1] == \"#\":\n cnt += 1\n if S[i - 1][j] == \"#\":\n cnt += 1\n if S[i + 1][j] == \"#\":\n cnt += 1\n if S[i - 1][j + 1] == \"#\":\n cnt += 1\n if S[i][j + 1] == \"#\":\n cnt += 1\n if S[i + 1][j + 1] == \"#\":\n cnt += 1\n ans[i - 1][j - 1] = cnt\n\nfor i in ans:\n p = [\"#\" if x == -1 else x for x in i]\n print(*p, sep=\"\")\n","fail":"H, W = map(int, input().split())\nS = [\".\" * (W + 2)]\nfor _ in range(H):\n S += [\".\" + input() + \".\"]\nS += [\".\" * (W + 2)]\n\nans = [[-1] * W for _ in range(H)]\n\nfor i in range(1, H + 1):\n for j in range(1, W + 1):\n if S[i][j] == \"#\":\n continue\n cnt = 0\n if S[i - 1][j - 1] == \"#\":\n cnt += 1\n if S[i][j - 1] == \"#\":\n cnt += 1\n if S[i + 1][j - 1] == \"#\":\n cnt += 1\n if S[i - 1][j] == \"#\":\n cnt += 1\n if S[i + 1][j] == \"#\":\n cnt += 1\n if S[i - 1][j + 1] == \"#\":\n cnt += 1\n if S[i][j + 1] == \"#\":\n cnt += 1\n if S[i + 1][j + 1] == \"#\":\n cnt += 1\n ans[i - 1][j - 1] = cnt\n\nfor i in ans:\n p = [\"#\" if x == -1 else x for x in i]\n print(*p, sep=\"\")\n","change":"replace","i1":1,"i2":5,"j1":1,"j2":5,"error":"0","stderr":null,"stdout":"11211\n1#2#1\n11211\n"} {"problem_id":"p03574","language":"Python","original_status":"Runtime Error","pass":"h, w = map(int, input().split())\nfield = [list(input().split()) for _ in range(h)]\ndx = [1, 0, -1, 0, 1, -1, -1, 1]\ndy = [0, 1, 0, -1, 1, 1, -1, -1]\nfor i in range(h):\n for j in range(w):\n if field[i][j] != \"#\":\n num = 0\n for k in range(8):\n ni = i + dy[k]\n nj = j + dx[k]\n if nj < 0 or h <= nj:\n continue\n if ni < 0 or w <= ni:\n continue\n if field[ni][nj] == \"#\":\n num += 1\n field[i][j] = num\nfor out in field:\n print(\"\".join(out))\n","fail":"h, w = map(int, input().split())\nfield = [list(input()) for _ in range(h)]\ndx = [1, 0, -1, 0, 1, -1, -1, 1]\ndy = [0, 1, 0, -1, 1, 1, -1, -1]\nfor i in range(h):\n for j in range(w):\n if field[i][j] == \"#\":\n continue\n num = 0\n for k in range(8):\n ni = i + dy[k]\n nj = j + dx[k]\n if ni < 0 or h <= ni:\n continue\n if nj < 0 or w <= nj:\n continue\n if field[ni][nj] == \"#\":\n num += 1\n field[i][j] = str(num)\nfor out in field:\n print(\"\".join(out))\n","change":"replace","i1":1,"i2":18,"j1":1,"j2":19,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03574\/Python\/s215031436.py\", line 16, in \n if field[ni][nj] == \"#\":\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03575","language":"Python","original_status":"Runtime Error","pass":"def main():\n n, m, *ab = map(int, open(0).read().split())\n e = [set() for _ in range(n)]\n for u, v in zip(*[iter(ab)] * 2):\n e[u - 1].add(v - 1)\n e[v - 1].add(u - 1)\n\n ans = 0\n for _ in range(m):\n count = 0\n for i, x in enumerate(e):\n if len(x) == 1:\n e[i] = []\n e[x[0]] -= {i}\n count += 1\n if count:\n ans += count\n else:\n print(ans)\n exit()\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n n, m, *ab = map(int, open(0).read().split())\n e = [set() for _ in range(n)]\n for u, v in zip(*[iter(ab)] * 2):\n e[u - 1].add(v - 1)\n e[v - 1].add(u - 1)\n\n ans = 0\n for _ in range(m):\n count = 0\n for i, x in enumerate(e):\n if len(x) == 1:\n j = x.pop()\n e[j] -= {i}\n count += 1\n if count:\n ans += count\n else:\n print(ans)\n exit()\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":12,"i2":14,"j1":12,"j2":14,"error":"TypeError: 'set' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03575\/Python\/s273670080.py\", line 24, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03575\/Python\/s273670080.py\", line 14, in main\n e[x[0]] -= {i}\nTypeError: 'set' object is not subscriptable\n","stdout":null} {"problem_id":"p03575","language":"Python","original_status":"Runtime Error","pass":"from sys import stdin\n\n\ndef dfs(g, v, visited):\n visited[v] = True\n\n for v2 in range(len(visited)):\n if not g[v][v2]:\n continue\n if visited[v2]:\n continue\n dfs(g, v2, visited)\n\n\ndef main():\n n, m = map(int, stdin.readline().split())\n ab = [list(map(int, stdin.readline().split())) for _ in range(m)]\n g = [[False] * n for _ in range(n)]\n for a, b in ab:\n g[a - 1][b - 1] = True\n g[b - 1][a - 1] = True\n\n ans = 0\n\n for i in range(m):\n visited = [False for _ in range(n)]\n a, b = ab[i]\n g[a - 1][b - 1] = False\n g[b - 1][a - 1] = False\n\n dfs(g, i, visited)\n\n check = False\n for v in visited:\n if not v:\n check = True\n if check:\n ans += 1\n\n g[a - 1][b - 1] = True\n g[b - 1][a - 1] = True\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"from sys import stdin\n\n\ndef dfs(g, v, visited):\n visited[v] = True\n\n for v2 in range(len(visited)):\n if not g[v][v2]:\n continue\n if visited[v2]:\n continue\n dfs(g, v2, visited)\n\n\ndef main():\n n, m = map(int, stdin.readline().split())\n ab = [list(map(int, stdin.readline().split())) for _ in range(m)]\n g = [[False] * n for _ in range(n)]\n for a, b in ab:\n g[a - 1][b - 1] = True\n g[b - 1][a - 1] = True\n\n ans = 0\n\n for i in range(m):\n visited = [False for _ in range(n)]\n a, b = ab[i]\n g[a - 1][b - 1] = False\n g[b - 1][a - 1] = False\n\n dfs(g, 0, visited)\n\n check = False\n for v in visited:\n if not v:\n check = True\n if check:\n ans += 1\n\n g[a - 1][b - 1] = True\n g[b - 1][a - 1] = True\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":30,"i2":31,"j1":30,"j2":31,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03578","language":"Python","original_status":"Time Limit Exceeded","pass":"# def makelist(n, m):\n# return [[0 for i in range(m)] for j in range(n)]\n\n# n = int(input())\n# a, b = map(int, input().split())\n# s = input()\n\n\nN = int(input())\nD = list(map(int, input().split()))\nM = int(input())\nT = list(map(int, input().split()))\n\nD.sort()\nT.sort()\n\ni = 0\nans = \"YES\"\nfor e in T:\n while True:\n if i >= N:\n ans = \"NO\"\n break\n else:\n if D[i] != e:\n i += 1\n\n if ans == \"NO\":\n break\nprint(ans)\n","fail":"N = int(input())\nD = list(map(int, input().split()))\nM = int(input())\nT = list(map(int, input().split()))\n\nD.sort()\nT.sort()\n\ni = 0\nans = \"YES\"\nfor e in T:\n flag = True\n while flag:\n if i >= N:\n ans = \"NO\"\n break\n else:\n if D[i] == e:\n flag = False\n i += 1\n\n if ans == \"NO\":\n break\nprint(ans)\n","change":"replace","i1":0,"i2":26,"j1":0,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03578","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n\nn = int(input())\nd = [int(x) for x in input().split()]\nm = int(input())\nt = [int(x) for x in input().split()]\nfor et in t:\n if et not in d:\n print(\"NO\")\n exit()\n d.remove(et)\nprint(\"YES\")\n","fail":"#!\/usr\/bin\/env python3\n\nimport collections\n\nn = int(input())\nd = collections.Counter([int(x) for x in input().split()])\nm = int(input())\nt = collections.Counter([int(x) for x in input().split()])\nfor k, v in t.items():\n if d[k] < v:\n print(\"NO\")\n exit()\nprint(\"YES\")\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03578","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nd = list(map(int, input().split()))\nm = int(input())\nt = map(int, input().split())\nans = \"YES\"\n\nfor ti in t:\n if ti in d:\n d.remove(ti)\n else:\n ans = \"NO\"\nprint(ans)\n","fail":"from collections import Counter\n\nn = input()\nd = Counter(map(int, input().split()))\nm = input()\nt = Counter(map(int, input().split()))\nd.subtract(t)\nprint(\"NO\" if -d else \"YES\")\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03578","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nD = list(map(int, input().split()))\n\nM = int(input())\nT = list(map(int, input().split()))\n\nd = [0 for _ in range(200005)]\nt = [0 for _ in range(200005)]\n\nans = \"YES\"\n\nfor i in range(N):\n d[D[i]] += 1\n\nfor i in range(M):\n t[T[i]] += 1\n\nfor i in range(len(d)):\n if t[i] > d[i]:\n ans = \"NO\"\n\nprint(ans)\n","fail":"from collections import defaultdict\n\nn = int(input())\nd = tuple(map(int, input().split()))\nm = int(input())\nt = tuple(map(int, input().split()))\nl = defaultdict(int)\nfor x in d:\n l[x] += 1\nfor y in t:\n if l[y] == 0:\n print(\"NO\")\n exit()\n l[y] -= 1\nprint(\"YES\")\n","change":"replace","i1":0,"i2":22,"j1":0,"j2":15,"error":"0","stderr":null,"stdout":"YES\n"} {"problem_id":"p03578","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nd = list(map(int, input().split()))\nm = int(input())\nt = list(map(int, input().split()))\n\nflag = 0\nfor i in range(m):\n if t[i] in d:\n d.remove(t[i])\n else:\n flag = 1\n break\n\nif flag == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"from collections import deque\n\nn = int(input())\nd = list(map(int, input().split()))\nm = int(input())\nt = list(map(int, input().split()))\na = deque(sorted(d))\nb = deque(sorted(t))\nflag = 0\nif n >= m:\n for i in range(n):\n if a[0] == b[0]:\n b.popleft()\n a.popleft()\n if len(b) == 0:\n print(\"YES\")\n flag = 1\n break\nif flag == 0:\n print(\"NO\")\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03578","language":"Python","original_status":"Time Limit Exceeded","pass":"import collections\n\nN = int(input())\nD = list(map(int, input().split()))\nM = int(input())\nT = list(map(int, input().split()))\n\nD.sort()\nT2 = collections.Counter(T)\n\nfor i in T2.keys():\n if T2[i] > D.count(i):\n print(\"NO\")\n exit()\n\nprint(\"YES\")\n","fail":"import collections\nimport bisect\n\nN = int(input())\nD = list(map(int, input().split()))\nM = int(input())\nT = list(map(int, input().split()))\n\nD.sort()\nT2 = collections.Counter(T)\n\nfor i in T2.keys():\n if T2[i] > bisect.bisect_right(D, i) - bisect.bisect_left(D, i):\n print(\"NO\")\n exit()\n\nprint(\"YES\")\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03579","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\n\ndef dfs(x):\n res = True\n for e in edge[x]:\n if color[e] is None:\n color[e] = 0 if color[x] else 1\n res &= dfs(e)\n else:\n if color[e] == color[x]:\n res &= False\n else:\n res &= True\n return res\n\n\nN, M = map(int, input().split())\nedge = [[] for _ in range(N)]\nfor _ in range(M):\n A, B = map(int, input().split())\n A -= 1\n B -= 1\n edge[A].append(B)\n edge[B].append(A)\n\ncolor = [None] * N\ncolor[0] = 0\nisBin = dfs(0)\n\nif isBin:\n C = Counter(color)\n print(C[0] * C[1] - M)\nelse:\n print(N * (N - 1) \/\/ 2 - M)\n","fail":"from collections import Counter\nimport sys\n\n\nsys.setrecursionlimit(10**6)\n\n\ndef dfs(x):\n res = True\n for e in edge[x]:\n if color[e] is None:\n color[e] = 0 if color[x] else 1\n res &= dfs(e)\n else:\n if color[e] == color[x]:\n res &= False\n else:\n res &= True\n return res\n\n\nN, M = map(int, input().split())\nedge = [[] for _ in range(N)]\nfor _ in range(M):\n A, B = map(int, input().split())\n A -= 1\n B -= 1\n edge[A].append(B)\n edge[B].append(A)\n\ncolor = [None] * N\ncolor[0] = 0\nisBin = dfs(0)\n\nif isBin:\n C = Counter(color)\n print(C[0] * C[1] - M)\nelse:\n print(N * (N - 1) \/\/ 2 - M)\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":5,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03579","language":"Python","original_status":"Runtime Error","pass":"# \u4e8c\u90e8\u30b0\u30e9\u30d5\u5224\u5b9a\ndef dfs(u, c):\n color[u] = c # \u8a2a\u554f\u3057\u305f\u3089\u6307\u5b9a\u306e\u8272\u3067\u5857\u308b\n for v in G[u]: # u\u304b\u3089\u3064\u306a\u304c\u3063\u3066\u3044\u308b\u9802\u70b9\u3092\u9806\u306b\u53d6\u308a\u51fa\u3059\n if color[v] != -1: # \u3059\u3067\u306b\u8a2a\u554f\u3057\u3066\u3044\u305f\u5834\u5408\n if color[v] == c:\n return False # \u96a3\u63a5\u3059\u308b\u9802\u70b9\u304c\u540c\u3058\u8272\u306e\u3068\u304d\u306fFalse\n else:\n continue\n else: # \u672a\u8a2a\u554f\u306e\u6642\u306f\u8272\u306f\u9055\u3046\u8272\u306b\u3057\u3066DFS\u3067\u518d\u5e30\u7684\u306b\u63a2\u7d22\n if not dfs(v, 1 - c): # False\u3060\u3063\u305f\u3089False\u3092\u8fd4\u3059\n return False\n return True\n\n\n# \u9802\u70b9\u6570\u3068\u8fba\u6570\u3092\u5165\u529b\nN, M = map(int, input().split())\n# \u30b0\u30e9\u30d5\u306e\u5165\u529b\nG = [[] for _ in range(N)] # \u9802\u70b9\u6570N\u3060\u3051\u6e96\u5099\ncolor = [-1] * N # \u672a\u8a2a\u554f\u306f-1\u3068\u3059\u308b\nfor _ in range(M):\n a, b = map(int, input().split())\n a -= 1\n b -= 1\n G[a].append(b)\n G[b].append(a)\n# \u63a2\u7d22\nflag = True\nfor i in range(N):\n if color[i] == -1:\n if not dfs(i, 0):\n flag = False\n break\nif flag:\n ans = color.count(1) * color.count(0) - M\nelse:\n ans = N * (N - 1) \/\/ 2 - M\nprint(ans)\n","fail":"import sys\n\nsys.setrecursionlimit(1000000)\n\n# \u4e8c\u90e8\u30b0\u30e9\u30d5\u5224\u5b9a\ndef dfs(u, c):\n color[u] = c # \u8a2a\u554f\u3057\u305f\u3089\u6307\u5b9a\u306e\u8272\u3067\u5857\u308b\n for v in G[u]: # u\u304b\u3089\u3064\u306a\u304c\u3063\u3066\u3044\u308b\u9802\u70b9\u3092\u9806\u306b\u53d6\u308a\u51fa\u3059\n if color[v] != -1: # \u3059\u3067\u306b\u8a2a\u554f\u3057\u3066\u3044\u305f\u5834\u5408\n if color[v] == c:\n return False # \u96a3\u63a5\u3059\u308b\u9802\u70b9\u304c\u540c\u3058\u8272\u306e\u3068\u304d\u306fFalse\n else:\n continue\n else: # \u672a\u8a2a\u554f\u306e\u6642\u306f\u8272\u306f\u9055\u3046\u8272\u306b\u3057\u3066DFS\u3067\u518d\u5e30\u7684\u306b\u63a2\u7d22\n if not dfs(v, 1 - c): # False\u3060\u3063\u305f\u3089False\u3092\u8fd4\u3059\n return False\n return True\n\n\n# \u9802\u70b9\u6570\u3068\u8fba\u6570\u3092\u5165\u529b\nN, M = map(int, input().split())\n# \u30b0\u30e9\u30d5\u306e\u5165\u529b\nG = [[] for _ in range(N)] # \u9802\u70b9\u6570N\u3060\u3051\u6e96\u5099\ncolor = [-1] * N # \u672a\u8a2a\u554f\u306f-1\u3068\u3059\u308b\nfor _ in range(M):\n a, b = map(int, input().split())\n a -= 1\n b -= 1\n G[a].append(b)\n G[b].append(a)\n# \u63a2\u7d22\nflag = True\nfor i in range(N):\n if color[i] == -1:\n if not dfs(i, 0):\n flag = False\n break\nif flag:\n ans = color.count(1) * color.count(0) - M\nelse:\n ans = N * (N - 1) \/\/ 2 - M\nprint(ans)\n","change":"insert","i1":0,"i2":0,"j1":0,"j2":4,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03583","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nimin = n \/\/ 4\nflag = False\nfor i in range(imin, 3501):\n jmin = i * n \/\/ (4 * i - n)\n for j in range(jmin, 3501):\n num = i * j * n\n den = 4 * i * j - i * n - j * n\n if den > 0 and num % den == 0:\n k = num \/\/ den\n print(\"{} {} {}\".format(i, j, k))\n flag = True\n if flag:\n break\n","fail":"n = int(input())\nimin = n \/\/ 4\nflag = False\nfor i in range(imin, 3501):\n num = i * n\n den = 4 * i - n\n if den <= 0:\n continue\n jmin = num \/\/ den\n for j in range(jmin, 3501):\n num = i * j * n\n den = 4 * i * j - i * n - j * n\n if den > 0 and num % den == 0:\n k = num \/\/ den\n print(\"{} {} {}\".format(i, j, k))\n flag = True\n break\n if flag:\n break\n","change":"replace","i1":4,"i2":12,"j1":4,"j2":17,"error":"0","stderr":null,"stdout":"1 2 2\n"} {"problem_id":"p03583","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nfor n in range(1, 3501):\n for w in range(1, 3501):\n t = 4 * n * w - N * w - N * n\n if t > 0:\n h = N * n * w \/ t\n if h.is_integer() and h > 0:\n print(int(h), n, w)\n exit()\n","fail":"N = int(input())\n\nfor n in range(1, 3501):\n for w in range(n, 3501):\n t = 4 * n * w - N * w - N * n\n if t > 0:\n h = N * n * w \/ t\n if h.is_integer() and h > 0:\n print(int(h), n, w)\n exit()\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03583","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nfor h in range(3501):\n for w in range(3501):\n bns = n * h * w\n bnb = 4 * h * w - n * (h + w)\n if bns % bnb == 0:\n print(h, w, bns \/\/ bnb)\n break\n","fail":"n = int(input())\n\nfor h in range(1, 3501):\n for w in range(1, 3501):\n bns = n * h * w\n bnb = 4 * h * w - n * (h + w)\n if bnb >= 1 and bns % bnb == 0:\n print(h, w, bns \/\/ bnb)\n exit()\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":9,"error":"ZeroDivisionError: integer division or modulo by zero","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03583\/Python\/s090879179.py\", line 7, in \n if bns % bnb == 0:\nZeroDivisionError: integer division or modulo by zero\n","stdout":null} {"problem_id":"p03583","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nfor h in range(1, 3501):\n for n in range(1, 3501):\n x = 4 * h * n - N * n - N * h\n if x != 0 and N * h * n % x == 0:\n w = N * h * n \/\/ x\n if w >= 1:\n print(h, n, w)\n exit()\n","fail":"from numba import njit\n\nN = int(input())\n\n\n@njit\ndef f():\n for h in range(1, 3501):\n for n in range(1, 3501):\n x = 4 * h * n - N * n - N * h\n if x != 0 and N * h * n % x == 0:\n w = N * h * n \/\/ x\n if w >= 1:\n return h, n, w\n\n\nprint(*f())\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03589","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(input()) for i in range(N)]\n\nA.sort()\nleft = A[0]\nright = A[N - 1]\nans = right - left\nfor i in range((N - 2) \/\/ 2):\n if i % 2 == 0:\n ans += right - A[1 + i]\n ans += A[N - 2 - i] - left\n right = A[1 + i]\n left = A[N - 2 - i]\n else:\n ans += left - A[1 + i]\n ans += A[N - 2 - i] - right\n left = A[1 + i]\n right = A[N - 2 - i]\n\nif N % 2 == 1:\n ans += max(abs(right - A[N \/\/ 2]), abs(left - A[N \/\/ 2]))\n\nprint(ans)\n","fail":"N = int(input())\n\nfor h in range((N + 3) \/\/ 4, 3501):\n for n in range((N + 3) \/\/ 4, 3501):\n a = N * h * n\n b = 4 * h * n - N * (h + n)\n if a > 0 and b > 0 and a % b == 0:\n print(\"{0} {1} {2}\".format(h, n, a \/\/ b))\n exit()\n","change":"replace","i1":1,"i2":23,"j1":1,"j2":9,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03589\/Python\/s709705448.py\", line 2, in \n A = [int(input()) for i in range(N)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03589\/Python\/s709705448.py\", line 2, in \n A = [int(input()) for i in range(N)]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03591","language":"Python","original_status":"Runtime Error","pass":"inn = input()\nans = \"No\"\nif inn[0] == \"Y\" and inn[1] == \"A\" and inn[2] == \"K\" and inn[3] == \"I\":\n ans = \"Yes\"\nprint(ans)\n","fail":"inn = input()\nans = \"No\"\ntry:\n if inn[0] == \"Y\" and inn[1] == \"A\" and inn[2] == \"K\" and inn[3] == \"I\":\n ans = \"Yes\"\nexcept:\n pass\nprint(ans)\n","change":"replace","i1":2,"i2":4,"j1":2,"j2":7,"error":0,"stderr":null,"stdout":"Yes\n"} {"problem_id":"p03597","language":"Python","original_status":"Runtime Error","pass":"# \u5165\u529b : \u6570\u5b572\u3064\nN, A = map(int, input().split())\n\n# \u51fa\u529b\u3000N^2-A\nans = N * N - A\nprint(ans)\n","fail":"# \u5165\u529b : \u6570\u5b572\u3064\nN = int(input())\nA = int(input())\n\n# \u51fa\u529b\u3000N^2-A\nans = N * N - A\nprint(ans)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":3,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03597\/Python\/s414615432.py\", line 2, in \n N, A = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03597","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nprint(a * a - b)\n","fail":"a = int(input())\nb = int(input())\nprint(a * a - b)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03597\/Python\/s423596973.py\", line 1, in \n a, b = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03597","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\nprint(N * N - M)\n","fail":"N = int(input())\nM = int(input())\nprint(N * N - M)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03597\/Python\/s752455381.py\", line 1, in \n N, M = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03599","language":"Python","original_status":"Runtime Error","pass":"A, B, C, D, E, F = list(map(int, input().split()))\n\nwater = set()\nsugar = set()\nres = {}\nnoudo = []\n\ncounter = max([int(F \/ A), int(F \/ B)])\nA_counter = int(F \/ (A * 100))\nB_counter = int(F \/ (B * 100))\nfor i in range(A_counter + 1):\n for j in range(B_counter + 1):\n tmp = A * i * 100 + B * 100 * j\n if tmp <= F:\n water.add(tmp)\n\nC_counter = int(F \/ C)\nD_counter = int(F \/ D)\nfor i in range(C_counter + 1):\n for j in range(D_counter + 1):\n tmp = i * C + D * j\n if tmp < F:\n sugar.add(tmp)\n\nwater.remove(0)\nsugar.remove(0)\n\nfor w in water:\n for s in sugar:\n if w + s <= F and s <= E * (w \/ 100):\n n = s \/ (w + s)\n noudo.append(n)\n res[n] = {\"satoumizu\": w + s, \"sugar\": s}\nans = res[max(noudo)]\n# print(\" \".join([str(ans[\"satoumizu\"]), str(ans[\"sugar\"])]))\nprint(str(ans[\"satoumizu\"]) + \" \" + str(ans[\"sugar\"]))\n","fail":"A, B, C, D, E, F = list(map(int, input().split()))\n\nwater = set()\nsugar = set()\nres = {}\nnoudo = []\n\ncounter = max([int(F \/ A), int(F \/ B)])\nA_counter = int(F \/ (A * 100))\nB_counter = int(F \/ (B * 100))\nfor i in range(A_counter + 1):\n for j in range(B_counter + 1):\n tmp = A * i * 100 + B * 100 * j\n if tmp <= F:\n water.add(tmp)\n\nC_counter = int(F \/ C)\nD_counter = int(F \/ D)\nfor i in range(C_counter + 1):\n for j in range(D_counter + 1):\n tmp = i * C + D * j\n if tmp < F:\n sugar.add(tmp)\n\nwater.remove(0)\n# sugar.remove(0)\n\nfor w in water:\n for s in sugar:\n if w + s <= F and s <= E * (w \/ 100):\n n = s \/ (w + s)\n noudo.append(n)\n res[n] = {\"satoumizu\": w + s, \"sugar\": s}\nans = res[max(noudo)]\n# print(\" \".join([str(ans[\"satoumizu\"]), str(ans[\"sugar\"])]))\nprint(str(ans[\"satoumizu\"]) + \" \" + str(ans[\"sugar\"]))\n","change":"replace","i1":25,"i2":26,"j1":25,"j2":26,"error":"0","stderr":null,"stdout":"110 10\n"} {"problem_id":"p03599","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d, e, f = [int(x) for x in input().strip().split()]\na *= 100\nb *= 100\nif f < a + c:\n print(\"0 0\")\n raise SystemExit\n\nwater_cands = set()\nt = 0\nwhile t <= f:\n water_cands.add(t)\n u = t + b\n while u <= f:\n water_cands.add(u)\n u += b\n t += a\n\nrat, wat, sug = 0.0, 0, 0\nfor w in water_cands:\n suger_limit = min(f - w, w \/\/ 100 * e)\n suger_max = 0\n t = 0\n while t <= suger_limit:\n if suger_max < t:\n suger_max = t\n u = t + d\n while u <= suger_limit:\n if suger_max < u:\n suger_max = u\n u += d\n t += c\n if suger_max \/ (suger_max + w) > rat:\n rat = suger_max \/ (suger_max + w)\n wat = w\n sug = suger_max\n\nprint(wat + sug, sug)\n","fail":"a, b, c, d, e, f = [int(x) for x in input().strip().split()]\na *= 100\nb *= 100\n\nwater_cands = set()\nt = 0\nwhile t <= f:\n water_cands.add(t)\n u = t + b\n while u <= f:\n water_cands.add(u)\n u += b\n t += a\n\nrat, wat, sug = 0.0, a, 0\nfor w in water_cands:\n if w == 0:\n continue\n suger_limit = min(f - w, w \/\/ 100 * e)\n suger_max = 0\n t = 0\n while t <= suger_limit:\n if suger_max < t:\n suger_max = t\n u = t + d\n while u <= suger_limit:\n if suger_max < u:\n suger_max = u\n u += d\n t += c\n if suger_max \/ (suger_max + w) > rat:\n rat = suger_max \/ (suger_max + w)\n wat = w\n sug = suger_max\n\nprint(wat + sug, sug)\n","change":"replace","i1":3,"i2":19,"j1":3,"j2":18,"error":"ZeroDivisionError: division by zero","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03599\/Python\/s072674453.py\", line 32, in \n if suger_max \/ (suger_max + w) > rat:\nZeroDivisionError: division by zero\n","stdout":null} {"problem_id":"p03599","language":"Python","original_status":"Runtime Error","pass":"A, B, C, D, E, F = map(int, input().split())\n\nw = set()\nfor i in range(F \/\/ (100 * A) + 1):\n for j in range(F \/\/ (100 * B) + 1):\n a = (A * i + B * j) * 100\n if a < F:\n w.append(a)\nw.remove(0)\n\nbest_concentration = -1\nbest_a = -1\nbest_b = -1\nfor a in w:\n for i in range((F - a) \/\/ C + 1):\n for j in range((F - a) \/\/ D + 1):\n b = C * i + D * j\n if a + b > F:\n continue\n if b > E * a \/\/ 100:\n continue\n concentration = 100 * b \/ (a + b)\n if concentration > best_concentration:\n best_concentration = concentration\n best_a = a\n best_b = b\nprint(best_a + best_b, best_b)\n","fail":"A, B, C, D, E, F = map(int, input().split())\n\nw = set()\nfor i in range(F \/\/ (100 * A) + 1):\n for j in range(F \/\/ (100 * B) + 1):\n a = (A * i + B * j) * 100\n if a < F:\n w.add(a)\nw.remove(0)\n\nbest_concentration = -1\nbest_a = -1\nbest_b = -1\nfor a in w:\n for i in range((F - a) \/\/ C + 1):\n for j in range((F - a) \/\/ D + 1):\n b = C * i + D * j\n if a + b > F:\n continue\n if b > E * a \/\/ 100:\n continue\n concentration = 100 * b \/ (a + b)\n if concentration > best_concentration:\n best_concentration = concentration\n best_a = a\n best_b = b\nprint(best_a + best_b, best_b)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"AttributeError: 'set' object has no attribute 'append'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03599\/Python\/s680904268.py\", line 8, in \n w.append(a)\nAttributeError: 'set' object has no attribute 'append'\n","stdout":null} {"problem_id":"p03600","language":"Python","original_status":"Runtime Error","pass":"inf = float(\"inf\")\nN = int(input())\nA = []\nfor _ in range(N):\n a = [int(s) for s in input().split()]\n A.append(a)\nd = [a[:] for a in A]\nans = 0\nfor i in range(N - 1):\n for j in range(i + 1, N):\n dmin = min([d[i][k] + d[k][j] for k in range(N) if k not in (i, j)])\n if d[i][j] > dmin:\n print(-1)\n exit()\n if d[i][j] != dmin:\n ans += d[i][j]\nprint(ans)\n","fail":"inf = float(\"inf\")\nN = int(input())\nA = []\nfor _ in range(N):\n a = [int(s) for s in input().split()]\n A.append(a)\nd = [a[:] for a in A]\nans = 0\nfor i in range(N - 1):\n for j in range(i + 1, N):\n dmin = min([inf] + [d[i][k] + d[k][j] for k in range(N) if k not in (i, j)])\n if d[i][j] > dmin:\n print(-1)\n exit()\n if d[i][j] != dmin:\n ans += d[i][j]\nprint(ans)\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03600","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\nimport numpy as np\nfrom scipy.sparse.csgraph import floyd_warshall\n\n\ndef main():\n N = int(input())\n matr = [tuple(map(int, input().split())) for _ in range(N)]\n way = floyd_warshall(matr).astype(int)\n if np.any(way < matr):\n print(-1)\n exit()\n\n ans = 0\n for a, b in itertools.combinations(range(N), 2):\n for c in range(N):\n if c == a or c == b:\n continue\n if matr[a][b] == matr[a][c] + matr[c][b]:\n break\n else:\n ans += matr[a][b]\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import itertools\nimport numpy as np\nfrom scipy.sparse.csgraph import floyd_warshall\n\n\ndef main():\n N = int(input())\n matr = np.array([tuple(map(int, input().split())) for _ in range(N)], dtype=np.int64)\n way = floyd_warshall(matr).astype(int)\n if np.any(way < matr):\n print(-1)\n exit()\n\n ans = 0\n for a, b in itertools.combinations(range(N), 2):\n eq = matr[a, b] == (matr[a] + matr[:, b])\n eq[a] = eq[b] = False\n if not np.any(eq):\n ans += matr[a, b]\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":7,"i2":22,"j1":7,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03600","language":"Python","original_status":"Runtime Error","pass":"from scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse import csr_matrix\n\nimport numpy as np\n\nn = int(input())\na = [list(map(int, input().split())) for _ in range(n)]\n\na = np.array(a)\n\ng = csr_matrix(a)\ndist = floyd_warshall(g)\n\nbl = dist == a\n\nif bl.all():\n sm = dist.sum()\n for u in range(n):\n for v in range(n):\n if u == v:\n continue\n rmv = [u, v]\n i_rmv = np.ones(n, dtype=bool)\n i_rmv[rmv] = False\n\n mn = np.min(dist[u, i_rmv] + dist[v, i_rmv])\n if mn == dist[u, v]:\n sm -= dist[u, v]\n\n ans = int(sm) \/\/ 2\n print(ans)\n\nelse:\n print(-1)\n","fail":"from scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse import csr_matrix\n\nimport numpy as np\n\nn = int(input())\na = [list(map(int, input().split())) for _ in range(n)]\n\na = np.array(a)\n\ng = csr_matrix(a)\ndist = floyd_warshall(g)\n\nbl = dist == a\n\nif bl.all():\n sm = dist.sum()\n INF = 10**18 + 1\n inf = np.array([INF] * n)\n inf = np.diag(inf)\n dist += inf\n for u in range(n):\n for v in range(n):\n if u == v:\n continue\n\n mn = np.min(dist[u] + dist[v])\n if mn == dist[u, v]:\n sm -= dist[u, v]\n\n ans = int(sm) \/\/ 2\n print(ans)\n\nelse:\n print(-1)\n","change":"replace","i1":17,"i2":26,"j1":17,"j2":27,"error":"ModuleNotFoundError: No module named 'scipy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03600\/Python\/s873571990.py\", line 1, in \n from scipy.sparse.csgraph import floyd_warshall\nModuleNotFoundError: No module named 'scipy'\n","stdout":null} {"problem_id":"p03600","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [tuple(map(int, input().split())) for _ in range(N)]\nseen = [[False] * N for _ in range(N)]\n\nans = 0\n\nfor i in range(N - 1):\n for j in range(i + 1, N):\n # i\u304b\u3089j\u306b\u884c\u304f\u30eb\u30fc\u30c8\u3092\u8003\u3048\u308b\n path_IJ = A[i][j]\n use = [(i, j)]\n for k in range(N):\n if i == k or j == k:\n continue\n path_IKJ = A[i][k] + A[k][j]\n\n if path_IJ > path_IKJ:\n print(-1)\n exit()\n elif path_IJ == path_IKJ:\n use = [(i, k), (k, j)]\n else:\n pass\n\n for x, y in use:\n x, y = min(x, y), max(x, y)\n if not seen[x][y]:\n ans += A[x][y]\n seen[x][y] = True\nprint(ans)\n","fail":"import sys\n\ninput = sys.stdin.buffer.readline\nsys.setrecursionlimit(10**7)\n\n\ndef road():\n N = int(input())\n A = tuple(tuple(map(int, input().split())) for _ in range(N))\n\n res = 0\n for s in range(N - 1):\n for t in range(s + 1, N):\n # s-t\u9593\u306b\u8fba\u3092\u5f35\u308b\u304b\u3092\u6c7a\u3081\u308b\n dist = A[s][t]\n is_connect = True\n for m in range(N):\n if m in [s, t]:\n continue\n d = A[s][m] + A[m][t]\n if d < dist:\n return -1\n elif d == dist:\n is_connect = False\n if is_connect:\n res += dist\n return res\n\n\nif __name__ == \"__main__\":\n print(road())\n","change":"replace","i1":0,"i2":30,"j1":0,"j2":31,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03601","language":"Python","original_status":"Time Limit Exceeded","pass":"A, B, C, D, E, F = map(int, input().split())\n\ntmp = 0\nans_A = 0\nans_B = 0\nfor a in range(31):\n for b in range(31):\n x = 100 * (a * A + b * B)\n for c in range((x \/\/ 100 * E) \/\/ C + 1):\n for d in range(((x \/\/ 100 * E) - c) \/\/ D + 1):\n y = c * C + d * D\n if x + y > F or y > x * E \/\/ 100:\n break\n if x + y != 0:\n if y \/ (x + y) > tmp:\n ans_A = x + y\n ans_B = y\n tmp = y \/ (x + y)\n\nif ans_A == 0:\n print(100 * A, 0)\nelse:\n print(ans_A, ans_B)\n","fail":"A, B, C, D, E, F = map(int, input().split())\n\ntmp = 0\nans_A = 0\nans_B = 0\nfor a in range(31):\n for b in range(31):\n x = 100 * (a * A + b * B)\n if x > F:\n break\n for c in range((x \/\/ 100 * E) \/\/ C + 1):\n for d in range(((x \/\/ 100 * E) - c) \/\/ D + 1):\n y = c * C + d * D\n if x + y > F or y > x * E \/\/ 100:\n break\n if x + y != 0:\n if y \/ (x + y) > tmp:\n ans_A = x + y\n ans_B = y\n tmp = y \/ (x + y)\n\nif ans_A == 0:\n print(100 * A, 0)\nelse:\n print(ans_A, ans_B)\n","change":"insert","i1":8,"i2":8,"j1":8,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03601","language":"Python","original_status":"Runtime Error","pass":"from itertools import product\n\na, b, c, d, e, f = map(int, input().split())\n\nlima = [100 * a * i for i in range(f \/\/ (100 * a) + 1)]\nlimb = [100 * b * i for i in range(f \/\/ (100 * b) + 1)]\nsetw = set([i + j for i, j in product(lima, limb) if 0 < i + j <= f])\nlimc = [c * i for i in range(f \/\/ c + 1)]\nlimd = [d * i for i in range(f \/\/ d + 1)]\nsets = set([i + j for i, j in product(limc, limd) if 0 < i + j <= f])\n\ncnt = 0\nfor w in setw:\n for s in sets:\n if (cnt <= 100 * s \/ w <= e) and (s + w <= f):\n cnt = 100 * s \/ w\n ans = s + w, s\nelse:\n print(*ans)\n","fail":"from itertools import product\n\na, b, c, d, e, f = map(int, input().split())\n\nlima = [100 * a * i for i in range(f \/\/ (100 * a) + 1)]\nlimb = [100 * b * i for i in range(f \/\/ (100 * b) + 1)]\nsetw = set([i + j for i, j in product(lima, limb) if 0 < i + j <= f])\nlimc = [c * i for i in range(f \/\/ c + 1)]\nlimd = [d * i for i in range(f \/\/ d + 1)]\nsets = set([i + j for i, j in product(limc, limd) if 0 < i + j <= f])\n\ncnt, ans = 0, (max(setw), 0)\nfor w in setw:\n for s in sets:\n if (cnt <= 100 * s \/ w <= e) and (s + w <= f):\n cnt = 100 * s \/ w\n ans = s + w, s\nelse:\n print(*ans)\n","change":"replace","i1":11,"i2":12,"j1":11,"j2":12,"error":"0","stderr":null,"stdout":"110 10\n"} {"problem_id":"p03602","language":"Python","original_status":"Runtime Error","pass":"def solve(n, tbl):\n ans = 0\n for i, row_i in enumerate(tbl):\n for j in range(i + 1, n):\n row_j = tbl[j]\n ij = row_i[j]\n mind = min(ik + kj for ik, kj in zip(row_i, row_j) if ik and kj)\n if ij > mind:\n return -1\n if ij < mind:\n ans += ij\n return ans\n\n\nn = int(input())\ntbl = [list(map(int, input().split())) for _ in range(n)]\nprint(solve(n, tbl))\n","fail":"def solve(n, tbl):\n ans = 0\n for i, row_i in enumerate(tbl):\n for j in range(i + 1, n):\n row_j = tbl[j]\n ij = row_i[j]\n mind = min(\n (ik + kj for ik, kj in zip(row_i, row_j) if ik and kj),\n default=float(\"inf\"),\n )\n if ij > mind:\n return -1\n if ij < mind:\n ans += ij\n return ans\n\n\nn = int(input())\ntbl = [list(map(int, input().split())) for _ in range(n)]\nprint(solve(n, tbl))\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":10,"error":0,"stderr":null,"stdout":3} {"problem_id":"p03606","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nlr = [0] * n\nfor i in range(n):\n lr[i] = list(map(int, int().split()))\ns = 0\nfor i, j in lr:\n s += j - i + 1\nprint(s)\n","fail":"n = int(input())\ns = 0\nfor i in range(n):\n l, r = map(int, input().split())\n s += r - l + 1\nprint(s)\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":5,"error":"AttributeError: 'int' object has no attribute 'split'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03606\/Python\/s375896966.py\", line 4, in \n lr[i] = list(map(int, int().split()))\nAttributeError: 'int' object has no attribute 'split'\n","stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nans = 0\nA_list = [int(input()) for i in range(N)]\nA_set = set(A_list)\nfor i in A_set:\n if A_list.count(i) % 2 == 1:\n ans += 1\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\nfrom itertools import permutations, combinations\nfrom fractions import gcd\nfrom collections import Counter\nfrom math import sqrt\nimport sys\n\ninput = sys.stdin.readline\n\n\ndef lcm(x, y):\n return x * y \/\/ gcd(x, y)\n\n\ndef small_letters():\n return [chr(i) for i in range(97, 97 + 26)]\n\n\ndef capital_letters():\n return [chr(i) for i in range(65, 65 + 26)]\n\n\ndef main():\n \"\"\"\u3053\u3053\u306b\u66f8\u3044\u3066\u306d\"\"\"\n N = int(input())\n A_list = [int(input()) for i in range(N)]\n ans = 0\n counter = Counter(A_list)\n for i in counter.values():\n if i % 2 == 1:\n ans += 1\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":36,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\nls = []\n\nfor _ in range(n):\n a = int(input())\n if a not in ls:\n ls.append(a)\n else:\n ls.remove(a)\n\nprint(len(ls))\n","fail":"from collections import defaultdict\n\nn = int(input())\nd = defaultdict(int)\ncnt = 0\n\nfor _ in range(n):\n d[int(input())] += 1\n\nfor i in d.values():\n if i % 2 == 1:\n cnt += 1\n\nprint(cnt)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\na = []\nfor _ in range(n):\n p = int(input())\n if p not in a:\n a.append(p)\n else:\n a.remove(p)\n\nprint(len(a))\n","fail":"n = int(input())\n\na = [int(input()) for _ in range(n)]\n\na = sorted(a)\n\nans = n\nflag = 0\nfor i in range(1, n):\n if a[i] != a[i - 1] or flag == 1:\n flag = 0\n else:\n flag = 1\n ans -= 2\n\nprint(ans)\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nm = set()\nwhile n:\n x = int(input())\n if x in m:\n m.remove(x)\n else:\n m.add(x)\nprint(len(m))\n","fail":"n = int(input())\nm = set()\nwhile n:\n x = int(input())\n if x in m:\n m.remove(x)\n else:\n m.add(x)\n n -= 1\nprint(len(m))\n","change":"insert","i1":8,"i2":8,"j1":8,"j2":9,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03607\/Python\/s158359519.py\", line 4, in \n x = int(input())\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\nN = int(input())\nA = [int(input()) for _ in range(N)]\nc = Counter(A)\nprint(len([i for i in c if c.values(i) % 2 == 1]))\n","fail":"from collections import Counter\n\nN = int(input())\nA = [int(input()) for _ in range(N)]\nc = Counter(A).values()\n\nprint(len([i for i in c if i % 2 == 1]))\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":7,"error":"TypeError: dict.values() takes no arguments (1 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03607\/Python\/s453374209.py\", line 6, in \n print(len([i for i in c if c.values(i) % 2 == 1]))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03607\/Python\/s453374209.py\", line 6, in \n print(len([i for i in c if c.values(i) % 2 == 1]))\nTypeError: dict.values() takes no arguments (1 given)\n","stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = [int(input()) for i in range(n)]\n\nb = list()\nlenB = 0\nfor a in A:\n b.append(a)\n lenB += 1\n if len(set(b)) != lenB:\n b.pop(-1)\n b.remove(a)\n lenB -= 2\nprint(len(b))\n","fail":"n = int(input())\nA = [int(input()) for i in range(n)]\n\nb = set()\nlenB = 0\nfor a in A:\n b.add(a)\n lenB += 1\n if len(b) != lenB:\n b.remove(a)\n lenB -= 2\nprint(len(b))\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list([int(input()) for _ in range(N)])\nans = []\n\nfor a in A:\n if a not in ans:\n ans.append(a)\n else:\n ans.remove(a)\nprint(len(ans))\n","fail":"import collections\n\nN = int(input())\nA = list([int(input()) for _ in range(N)])\nA = collections.Counter(A).values()\n\nans = [x for x in A if x & 1]\nprint(len(ans))\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nans = []\nfor _ in range(n):\n a = int(input())\n if a in ans:\n ans.pop(ans.index(a))\n else:\n ans.append(a)\nprint(len(ans))\n","fail":"import collections\n\nn = int(input())\na = [int(input()) for _ in range(n)]\nc = collections.Counter(a)\n\nprint(len(list(filter(lambda x: x[1] % 2 == 1, c.items()))))\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\ncounter = 0\n\nwhile A:\n x = A[0]\n if A.count(x) % 2 == 1:\n counter += 1\n A = [i for i in A if i != x]\n\nprint(counter)\n","fail":"N = int(input())\nmaps = {}\n\nfor _ in range(N):\n A = int(input())\n if A in maps:\n maps.pop(A)\n else:\n maps[A] = 1\n\nprint(len(maps))\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"count = 0\nN = int(input())\nstring = list(map(int, [input() for i in range(N)]))\nfor i in set(string):\n if string.count(i) % 2 != 0:\n count += 1\nprint(count)\n","fail":"N = int(input())\nL = set()\nfor i in range(N):\n L ^= {input()}\nprint(len(L))\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\nn = int(sys.stdin.readline())\na_list = [int(x) for x in sys.stdin.readlines()]\na_list_index = list(set(a_list))\ncount = 0\nfor i in a_list_index:\n if a_list.count(i) % 2 == 0:\n continue\n else:\n count += 1\n\nprint(count)\n","fail":"import sys\nimport collections\n\nn = int(sys.stdin.readline())\na_list = [int(x) for x in sys.stdin.readlines()]\na_list_counter = collections.Counter(a_list)\ncount = 0\nfor i in a_list_counter:\n if a_list_counter[i] % 2 != 0:\n count += 1\n else:\n continue\nprint(count)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\np = []\n\nfor i in A:\n if i not in p:\n p.append(i)\n else:\n p.remove(i)\n\nprint(len(p))\n","fail":"from collections import Counter\n\nN = int(input())\nA = [int(input()) for _ in range(N)]\n\nres = 0\n\nc = Counter(A)\n\nfor i in c.values():\n if i % 2 != 0:\n res += 1\n\nprint(res)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"import collections\n\nN = int(input())\nA = [int(input()) for i in range(N)]\n\nAdic = collections.Counter(A)\n\nB = [n % 2 for n in Adic.values()]\n\nwhile 0 in B:\n B.remove(0)\n\nprint(len(B))\n","fail":"import collections\n\nN = int(input())\nA = [int(input()) for i in range(N)]\n\nAdic = collections.Counter(A)\n\nB = [n % 2 for n in Adic.values()]\n\nprint(B.count(1))\n","change":"replace","i1":9,"i2":13,"j1":9,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\npaper = [0] * 100000\n\nfor a in A:\n paper[a - 1] += 1\n\nans = len(list(filter(lambda x: x % 2 == 1, paper)))\nprint(ans)\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\npaper = {}\n\nfor a in A:\n paper.setdefault(a - 1, 0)\n paper[a - 1] += 1\n\nans = len(list(filter(lambda x: x % 2 == 1, paper.values())))\nprint(ans)\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":10,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(input()) for _ in range(n)]\n\nc = [a.count(x) for x in set(a)]\nprint(len([x for x in c if x % 2 == 1]))\n","fail":"n = int(input())\na = [int(input()) for _ in range(n)]\na.sort()\n\ny = a[0]\nc = 1\nans = 0\nfor i in range(1, n):\n if a[i] == y:\n c += 1\n else:\n if c % 2 == 1:\n ans += 1\n y = a[i]\n c = 1\n\nif c % 2 == 1:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\nB = []\nfor a in A:\n if a in B:\n B.remove(a)\n else:\n B.append(a)\n\nprint(len(B))\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\nA.sort()\nA.append(10**9 + 1)\n\nnow = 0\ncnt = 0\nans = 0\nfor a in A:\n if a == now:\n cnt += 1\n else:\n now = a\n ans += cnt % 2\n cnt = 1\n\nprint(ans)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(input()) for _ in range(n)]\n\nd = []\nfor i in range(n):\n if a[i] in d:\n d.remove(a[i])\n else:\n d.append(a[i])\nprint(len(d))\n","fail":"from collections import Counter\n\nn = int(input())\na = Counter([int(input()) for _ in range(n)])\n\nans = 0\nfor key in a.keys():\n if a[key] % 2:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"loops = int(input())\npaper = []\n\n# 1 <= loops <= 10^6\nfor _ in range(loops):\n num = int(input())\n if num in paper:\n paper.remove(num)\n else:\n paper.append(num)\nprint(len(paper))\n","fail":"loops = int(input())\nd = {}\n\n# 10^6\nfor _ in range(loops):\n key = input()\n if key not in d: # ?\n d[key] = 1\n else:\n d[key] += 1\n\n# 10^6\nans = 0\nfor k, v in d.items():\n if v % 2 != 0:\n ans += 1\nprint(ans)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nW = []\nfor _ in range(N):\n n = input()\n if n in W:\n W.remove(n)\n else:\n W.append(n)\nprint(len(W))\n","fail":"import collections\n\nN = int(input())\nW = [int(input()) for _ in range(N)]\nc = collections.Counter(W)\nprint(len([i for i in c.values() if i % 2 != 0]))\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\npaper = []\nfor i in range(N):\n if not A[i] in paper:\n paper.append(A[i])\n else:\n paper.remove(A[i])\n\nprint(len(paper))\n","fail":"import collections\n\nN = int(input())\nA = [int(input()) for _ in range(N)]\n\nans = 0\nAcount = collections.Counter(A)\n\nfor i in Acount:\n if Acount[i] % 2 == 1:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nans = 0\nnums = set([])\nfor _ in range(N):\n A = int(input())\n if A in nums:\n ans -= 1\n nums.clear(A)\n else:\n ans += 1\n nums.add(A)\nprint(ans)\n","fail":"N = int(input())\nans = 0\nnums = set()\nfor _ in range(N):\n A = int(input())\n if A in nums:\n ans -= 1\n nums.remove(A)\n else:\n ans += 1\n nums.add(A)\nprint(ans)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":8,"error":"TypeError: set.clear() takes no arguments (1 given)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03607\/Python\/s903001510.py\", line 8, in \n nums.clear(A)\nTypeError: set.clear() takes no arguments (1 given)\n","stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\nn, *a = map(int, open(0).read().split())\nb = [0] * (10**5 + 1)\nfor i in a:\n b[i] += 1\nprint(sum(i % 2 > 0 for i in b))\n","fail":"#!\/usr\/bin\/env python3\nfrom collections import defaultdict\n\nn, *a = map(int, open(0).read().split())\nb = defaultdict(int)\nfor i in a:\n b[i] += 1\nprint(sum(i % 2 > 0 for i in b.values()))\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":8,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nimport sys\n\n\ndef main():\n _ = sys.stdin.readline()\n arr = []\n for line in sys.stdin:\n num = line.rstrip()\n if num in arr:\n arr.remove(num)\n else:\n arr.append(num)\n print(len(arr))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"# -*- coding: utf-8 -*-\n\nimport sys\n\n\ndef main():\n _ = sys.stdin.readline()\n arr = set()\n for line in sys.stdin:\n num = line.rstrip()\n if num in arr:\n arr.remove(num)\n else:\n arr.add(num)\n print(len(arr))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":7,"i2":14,"j1":7,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\nresult = []\nfor a in A:\n if a in result:\n result.remove(a)\n else:\n result.append(a)\nprint(len(result))\n","fail":"from collections import Counter\n\nN = int(input())\nA = Counter([int(input()) for _ in range(N)])\nnum = 0\nfor a, n in A.items():\n if n % 2 == 1:\n num += 1\nprint(num)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(input()) for _ in range(n)]\ncnt = 0\na_set = set(a)\nfor i in a_set:\n if a.count(i) % 2 != 0:\n cnt += 1\nprint(cnt)\n","fail":"n = int(input())\nD = {}\ncnt = 0\nfor _ in range(n):\n a = int(input())\n if a not in D:\n D[a] = 1\n else:\n D[a] += 1\nfor i in D:\n if D[i] % 2 != 0:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03607","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [input() for _ in range(N)]\n\nd = []\nfor i in A:\n if i in d:\n d.remove(i)\n else:\n d.append(i)\nprint(len(d))\n","fail":"from collections import Counter\n\nN = int(input())\nA = [input() for _ in range(N)]\n\nres = 0\n# print(Counter(A))\n\nc = Counter(A)\nfor i in c.values():\n res += i % 2\nprint(res)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03608","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\nn, m, R = map(int, input().split())\nr = list(map(int, input().split()))\ndis = [[float(\"inf\") for _ in range(n)] for _ in range(n)]\nfor _ in range(m):\n a, b, c = map(int, input().split())\n dis[a - 1][b - 1] = c\n dis[b - 1][a - 1] = c\n\nfor k in range(n):\n for i in range(n):\n for j in range(n):\n if dis[i][j] > dis[i][k] + dis[k][j]:\n dis[i][j] = dis[i][k] + dis[k][j]\n\n\n_min = float(\"inf\")\nit = itertools.permutations(r)\nfor iterR in it:\n _dis = 0\n start = iterR[0] - 1\n for end in iterR[1:]:\n _dis += dis[start][end - 1]\n start = end - 1\n _min = min(_min, _dis)\nprint(_min)\n","fail":"import itertools\n\nn, m, R = map(int, input().split())\nr = list(map(int, input().split()))\ndis = [[float(\"inf\") for _ in range(n)] for _ in range(n)]\nfor _ in range(m):\n a, b, c = map(int, input().split())\n dis[a - 1][b - 1] = c\n dis[b - 1][a - 1] = c\n\n\ndef war(dis):\n for k in range(n):\n for i in range(n):\n for j in range(n):\n if dis[i][j] > dis[i][k] + dis[k][j]:\n dis[i][j] = dis[i][k] + dis[k][j]\n return dis\n\n\ndis = war(dis)\n_min = float(\"inf\")\nit = itertools.permutations(r)\nfor iterR in it:\n _dis = 0\n start = iterR[0] - 1\n for end in iterR[1:]:\n _dis += dis[start][end - 1]\n start = end - 1\n _min = min(_min, _dis)\nprint(_min)\n","change":"replace","i1":10,"i2":17,"j1":10,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03609","language":"Python","original_status":"Runtime Error","pass":"print(max(int(input()) - int(input()), 0))\n","fail":"x, t = list(map(int, input().split()))\nprint(max((x - t), 0))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: invalid literal for int() with base 10: '100 17'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03609\/Python\/s297739432.py\", line 1, in \n print(max(int(input()) - int(input()), 0))\nValueError: invalid literal for int() with base 10: '100 17'\n","stdout":null} {"problem_id":"p03610","language":"Python","original_status":"Runtime Error","pass":"s = input()\nsnum = len(s)\nharf_snum = snum \/\/ 2\n\ns_odd = []\nfor i in range(harf_snum + 1):\n s_odd.append(s[i * 2])\nprint(\"\".join(s_odd))\n","fail":"s = input()\n\ns_odd = []\nfor i in range(0, len(s)):\n if i % 2 == 0:\n s_odd.append(s[i])\n\nprint(\"\".join(s_odd))\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":7,"error":"0","stderr":null,"stdout":"acdr\n"} {"problem_id":"p03610","language":"Python","original_status":"Runtime Error","pass":"s = list(int(input()))\nprint(s[1::2])\n","fail":"s = input()\nprint(s[::2])\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'atcoder'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03610\/Python\/s676268610.py\", line 1, in \n s = list(int(input()))\nValueError: invalid literal for int() with base 10: 'atcoder'\n","stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nL = list(map(int, input().split()))\n\n# \u5148\u306bx\u3092\u9078\u3093\u3067\u304a\u304f\uff01\nans = 0\nm = max(L) + 1\nfor i in range(m):\n cm = L.count(i - 1)\n ce = L.count(i)\n cl = L.count(i + 1)\n ans = max(ans, cm + ce + cl)\n\nprint(ans)\n","fail":"from collections import Counter\n\nN = int(input())\nL = list(map(int, input().split()))\nc = Counter(L)\n# print(c)\n# \u5148\u306bx\u3092\u9078\u3093\u3067\u304a\u304f\uff01\nans = 0\nm = max(L) + 1\nfor i in range(m):\n ans = max(ans, c[i - 1] + c[i] + c[i + 1])\n\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na_lst = [int(x) for x in input().split()]\n\nmax_a = -1\nmax_cnt = -1\n\nfor a in a_lst:\n if max_a < a:\n max_a = a\nfor x in range(max_a + 1):\n cnt = 0\n for a in a_lst:\n if x - 1 <= a and a <= x + 1:\n cnt += 1\n if max_cnt < cnt:\n max_cnt = cnt\nprint(max_cnt)\n","fail":"N = int(input())\na_lst = [int(x) for x in input().split()]\n\ndict = {}\n\nfor a in a_lst:\n if not a - 1 in dict.keys():\n dict[a - 1] = 1\n else:\n dict[a - 1] += 1\n if not a in dict.keys():\n dict[a] = 1\n else:\n dict[a] += 1\n if not a + 1 in dict.keys():\n dict[a + 1] = 1\n else:\n dict[a + 1] += 1\nval_lst = list(dict.values())\nval_lst.sort(reverse=True)\nprint(val_lst[0])\n","change":"replace","i1":3,"i2":17,"j1":3,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Runtime Error","pass":"import statistics\n\nN = int(input())\na = list(map(int, input().split()))\n\nb = []\nc = []\nfor i in range(N):\n b.append(a[i] - 1)\n c.append(a[i] + 1)\n\nx = a + b + c\ny = statistics.mode(x)\n\nprint(x.count(y))\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\nb = []\nc = []\nfor i in range(N):\n if a[i] > 0:\n b.append(a[i] - 1)\n c.append(a[i] + 1)\n else:\n c.append(a[i] + 1)\n\nabc = a + b + c\ncount = [0] * (max(abc) + 1)\n\nfor x in abc:\n count[x] += 1\n\nprint(max(count))\n","change":"replace","i1":0,"i2":15,"j1":0,"j2":19,"error":"0","stderr":null,"stdout":"4\n"} {"problem_id":"p03611","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\nN = int(input())\nA = list(map(int, input().split()))\n\nif N >= 3:\n counter = Counter(A)\n m = min(A)\n M = max(A)\n cnt = []\n for i in range(m, M - 1):\n ans = counter[i] + counter[i + 1] + counter[i + 2]\n if ans:\n cnt.append(ans)\n print(cnt)\n print(max(cnt))\n\nelif N == 2:\n if abs(A[0] - A[1]) <= 2:\n print(2)\n else:\n print(1)\n\nelif N == 1:\n print(1)\n","fail":"import numpy as np\n\nN = int(input())\nA = np.bincount(np.array(list(map(int, input().split()))))\n\nB = A.copy()\nB[1:] += A[:-1]\nB[:-1] += A[1:]\n\nanswer = B.max()\nprint(answer)\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":11,"error":"WA","stderr":null,"stdout":"[4]\n[4, 3]\n[4, 3, 3]\n[4, 3, 3, 2]\n[4, 3, 3, 2, 1]\n[4, 3, 3, 2, 1]\n[4, 3, 3, 2, 1, 1]\n4\n"} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nn = int(input())\na = list(map(int, input().split()))\n\nans = 0\nc = Counter(a).most_common()\nfor i in range(min(a), max(a) + 1):\n temp = [value if abs(i - key) <= 1 else 0 for key, value in c]\n ans = max(ans, sum(temp))\n\nprint(ans)\n","fail":"from collections import Counter\n\nn = int(input())\na = list(map(int, input().split()))\n\nx = []\nfor i in a:\n x.append(i)\n x.append(i + 1)\n x.append(i - 1)\n\nans = max(Counter(x).values())\nprint(ans)\n","change":"replace","i1":5,"i2":11,"j1":5,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nb = [i - 1 for i in a]\nc = [i + 1 for i in a]\n\na.extend(b)\na.extend(c)\nf = set(a)\nans = 0\nfor i in f:\n ans = max(ans, a.count(i))\n\nprint(ans)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\nN = 10**5\ncnt = [0 for i in range(N + 2)]\n# index 0 == -1\nfor i in a:\n cnt[i] += 1\n cnt[i + 1] += 1\n cnt[i + 2] += 1\n\nprint(max(cnt))\n","change":"replace","i1":3,"i2":14,"j1":3,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Runtime Error","pass":"# \u30cf\u30c3\u30b7\u30e5\u3067\u6570\u3048\u3066\u30ad\u30fc\u3067\u30bd\u30fc\u30c8\u3057\u3066+-1\u3092\u5168\u63a2\u7d22\nn = int(input())\narr = list(map(int, input().split()))\nhash = dict()\nfor a in arr:\n if a in hash:\n hash[a] += 1\n else:\n hash[a] = 1\n\nlis = list(sorted(hash.items(), key=lambda x: x[0]))\n\nans = 0\nfor i in range(1, n - 2):\n temp = lis[i][1]\n if lis[i - 1][0] + 1 == lis[i][0]:\n temp += lis[i - 1][1]\n if lis[i + 1][0] - 1 == lis[i][0]:\n temp += lis[i + 1][1]\n ans = max(ans, temp)\n\nprint(ans)\n","fail":"# \u30cf\u30c3\u30b7\u30e5\u3067\u6570\u3048\u3066\u30ad\u30fc\u3067\u30bd\u30fc\u30c8\u3057\u3066+-1\u3092\u5168\u63a2\u7d22\n# \u3068\u601d\u3063\u305f\u3051\u3069\u767b\u5834\u3057\u3066\u306a\u3044\u3084\u3064\u3067\u3082\u3044\u3051\u308b 3 5 \u306a\u30894\u304c2\u500b\u306b\u306a\u308b\u306e\u3067N\u500b\u304b\u3089\u5168\u63a2\u7d22\n\nn = int(input())\narr = list(map(int, input().split()))\nlis = [0 for _ in range(10**5 + 1)]\nhash = dict()\nfor a in arr:\n lis[a] += 1\n\nans = 1\nfor i in range(1, 10**5):\n ans = max(ans, lis[i - 1] + lis[i] + lis[i + 1])\n\nprint(ans)\n","change":"replace","i1":1,"i2":20,"j1":1,"j2":13,"error":"0","stderr":null,"stdout":"4\n"} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nA = set(a)\n\nans = 0\nfor i in A:\n cnt = 0\n J = [i, i - 1, i + 1]\n for j in J:\n if j in a:\n cnt += a.count(j)\n ans = max(ans, cnt)\nprint(ans)\n","fail":"N = int(input())\na = sorted(list(map(int, input().split())))\n\ncnt = [0] * (10**5 + 2)\n\nfor i in a:\n cnt[i] += 1\n cnt[i + 1] += 1\n cnt[i + 2] += 1\n\nprint(max(cnt))\n","change":"replace","i1":1,"i2":14,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nnumbers = list(map(int, input().split()))\n\n# max_x = max(numbers) + 1\n# max_x = int(sum(numbers) \/ len(numbers))\nres = 0\ntest = set()\nfor n in numbers:\n test.add(n)\n test.add(n - 1)\n test.add(n + 1)\n\n# for i in range(max_x + 1):\nfor i in test:\n c = 0\n for n in numbers:\n if n - 1 == i or n == i or n + 1 == i:\n c += 1\n if res < c:\n res = c\n\nprint(res)\n","fail":"N = int(input())\n\nnumbers = list(map(int, input().split()))\n\n# max_x = max(numbers) + 1\n# max_x = int(sum(numbers) \/ len(numbers))\n# res = 0\ntest = set()\nfor n in numbers:\n test.add(n)\n test.add(n - 1)\n test.add(n + 1)\nlength = len(test)\nres = {}\n# print(test)\n# for i in range(max_x + 1):\nfor n in numbers:\n c = 0\n sub = set([n - 1, n, n + 1]) & test\n # print(sub)\n for s in sub:\n if res.get(s) is None:\n res[s] = 1\n else:\n res[s] += 1\n# for i in test:\n# c = 0\n# for n in numbers:\n# if n - 1 == i or n == i or n + 1 == i:\n# c += 1\n# if res < c:\n# res = c\n\n# print(res)\nres = max(res.values())\nprint(res)\n","change":"replace","i1":6,"i2":22,"j1":6,"j2":35,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03611","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\n\nnum = [0 for i in range(3)]\nnum[0] = a.count(0)\nnum[1] = a.count(1)\n\nans = 0\nfor X in range(1, 100000):\n num[(X % 3) - 2] = a.count(X + 1)\n ans = max(ans, sum(num))\n\nprint(ans)\n","fail":"N = int(input())\na = list(map(int, input().split()))\n\nnum = [0 for i in range(100000)]\nfor aa in a:\n num[aa] += 1\n\nans = 0\nfor X in range(1, 99999):\n ans = max(ans, sum(num[X - 1 : X + 2]))\n\nprint(ans)\n","change":"replace","i1":3,"i2":11,"j1":3,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nplist = list(map(int, input().split()))\nans = 0\nfor i in range(N):\n if plist[i] == i + 1:\n plist[i], plist[i + 1] = plist[i + 1], plist[i]\n ans += 1\nif plist[-1] == N:\n ans += 1\nprint(ans)\n","fail":"N = int(input())\nplist = list(map(int, input().split()))\nans = 0\nfor i in range(N - 1):\n if plist[i] == i + 1:\n plist[i], plist[i + 1] = plist[i + 1], plist[i]\n ans += 1\nif plist[-1] == N:\n ans += 1\nprint(ans)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\np = list(map(int, input().split()))\nans = 0\nfor i in range(N):\n if p[i] == i + 1:\n ans += 1\n p[i], p[i + 1] = p[i + 1], p[i]\nif p[-1] == N:\n ans += 1\nprint(ans)\n","fail":"N = int(input())\np = list(map(int, input().split()))\nans = 0\nfor i in range(N - 1):\n if p[i] == i + 1:\n ans += 1\n p[i], p[i + 1] = p[i + 1], p[i]\nif p[-1] == N:\n ans += 1\nprint(ans)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\np = list(map(int, input().split()))\n# print(p)\ncount = 0\nfor i in range(len(p)):\n # print(p[i])\n if i + 1 == p[i]:\n tmp = p[i]\n p[i] = p[i + 1]\n p[i + 1] = tmp\n count += 1\nprint(count)\n","fail":"N = int(input())\np = list(map(int, input().split()))\ncount = 0\nfor i in range(len(p)):\n if i + 1 == p[i]:\n if i + 1 != len(p):\n tmp = p[i]\n p[i] = p[i + 1]\n p[i + 1] = tmp\n count += 1\n else:\n tmp = p[i]\n p[i] = p[i - 1]\n p[i - 1] = tmp\n count += 1\n\nprint(count)\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":16,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Time Limit Exceeded","pass":"def resolve():\n n = int(input())\n p = list(map(int, input().split()))\n ans = 0\n while any(i + 1 == p[i] for i in range(n)):\n for i in range(n - 1):\n if i + 1 == p[i]:\n p[i], p[i + 1] = p[i + 1], p[i]\n ans += 1\n print(ans)\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n n = int(input())\n p = list(map(int, input().split()))\n ans = 0\n if p[0] == 1:\n p[0], p[1] = p[1], p[0]\n ans += 1\n if p[n - 1] == n:\n p[n - 2], p[n - 1] = p[n - 1], p[n - 2]\n ans += 1\n for i in range(n - 1):\n if p[i] == i + 1:\n p[i], p[i + 1] = p[i + 1], p[i]\n ans += 1\n print(ans)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nb = list(range(n**2))\na = list(map(int, input().split()))\nflg = False\ncnt = 0\nfor i, v in enumerate(a, 1):\n if flg:\n flg = False\n continue\n\n if i is v:\n cnt += 1\n flg = True\nprint(cnt)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nflg = False\ncnt = 0\nfor i, v in enumerate(a, 1):\n if flg:\n flg = False\n continue\n\n if i == v:\n cnt += 1\n flg = True\nprint(cnt)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":10,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n\nN = int(input().split()[0])\np_list = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n index = i + 1\n if index == p_list[i]:\n if i != 0 and i != 1:\n if p_list[i + 1] == index + 1:\n p_list[i] = p_list[i + 1]\n p_list[i + 1] = index\n else:\n p_list[i] = p_list[i - 1]\n p_list[i - 1] = index\n elif i != 0:\n p_list[i] = p_list[i - 1]\n p_list[i - 1] = index\n elif i != 1:\n p_list[i] = p_list[i + 1]\n p_list[i + 1] = index\n\n count += 1\n\nans = count\nprint(ans)\n","fail":"#!\/usr\/bin\/env python3\n\nN = int(input().split()[0])\np_list = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n index = i + 1\n if index == p_list[i]:\n if i != 0 and i != N - 1:\n if p_list[i + 1] == index + 1:\n p_list[i] = p_list[i + 1]\n p_list[i + 1] = index\n else:\n p_list[i] = p_list[i - 1]\n p_list[i - 1] = index\n elif i != 0:\n p_list[i] = p_list[i - 1]\n p_list[i - 1] = index\n elif i != N - 1:\n p_list[i] = p_list[i + 1]\n p_list[i + 1] = index\n\n count += 1\n\nans = count\nprint(ans)\n","change":"replace","i1":8,"i2":19,"j1":8,"j2":19,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"def main():\n N = int(input())\n P = map(int, input().split())\n cnt = 0\n for i in range(N):\n if P[i] == i + 1:\n cnt += 1\n ans = (cnt + 1) \/\/ 2\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n N = int(input())\n P = list(map(int, input().split()))\n cnt = 0\n for i in range(N - 1):\n if P[i] == i + 1:\n cnt += 1\n P[i + 1], P[i] = P[i], P[i + 1]\n if P[N - 1] == N:\n cnt += 1\n print(cnt)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":11,"error":"TypeError: 'map' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03612\/Python\/s310758336.py\", line 13, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03612\/Python\/s310758336.py\", line 6, in main\n if P[i] == i + 1:\nTypeError: 'map' object is not subscriptable\n","stdout":null} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\nfor i in range(N):\n if P[i] == i + 1:\n P[i], P[i + 1] = P[i + 1], P[i]\n ans += 1\nprint(ans)\n","fail":"N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\n\nfor i in range(N):\n if P[i] == i + 1:\n if i + 1 < N:\n P[i], P[i + 1] = P[i + 1], P[i]\n ans += 1\nprint(ans)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":9,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\np = [0] + list(map(int, input().split()))\nnum = 0\nfor i in range(1, n + 1):\n if i == p[i]:\n num += 1\n p[i], p[i + 1] = p[i + 1], p[i]\n\nprint(num)\n","fail":"n = int(input())\np = [0] + list(map(int, input().split()))\nnum = 0\nfor i in range(1, n + 1):\n if i == n:\n if i == p[i]:\n num += 1\n break\n if i == p[i]:\n num += 1\n p[i], p[i + 1] = p[i + 1], p[i]\n\nprint(num)\n","change":"insert","i1":4,"i2":4,"j1":4,"j2":8,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nP = list(map(int, input().split()))\n\nres = 0\nfor i in range(N):\n if P[i] == i + 1:\n res += 1\n if i < N:\n P[i], P[i + 1] = P[i + 1], P[i]\n\nprint(res)\n","fail":"N = int(input())\nP = list(map(int, input().split()))\n\nres = 0\nfor i in range(N):\n if P[i] == i + 1:\n res += 1\n if i < N - 1:\n P[i], P[i + 1] = P[i + 1], P[i]\n\nprint(res)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03612","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\n# print(P)\n\nfor i in range(N):\n if P[i] != int(i + 1):\n continue\n else:\n P[i], P[i + 1] = P[i + 1], P[i]\n # print(i + 1, P)\n ans += 1\n\nprint(ans)\n","fail":"N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\n# print(P)\n\nfor i in range(N - 1):\n if P[i] != int(i + 1):\n continue\n else:\n P[i], P[i + 1] = P[i + 1], P[i]\n # print(i + 1, P)\n ans += 1\n\n\n# \u6700\u5f8c\u3092\u898b\u3066\u306a\u304b\u3063\u305f\uff01\uff01\uff01\uff01\nif P[-1] == N:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":6,"i2":14,"j1":6,"j2":19,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03613","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nb = [i + 1 for i in a]\nc = [i - 1 for i in a]\nuse_set = set(a) | set(b) | set(c)\nans = 0\nfor i in use_set:\n ans = max(ans, a.count(i) + b.count(i) + c.count(i))\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\n\"\"\"\nb = [i + 1 for i in a]\nc = [i - 1 for i in a]\nuse_set = set(a) | set(b) | set(c)\nans = 0\nfor i in use_set:\n ans = max(ans, a.count(i) + b.count(i) + c.count(i))\nprint(ans)\n\"\"\"\n# \u3053\u308c\u3060\u3068\u6700\u5f8c\u3067TLE\n# in\u306e\u6bb5\u968e\u3067hash?\n\nans = {}\nfor i in a:\n for j in range(3):\n if i + j - 1 not in ans:\n ans[i + j - 1] = 1\n else:\n ans[i + j - 1] += 1\n\nprint(max(ans.values()))\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":24,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03617","language":"Python","original_status":"Runtime Error","pass":"def main(q: int, h: int, s: int, d: int, n: int):\n print((n \/\/ 2) * min(q * 8, h * 4, s * 2, d) + (n % 2) * min(q * 4, h * 2, s))\n\n\nif __name__ == \"__main__\":\n q, h, s, d = map(int, input().split())\n n = int(input)\n\n main(q, h, s, d, n)\n","fail":"def main(q: int, h: int, s: int, d: int, n: int):\n print((n \/\/ 2) * min(q * 8, h * 4, s * 2, d) + (n % 2) * min(q * 4, h * 2, s))\n\n\nif __name__ == \"__main__\":\n q, h, s, d = map(int, input().split())\n n = int(input())\n\n main(q, h, s, d, n)\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03617\/Python\/s356966481.py\", line 7, in \n n = int(input)\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p03617","language":"Python","original_status":"Time Limit Exceeded","pass":"Q, H, S, D = map(int, input().split())\nN = int(input())\n\np025 = Q\np05 = min(H, p025 * 2)\np1 = min(S, p05 * 2)\np2 = min(D, p1 * 2)\n\nans = 0\nwhile N > 0:\n if N >= 2:\n N -= 2\n ans += p2\n elif N >= 1:\n N -= 1\n ans += p1\n\nprint(ans)\n","fail":"Q, H, S, D = map(int, input().split())\nN = int(input())\n\np025 = Q\np05 = min(H, p025 * 2)\np1 = min(S, p05 * 2)\np2 = min(D, p1 * 2)\n\nans = 0\nif N % 2 != 0:\n N -= 1\n ans += p1\nans += (N \/\/ 2) * p2\n\nprint(ans)\n","change":"replace","i1":9,"i2":16,"j1":9,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03618","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\n\ncount = 1\n\nalphabets = {}\n\nalphabets[s[0]] = 1\n\nfor i in range(1, len(s)):\n ss = s[0:i]\n for char, char_count in alphabets.items():\n if char != s[i]:\n count += char_count\n\n if s[i] in alphabets:\n alphabets[s[i]] += 1\n else:\n alphabets[s[i]] = 1\n\nprint(count)\n","fail":"s = input()\n\ncount = 1\n\nalphabets = {}\n\nalphabets[s[0]] = 1\n\nfor i in range(1, len(s)):\n for char, char_count in alphabets.items():\n if char != s[i]:\n count += char_count\n\n if s[i] in alphabets:\n alphabets[s[i]] += 1\n else:\n alphabets[s[i]] = 1\n\nprint(count)\n","change":"delete","i1":9,"i2":10,"j1":9,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03619","language":"Python","original_status":"Runtime Error","pass":"import operator\nfrom bisect import bisect_left\nfrom math import pi\nimport decimal\n\n\ndef lis(A):\n L = [A[0]]\n for a in A[1:]:\n if a > L[-1]:\n L.append(a)\n else:\n L[bisect_left(L, a)] = a\n return len(L)\n\n\ndef solve():\n x1, y1, x2, y2 = map(int, input().split())\n if x1 > x2:\n x1, y1, x2, y2 = x2, y2, x1, y1\n is_down = y1 > y2\n if is_down:\n y1, y2 = -y1, -y2\n\n n = int(input())\n fountains = []\n for _ in range(n):\n x, y = map(int, input().split())\n if is_down:\n y = -y\n if x < x1 or x2 < x or y < y1 or y2 < y:\n continue\n fountains.append((x, y))\n fountains.sort()\n\n if x1 == x2:\n base = (y2 - y1) * 100\n for x, y in fountains:\n if x == x1:\n if y1 < y < y2:\n return base + 10 * pi - 20\n else:\n break\n return base\n if y1 == y2:\n base = (x2 - x1) * 100\n for x, y in fountains:\n if y == y1:\n if x1 < x < x2:\n return base + 10 * pi - 20\n else:\n break\n return base\n\n fountains_y = list(map(operator.itemgetter(1), fountains))\n mc = lis(fountains_y)\n dpi = decimal.Decimal(pi)\n base = decimal.Decimal((x2 - x1 + y2 - y1) * 100 - mc * 20)\n\n return str(base + mc * 5 * dpi)\n\n\nprint(solve())\n","fail":"import operator\nfrom bisect import bisect_left\nfrom math import pi\nimport decimal\n\n\ndef lis(A):\n L = [A[0]]\n for a in A[1:]:\n if a > L[-1]:\n L.append(a)\n else:\n L[bisect_left(L, a)] = a\n return len(L)\n\n\ndef solve():\n x1, y1, x2, y2 = map(int, input().split())\n if x1 > x2:\n x1, y1, x2, y2 = x2, y2, x1, y1\n is_down = y1 > y2\n if is_down:\n y1, y2 = -y1, -y2\n base = decimal.Decimal(100) * (x2 - x1 + y2 - y1)\n\n n = int(input())\n fountains = []\n for _ in range(n):\n x, y = map(int, input().split())\n if is_down:\n y = -y\n if x < x1 or x2 < x or y < y1 or y2 < y:\n continue\n fountains.append((x, y))\n\n if not fountains:\n return str(base)\n\n dpi = decimal.Decimal(pi)\n\n fountains.sort()\n fountains_y = list(map(operator.itemgetter(1), fountains))\n mc = lis(fountains_y)\n if mc == min(x2 - x1, y2 - y1) + 1:\n dist = base + (dpi * 5 - 20) * (mc - 1) + dpi * 10 - 20\n else:\n dist = base + (dpi * 5 - 20) * mc\n return str(dist)\n\n\nprint(solve())\n","change":"replace","i1":23,"i2":60,"j1":23,"j2":48,"error":"WA","stderr":null,"stdout":891.4159265359} {"problem_id":"p03624","language":"Python","original_status":"Runtime Error","pass":"import string\n\nS = list(map(str, input()))\ns = sorted(set(S))\n\nalphabet = string.ascii_lowercase\n\nif len(s) == len(alphabet):\n print(\"None\")\n\nelse:\n for i in range(30):\n if s[i] != alphabet[i]:\n print(alphabet[i])\n break\n","fail":"import string\n\nS = list(map(str, input()))\ns = sorted(set(S))\ncount = 0\n\nalphabet = string.ascii_lowercase\n\nif len(s) == len(alphabet):\n print(\"None\")\n\nelse:\n for i in range(len(s)):\n if s[i] != alphabet[i]:\n print(alphabet[i])\n break\n else:\n count += 1\n\nif count == len(s):\n print(alphabet[len(s)])\n","change":"replace","i1":4,"i2":15,"j1":4,"j2":21,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03624","language":"Python","original_status":"Runtime Error","pass":"s = sorted(set(input()))\n\nans = \"None\"\nfor i in range(26):\n a = chr(ord(\"a\") + i)\n if s[i] != a:\n ans = a\n break\nprint(ans)\n","fail":"s = sorted(set(input()))\n\nalphabet = [chr(ord(\"a\") + i) for i in range(26)]\nans = \"None\"\nfor actual, expected in zip(s, alphabet):\n if actual != expected:\n ans = expected\n break\n\nif ans == \"None\" and s[len(s) - 1] != \"z\":\n ans = alphabet[len(s)]\nprint(ans)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":11,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03624","language":"Python","original_status":"Runtime Error","pass":"S = list(input())\nL = len(S)\nSlist = set()\nfor i in range(L):\n Slist.add(ord(S[i]))\nSlist = list(Slist)\nSlist.sort()\nj = 97\nok = 0\nfor i in range(L):\n if Slist[i] == j:\n j += 1\n continue\n ans = chr(j)\n ok = 1\n break\nif len(Slist) == 26:\n ans = \"None\"\nelif ok == 0:\n ans = chr(j)\nprint(ans)\n","fail":"S = list(input())\nL = len(S)\nSlist = set()\nfor i in range(L):\n Slist.add(ord(S[i]))\nSlist = list(Slist)\nSlist.sort()\nans = \"None\"\nj = 0\nL = len(Slist)\nfor i in range(97, 123):\n if Slist[j] == i:\n j += 1\n if j >= L and i + 1 < 123:\n ans = chr(i + 1)\n break\n continue\n ans = chr(i)\n break\nprint(ans)\n","change":"replace","i1":7,"i2":20,"j1":7,"j2":19,"error":"0","stderr":null,"stdout":"b\n"} {"problem_id":"p03624","language":"Python","original_status":"Runtime Error","pass":"alpha = list(\"abcdefghijklmnopqrstuvwxyz\")\ns = input()\n\nfound = False\nfor chr in s:\n del alpha[alpha.index(chr)]\n\nif len(alpha) == 0:\n print(\"None\")\nelse:\n print(alpha[0])\n","fail":"alpha = list(\"abcdefghijklmnopqrstuvwxyz\")\ns = input()\n\nfound = False\nfor chr in s:\n if chr in alpha:\n del alpha[alpha.index(chr)]\n\nif len(alpha) == 0:\n print(\"None\")\nelse:\n print(alpha[0])\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":7,"error":"ValueError: 'r' is not in list","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03624\/Python\/s990496018.py\", line 6, in \n del alpha[alpha.index(chr)]\nValueError: 'r' is not in list\n","stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nA = list(map(int, input().split()))\n\nA.sort()\n\ns1 = 0\ns2 = 0\n\nt = -1\nfor a in A:\n if a != t:\n ac = A.count(a)\n if ac >= 4:\n s1 = a\n s2 = a\n elif ac >= 2:\n s2 = s1\n s1 = a\n\n t = a\n\nprint(s1 * s2)\n","fail":"N = int(input())\n\nA = list(map(int, input().split()))\n\nA.sort()\n\ns1 = 0\ns2 = 0\n\nat = -1\natc = 0\n\nfor a in A:\n if at == a:\n atc += 1\n\n else:\n if atc >= 4:\n s1 = at\n s2 = at\n elif atc >= 2:\n s2 = s1\n s1 = at\n\n at = a\n atc = 1\n\nif atc >= 4:\n s1 = at\n s2 = at\nelif atc >= 2:\n s2 = s1\n s1 = at\n\nprint(s1 * s2)\n","change":"replace","i1":9,"i2":21,"j1":9,"j2":33,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nswi = 0\ns = [0, 0]\ni = 0\nwhile i < len(a):\n if a[i] == a[i + 1]:\n s[swi] = a[i]\n i += 1\n swi += 1\n if swi == 2:\n break\n i += 1\n\nprint(s[0] * s[1])\n","fail":"n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nswi = 0\ns = [0, 0]\ni = 0\nwhile i < len(a) - 1:\n if a[i] == a[i + 1]:\n s[swi] = a[i]\n i += 1\n swi += 1\n if swi == 2:\n break\n i += 1\n\nprint(s[0] * s[1])\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = sorted(list(map(int, input().split())))\nl1, l2 = 0, 0\nwhile len(A) > 1:\n if A[-1] == A[-2] and l1 == 0:\n l1 = A[-1]\n A = A[:-2]\n elif A[-1] == A[-2] and l2 == 0:\n l2 = A[-1]\n break\n else:\n A = A[:-1]\nprint(l1 * l2)\n","fail":"N = int(input())\nA = sorted(list(map(int, input().split())))[::-1]\nl1, l2 = 0, 0\nflag = True\nfor i in range(N - 1):\n if A[i] > A[i + 1]:\n flag = True\n pass\n elif l1 == 0:\n l1 = A[i]\n flag = False\n elif l2 == 0 and flag:\n l2 = A[i]\n break\n else:\n flag = True\n\nprint(l1 * l2)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Runtime Error","pass":"def main():\n N = int(input())\n A = sorted(list(map(int, input().split())), reverse=True)\n i = 0\n d = []\n while N - 1 > i:\n if len(d) == 2:\n break\n if A[i] == A[i + 1]:\n d.append(A[i])\n i += 1\n i += 1\n print(d[0] * d[1])\n\n\nmain()\n","fail":"def main():\n N = int(input())\n A = sorted(list(map(int, input().split())), reverse=True)\n i = 0\n d = []\n while N - 1 > i:\n if len(d) == 2:\n break\n if A[i] == A[i + 1]:\n d.append(A[i])\n i += 1\n i += 1\n if len(d) == 2:\n print(d[0] * d[1])\n else:\n print(0)\n\n\nmain()\n","change":"replace","i1":12,"i2":13,"j1":12,"j2":16,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = sorted(list(map(int, input().split())))\n\nb = 0\nc = 0\nwhile a:\n if a.pop() in a:\n if b == 0:\n b = a.pop()\n elif c == 0:\n c = a.pop()\n else:\n break\nprint(b * c)\n","fail":"from collections import Counter\n\nn = int(input())\nc = Counter(map(int, input().split()))\nh = w = 0\nfor k, v in c.items():\n if v >= 2 and k > w:\n if k > h:\n if v >= 4:\n h = k\n w = k\n else:\n w = h\n h = k\n else:\n w = k\nprint(h * w)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nuniq_a = sorted(list(set(a)), reverse=True)\nc = 0\nans = 1\nfor num in uniq_a:\n if c == 0 and a.count(num) >= 4:\n print(num**2)\n exit()\n if a.count(num) >= 2:\n c += 1\n ans *= num\n if c == 2:\n print(ans)\n exit()\nprint(0)\n","fail":"n = int(input())\na = list(map(int, input().split()))\na = sorted(a, reverse=True)\n\nflag = True\npairs = []\nfor i in range(1, len(a)):\n if flag:\n if a[i] == a[i - 1]:\n pairs.append(a[i])\n if len(pairs) == 2:\n print(pairs[0] * pairs[1])\n exit()\n flag = False\n else:\n flag = True\nprint(0)\n","change":"replace","i1":2,"i2":15,"j1":2,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"a = input()\na_list = list(map(int, input().split()))\n\na_list = sorted(a_list, reverse=True)\na_set = set(a_list)\na_dict = {}\nsorted_dict = {}\n\nans_big = 0\nans_small = 0\n\nfor i in a_set:\n a_dict[i] = a_list.count(i)\n\nfor k, v in sorted(a_dict.items(), key=lambda x: -x[0]):\n if v >= 4:\n if ans_big < k:\n ans_big = k\n if ans_small < k:\n ans_small = k\n elif v >= 2:\n if ans_big < k:\n ans_big = k\n elif ans_small < k:\n ans_small = k\nprint(ans_small * ans_big)\n","fail":"from collections import Counter\n\na = input()\na_list = list(map(int, input().split()))\n\n# \u8981\u7d20\u6570\u306e\u6570\u3048\u4e0a\u3052\u3068\u53d6\u308a\u51fa\u3057\nnum_counter = Counter(a_list)\nnum_keys = sorted(num_counter.keys(), reverse=True)\n\nbig = 0\nsmall = 0\n\nfor i in num_keys:\n x = num_counter[i]\n if x >= 4:\n if big == 0:\n big = small = i\n elif big != 0 and small == 0:\n small = i\n elif x == 3 or x == 2:\n if big == 0:\n big = i\n elif big != 0 and small == 0:\n small = i\n if big != 0 and small != 0:\n break\nprint(big * small)\n","change":"replace","i1":0,"i2":26,"j1":0,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03625","language":"Python","original_status":"Time Limit Exceeded","pass":"cou = int(input())\nbars = input().split()\ntwo = [0, 0]\ni = 0\nca = len(bars)\nwhile i < ca:\n if bars[i] in two:\n pass\n else:\n if bars.count(bars[i]) > 3:\n two.extend(bars[i])\n two.extend(bars[i])\n elif bars.count(bars[i]) > 1:\n two.extend(bars[i])\n else:\n pass\n i += 1\ntwo.sort(key=int)\nprint(int(two[-1]) * int(two[-2]))\n","fail":"n = input()\na = list(map(int, input().split()))\na.sort()\nh, w = 0, 0\nwhile True:\n try:\n if a[-1] == a[-2]:\n h = a[-1]\n a.pop()\n a.pop()\n break\n else:\n a.pop()\n except:\n break\n\nwhile True:\n try:\n if a[-1] == a[-2]:\n w = a[-1]\n a.pop()\n a.pop()\n break\n else:\n a.pop()\n except:\n break\nprint(h * w)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03626","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nS1 = list(input())\nS2 = list(input())\n\nif len(S1) == 1:\n print(3)\nelse:\n if S1[0] != S2[0]:\n t = 2\n i = 2\n a = 6\n else:\n t = 1\n i = 1\n a = 3\n while True:\n if S1[i] != S2[i]:\n if t == 2:\n a *= 3\n else:\n a *= 2\n i += 2\n t = 2\n else:\n if t == 2:\n a *= 1\n else:\n a *= 2\n i += 1\n t = 1\n a %= 1000000007\n if i == len(S1):\n print(a)\n break\n","fail":"N = int(input())\nS1 = list(input())\nS2 = list(input())\n\nif len(S1) == 1:\n print(3)\nelif len(S1) == 2:\n print(6)\nelse:\n if S1[0] != S2[0]:\n t = 2\n i = 2\n a = 6\n else:\n t = 1\n i = 1\n a = 3\n while True:\n if S1[i] != S2[i]:\n if t == 2:\n a *= 3\n else:\n a *= 2\n i += 2\n t = 2\n else:\n if t == 2:\n a *= 1\n else:\n a *= 2\n i += 1\n t = 1\n a %= 1000000007\n if i == len(S1):\n print(a)\n break\n","change":"insert","i1":6,"i2":6,"j1":6,"j2":8,"error":0,"stderr":null,"stdout":6} {"problem_id":"p03627","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\n\nN = int(input())\nc = Counter(map(int, input().split()))\nusables = sorted([(k, v) for k, v in c.items() if v >= 2])\nif len(usables) <= 1:\n print(0)\nelse:\n if usables[-1][2] >= 4:\n print(usables[-1][1] ** 2)\n else:\n print(usables[-1][1] * usables[-2][1])\n","fail":"from collections import Counter\n\n\nN = int(input())\nc = Counter(map(int, input().split()))\nusables = sorted([(k, v) for k, v in c.items() if v >= 2])\nif len(usables) <= 1:\n print(0)\nelse:\n if usables[-1][1] >= 4:\n print(usables[-1][0] ** 2)\n else:\n print(usables[-1][0] * usables[-2][0])\n","change":"replace","i1":9,"i2":13,"j1":9,"j2":13,"error":"IndexError: tuple index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03627\/Python\/s435712312.py\", line 10, in \n if usables[-1][2] >= 4:\nIndexError: tuple index out of range\n","stdout":null} {"problem_id":"p03627","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = sorted(list(map(int, input().split())), reverse=True)\n\nres = [0]\ntmp = -1\nfor a in A:\n if a == tmp:\n res.append(a)\n tmp = -1\n else:\n tmp = a\n if len(res) > 2:\n break\n\nres = sorted(res, reverse=True)\n\nresult = 1\nfor i in range(2):\n result *= res[i]\n\nprint(result)\n","fail":"N = int(input())\nA = sorted(list(map(int, input().split())), reverse=True)\n\nres = [0, 0]\ntmp = -1\nfor a in A:\n if a == tmp:\n res.append(a)\n tmp = -1\n else:\n tmp = a\n if len(res) >= 4:\n break\n\nres = sorted(res, reverse=True)\n\nresult = 1\nfor i in range(2):\n result *= res[i]\n\nprint(result)\n","change":"replace","i1":3,"i2":12,"j1":3,"j2":12,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03627","language":"Python","original_status":"Runtime Error","pass":"import collections\nimport sys\n\nN = int(input())\nA = list(map(int, input().split()))\nc = collections.Counter(A)\ntwo = [k for k, v in c.items() if v > 1]\nfour = [k for k, v in c.items() if v > 3]\nif len(two) < 2 and not four:\n print(0)\n sys.exit(0)\ntwo.sort(reverse=True)\nfour.sort(reverse=True)\ntmp = 1\nfor i in range(2):\n tmp *= two[i]\nmax_four = max(four)\nprint(tmp if tmp > max_four else max_four)\n","fail":"import collections\nimport sys\n\nN = int(input())\nA = list(map(int, input().split()))\nc = collections.Counter(A)\ntwo = [k for k, v in c.items() if v > 1]\nfour = [k for k, v in c.items() if v > 3]\nif len(two) < 2 and not four:\n print(0)\n sys.exit(0)\n\nSt = 0\nSf = 0\nif two:\n two.sort(reverse=True)\n St = 1\n for i in range(2):\n St *= two[i]\nif four:\n Sf = max(four) ** 2\nprint(St if St > Sf else Sf)\n","change":"replace","i1":11,"i2":18,"j1":11,"j2":22,"error":"ValueError: max() arg is an empty sequence","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03627\/Python\/s133994662.py\", line 17, in \n max_four = max(four)\nValueError: max() arg is an empty sequence\n","stdout":null} {"problem_id":"p03631","language":"Python","original_status":"Runtime Error","pass":"n = input()\nif n(0) == n(2):\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"n = input()\nif n[0] == n[2]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'str' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03631\/Python\/s893236770.py\", line 2, in \n if n(0) == n(2):\nTypeError: 'str' object is not callable\n","stdout":null} {"problem_id":"p03632","language":"Python","original_status":"Runtime Error","pass":"a, b, c, d = map(int, input().split())\n\nprint(max(min(b, d) - max(a, c)), 0)\n","fail":"a, b, c, d = map(int, input().split())\n\nprint(max(min(b, d) - max(a, c), 0))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03632\/Python\/s806396854.py\", line 3, in \n print(max(min(b, d) - max(a, c)), 0)\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03632","language":"Python","original_status":"Runtime Error","pass":"A, B, C, D = map(int, input().split())\n\nif A <= C:\n print(max(min(B, D) - C), 0)\nelse:\n print(max(min(B, D) - A), 0)\n","fail":"A, B, C, D = map(int, input().split())\n\nif A <= C:\n print(max(min(B, D) - C, 0))\nelse:\n print(max(min(B, D) - A, 0))\n","change":"replace","i1":3,"i2":6,"j1":3,"j2":6,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03632\/Python\/s956331170.py\", line 4, in \n print(max(min(B, D) - C), 0)\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\n\n\ndef lcm(a, b):\n return a * b \/\/ math.gcd(a, b)\n\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\ntmp = 1\nfor i in range(N):\n tmp = lcm(tmp, T[i])\nprint(tmp)\n","fail":"import fractions\n\n\ndef lcm(a, b):\n n = fractions.gcd(a, b)\n return a * b \/\/ n if n > 0 else 0\n\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\ntmp = 1\nfor i in range(N):\n tmp = lcm(tmp, T[i])\nprint(tmp)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":6,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"from math import gcd\nfrom functools import reduce\n\n\ndef lcm_base(a, b):\n return (a * b) \/\/ gcd(a, b)\n\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nn = int(input())\nT = []\n\nfor _ in range(n):\n T.append(int(input()))\n\nprint(lcm(*T))\n","fail":"from functools import reduce\n\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef lcm_base(a, b):\n return a * b \/\/ gcd(a, b)\n\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nn = int(input())\nT = []\n\nfor _ in range(n):\n T.append(int(input()))\n\nprint(lcm(*T))\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":11,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nT = []\nfor _ in range(N):\n T.append(int(input()))\n\n\ndef gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a % b)\n\n\ndef lcm(a, b):\n if a > b:\n g = gcd(a, b)\n return int(a \/ g * b)\n else:\n g = gcd(b, a)\n return int(b \/ g * a)\n\n\nx = T[0]\nfor i in range(1, N):\n x = lcm(x, T[i])\n\nprint(x)\n","fail":"from functools import reduce\n\nN = int(input())\nT = []\nfor _ in range(N):\n T.append(int(input()))\n\n\ndef gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a % b)\n\n\ndef lcm(a, b):\n if b > a:\n b, a = a, b\n return a * b \/\/ gcd(a, b)\n\n\nx = reduce(lcm, T)\nprint(x)\n","change":"replace","i1":0,"i2":26,"j1":0,"j2":22,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"from math import gcd\n\nn = int(input())\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\nans = 1\nfor _ in range(n):\n t = int(input())\n ans = lcm(ans, t)\n\nprint(ans)\n","fail":"from fractions import gcd\n\nn = int(input())\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\nans = 1\nfor _ in range(n):\n t = int(input())\n ans = lcm(ans, t)\n\nprint(ans)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\nfrom functools import reduce\n\nn = int(input())\nt = [int(input()) for _ in range(n)]\n\nans = reduce(lambda x, y: x * y \/\/ math.gcd(x, y), t)\nprint(ans)\n","fail":"import fractions\nfrom functools import reduce\n\nn = int(input())\nt = [int(input()) for _ in range(n)]\n\nans = reduce(lambda x, y: x * y \/\/ fractions.gcd(x, y), t)\nprint(ans)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":7,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"from functools import reduce\nimport math\n\n\ndef lcm(x, y):\n return (x * y) \/\/ math.gcd(x, y)\n\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\nprint(reduce(lcm, T, 1))\n","fail":"from functools import reduce\nfrom fractions import gcd\n\n\ndef lcm(x, y):\n return (x * y) \/\/ gcd(x, y)\n\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\nprint(reduce(lcm, T, 1))\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":6,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nlst = [int(input()) for _ in range(N)]\n\n\ndef gcd(x, y):\n if y == 0:\n return x\n return gcd(y, x % y)\n\n\ndef lcm(x, y):\n return x * y \/\/ gcd(max(x, y), min(x, y))\n\n\nret = lcm(lst[0], lst[1])\nfor x in lst[2:]:\n ret = lcm(ret, x)\nprint(ret)\n","fail":"N = int(input())\nlst = [1] + [int(input()) for _ in range(N)]\n\n\ndef gcd(x, y):\n if y == 0:\n return x\n return gcd(y, x % y)\n\n\ndef lcm(x, y):\n return x * y \/\/ gcd(max(x, y), min(x, y))\n\n\nret = lcm(lst[0], lst[1])\nfor x in lst[2:]:\n ret = lcm(ret, x)\nprint(ret)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\n\nN = int(input())\nT = [int(input()) for n in range(N)]\n\n\ndef lcm(a, b):\n return a * b \/\/ math.gcd(a, b)\n\n\nres = T[0]\nfor t in T:\n res = lcm(res, t)\n\nprint(res)\n","fail":"N = int(input())\nT = [int(input()) for n in range(N)]\n\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(a, b)\n\n\nres = T[0]\nfor t in T:\n res = lcm(res, t)\n\nprint(res)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":12,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\n\n\ndef lcm(x, y):\n return (x * y) \/\/ math.gcd(x, y)\n\n\nN = int(input())\nt_li = []\nfor _ in range(N):\n t_li.append(int(input()))\nans = lcm(t_li[0], t_li[1])\nfor i in range(2, N):\n ans = lcm(ans, t_li[i])\nprint(ans)\n","fail":"import math\n\n\ndef lcm(x, y):\n return (x * y) \/\/ math.gcd(x, y)\n\n\nN = int(input())\nt_li = []\nfor _ in range(N):\n t_li.append(int(input()))\nif N > 1:\n ans = lcm(t_li[0], t_li[1])\n for i in range(2, N):\n ans = lcm(ans, t_li[i])\nelse:\n ans = t_li[0]\nprint(ans)\n","change":"replace","i1":11,"i2":14,"j1":11,"j2":17,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nfrom numpy import lcm\n\n\nn = int(input())\nt = [int(input()) for _ in range(n)]\n\nans = 1\nfor ele in t:\n ans = lcm(ans, ele)\n\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\n\n\ndef gcd(x, y):\n while x % y:\n x, y = y, x % y\n return y\n\n\ndef lcm(x, y):\n return x * y \/\/ gcd(x, y)\n\n\nn = int(input())\nt = [int(input()) for _ in range(n)]\n\nans = 1\nfor ele in t:\n ans = lcm(ans, ele)\n\nprint(ans)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import fractions\n\n\ndef lcm(x, y):\n return (x * y) \/\/ fractions.gcd(x, y)\n\n\nN = int(input())\nt1 = int(input())\nt2 = int(input())\nt = lcm(t1, t2)\nfor _ in range(2, N):\n t = lcm(t, int(input()))\nprint(t)\n","fail":"import fractions\n\n\ndef lcm(x, y):\n return (x * y) \/\/ fractions.gcd(x, y)\n\n\nN = int(input())\nif N == 1:\n print(input())\nelse:\n t1 = int(input())\n t2 = int(input())\n t = lcm(t1, t2)\n for _ in range(2, N):\n t = lcm(t, int(input()))\n print(t)\n","change":"replace","i1":8,"i2":14,"j1":8,"j2":17,"error":"AttributeError: module 'fractions' has no attribute 'gcd'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03633\/Python\/s647754029.py\", line 11, in \n t = lcm(t1, t2)\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03633\/Python\/s647754029.py\", line 5, in lcm\n return (x * y) \/\/ fractions.gcd(x, y)\nAttributeError: module 'fractions' has no attribute 'gcd'\n","stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import numpy as np\n\nn = int(input())\n\nt = [int(input()) for _ in range(n)]\n\nprint(np.lcm.reduce(np.array(t)))\n","fail":"from fractions import gcd\n\nn = int(input())\n\nt = [int(input()) for _ in range(n)]\n\nans = t[0]\nfor i in range(1, n):\n ans = ans * t[i] \/\/ gcd(ans, t[i])\nprint(ans)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"def gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a % b)\n\n\ndef lcm(a, b):\n return int(a * b \/ gcd(max(a, b), min(a, b)))\n\n\nN = int(input())\nT = [int(input()) for i in range(N)]\n\nA = T[0]\nfor i in range(N):\n A = lcm(A, T[i])\nprint(A)\n","fail":"def gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a % b)\n\n\ndef lcm(a, b):\n return a * b \/\/ gcd(max(a, b), min(a, b))\n\n\nN = int(input())\nT = [int(input()) for i in range(N)]\n\nA = T[0]\nfor i in range(N):\n A = lcm(A, T[i])\nprint(A)\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nT = [int(input()) for i in range(N)]\nT.sort()\nT.reverse()\nresult = T[0]\n\nfor i in range(1, N):\n a = 1\n while True:\n if (result * a) % T[i] == 0:\n result *= a\n break\n a += 1\n\nprint(result)\n","fail":"N = int(input())\nT = [int(input()) for i in range(N)]\nresult = T[0]\n\nfor i in range(1, N):\n n = T[i]\n m = result\n while n % m != 0:\n m, n = n % m, m\n result = (result * T[i]) \/\/ m\n\nprint(result)\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\n\nn = int(input())\nt = []\nfor _ in range(n):\n t.append(int(input()))\n\nans = t[0]\nfor ti in t:\n ans = ans * ti \/\/ math.gcd(ans, ti)\n\n\nprint(ans)\n","fail":"import fractions\n\nn = int(input())\nt = []\nfor _ in range(n):\n t.append(int(input()))\n\nans = t[0]\nfor ti in t:\n ans = ans * ti \/\/ fractions.gcd(ans, ti)\n\n\nprint(ans)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":10,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\ncycles = [int(input()) for i in range(N)]\n\n\nx = 1\nM = max(cycles)\nwhile 1:\n for num in cycles:\n if (M * x) % num != 0:\n x += 1\n break\n else:\n print(M * x)\n quit()\n","fail":"def GCD(x: int, y: int):\n if x < y:\n x, y = y, x\n\n if x % y == 0:\n return y\n else:\n return GCD(y, x % y)\n\n\ndef LCM(x: int, y: int):\n return x * y \/\/ GCD(x, y)\n\n\nN = int(input())\nTlist = [int(input()) for i in range(N)]\nans = 1\nfor num in Tlist:\n ans = LCM(ans, num)\nprint(ans)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"import math\nfrom functools import reduce\n\n\ndef gcd(*numbers):\n return reduce(math.gcd, numbers)\n\n\ndef gcd_list(numbers):\n return reduce(math.gcd, numbers)\n\n\ndef lcm_base(x, y):\n return (x * y) \/\/ math.gcd(x, y)\n\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\n\n\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nn = int(input())\nt = list(set([int(input()) for _ in range(n)]))\n\nprint(lcm(*t))\n","fail":"import fractions\n\nn = int(input())\na = 1\n\nfor b in range(n):\n b = int(input())\n a = a * b \/\/ fractions.gcd(a, b)\nprint(a)\n","change":"replace","i1":0,"i2":28,"j1":0,"j2":9,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"from math import gcd\nfrom functools import reduce\n\n\ndef lcm(a, b):\n return (a * b) \/\/ gcd(a, b)\n\n\nN = int(input())\nT = list(int(input()) for _ in range(N))\n\nprint(reduce(lcm, T))\n","fail":"from fractions import gcd\nfrom functools import reduce\n\n\ndef lcm(a, b):\n return (a * b) \/\/ gcd(a, b)\n\n\nN = int(input())\nT = list(int(input()) for _ in range(N))\n\nprint(reduce(lcm, T))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03633","language":"Python","original_status":"Runtime Error","pass":"from math import gcd\nfrom functools import reduce\n\n\ndef resolve():\n n = int(input())\n t = list(int(input()) for _ in range(n))\n res = 1\n for ti in t:\n res = lcm_base(res, ti)\n print(res)\n\n\ndef lcm_base(x, y):\n return x * y \/\/ gcd(x, y)\n\n\ndef lcm(numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"from fractions import gcd\nfrom functools import reduce\n\n\ndef resolve():\n n = int(input())\n t = list(int(input()) for _ in range(n))\n res = 1\n for ti in t:\n res = lcm_base(res, ti)\n print(res)\n\n\ndef lcm_base(x, y):\n return x * y \/\/ gcd(x, y)\n\n\ndef lcm(numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"0","stderr":null,"stdout":6.0} {"problem_id":"p03634","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nD = [[] for _ in range(N + 1)]\nfor _ in range(N - 1):\n a, b, c = map(int, input().split())\n a -= 1\n b -= 1\n D[a].append((b, c))\n D[b].append((a, c))\nQ, K = map(int, input().split())\nDS = [-1] * (N + 2)\n\n\ndef dfs(c, p, d):\n DS[c] = d\n for r in D[c]:\n if r[0] == p:\n continue\n dfs(r[0], c, d + r[1])\n\n\ndef main():\n dfs(K - 1, -1, 0)\n for _ in range(Q):\n x, y = map(int, input().split())\n print(DS[x - 1] + DS[y - 1])\n\n\nmain()\n","fail":"import sys\n\nsys.setrecursionlimit(1000001)\n\nN = int(input())\nD = [[] for _ in range(N + 1)]\nfor _ in range(N - 1):\n a, b, c = map(int, input().split())\n a -= 1\n b -= 1\n D[a].append((b, c))\n D[b].append((a, c))\nQ, K = map(int, input().split())\nDS = [-1] * (N + 2)\n\n\ndef dfs(c, p, d):\n DS[c] = d\n for r in D[c]:\n if r[0] == p:\n continue\n dfs(r[0], c, d + r[1])\n\n\ndef main():\n dfs(K - 1, -1, 0)\n for _ in range(Q):\n x, y = map(int, input().split())\n print(DS[x - 1] + DS[y - 1])\n\n\nmain()\n","change":"insert","i1":0,"i2":0,"j1":0,"j2":4,"error":0,"stderr":null,"stdout":"3\n2\n4\n"} {"problem_id":"p03635","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input())\nprint((n - 1) * (m - 1))\n","fail":"n, m = map(int, input().split())\nprint((n - 1) * (m - 1))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03635\/Python\/s631153988.py\", line 1, in \n n, m = map(int, input())\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03636","language":"Python","original_status":"Runtime Error","pass":"s = input()\n\nprint(s[0] + len(s[1:-1]) + s[-1])\n","fail":"s = input()\n\nprint(s[0] + str(len(s[1:-1])) + s[-1])\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: can only concatenate str (not \"int\") to str","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03636\/Python\/s904035793.py\", line 3, in \n print(s[0] + len(s[1:-1]) + s[-1])\nTypeError: can only concatenate str (not \"int\") to str\n","stdout":null} {"problem_id":"p03638","language":"Python","original_status":"Runtime Error","pass":"H, W = map(int, input().split())\nN = int(input())\na = list(map(int, input().split()))\n\nresult = [[None] * W for _ in range(H)]\nd = 1\nx, y = 0, 0\nfor i in range(N):\n t = a[i]\n while t > 0:\n result[y][x] = i + 1\n if x == 0 or x == W - 1:\n d = -d\n y += 1\n else:\n x += d\n t -= 1\n\nfor i in range(H):\n print(*result[i])\n","fail":"H, W = map(int, input().split())\nN = int(input())\na = list(map(int, input().split()))\n\nresult = [[None] * W for _ in range(H)]\nd = 1\nx, y = 0, 0\nfor i in range(N):\n t = a[i]\n while t > 0:\n result[y][x] = i + 1\n x += d\n if x == -1 or x == W:\n x -= d\n d = -d\n y += 1\n t -= 1\n\nfor i in range(H):\n print(*result[i])\n","change":"replace","i1":11,"i2":16,"j1":11,"j2":16,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03638\/Python\/s838608670.py\", line 11, in \n result[y][x] = i + 1\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03643","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nL = sorted(L, reverse=True)\n\nprint(sum(L[:K]))\n","fail":"N = input()\n\nprint(\"ABC\" + N)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":3,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03643\/Python\/s548681311.py\", line 1, in \n N, K = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03643","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nprint(f\"ABC{N}\")\n","fail":"N = int(input())\nprint(\"ABC\" + str(N))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":"ABC100\n"} {"problem_id":"p03643","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nprint(\"ABC\" + n)\n","fail":"n = int(input())\n\nprint(\"ABC\" + str(n))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: can only concatenate str (not \"int\") to str","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03643\/Python\/s236213679.py\", line 3, in \n print(\"ABC\" + n)\nTypeError: can only concatenate str (not \"int\") to str\n","stdout":null} {"problem_id":"p03643","language":"Python","original_status":"Runtime Error","pass":"n = input()\nprint(int(n[3:]))\n","fail":"n = input()\nprint(\"ABC\" + n)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: invalid literal for int() with base 10: ''","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03643\/Python\/s594169915.py\", line 2, in \n print(int(n[3:]))\nValueError: invalid literal for int() with base 10: ''\n","stdout":null} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ncnt_list = []\nfor i in range(1, n):\n cnt = 0\n while i % 2 == 0:\n i = i \/ 2\n cnt += 1\n cnt_list.append(cnt)\nprint(max(cnt_list))\n","fail":"n = int(input())\ncnt_list = []\nfor i in range(1, n + 1):\n cnt = 0\n while i % 2 == 0:\n i = i \/ 2\n cnt += 1\n cnt_list.append(cnt)\nprint(2 ** max(cnt_list))\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":9,"error":"WA","stderr":null,"stdout":2.0} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"\"\"\" AtCoder \"\"\"\n\nN = int(input())\nans_list = [2, 4, 8, 16, 32, 64]\nans_list = ans_list[::-1]\n\nif N == 1:\n print(1)\n\nfor i in range(7):\n if N > ans_list[i]:\n print(ans_list[i])\n break\n","fail":"\"\"\" AtCoder \"\"\"\n\nN = int(input())\nans_list = [2, 4, 8, 16, 32, 64]\nans_list = ans_list[::-1]\n\nif N == 1:\n print(1)\n exit()\n\nfor i in range(7):\n if N >= ans_list[i]:\n print(ans_list[i])\n break\n","change":"replace","i1":8,"i2":11,"j1":8,"j2":12,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nN = int(sys.stdin.readline())\n\nsorted_list = [1, 2, 4, 8, 16, 32, 64, N][::1]\nmin_index = sorted_list[sorted_list.index(N) + 1]\nprint(min_index)\n","fail":"import sys\n\nN = int(sys.stdin.readline())\n\nif N in [1, 2, 4, 8, 16, 32, 64]:\n print(N)\nelse:\n sorted_list = sorted([1, 2, 4, 8, 16, 32, 64, N])[::-1]\n min_index = sorted_list[sorted_list.index(N) + 1]\n print(min_index)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":10,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03644\/Python\/s340201772.py\", line 6, in \n min_index = sorted_list[sorted_list.index(N) + 1]\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"# https:\/\/atcoder.jp\/contests\/abc068\/tasks\/abc068_b\n\n\ndef two_factor(x):\n cnt = 0\n while x % 2 == 0:\n cnt += 1\n x \/\/= 2\n return cnt\n\n\nN = int(input())\na = map(two_factor, range(1, N + 1))\nmax_cnt = max(a)\nprint(a.index(max_cnt) + 1)\n","fail":"# https:\/\/atcoder.jp\/contests\/abc068\/tasks\/abc068_b\n\n\ndef two_factor(x):\n cnt = 0\n while x % 2 == 0:\n cnt += 1\n x \/\/= 2\n return cnt\n\n\nN = int(input())\na = list(map(two_factor, range(1, N + 1)))\nmax_cnt = max(a)\nprint(a.index(max_cnt) + 1)\n","change":"replace","i1":12,"i2":13,"j1":12,"j2":13,"error":"AttributeError: 'map' object has no attribute 'index'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03644\/Python\/s895004544.py\", line 15, in \n print(a.index(max_cnt) + 1)\nAttributeError: 'map' object has no attribute 'index'\n","stdout":null} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nif N == 1:\n print(0)\nelse:\n ans = 2\n while ans * 2 <= N:\n ans *= 2\nprint(ans)\n","fail":"N = int(input())\n\nif N == 1:\n print(1)\nelse:\n ans = 2\n while ans * 2 <= N:\n ans *= 2\n print(ans)\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":9,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03644","language":"Python","original_status":"Runtime Error","pass":"import math\n\n\ndef resolve():\n n = int(input())\n print(2 ** int(math.log2(n)))\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n n = int(input())\n ans = 0\n for i in range(2, n + 1, 2):\n c = 0\n while i % 2 == 0:\n i \/\/= 2\n c += 1\n if c > ans:\n ans = c\n print(2**ans)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":11,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n n, m = map(int, input().split())\n\n islands_to_1 = []\n islands_to_n = []\n for _ in range(m):\n boat = list(map(int, input().split()))\n if 1 in boat:\n islands_to_1.append(max(boat))\n\n if n in boat:\n islands_to_n.append(min(boat))\n\n for island_to_1 in islands_to_1:\n if island_to_1 in islands_to_n:\n print(\"POSSIBLE\")\n return\n\n print(\"IMPOSSIBLE\")\n return\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n n, m = map(int, input().split())\n\n islands_to_1 = [0 for _ in range(n + 1)]\n islands_to_n = []\n for _ in range(m):\n boat = list(map(int, input().split()))\n if 1 in boat:\n islands_to_1[boat[1]] = 1\n\n if n in boat:\n islands_to_n.append(min(boat))\n\n for island_to_n in islands_to_n:\n if islands_to_1[island_to_n] == 1:\n print(\"POSSIBLE\")\n return\n\n print(\"IMPOSSIBLE\")\n return\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\nab_list = [list(map(lambda x: int(x) - 1, input().split())) for i in range(M)]\n\nlis = [[] for i in range(N)]\n\nfor i in range(M):\n lis[ab_list[i][0]].append(ab_list[i][1])\n\nque = [[0, 0, lis[0], []]]\nends = []\nres = False\n\nwhile que:\n count, now, next_nodes, visited = que.pop()\n ends.append(visited)\n visited.append(now)\n for node in next_nodes:\n if node in visited or count == 2:\n continue\n que.append([count + 1, node, lis[node], visited[:]])\n\nprint()\n\nif N - 1 in set(sum(ends, [])):\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","fail":"N, M = map(int, input().split())\nab_list = [list(map(lambda x: int(x) - 1, input().split())) for i in range(M)]\n\nlis = [[] for i in range(N)]\n\nfor i in range(M):\n lis[ab_list[i][0]].append(ab_list[i][1])\n\nque = [[0, 0, lis[0], []]]\nends = []\nres = False\n\nwhile que:\n count, now, next_nodes, visited = que.pop()\n visited.append(now)\n if now == N - 1:\n ends = visited[:]\n for node in next_nodes:\n if node in visited or count == 2:\n continue\n que.append([count + 1, node, lis[node], visited[:]])\n\nif N - 1 in ends:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":14,"i2":24,"j1":14,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\na = [0 for i in range(M)]\nb = [0 for i in range(M)]\nc = []\nfor i in range(M):\n a[i], b[i] = map(int, input().split())\n if a[i] == 1:\n c.append(b[i])\n\nflag = 0\nfor k in c:\n if k == N:\n flag = 1\n break\n else:\n for i in range(M):\n if a[i] == k and b[i] == N:\n flag = 1\n break\n if flag == 1:\n break\n\nif flag == 0:\n print(\"IMPOSSIBLE\")\nelse:\n print(\"POSSIBLE\")\n","fail":"N, M = map(int, input().split())\na = [0 for i in range(M)]\nb = [0 for i in range(M)]\nc = []\nd = []\nflag = 0\nfor i in range(M):\n a[i], b[i] = map(int, input().split())\n if a[i] == 1:\n c.append(b[i])\n if b[i] == N:\n flag = 1\n if b[i] == N:\n d.append(a[i])\n if a[i] == 1:\n flag = 1\ne = set(c) | set(d)\nif len(c) + len(d) == len(e):\n flag = 0\nelse:\n flag = 1\n\nif flag == 0:\n print(\"IMPOSSIBLE\")\nelse:\n print(\"POSSIBLE\")\n","change":"replace","i1":4,"i2":21,"j1":4,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\nab = [list(map(int, input().split())) for i in range(M)]\nsecond = []\nflag = False\nfor x in range(M):\n if ab[x][0] == 1:\n second.append(ab[x][1])\n\nfor y in range(len(second)):\n for z in range(M):\n if ab[z][0] == second[y] and ab[z][1] == N:\n flag = True\nif flag:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","fail":"N, M = map(int, input().split())\nab = [list(map(int, input().split())) for i in range(M)]\nstart = []\ngoal = []\nflag = False\nfor x in range(M):\n if ab[x][0] == 1:\n start.append(ab[x][1])\n\n if ab[x][1] == N:\n goal.append(ab[x][0])\n\nstart_goal = set(start) & set(goal)\n\nif start_goal:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\n\none2 = []\ntoN = []\n\nfor _ in range(M):\n a, b = map(int, input().split())\n\n if a == 1:\n one2.append(b)\n\n if b == N:\n toN.append(a)\n\nflag = False\nfor a in one2:\n if a in toN:\n flag = True\n break\n\nif flag:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","fail":"N, M = map(int, input().split())\n\none2 = set()\ntoN = set()\n\nfor _ in range(M):\n a, b = map(int, input().split())\n\n if a == 1:\n one2.add(b)\n\n if b == N:\n toN.add(a)\n\ninter = one2 & toN\n\nif len(inter) > 0:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":2,"i2":21,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"# \u30b0\u30e9\u30d5\u308f\u304b\u3089\u3093\u306e\u3067\u30b0\u30e9\u30d5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u5fd8\u308c\u305f\n# dfs\u3067\u3084\u308b \u9650\u5ea62\u56de\n\nn, m = map(int, input().split())\ngraph = [[] for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n graph[a - 1].append(b - 1)\n graph[b - 1].append(a - 1)\n\n\ndef dfs(t, c, used):\n if c != 0 and t == n - 1:\n return True\n if c == 0:\n return False\n flag = False\n for g in graph[t]:\n if g in used:\n continue\n next_used = used[:]\n next_used.append(g)\n flag = dfs(g, c - 1, next_used)\n if flag:\n break\n return flag\n\n\nfor x in graph[0]:\n if dfs(x, 2, [x]):\n print(\"POSSIBLE\")\n exit()\nprint(\"IMPOSSIBLE\")\n","fail":"# \u30b0\u30e9\u30d5\u308f\u304b\u3089\u3093\u306e\u3067\u30b0\u30e9\u30d5\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u5fd8\u308c\u305f\n# dfs\u3067\u3084\u308b \u9650\u5ea62\u56dec\n# \u306a\u3093\u304b\u3057\u3089\u3093\u3051\u3069dfs\u304c2TLE\u306b\u306a\u308b\u306e\u3067\u8ae6\u3081\u305f \u305d\u308c\u305e\u308c\u306e\u5cf6\u306b\u3064\u3044\u30661\u3068N\u304c\u3042\u308c\u3070\u826f\u3044\n\nn, m = map(int, input().split())\ngraph = [[] for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n graph[a - 1].append(b - 1)\n graph[b - 1].append(a - 1)\n\nfor g in graph[1 : n - 1]:\n c = 0\n for v in g:\n if c >= 2:\n break\n if v == 0 or v == n - 1:\n c += 1\n if c == 2:\n print(\"POSSIBLE\")\n exit()\nprint(\"IMPOSSIBLE\")\n","change":"replace","i1":1,"i2":30,"j1":1,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\nr = [[0, 0] for _ in range(m)]\nln = []\nl1 = []\nfor i in range(m):\n r[i][0], r[i][1] = map(int, input().split())\n if r[i][1] == n:\n ln.append(i)\n if r[i][0] == 1:\n l1.append(i)\nans = \"IMPOSSIBLE\"\nfor i in l1:\n for j in ln:\n if r[i][1] == r[j][0]:\n ans = \"POSSIBLE\"\n break\nprint(ans)\n","fail":"n, m = map(int, input().split())\nl = [0] * n\nr = []\nfor i in range(m):\n a, b = map(int, input().split())\n if a == 1:\n r.append(b)\n if b == n:\n l[a - 1] = 1\nans = \"IMPOSSIBLE\"\nfor i in r:\n if l[i - 1] == 1:\n ans = \"POSSIBLE\"\nprint(ans)\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\ns1 = set()\ns2 = set()\n\nfor _ in range(M):\n a, b = map(int, input().split())\n if a == 1:\n s1.add(b)\n if b == N:\n s2.add(a)\n\nfor x in s1:\n if s2.count(x) >= 1:\n print(\"POSSIBLE\")\n exit()\n\nprint(\"IMPOSSIBLE\")\n","fail":"N, M = map(int, input().split())\ns1 = set()\ns2 = set()\n\nfor _ in range(M):\n a, b = map(int, input().split())\n if a == 1:\n s1.add(b)\n if b == N:\n s2.add(a)\n\nif len(s1.intersection(s2)) > 0:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":11,"i2":17,"j1":11,"j2":15,"error":"AttributeError: 'set' object has no attribute 'count'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03645\/Python\/s877436493.py\", line 13, in \n if s2.count(x) >= 1:\nAttributeError: 'set' object has no attribute 'count'\n","stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i], b[i] = map(int, input().split())\n\ncheck = 0\n\n\nfor i in range(m):\n if a[i] == 1:\n check = b[i]\n for j in range(m):\n if a[j] == check and b[j] == n:\n print(\"POSSIBLE\")\n exit()\n\nprint(\"IMPOSSIBLE\")\n","fail":"n, m = map(int, input().split())\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i], b[i] = map(int, input().split())\n\"\"\"\ncheck = 0\n\n\nfor i in range(m):\n if a[i] == 1:\n check = b[i]\n for j in range(m):\n if a[j] == check and b[j] == n:\n print(\"POSSIBLE\")\n exit()\n\nprint(\"IMPOSSIBLE\")\n\n\"\"\"\nstart = []\nleave = []\nfor i in range(m):\n if a[i] == 1:\n start.append(b[i])\n elif b[i] == n:\n leave.append(a[i])\n\nif set(start) & set(leave):\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":5,"i2":18,"j1":5,"j2":32,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\na = [list(map(int, input().split())) for _ in range(m)]\n\npot_starts = []\npot_ends = []\n\nfor i in a:\n if i[0] == 1:\n pot_starts.append(i[1])\n elif i[1] == n:\n pot_ends.append(i[0])\n\nfor i in set(pot_starts):\n if i in pot_ends:\n print(\"POSSIBLE\")\n exit()\n\nprint(\"IMPOSSIBLE\")\n","fail":"n, m = map(int, input().split())\na = [list(map(int, input().split())) for _ in range(m)]\n\n# n, m = 3, 2\n# a = [[1, 2], [2, 3]]\n\npot_starts = []\npot_ends = []\n\nfor i in a:\n if i[0] == 1:\n pot_starts.append(i[1])\n elif i[1] == n:\n pot_ends.append(i[0])\n\nif set(pot_starts).intersection(pot_ends):\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":2,"i2":18,"j1":2,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03645","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\na = [input().split() for _ in range(m)]\nA = set()\nB = set()\n\nfor i in range(m):\n if a[i][0] == \"1\":\n A.add(a[i][1])\n if a[i][1] == str(n):\n B.add(a[i][0])\n if A & B:\n print(\"POSSIBLE\")\n break\nelse:\n print(\"IMPOSSIBLE\")\n","fail":"n, m = map(int, input().split())\na = [input().split() for _ in range(m)]\nA = []\nB = []\n\nfor i in range(m):\n if a[i][0] == \"1\":\n A.append(a[i][1])\n if a[i][1] == str(n):\n B.append(a[i][0])\nprint(\"POSSIBLE\" if set(A) & set(B) else \"IMPOSSIBLE\")\n","change":"replace","i1":2,"i2":15,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03649","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nans = 0\nflag = True\nwhile flag:\n flag = False\n for i in range(N):\n if A[i] >= N:\n count = A[i] \/\/ N\n ans += count\n for j in range(N):\n A[j] += count\n A[i] -= count\n A[i] %= N\n flag = True\n break\n\nprint(ans)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nans = 0\nflag = True\nwhile flag:\n flag = False\n for i in range(N):\n if A[i] >= N:\n count = A[i] \/\/ N\n ans += count\n for j in range(N):\n A[j] += count\n A[i] -= count\n A[i] %= N\n flag = True\n\nprint(ans)\n","change":"delete","i1":15,"i2":16,"j1":15,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03651","language":"Python","original_status":"Runtime Error","pass":"import functools\nimport math\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\nm = max(a)\n\nif k > m:\n print(\"IMPOSSIBLE\")\nelse:\n gcd = functools.reduce(math.gcd, a)\n if k % gcd == 0:\n print(\"POSSIBLE\")\n else:\n print(\"IMPOSSIBLE\")\n","fail":"import functools\nimport fractions\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\nm = max(a)\n\nif k > m:\n print(\"IMPOSSIBLE\")\nelse:\n gcd = functools.reduce(fractions.gcd, a)\n if k % gcd == 0:\n print(\"POSSIBLE\")\n else:\n print(\"IMPOSSIBLE\")\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":11,"error":"0","stderr":null,"stdout":"POSSIBLE\n"} {"problem_id":"p03651","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\narray = list(map(int, input().split()))\nimpossible = \"IMPOSSIBLE\"\npossible = \"POSSIBLE\"\n\nif a == 1:\n if b == array[0]:\n print(possible)\n else:\n print(impossible)\n exit(0)\n\narray = list(set(array))\narray.sort()\n\nbtw = [v1 - v2 for v1, v2 in zip(array[1:], array[0:])]\nn = sorted(btw)[0]\n\nsame = len(set(btw)) == 1 or all([v % n == 0 for v in btw])\n\nif b in array:\n print(possible)\nelif array[-1] < b:\n print(impossible)\nelif same and (b - array[0]) % n == 0:\n print(possible)\nelse:\n print(impossible)\n","fail":"a, b = map(int, input().split())\narray = list(map(int, input().split()))\nimpossible = \"IMPOSSIBLE\"\npossible = \"POSSIBLE\"\n\narray = list(set(array))\n\nif len(array) == 1:\n if b == array[0]:\n print(possible)\n else:\n print(impossible)\n exit(0)\n\narray.sort()\n\nbtw = [v1 - v2 for v1, v2 in zip(array[1:], array[0:])]\nn = sorted(btw)[0]\n\nsame = len(set(btw)) == 1 or all([v % n == 0 for v in btw])\n\nif b in array:\n print(possible)\nelif array[-1] < b:\n print(impossible)\nelif same and (b - array[0]) % n == 0:\n print(possible)\nelse:\n print(impossible)\n","change":"replace","i1":5,"i2":13,"j1":5,"j2":14,"error":"0","stderr":null,"stdout":"POSSIBLE\n"} {"problem_id":"p03651","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\nimport copy\n\nN, K = list(map(int, input().split()))\na_list = list(map(int, input().split()))\n\na_list = sorted(a_list)\n\n\ndef judge(w_list, k):\n w_list = sorted(w_list)\n\n for i in range(len(w_list) - 1):\n w_list += [abs(w_list[i] - w_list[i + 1])]\n\n w_list = sorted(list(set(w_list)))\n\n if k in w_list:\n return True, w_list\n elif 1 in w_list:\n return True, w_list\n elif abs(w_list[0] - w_list[-1]) < K:\n return False, w_list\n elif k % 2 == 0 and 2 in w_list:\n return True, w_list\n else:\n for w in w_list:\n if w + K in w_list:\n return True, w_list\n\n return False, w_list\n\n\nw_list = a_list\n\nwhile True:\n org_w_list = copy.copy(w_list)\n is_ok, w_list = judge(w_list, K)\n if is_ok:\n break\n else:\n if abs(w_list[0] - w_list[-1]) < K:\n break\n if w_list == org_w_list:\n break\n\nans = \"POSSIBLE\" if is_ok else \"IMPOSSIBLE\"\n\nprint(ans)\n","fail":"#!\/usr\/bin\/env python3\nimport copy\n\nN, K = list(map(int, input().split()))\na_list = list(map(int, input().split()))\n\na_list = sorted(a_list)\n\n\ndef judge(w_list, k):\n w_list = sorted(w_list)\n\n for i in range(len(w_list) - 1):\n w_list += [abs(w_list[i] - w_list[i + 1])]\n\n w_list = sorted(list(set(w_list)))\n\n if k in w_list:\n return True, w_list\n elif 1 in w_list:\n return True, w_list\n elif abs(w_list[0] - w_list[-1]) < K:\n return False, w_list\n elif k % 2 == 0 and 2 in w_list:\n return True, w_list\n else:\n ww_list = set([w + K for w in w_list])\n if ww_list & set(w_list):\n return True, w_list\n else:\n return False, w_list\n\n\nw_list = a_list\n\nwhile True:\n org_w_list = copy.copy(w_list)\n is_ok, w_list = judge(w_list, K)\n if is_ok:\n break\n else:\n if abs(w_list[0] - w_list[-1]) < K:\n break\n if w_list == org_w_list:\n break\n\nans = \"POSSIBLE\" if is_ok else \"IMPOSSIBLE\"\n\nprint(ans)\n","change":"replace","i1":26,"i2":31,"j1":26,"j2":31,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03652","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nread = sys.stdin.read\nreadline = sys.stdin.readline\n\nN, M, *A = map(int, read().split())\nA = list(map(list, map(reversed, zip(*[iter(A)] * M))))\n\n# \u5404\u30b9\u30dd\u30fc\u30c4\u306b\u53c2\u52a0\u3057\u3066\u3044\u308b\u4eba\u6570\np = [0] * (M + 1)\ncanceled = set()\nanswer = []\n\n\ndef solve(s, n):\n # n\u306f\u958b\u50ac\u3057\u3066\u3044\u308b\u30b9\u30dd\u30fc\u30c4\u306e\u6570\n # s\u306f\u65b0\u305f\u306b\u958b\u50ac\u3092\u3084\u3081\u308b\u30b9\u30dd\u30fc\u30c4\n p[s] = 0\n canceled.add(s)\n if n == M:\n for i in A:\n p[i[-1]] += 1\n p_max = max(p)\n answer.append(p_max)\n cancel = p.index(p_max)\n solve(cancel, n - 1)\n elif n == 1:\n answer.append(N)\n else:\n for i in range(N):\n if A[i][-1] in canceled:\n while A[i][-1] in canceled:\n A[i].pop()\n p[A[i][-1]] += 1\n p_max = max(p)\n answer.append(p_max)\n cancel = p.index(p_max)\n solve(cancel, n - 1)\n\n\nsolve(0, M)\nprint(min(answer))\n","fail":"import sys\n\nread = sys.stdin.read\nreadline = sys.stdin.readline\n\nN, M, *A = map(int, read().split())\nA = list(map(list, map(reversed, zip(*[iter(A)] * M))))\n\n# \u5404\u30b9\u30dd\u30fc\u30c4\u306b\u53c2\u52a0\u3057\u3066\u3044\u308b\u4eba\u6570\np = [0] * (M + 1)\ncanceled = set()\nanswer = []\n\n\ndef solve(s, n):\n # n\u306f\u958b\u50ac\u3057\u3066\u3044\u308b\u30b9\u30dd\u30fc\u30c4\u306e\u6570\n # s\u306f\u65b0\u305f\u306b\u958b\u50ac\u3092\u3084\u3081\u308b\u30b9\u30dd\u30fc\u30c4\n if n == 1:\n answer.append(N)\n elif n == M:\n for i in A:\n p[i[-1]] += 1\n p_max = max(p)\n answer.append(p_max)\n cancel = p.index(p_max)\n solve(cancel, n - 1)\n else:\n canceled.add(s)\n p[s] = 0\n for i in range(N):\n if A[i][-1] in canceled:\n while A[i][-1] in canceled:\n A[i].pop()\n p[A[i][-1]] += 1\n p_max = max(p)\n answer.append(p_max)\n cancel = p.index(p_max)\n solve(cancel, n - 1)\n\n\nsolve(0, M)\nprint(min(answer))\n","change":"replace","i1":17,"i2":29,"j1":17,"j2":29,"error":0,"stderr":null,"stdout":2} {"problem_id":"p03657","language":"Python","original_status":"Runtime Error","pass":"print(\"Impossible\" if sum(map(int, input.split())) % 3 else \"Possible\")\n","fail":"A, B = map(int, input().split())\nif A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:\n print(\"Possible\")\nelse:\n print(\"Impossible\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":5,"error":"AttributeError: 'builtin_function_or_method' object has no attribute 'split'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03657\/Python\/s777334457.py\", line 1, in \n print(\"Impossible\" if sum(map(int, input.split())) % 3 else \"Possible\")\nAttributeError: 'builtin_function_or_method' object has no attribute 'split'\n","stdout":null} {"problem_id":"p03658","language":"Python","original_status":"Runtime Error","pass":"K, N = map(int, input().split())\nL = list(map(int, input().split())).sort(reverse=True)\nprint(sum(L[:K]))\n","fail":"N, K = map(int, input().split())\nL = list(map(int, input().split()))\nL.sort(reverse=True)\nprint(sum(L[:K]))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":3,"error":"TypeError: 'NoneType' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03658\/Python\/s266603109.py\", line 3, in \n print(sum(L[:K]))\nTypeError: 'NoneType' object is not subscriptable\n","stdout":null} {"problem_id":"p03658","language":"Python","original_status":"Time Limit Exceeded","pass":"from itertools import combinations\n\nN, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nans = max([sum(combi) for combi in combinations(L, K)])\nprint(ans)\n","fail":"from itertools import combinations\n\nN, K = map(int, input().split())\nL = sorted(list(map(int, input().split())), reverse=True)\nans = sum(L[:K])\nprint(ans)\n","change":"replace","i1":3,"i2":6,"j1":3,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03658","language":"Python","original_status":"Runtime Error","pass":"l1 = input().split()\na, b = list(map(int, l1))\n\nl2 = input().split()\nl2 = list(map(int, l2))\n\nl3 = sorted(l2)\nsum = l3[-1] + l3[-2] + l3[-3]\nprint(sum)\n","fail":"l1 = input().split()\nN, K = map(int, l1)\nmax = K + 1\nl2 = input().split()\nl2 = list(map(int, l2))\n\nl3 = sorted(l2)\nsum = 0\n\n\nfor i in range(1, max):\n sum += l3[-i]\n\nprint(sum)\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":13,"error":"0","stderr":null,"stdout":12.0} {"problem_id":"p03658","language":"Python","original_status":"Runtime Error","pass":"N, K = [int(x) for x in input().split()]\nlens = [int(x) for x in input().split()]\n\nlens = sorted(lens).reverse()\n\nif len(lens) >= K:\n print(sum(lens))\nelse:\n print(sum(lens[:K]))\n","fail":"N, K = [int(x) for x in input().split()]\nlens = [int(x) for x in input().split()]\n\nlens = sorted(lens)[::-1]\n\nif len(lens) <= K:\n print(sum(lens))\nelse:\n print(sum(lens[:K]))\n","change":"replace","i1":3,"i2":6,"j1":3,"j2":6,"error":"TypeError: object of type 'NoneType' has no len()","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03658\/Python\/s815774463.py\", line 6, in \n if len(lens) >= K:\nTypeError: object of type 'NoneType' has no len()\n","stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\ntmp = 0\ndiffs = []\nfor i in range(N - 1):\n tmp += A[i]\n diffs.append(abs(sum(A) - tmp - tmp))\nprint(min(diffs))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\ntmp = 0\nans = 10**10\nAsum = sum(A)\nfor i in range(N - 1):\n tmp += A[i]\n a = abs((Asum - tmp) - tmp)\n if ans > a:\n ans = a\nprint(ans)\n","change":"replace","i1":3,"i2":8,"j1":3,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"def test(L):\n T = abs(sum(A[:L]) - sum(A[L:]))\n return T < answer\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\nleft = 0\nright = N\nanswer = float(\"inf\")\n\nfor i in range(1, N):\n if test(i):\n answer = abs(sum(A[:i]) - sum(A[i:]))\n\nprint(answer)\n","fail":"from itertools import accumulate\n\nN = int(input())\nA = list(map(int, input().split()))\nA = list(accumulate(A))\nanswer = abs((A[-1] - A[0]) - A[0])\nfor i in range(N - 1):\n L = A[-1] - A[i]\n K = abs(L - A[i])\n if K < answer:\n answer = K\n\n\nprint(answer)\n","change":"replace","i1":0,"i2":15,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N, *a = map(int, open(0).read().split())\n print(min(abs(2 * sum(a[:i]) - sum(a)) for i in range(1, N)))\n return\n\n\nmain()\n","fail":"INF = float(\"inf\")\n\n\ndef main():\n N, *a = map(int, open(0).read().split())\n ans = INF\n tmp = 0\n total = sum(a)\n for i in range(N - 1):\n tmp += a[i]\n ans = min(ans, abs(2 * tmp - total))\n print(ans)\n return\n\n\nmain()\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na_list = list(map(int, input().split()))\n\nmin_diff = abs(sum(a_list[:1]) - sum(a_list[1:]))\nfor i in range(2, N):\n diff = abs(sum(a_list[:i]) - sum(a_list[i:]))\n min_diff = min(min_diff, diff)\nprint(min_diff)\n","fail":"N = int(input())\na_list = list(map(int, input().split()))\n\na_sum = sum(a_list)\nl_a_sum = a_list[0]\nmin_diff = abs(a_sum - 2 * l_a_sum)\nfor i in range(1, N - 1):\n l_a_sum += a_list[i]\n min_diff = min(min_diff, abs(a_sum - 2 * l_a_sum))\nprint(min_diff)\n","change":"replace","i1":3,"i2":7,"j1":3,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"if __name__ == \"__main__\":\n n = int(input())\n a = list(map(int, input().split()))\n\n ans = 10**10\n for i in range(1, n):\n g1 = a[0:i]\n g2 = a[i:n]\n tmp = abs(sum(g1) - sum(g2))\n if tmp < ans:\n ans = tmp\n\n print(ans)\n","fail":"if __name__ == \"__main__\":\n n = int(input())\n a = list(map(int, input().split()))\n\n g1 = a[0]\n g2 = sum(a[1:n])\n ans = abs(g1 - g2)\n if n > 2:\n for i in range(1, n - 1):\n g1 += a[i]\n g2 -= a[i]\n tmp = abs(g1 - g2)\n if tmp < ans:\n ans = tmp\n\n print(ans)\n","change":"replace","i1":4,"i2":11,"j1":4,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = list(map(int, input().split()))\nans = 10000000000\ntotal = sum(a)\nfor i in range(1, N):\n sunuke = a[:i]\n Sum = sum(sunuke)\n if abs(Sum - (total - Sum)) <= ans:\n ans = abs(Sum - (total - Sum))\nprint(ans)\n","fail":"N = int(input())\na = list(map(int, input().split()))\nans = 10000000000\ntotal = sum(a)\nsunuke = 0\nfor i in range(N - 1):\n sunuke += a[i]\n dif = abs(2 * sunuke - total)\n if dif <= ans:\n ans = dif\nprint(ans)\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(x) for x in input().split()]\n\nd = []\n\nfor i in range(1, n):\n d.append(abs(sum(a[:i]) - sum(a[i:])))\n\nprint(min(d))\n","fail":"n = int(input())\na = [int(x) for x in input().split()]\n\nb = sum(a)\nc = a[0]\nd = a[0]\n\nfor i in range(1, n - 1):\n c += a[i]\n if abs(b - 2 * d) > abs(b - 2 * c):\n d = c\n\nprint(abs(b - 2 * d))\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03659","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n\n result = []\n\n for i in range(1, N):\n result.append(abs(sum(A[:i]) - sum(A[i:])))\n print(min(result))\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n\n A_sum = sum(A)\n tmp = 0\n\n result = []\n\n for a in A:\n tmp += a\n result.append(abs(A_sum - tmp * 2))\n print(min(result[:-1]))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":8,"i2":13,"j1":8,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03667","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nn, m = map(int, input().split())\nan = list(map(int, input().split()))\nac_ = Counter(an)\nac = {i: ac_[i] if i in ac_ else 0 for i in range(1, n + 1)}\nad = [0] * n\nfor a, c in ac.items():\n for i in range(max(0, a - c), a):\n ad[i] += 1\nans = ad.count(0)\n\nfor _ in range(m):\n x, y = map(int, input().split())\n ax = an[x - 1]\n xdi = ax - ac[ax]\n if xdi >= 0:\n ad[xdi] -= 1\n if ad[xdi] == 0:\n ans += 1\n ac[ax] -= 1\n ac[y] += 1\n ydi = y - ac[y]\n if ydi >= 0:\n ad[ydi] += 1\n if ad[ydi] == 1:\n ans -= 1\n an[x - 1] = y\n print(ans)\n","fail":"from collections import Counter\n\nn, m = map(int, input().split())\nan = list(map(int, input().split()))\nac_ = Counter(an)\nac = {i: ac_[i] if i in ac_ else 0 for i in range(1, n + 1)}\nad = [0] * n\nfor a, c in ac.items():\n for i in range(max(0, a - c), a):\n ad[i] += 1\nans = ad.count(0)\nanss = []\n\nfor x, y in (map(int, input().split()) for _ in range(m)):\n ax = an[x - 1]\n xdi = ax - ac[ax]\n if xdi >= 0:\n ad[xdi] -= 1\n if ad[xdi] == 0:\n ans += 1\n ac[ax] -= 1\n ac[y] += 1\n ydi = y - ac[y]\n if ydi >= 0:\n ad[ydi] += 1\n if ad[ydi] == 1:\n ans -= 1\n an[x - 1] = y\n anss.append(ans)\nprint(\"\\\\n\".join(map(str, anss)))\n","change":"replace","i1":11,"i2":29,"j1":11,"j2":30,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03671","language":"Python","original_status":"Runtime Error","pass":"a = list(int(input().split()))\nprint(sorted(a)[-1] + sorted(a)[-2])\n","fail":"a = list(map(int, input().split()))\nprint(sorted(a)[0] + sorted(a)[1])\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03671\/Python\/s485399330.py\", line 1, in \n a = list(int(input().split()))\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p03671","language":"Python","original_status":"Runtime Error","pass":"a, b, c = list(map(int, input().split()))\nvalues = sorted(list(set([a, b, c])))\nans = values[0] + values[1]\nprint(ans)\n","fail":"a, b, c = list(map(int, input().split()))\nvalues = sorted([a, b, c])\nans = values[0] + values[1]\nprint(ans)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":1300.0} {"problem_id":"p03671","language":"Python","original_status":"Runtime Error","pass":"abc = [map(int, input().split())]\nprint(sum(abc) - max(abc))\n","fail":"abc = list(map(int, input().split()))\nprint(sum(abc) - max(abc))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for +: 'int' and 'map'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03671\/Python\/s477518016.py\", line 2, in \n print(sum(abc) - max(abc))\nTypeError: unsupported operand type(s) for +: 'int' and 'map'\n","stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = tuple(map(int, input().split()))\n\nb = []\nfor i in range(len(a)):\n b.append(a[i])\n b = b[::-1]\n\nprint(*b)\n","fail":"n = int(input())\na = tuple(map(int, input().split()))\nreverse_a = a[::-1]\n\n\nif n % 2 == 0:\n first = first = reverse_a[::2]\n second = a[::2]\nelse:\n first = reverse_a[::2]\n second = a[1:n:2]\n\nprint(*first + second)\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(i) for i in input().split()]\nb = []\nis_even = len(a) % 2 == 0\n\nif is_even:\n for i in range(n):\n if i % 2 == 0:\n b.append(str(a[i]))\n else:\n b.insert(0, str(a[i]))\nelse:\n for i in range(n):\n if i % 2 == 0:\n b.insert(0, str(a[i]))\n else:\n b.append(str(a[i]))\nprint(\" \".join(b))\n","fail":"n = int(input())\na = [int(i) for i in input().split()]\nif n % 2 == 0:\n b = a[1::2][::-1] + a[::2]\n print(*b)\nelse:\n b = a[::2][::-1] + a[1::2]\n print(*b)\n","change":"replace","i1":2,"i2":18,"j1":2,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nb = []\nfor t in a:\n b.append(t)\n b.reverse()\n\nprint(\" \".join(map(str, b)))\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque()\nfor i in range(n):\n if i % 2 == 0:\n b.append(a[i])\n else:\n b.appendleft(a[i])\nif n % 2 == 1:\n b.reverse()\n\nprint(\" \".join(map(str, b)))\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = []\nfor ele in a:\n b.append(ele)\n b = b[::-1]\n\nprint(*b)\n","fail":"# -*- coding: utf-8 -*-\n\nfrom collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque()\nfor i, ele in enumerate(a):\n if i % 2:\n b.appendleft(ele)\n else:\n b.append(ele)\n\nif n % 2:\n b.reverse()\n\nprint(*b)\n","change":"replace","i1":1,"i2":9,"j1":1,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nret = []\n\nfor i in range(N):\n if i % 2 == 0:\n ret.append(A[i])\n else:\n ret.insert(0, A[i])\n\nif N % 2 == 1:\n ret.reverse()\n\nprint(*ret)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nret = []\n\nfor i in range(N):\n if i % 2 == 0:\n ret.append(A[i])\nret.reverse()\nfor i in range(N):\n if i % 2 == 1:\n ret.append(A[i])\n\nif N % 2 == 0:\n ret.reverse()\n\nprint(*ret)\n","change":"replace","i1":7,"i2":11,"j1":7,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import deque\n\nn = int(input())\na = deque(map(int, input().split()))\nb = deque()\n\nfor _ in range(n):\n b.append(a.popleft())\n b.reverse()\n\nprint(*b)\n","fail":"from collections import deque\n\nn = int(input())\na = deque(map(int, input().split()))\nb = deque()\n\nif n % 2 == 1:\n for i in range(n):\n if i % 2 == 0:\n b.appendleft(a.popleft())\n else:\n b.append(a.popleft())\nelse:\n for i in range(n):\n if i % 2 == 0:\n b.append(a.popleft())\n else:\n b.appendleft(a.popleft())\n\nprint(*b)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nalist = list(map(int, input().split()))\nb = []\nfor i in range(n):\n b.append(alist[i])\n b = b[::-1]\n\nfor _ in b:\n print(_, end=\" \")\n","fail":"n = int(input())\nalist = list(map(int, input().split()))\nb = alist[::-2] + alist[n % 2 :: 2]\nprint(\" \".join(list(map(str, b))))\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"int_n = int(input())\nar_int_a = list(map(int, input().split()))\nar_int_b = list()\nfor i in ar_int_a:\n ar_int_b.append(i)\n ar_int_b = ar_int_b[::-1]\n\nprint(\" \".join(map(str, ar_int_b)))\n","fail":"int_n = int(input())\nar_int_a = list(map(int, input().split()))\nar_int_b = [-1] * int_n\n\n\nidx = int_n \/\/ 2\nar_int_b[idx] = ar_int_a[0]\n\nif int_n % 2 == 0:\n # \u5076\u6570\n for i in range(1, int_n):\n if i % 2 == 0:\n idx = idx + i\n else:\n idx = idx + (-1 * i)\n ar_int_b[idx] = ar_int_a[i]\nelse:\n # \u5947\u6570\n for i in range(1, int_n):\n if i % 2 == 0:\n idx = idx + (-1 * i)\n else:\n idx = idx + i\n ar_int_b[idx] = ar_int_a[i]\n\n\nprint(\" \".join(map(str, ar_int_b)))\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n result = []\n\n for i in range(N):\n if i % 2:\n result.append(A[i])\n else:\n result.insert(0, A[i])\n\n if N % 2:\n print(*result)\n else:\n print(*result[::-1])\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\nimport collections\n\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n\n result = collections.deque()\n\n for i in range(N):\n if i % 2 == N % 2:\n result.append(A[i])\n else:\n result.appendleft(A[i])\n print(*result)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":2,"i2":19,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N = int(input())\n A = input().split()\n ans = A[0]\n for i in range(1, N):\n ans = (ans + \" \" + A[i])[::-1]\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"from collections import deque\n\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n q = deque()\n for i in range(N):\n if (N - i) % 2 == 1:\n q.appendleft(A[i])\n else:\n q.append(A[i])\n print(\" \".join(map(str, q)))\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"num = int(input())\narray = [int(x) for x in input().split()]\n\nres = []\nfor i in range(0, num):\n if i % 2 == 0:\n res.append(array[i])\n else:\n res.insert(0, array[i])\n\nif num % 2 == 0:\n res = map(str, res)\n print(\" \".join(res))\nelse:\n res = map(str, res[::-1])\n print(\" \".join(res))\n","fail":"import math\n\nnum = int(input())\narray = [int(x) for x in input().split()]\n\nzero_array = array[0::2]\none_array = array[1::2]\n\nif num % 2 == 0:\n one_array = one_array[: int(num \/ 2)]\n pick = one_array[::-1] + zero_array[: int(num \/ 2)]\nelse:\n one_array = one_array[: int(num \/ 2)]\n pick = one_array[::-1] + zero_array[: math.ceil(num \/ 2)]\n\nif num % 2 == 0:\n print(\" \".join(map(str, pick)))\nelse:\n print(\" \".join(map(str, pick[::-1])))\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = list(map(int, input().split()))\nX = [str(A[0])]\nappend_ = True if n % 2 != 0 else False\nfor a in A[1:]:\n if append_:\n X.append(str(a))\n else:\n X.insert(0, str(a))\n append_ = not append_\nprint(\" \".join(X))\n","fail":"from collections import deque\n\nn = int(input())\nA = list(map(int, input().split()))\nX = deque([str(A[0])])\nappend_ = True if n % 2 != 0 else False\nfor a in A[1:]:\n if append_:\n X.append(str(a))\n else:\n X.appendleft(str(a))\n append_ = not append_\nprint(\" \".join(X))\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nb = []\nfor i in range(n):\n if i % 2 == 0:\n b.append(a[i])\n else:\n b.insert(0, a[i])\n\nif n % 2 != 0:\n b.reverse()\nfor i in b:\n print(i, end=\" \")\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\nb = deque()\nfor i in range(n):\n if i % 2 == 0:\n b.append(a[i])\n else:\n b.appendleft(a[i])\n\nif n % 2 != 0:\n for i in reversed(b):\n print(i, end=\" \")\nelse:\n for i in b:\n print(i, end=\" \")\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\nN = int(input())\na = list(map(int, input().split()))\n\nif N % 2 == 0:\n print(\" \".join(a[N::-2] + a[::2]))\nelse:\n print(\" \".join(a[N::-2] + a[1::2]))\n","fail":"# -*- coding: utf-8 -*-\nN = int(input())\na = input().split()\n\nif N % 2 == 0:\n b = a[N::-2] + a[::2]\nelse:\n b = a[N::-2] + a[1::2]\n\nprint(\" \".join(b))\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":10,"error":"TypeError: sequence item 0: expected str instance, int found","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03673\/Python\/s153812591.py\", line 6, in \n print(\" \".join(a[N::-2] + a[::2]))\nTypeError: sequence item 0: expected str instance, int found\n","stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nb = []\n\nfor i in range(n):\n b.append(a[i])\n b.reverse()\n\nprint(*b)\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\nb = deque()\n\nfor i in range(n):\n if i % 2 == 0:\n b.append(a[i])\n else:\n b.appendleft(a[i])\n\nif n % 2 == 1:\n b.reverse()\n\nprint(*b)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\na1 = []\na2 = []\nfor i in range(n):\n if i % 2 == 0:\n a1.append(a[i])\n else:\n a2.append(a[i])\nif n % 2 == 0:\n rev = list(reversed(a2))\n print(*rev, *a1)\nelse:\n rev = list(reversed(a1))\n print(*rev, *a2)\n","fail":"n = int(input())\na = list(map(int, input().split()))\na1 = []\na2 = []\nfor i in range(n):\n if i % 2 == 0:\n a1.append(a[i])\n else:\n a2.append(a[i])\nif n % 2 == 0:\n a2.reverse()\n print(*a2 + a1)\nelse:\n a1.reverse()\n print(*a1 + a2)\n","change":"replace","i1":10,"i2":15,"j1":10,"j2":15,"error":"0","stderr":null,"stdout":"4 2 1 3\n"} {"problem_id":"p03673","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\neven = []\nodd = []\nfor i in range(n):\n if i % 2:\n even.append(a[i])\n else:\n odd.append(a[i])\nif n % 2 == 0:\n print(*even[::-1], *odd)\nelse:\n print(*odd[::-1], *even)\n","fail":"n = int(input())\na = list(map(int, input().split()))\neven = []\nodd = []\nfor i in range(n):\n if i % 2:\n even.append(a[i])\n else:\n odd.append(a[i])\nif n % 2 == 0:\n print(*even[::-1], end=\" \")\n print(*odd)\nelse:\n print(*odd[::-1], end=\" \")\n print(*even)\n","change":"replace","i1":10,"i2":13,"j1":10,"j2":15,"error":"0","stderr":null,"stdout":"4 2 1 3\n"} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nb = []\n\nfor i in range(n):\n b.append(a[i])\n b = b[::-1]\nprint(*b)\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque()\n\n\nfor i in range(n):\n if i % 2 == 0:\n b.appendleft(a[i])\n else:\n b.append(a[i])\nif n % 2 == 0:\n b = list(b)[::-1]\nprint(*b)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nb = []\nfor p in a:\n b.append(p)\n b.reverse()\nfor p in b:\n print(str(p) + \" \", end=\"\")\nprint()\n","fail":"n = int(input())\na = list(map(int, input().split()))\nif n % 2:\n for i in range(n \/\/ 2 + 1):\n print(str(a[n - 1 - 2 * i]) + \" \", end=\"\")\n for i in range(n \/\/ 2):\n print(str(a[1 + 2 * i]) + \" \", end=\"\")\n print()\nelse:\n for i in range(n \/\/ 2):\n print(str(a[n - 1 - 2 * i]) + \" \", end=\"\")\n for i in range(n \/\/ 2):\n print(str(a[2 * i]) + \" \", end=\"\")\n print()\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\nB = []\nfor i in range(N):\n B.append(A[i])\n B = B[::-1]\n\nprint(*B)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\n\nif len(A) == 1:\n print(A[0])\n exit(0)\n\nB_left = []\nB_right = []\nfor i, a in enumerate(A):\n if i % 2 == 0:\n B_right.append(a)\n else:\n B_left.append(a)\n\nif len(A) % 2 == 0:\n B = B_left[::-1] + B_right\nelse:\n B = B_right[::-1] + B_left\nprint(*B)\n","change":"replace","i1":3,"i2":8,"j1":3,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nA = list(map(int, input().split()))\nB = []\n\nfor i in range(n):\n B.append(A[i])\n B = B[::-1]\n\nprint(*B)\n","fail":"from collections import deque\n\nn = int(input())\nA = list(map(int, input().split()))\ndeq = deque([])\n\nfor i in range(1, n + 1):\n if i % 2 == 1:\n deq.append(A[i - 1])\n else:\n deq.appendleft(A[i - 1])\n\nif n % 2 == 0:\n print(*deq)\nelse:\n print(*reversed(list(deq)))\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03673","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\n\nif len(a) % 2 == 0:\n print(*list(reversed(a[1::2])), *a[0::2])\nelse:\n print(*list(reversed(a[0::2])), *a[1::2])\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nd = deque()\nfor i in range(n):\n if i % 2 != 0:\n d.append(a[i])\n else:\n d.appendleft(a[i])\n\nif n % 2 == 0:\n print(*list(reversed(d)))\nelse:\n print(*d)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":16,"error":"0","stderr":null,"stdout":"4 2 1 3\n"} {"problem_id":"p03673","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = input().split()\n\nb = []\n\nfor i in a:\n b.append(i)\n b.reverse()\n\nprint(\" \".join(b))\n","fail":"n = 4\na = [1, 2, 3, 4]\n\nn = int(input())\na = input().split()\n\n\nif n % 2 == 0:\n y = [a[j] for j in range(1, n, 2)][::-1]\n z = [a[j] for j in range(0, n, 2)]\n\nelse:\n y = [a[j] for j in range(0, n, 2)][::-1]\n z = [a[j] for j in range(1, n, 2)]\n\nprint(\" \".join(map(str, y + z)))\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03674","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(_) for _ in input().split()]\nmod = 10**9 + 7\n\nf = [1] * (N + 2)\nfi = [1] * (N + 2)\nfor i in range(2, N + 2):\n f[i] = i * f[i - 1]\n f[i] %= mod\nfor i in range(2, N + 2):\n fi[i] = fi[i - 1] * pow(i, mod - 2, mod)\n fi[i] %= mod\n\n\ndef comb(n, r):\n if 0 <= n and 0 <= r and 0 <= n - r:\n return (f[n] * fi[r] * fi[n - r]) % mod\n else:\n return 0\n\n\nb = set()\nfor a in A:\n if a in b:\n break\n b.add(a)\nc = []\nfor i in range(N):\n if A[i] == a:\n c += [i]\ni, j = c\nfor x in range(1, N + 2):\n print((comb(N + 1, x) - (comb(N - j + i, x - 1))) % mod)\n","fail":"N = int(input())\nA = [int(_) for _ in input().split()]\nmod = 10**9 + 7\n\nf = [1] * (N + 2)\nfi = [1] * (N + 2)\nfor i in range(2, N + 2):\n f[i] = i * f[i - 1]\n f[i] %= mod\nfor i in range(2, N + 2):\n fi[i] = fi[i - 1] * pow(i, mod - 2, mod)\n fi[i] %= mod\n\n\ndef comb(n, r):\n if 0 <= n and 0 <= r and 0 <= n - r:\n return (f[n] * fi[r] * fi[n - r]) % mod\n else:\n return 0\n\n\nb = set()\nfor a in A:\n if a in b:\n break\n b.add(a)\nc = []\nfor i in range(N + 1):\n if A[i] == a:\n c += [i]\ni, j = c\nfor x in range(1, N + 2):\n print((comb(N + 1, x) - (comb(N - j + i, x - 1))) % mod)\n","change":"replace","i1":27,"i2":28,"j1":27,"j2":28,"error":0,"stderr":null,"stdout":"3\n5\n4\n1\n"} {"problem_id":"p03675","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nb = []\n\nfor i in range(n):\n if i % 2 != n % 2:\n b.insert(0, a[i])\n else:\n b.append(a[i])\n\nprint(\" \".join(map(str, b)))\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque()\n\nfor i in range(n):\n if i % 2 != n % 2:\n b.appendleft(a[i])\n else:\n b.append(a[i])\n\nprint(\" \".join(map(str, b)))\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03675","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\nans = [A[0]]\nfor i in range(1, N):\n if i % 2 == 0:\n ans.append(A[i])\n else:\n ans.insert(0, A[i])\n\nif N % 2 == 1:\n ans = ans[::-1]\n\nprint(\" \".join(list(map(str, ans))))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\n\nans = []\nif N % 2 == 0:\n l1 = A[0::2]\n l2 = A[1::2]\n l2 = l2[::-1]\n ans = l2 + l1\nelse:\n l1 = A[0::2]\n l2 = A[1::2]\n l1 = l1[::-1]\n ans = l1 + l2\n\nprint(\" \".join(list(map(str, ans))))\n","change":"replace","i1":3,"i2":12,"j1":3,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03675","language":"Python","original_status":"Runtime Error","pass":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque([])\nrev = 1\nfor i in a:\n if rev == 1:\n b.append(i)\n rev = -1\n elif rev == -1:\n b.appendleft(i)\n rev = 1\n\nprint(*(b if rev == 1 else b[::-1]))\n","fail":"from collections import deque\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = deque([])\nrev = 1\nfor i in a:\n if rev == 1:\n b.append(i)\n rev = -1\n elif rev == -1:\n b.appendleft(i)\n rev = 1\n\nprint(*(b if rev == 1 else list(b)[::-1]))\n","change":"replace","i1":15,"i2":16,"j1":15,"j2":16,"error":"0","stderr":null,"stdout":"4 2 1 3\n"} {"problem_id":"p03676","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nsys.setrecursionlimit(100001)\n\n\ndef get_ncr(div):\n cache = {}\n\n def f(*args):\n if args in cache:\n return cache[args]\n n, r = args\n if r == 0 or n == r:\n cache[args] = 1\n return 1\n cache[args] = (f(n - 1, r) + f(n - 1, r - 1)) % div\n return cache[args]\n\n return f\n\n\ndef find_duplicated(aa):\n appeared = [-1] * (n + 1)\n for i, a in enumerate(aa):\n if appeared[a] >= 0:\n return appeared[a], i\n appeared[a] = i\n\n\nn = int(input())\naa = list(map(int, input().split()))\ni1, i2 = find_duplicated(aa)\nbetween_n = i2 - i1 + 1\noutside_n = n + 1 - between_n\ndiv = int(1e9 + 7)\nncr = get_ncr(div)\n\nfor part_n in range(1, n + 2):\n sub = ncr(outside_n, part_n - 1) if outside_n >= part_n - 1 else 0\n print((ncr(n + 1, part_n) - sub) % div)\n","fail":"def ncr(n, r):\n return fact[n] * inv_fact[r] * inv_fact[n - r] % div\n\n\ndef find_duplicated(aa):\n appeared = [-1] * (n + 1)\n for i, a in enumerate(aa):\n if appeared[a] >= 0:\n return appeared[a], i\n appeared[a] = i\n\n\ndiv = int(1e9 + 7)\nn = int(input())\naa = list(map(int, input().split()))\n\nfact, inv_fact = [1], [1]\nfact_tmp = 1\nfor i in range(1, n + 2):\n fact_tmp *= i\n fact_tmp %= div\n fact.append(fact_tmp)\n inv_fact.append(pow(fact_tmp, div - 2, div))\n\ni1, i2 = find_duplicated(aa)\noutside_n = n + 1 - (i2 - i1 + 1)\n\nfor part_n in range(1, n + 2):\n sub = ncr(outside_n, part_n - 1) if outside_n >= part_n - 1 else 0\n print((ncr(n + 1, part_n) - sub) % div)\n","change":"replace","i1":0,"i2":36,"j1":0,"j2":26,"error":0,"stderr":null,"stdout":"3\n5\n4\n1\n"} {"problem_id":"p03680","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nbuttons = [0]\ntarget_index = 0\nfor _ in range(n):\n num = int(input())\n buttons.append(num)\n\ncount = 0\nnext_index = 2\nwhile count < n:\n if next_index < 1 or len(buttons) - 1 <= next_index:\n count = -1\n break\n\n prev_index = buttons.index(next_index)\n count += 1\n if prev_index == 1:\n break\n else:\n next_index = prev_index\n\nprint(count if count < n else -1)\n","fail":"n = int(input())\nbuttons = [0]\ntarget_index = 0\nfor _ in range(n):\n buttons.append(int(input()))\n\ncount = 0\nprev_index = 1\nwhile count < n:\n if prev_index < 1 or len(buttons) <= prev_index:\n count = -1\n break\n\n next_index = buttons[prev_index]\n count += 1\n if next_index == 2:\n break\n else:\n prev_index = next_index\n\nprint(count if count < n else -1)\n","change":"replace","i1":4,"i2":20,"j1":4,"j2":19,"error":"WA","stderr":null,"stdout":-1.0} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\nB = [1]\ni = 0\nflag = False\nfor _ in range(N):\n if 2 in B:\n flag = True\n break\n elif A[i] in B:\n break\n B.append(A[i])\n i = A[i] - 1\n\nprint(len(B) - 1) if flag else print(-1)\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\nB = [1]\ni = 0\ncnt = 0\nflag = False\nfor _ in range(N):\n i = A[i] - 1\n cnt += 1\n if i == 1:\n flag = True\n break\n\nprint(cnt) if flag else print(-1)\n","change":"replace","i1":5,"i2":16,"j1":5,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [0] + [int(input()) for i in range(n)]\nc = a[1]\np = 1\nwhile c > 2:\n c = a[c]\n p += 1\n\nif c == 2:\n print(p)\nelse:\n print(-1)\n","fail":"n = int(input())\na = [0] + [int(input()) for i in range(n)]\nc = a[1]\np = 1\nwhile c > 2:\n d = a[c]\n a[c] = 0\n c = d\n p += 1\n\nif c == 2:\n print(p)\nelse:\n print(-1)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input().strip())\na = [int(input().strip()) for _ in range(n)]\nvisited = [False] * n\nvisited[0] = True\nnow = 0\nans = 0\nwhile True:\n now = a[now] - 1\n ans += 1\n if now == 1:\n print(ans)\n exit()\n elif visited[now]:\n print(-1)\n exit()\n","fail":"n = int(input().strip())\na = [int(input().strip()) for _ in range(n)]\nvisited = [False] * n\nvisited[0] = True\nnow = 0\nans = 0\nwhile True:\n now = a[now] - 1\n ans += 1\n if now == 1:\n print(ans)\n exit()\n elif visited[now]:\n print(-1)\n exit()\n visited[now] = True\n","change":"insert","i1":15,"i2":15,"j1":15,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nnlist = [int(input()) for i in range(n)]\nxlist = []\nc = 0\nx = 1\nwhile x != 2 and x not in xlist and c < n:\n xlist.append(x)\n x = nlist[x - 1]\n c += 1\nif x == 2:\n print(c)\nelse:\n print(-1)\n","fail":"n = int(input())\nnlist = [int(input()) for i in range(n)]\nc = 0\nx = 1\nwhile x != 2 and c < n:\n x = nlist[x - 1]\n c += 1\nif x == 2:\n print(c)\nelse:\n print(-1)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n n = int(input())\n a = [int(input()) for i in range(n)]\n\n btn = 1\n hist = []\n while True:\n if btn == 2:\n print(len(hist))\n break\n\n if btn in hist:\n print(-1)\n break\n\n hist.append(btn)\n btn = a[btn - 1]\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n n = int(input())\n a = [int(input()) for i in range(n)]\n\n btn = 1\n hist = set()\n while True:\n if btn == 2:\n print(len(hist))\n break\n\n if btn in hist:\n print(-1)\n break\n\n hist.add(btn)\n btn = a[btn - 1]\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":5,"i2":16,"j1":5,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [int(input()) for _ in range(N)]\n\ni = 1\nc = 0\nwhile True:\n i = a[i - 1]\n c += 1\n if i == 1:\n c = -1\n break\n elif i == 2:\n break\nprint(c)\n","fail":"N = int(input())\na = [int(input()) for _ in range(N)]\n\ni = 1\nc = 0\nans = -1\nfor _ in range(N):\n i = a[i - 1]\n c += 1\n if i == 2:\n ans = c\n break\nprint(ans)\n","change":"replace","i1":5,"i2":14,"j1":5,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Runtime Error","pass":"n = input()\na = (input() for i in range(n))\ncounter = 0\ni = 1\nwhile counter < n:\n i = a[i - 1]\n counter += 1\n if i == 2:\n print(counter)\n break\nelse:\n print(-1)\n","fail":"n = int(input())\na = [int(input()) for i in range(n)]\ncounter = 0\ni = 1\nwhile counter <= n:\n i = a[i - 1]\n counter += 1\n if i == 2:\n print(counter)\n break\nelse:\n print(-1)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":5,"error":"TypeError: 'str' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03680\/Python\/s197975639.py\", line 2, in \n a = (input() for i in range(n))\nTypeError: 'str' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = []\nfor _ in range(N):\n A.append(int(input()))\n\npushed = [False] * N\npushed[0] = True\nnow = 0\ncnt = 0\nwhile True:\n next = A[now] - 1\n if pushed[next]:\n cnt = -1\n break\n\n if next != 1:\n now = next\n cnt += 1\n\n if next == 1:\n cnt += 1\n break\n\nprint(cnt)\n","fail":"N = int(input())\nA = []\nfor _ in range(N):\n A.append(int(input()))\n\npushed = [False] * N\npushed[0] = True\nnow = 0\ncnt = 0\n\nwhile True:\n next = A[now] - 1\n\n if pushed[next]:\n cnt = -1\n break\n\n if next == 1:\n cnt += 1\n break\n\n if next != 1:\n now = next\n pushed[next] = True\n cnt += 1\n\n\nprint(cnt)\n","change":"replace","i1":9,"i2":23,"j1":9,"j2":27,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [int(input()) for i in range(N)]\n\npushed = [0]\nans = 0\ncurrent = 0\nwhile True:\n ans += 1\n current = a[current] - 1\n if current in pushed:\n ans = -1\n break\n if current == 1:\n break\n pushed.append(current)\nprint(ans)\n","fail":"N = int(input())\na = [int(input()) for i in range(N)]\n\npushed = [False] * N\nans = 0\ncurrent = 0\nwhile True:\n ans += 1\n current = a[current] - 1\n if pushed[current]:\n ans = -1\n break\n if current == 1:\n break\n pushed[current] = True\nprint(ans)\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\nnow = 0\ncount = 0\nwhile True:\n if now == 0 and count != 0:\n print(-1)\n break\n\n if now == 1:\n print(count)\n break\n\n now = A[now] - 1\n count += 1\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\n\nnow = 0\ncount = 0\nwhile True:\n if count >= N:\n print(-1)\n break\n\n if now == 1:\n print(count)\n break\n\n now = A[now] - 1\n count += 1\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [int(input()) for _ in range(N)]\nseen_list = []\nn = 1\nans = 0\nwhile True:\n if n in seen_list:\n print(-1)\n exit()\n else:\n if n == 2:\n print(ans)\n exit()\n else:\n seen_list.append(n)\n n = a[n - 1]\n ans += 1\n","fail":"from collections import defaultdict\n\nN = int(input())\na = [int(input()) for _ in range(N)]\nseen_list = defaultdict(int)\nn = 1\nans = 0\nwhile True:\n if seen_list[n] == 1:\n print(-1)\n exit()\n else:\n if n == 2:\n print(ans)\n exit()\n else:\n seen_list[n] = 1\n n = a[n - 1]\n ans += 1\n","change":"replace","i1":0,"i2":15,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [int(input()) for _ in range(n)]\nL = []\ncnt = 0\ni = 0\nwhile True:\n if i in L:\n print(-1)\n break\n else:\n L.append(i)\n i = a[i] - 1\n cnt += 1\n if i == 1:\n print(cnt)\n break\n","fail":"n = int(input())\na = [int(input()) for _ in range(n)]\nL = [0] * n\ncnt = 0\ni = 0\nwhile True:\n if L[i] == 1:\n print(-1)\n break\n else:\n L[i] = 1\n i = a[i] - 1\n cnt += 1\n if i == 1:\n print(cnt)\n break\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na_list = [int(input()) for _ in range(N)]\n\nbutton_history = [1]\nwhile True:\n next_button = a_list[button_history[-1] - 1]\n if next_button == 2:\n print(len(button_history))\n break\n elif next_button in button_history:\n print(-1)\n break\n else:\n button_history.append(next_button)\n","fail":"N = int(input())\na_list = [int(input()) for _ in range(N)]\n\nbutton_history = [1]\ncurrent_button = 1\nnum_manipulation = -1\n\nfor i in range(1, N + 1):\n current_button = a_list[current_button - 1]\n if current_button == 2:\n num_manipulation = i\n break\n\nprint(num_manipulation)\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [0] + [int(input()) for _ in range(n)]\n\npos = 1\ncnt = 0\nwhile True:\n cnt += 1\n if a[pos] == 1:\n print(-1)\n break\n elif a[pos] == 2:\n print(cnt)\n break\n pos = a[pos]\n","fail":"n = int(input())\na = [0] + [int(input()) for _ in range(n)]\n\npos = 1\nfor i in range(n):\n pos = a[pos]\n if pos == 2:\n print(i + 1)\n break\nelse:\n print(-1)\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nbuttons = [input() for i in range(n)]\nbuttons_int = [int(b) - 1 for b in buttons]\nbutton = 0\ncount = 0\nhistory_list = []\ni = 0\nwhile i < n:\n if button == i:\n button = buttons_int[i]\n count += 1\n if button == 1:\n print(count)\n exit()\n if i in history_list:\n print(-1)\n exit()\n else:\n history_list.append(i)\n i = 0\n else:\n i += 1\n","fail":"n = int(input())\nbuttons = [input() for i in range(n)]\nbuttons_int = [int(b) - 1 for b in buttons]\nbutton = 0\nfor count in range(1, n + 1):\n button = buttons_int[button]\n if button == 1:\n print(count)\n exit()\nprint(-1)\n","change":"replace","i1":4,"i2":22,"j1":4,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N = int(input())\n A = [int(input()) for _ in range(N)]\n i = 1\n c = 0\n v = [0]\n while A[i - 1] not in v:\n if A[i - 1] == 2:\n print(c + 1)\n return\n v.append(i)\n i = A[i - 1]\n c += 1\n print(-1)\n\n\nmain()\n","fail":"def main():\n N = int(input())\n A = [int(input()) for _ in range(N)]\n i = 1\n c = 0\n v = [0] * (N + 1)\n while v[i] == 0:\n if A[i - 1] == 2:\n print(c + 1)\n return\n v[i] = 1\n i = A[i - 1]\n c += 1\n print(-1)\n\n\nmain()\n","change":"replace","i1":5,"i2":11,"j1":5,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(input()) for _ in range(N)]\npushed = [False] * N\npushed[0] = True\nbutton = 0\ncount = 0\nwhile True:\n count += 1\n button = A[button] - 1\n if button == 1:\n print(count)\n exit()\n if pushed[button]:\n print(-1)\n exit()\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\npushed = [False] * N\npushed[0] = True\nbutton = 0\ncount = 0\nwhile True:\n count += 1\n button = A[button] - 1\n if button == 1:\n print(count)\n exit()\n if pushed[button]:\n print(-1)\n exit()\n pushed[button] = True\n","change":"insert","i1":15,"i2":15,"j1":15,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [0 for _ in range(N)]\nfor i in range(N):\n a[i] = int(input())\nc = 0\nx = 1\ndic = [1]\nwhile 1:\n x = a[x - 1]\n if x == 2:\n c += 1\n break\n elif x in dic:\n c = -1\n break\n else:\n dic.append(x)\n c += 1\nprint(c)\n","fail":"N = int(input())\na = [0 for _ in range(N)]\nfor i in range(N):\n a[i] = int(input())\nc = 0\nx = 1\nwhile x != 2:\n nex = a[x - 1]\n if not nex:\n c = -1\n break\n else:\n a[x - 1] = False\n c += 1\n x = nex\nprint(c)\n","change":"replace","i1":6,"i2":18,"j1":6,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nn = int(input())\na = [0] * n\nfor i in range(n):\n a[i] = int(input())\n\ncnt = 0\nlit = 0\n\nwhile lit != 1 and (lit != 0 or cnt == 0):\n lit = a[lit] - 1\n cnt += 1\n\nif lit == 1:\n print(cnt)\nelse:\n print(-1)\n","fail":"N = int(input())\nA = [int(input()) for _ in range(N)]\ni = 0\ndone = {a - 1: False for a in A}\nnum = 0\nwhile True:\n i = A[i] - 1\n num += 1\n if i == 1:\n print(num)\n exit()\n if done[i]:\n print(-1)\n exit()\n done[i] = True\n","change":"replace","i1":0,"i2":18,"j1":0,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [0] + [int(input()) for _ in range(N)]\npreid = 1\nans = 0\nwhile True:\n tmp = preid\n ans += 1\n if a[preid] == 2:\n print(ans)\n break\n preid = a[preid]\n if a[tmp] == a[preid]:\n print(-1)\n break\n","fail":"N = int(input())\na = [0] + [int(input()) for _ in range(N)]\nans = 0\nidx = 1\nflag = False\nfor i in range(N):\n ans += 1\n if a[idx] == 2:\n print(ans)\n flag = True\n break\n idx = a[idx]\nelse:\n print(ans if flag else -1)\n","change":"replace","i1":2,"i2":14,"j1":2,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\na = [int(input()) for _ in range(N)]\npikaa = 1\nans = 0\nwhile 1:\n pikaa = a[pikaa - 1]\n ans += 1\n if pikaa == 1:\n print(-1)\n exit()\n elif pikaa == 2:\n print(ans)\n exit()\n","fail":"N = int(input())\na = [int(input()) for _ in range(N)]\npikaa = 1\nans = 0\nfor _ in range(N):\n pikaa = a[pikaa - 1]\n ans += 1\n if pikaa == 2:\n print(ans)\n exit()\nprint(-1)\n","change":"replace","i1":4,"i2":13,"j1":4,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nnxt_btn = {i: int(input()) for i in range(1, n + 1)}\n\nnum = 0\ncrr_btn = 1\nwhile True:\n num += 1\n if nxt_btn[crr_btn] == 1:\n num = -1\n break\n if nxt_btn[crr_btn] == 2:\n break\n crr_btn = nxt_btn[crr_btn]\nprint(num)\n","fail":"n = int(input())\nnxt_btn = {i: int(input()) for i in range(1, n + 1)}\n\nnum = -1\ncrr_btn = 1\nfor i in range(1, n + 1):\n if nxt_btn[crr_btn] == 2:\n num = i\n break\n crr_btn = nxt_btn[crr_btn]\nprint(num)\n","change":"replace","i1":3,"i2":11,"j1":3,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03680","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = []\nfor _ in range(N):\n a = int(input())\n A.append(a - 1)\nFlags = [False] * N\nFlags[0] = True\nnow = 0\ncnt = 0\nwhile now != 1:\n cnt += 1\n next_node = A[now]\n if Flags[next_node]:\n print(\"-1\")\n exit()\n now = next_node\nprint(cnt)\n","fail":"N = int(input())\nA = []\nfor _ in range(N):\n a = int(input())\n A.append(a - 1)\nFlags = [False] * N\nFlags[0] = True\nnow = 0\ncnt = 0\nfor _ in range(N):\n cnt += 1\n next_node = A[now]\n if next_node == 1:\n break\n if Flags[next_node]:\n print(\"-1\")\n exit()\n Flags[next_node] = True\n now = next_node\nprint(cnt)\n","change":"replace","i1":9,"i2":15,"j1":9,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03681","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\n\nMOD = 1_000_000_007\n\nif abs(N - M) > 1:\n print(0)\n exit(0)\n\ndogs = 1\nfor i in range(1, N + 1):\n dogs *= i\n dogs %= MOD\n\nmonks = 1\nfor i in range(1, M + 1):\n monks *= i\n monks %= MOD\n\nres = (dogs * monks) % MOD\nif (N + M) % 2 == 0:\n res *= 2\n res %= MOD\n\nprint(res)\n","fail":"N, M = map(int, input().split())\n\nMOD = 1000000007\n\nif abs(N - M) > 1:\n print(0)\n exit(0)\n\ndogs = 1\nfor i in range(1, N + 1):\n dogs *= i\n dogs %= MOD\n\nmonks = 1\nfor i in range(1, M + 1):\n monks *= i\n monks %= MOD\n\nres = (dogs * monks) % MOD\nif (N + M) % 2 == 0:\n res *= 2\n res %= MOD\n\nprint(res)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"0","stderr":null,"stdout":8.0} {"problem_id":"p03681","language":"Python","original_status":"Runtime Error","pass":"from math import factorial\n\nn, m = [int(i) for i in input().split()]\nmod = 10e9 + 7\n\nans = 0\ndiff = abs(n - m)\nif diff == 0:\n ans = (factorial(n) ** 2) * 2 % mod\nelif diff == 1:\n ans = factorial(n) * factorial(m) % mod\nprint(ans)\n","fail":"from math import factorial\n\nn, m = [int(i) for i in input().split()]\nmod = 10**9 + 7\n\nans = 0\ndiff = abs(n - m)\nif diff == 0:\n ans = (factorial(n) ** 2) * 2 % mod\nelif diff == 1:\n ans = factorial(n) * factorial(m) % mod\nprint(ans)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"WA","stderr":null,"stdout":8.0} {"problem_id":"p03682","language":"Python","original_status":"Runtime Error","pass":"from operator import itemgetter\nfrom scipy.sparse.csgraph import minimum_spanning_tree\nfrom scipy.sparse import csr_matrix\n\nn = int(input())\nxy = [list(map(int, input().split())) for _ in range(n)]\n\nxyi = [[x, y, i] for i, (x, y) in enumerate(xy)]\nrow = []\ncol = []\ncost = []\n\nxyi.sort()\nfor (x1, y1, i1), (x2, y2, i2) in zip(xyi, xyi[1:]):\n row.append(i1)\n col.append(i2)\n cost.append(min(abs(x1 - x2), abs(y1 - y2)))\n\nxyi.sort(key=itemgetter(1))\nfor (x1, y1, i1), (x2, y2, i2) in zip(xyi, xyi[1:]):\n row.append(i1)\n col.append(i2)\n cost.append(min(abs(x1 - x2), abs(y1 - y2)))\n\ngraph = csr_matrix((cost, (row, col)))\nmst = minimum_spanning_tree(graph)\nans = mst.sum().astype(int)\nprint(ans)\n","fail":"from operator import itemgetter\nfrom scipy.sparse.csgraph import minimum_spanning_tree\nfrom scipy.sparse import csr_matrix\n\nn = int(input())\nxy = [list(map(int, input().split())) for _ in range(n)]\n\nxyi = [[x, y, i] for i, (x, y) in enumerate(xy)]\nedge = set()\n\nxyi.sort()\nfor (x1, y1, i1), (x2, y2, i2) in zip(xyi, xyi[1:]):\n c = min(abs(x1 - x2), abs(y1 - y2))\n edge.add((i1, i2, c))\n\nxyi.sort(key=itemgetter(1))\nfor (x1, y1, i1), (x2, y2, i2) in zip(xyi, xyi[1:]):\n c = min(abs(x1 - x2), abs(y1 - y2))\n edge.add((i1, i2, c))\n\nrow, col, cost = zip(*edge)\n\ngraph = csr_matrix((cost, (row, col)), shape=(n, n))\nmst = minimum_spanning_tree(graph, overwrite=True).astype(int)\nans = mst.sum()\nprint(ans)\n","change":"replace","i1":8,"i2":27,"j1":8,"j2":25,"error":"ModuleNotFoundError: No module named 'scipy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03682\/Python\/s256567036.py\", line 2, in \n from scipy.sparse.csgraph import minimum_spanning_tree\nModuleNotFoundError: No module named 'scipy'\n","stdout":null} {"problem_id":"p03682","language":"Python","original_status":"Runtime Error","pass":"from scipy.sparse.csgraph import minimum_spanning_tree\nfrom scipy.sparse import csr_matrix\nimport numpy as np\n\nn = int(input())\nxy = [list(map(int, input().split())) for _ in range(n)]\n\nx = []\ny = []\nfor i, (ex, ey) in enumerate(xy):\n x.append([ex, i])\n y.append([ey, i])\n\nx.sort()\ny.sort()\n\nu = []\nv = []\nc = []\n\n\ndef f(li):\n for (e1, i1), (e2, i2) in zip(li, li[1:]):\n dist = e2 - e1\n u.append(i1)\n v.append(i2)\n c.append(dist)\n\n\nf(x)\nf(y)\n\ngraph = csr_matrix((c, (u, v)))\nmst = minimum_spanning_tree(graph).astype(np.int64)\nans = mst.sum()\nprint(ans)\n","fail":"from scipy.sparse.csgraph import minimum_spanning_tree\nfrom scipy.sparse import csr_matrix\nfrom operator import itemgetter\n\nn = int(input())\nxy = [list(map(int, input().split())) + [i] for i in range(n)]\n\nedge = set()\nfor key in (itemgetter(0), itemgetter(1)):\n xy.sort(key=key)\n for (x1, y1, i1), (x2, y2, i2) in zip(xy, xy[1:]):\n d = min(abs(x1 - x2), abs(y1 - y2))\n edge.add((i1, i2, d))\n\nu, v, c = zip(*edge)\n\ngraph = csr_matrix((c, (u, v)), shape=(n, n), dtype=int)\nmst = minimum_spanning_tree(graph, overwrite=True).astype(int)\nans = mst.sum()\nprint(ans)\n","change":"replace","i1":2,"i2":34,"j1":2,"j2":18,"error":"ModuleNotFoundError: No module named 'scipy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03682\/Python\/s206242713.py\", line 1, in \n from scipy.sparse.csgraph import minimum_spanning_tree\nModuleNotFoundError: No module named 'scipy'\n","stdout":null} {"problem_id":"p03682","language":"Python","original_status":"Runtime Error","pass":"from collections import defaultdict\nfrom heapq import heappop, heappush\nfrom operator import itemgetter\n\nN = int(input())\ntown = [[int(x) for x in input().split()] + [i] for i in range(N)]\n\n\nclass UnionFind(object):\n def __init__(self, n=1):\n self.par = [i for i in range(n)]\n self.rank = [0 for _ in range(n)]\n\n def find(self, x):\n if self.par[x] == x:\n return x\n else:\n self.par[x] = self.find(self.par[x])\n return self.par[x]\n\n def union(self, x, y):\n x = self.find(x)\n y = self.find(y)\n if x != y:\n if self.rank[x] < self.rank[y]:\n x, y = y, x\n if self.rank[x] == self.rank[y]:\n self.rank[x] += 1\n self.par[y] = x\n\n def is_same(self, x, y):\n return self.find(x) == self.find(y)\n\n\nclass Graph(object):\n def __init__(self):\n self.graph = defaultdict(dict)\n\n def __len__(self):\n return len(self.graph)\n\n def add_edge(self, src, dst, weight=1):\n self.graph[src][dst] = weight\n\n def get_nodes(self):\n return self.graph.keys()\n\n\nclass Kruskal(object):\n def __init__(self, graph):\n self.edge = []\n self.total = 0\n\n N = len(graph)\n g = graph.graph\n uf = UnionFind(N)\n\n Q = []\n for src, v in g.items():\n for dst, cost in v.items():\n heappush(Q, (cost, (src, dst)))\n\n while len(self.edge) < N - 1 and Q:\n cost, edge = heappop(Q)\n if uf.find(edge[0]) != uf.find(edge[1]):\n self.total += cost\n self.edge.append(edge)\n uf.union(*edge)\n\n\ng = Graph()\nfor i in range(2):\n town = sorted(town, key=itemgetter(i))\n for j in range(N - 1):\n t1, t2 = town[j], town[j + 1]\n d = t2[i] - t1[i]\n g.add_edge(t1[2], t2[2], d)\nprint(Kruskal(g).total)\n","fail":"import sys\nfrom collections import defaultdict\nfrom heapq import heappop, heappush\nfrom operator import itemgetter\n\nreadline = sys.stdin.readline\n\nN = int(readline())\ntown = [None] * N\nfor i in range(N):\n x, y = map(int, readline().split())\n town[i] = (i, x, y)\n\n\nclass UnionFind(object):\n def __init__(self, n=1):\n self.par = [i for i in range(n)]\n self.rank = [0 for _ in range(n)]\n\n def find(self, x):\n if self.par[x] == x:\n return x\n else:\n self.par[x] = self.find(self.par[x])\n return self.par[x]\n\n def union(self, x, y):\n x = self.find(x)\n y = self.find(y)\n if x != y:\n if self.rank[x] < self.rank[y]:\n x, y = y, x\n if self.rank[x] == self.rank[y]:\n self.rank[x] += 1\n self.par[y] = x\n\n def is_same(self, x, y):\n return self.find(x) == self.find(y)\n\n\ndef Kruskal(edges):\n edge = []\n total = 0\n\n uf = UnionFind(N)\n Q = sorted(edges, reverse=True)\n\n while len(edge) < N - 1 and Q:\n cost, e = Q.pop()\n if uf.find(e[0]) != uf.find(e[1]):\n total += cost\n edge.append(edge)\n uf.union(*e)\n return total\n\n\nedges = []\nfor xy in [1, 2]:\n town = sorted(town, key=itemgetter(xy))\n for i in range(N - 1):\n t1, t2 = town[i], town[i + 1]\n d = t2[xy] - t1[xy]\n edges.append((d, (t1[0], t2[0])))\nprint(Kruskal(edges))\n","change":"replace","i1":0,"i2":78,"j1":0,"j2":64,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03691","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\nfrom itertools import combinations\n\n\ndef solve(n, pairs):\n survivors = {v: {v} for v in range(1, n + 1)}\n for x, y in reversed(pairs):\n for v, srv in survivors.copy().items():\n if x in srv:\n if y in srv:\n del survivors[v]\n else:\n srv.add(y)\n elif y in srv:\n srv.add(x)\n return sum(su.isdisjoint(sv) for su, sv in combinations(survivors.values(), 2))\n\n\nn, m = map(int, input().split())\npairs = []\nfor line in sys.stdin.readlines():\n x, y = map(int, line.split())\n pairs.append((x, y))\nprint(solve(n, pairs))\n","fail":"import sys\n\nfrom itertools import combinations\n\n\ndef solve(n, pairs):\n survivors = {v: {v} for v in range(1, n + 1)}\n for x, y in reversed(pairs):\n for v, srv in survivors.copy().items():\n if x in srv:\n if y in srv:\n del survivors[v]\n else:\n srv.add(y)\n elif y in srv:\n srv.add(x)\n return sum(su.isdisjoint(sv) for su, sv in combinations(survivors.values(), 2))\n\n\nn, m = map(int, input().split())\npairs = [tuple(map(int, line.split())) for line in sys.stdin.readlines()]\nprint(solve(n, pairs))\n","change":"replace","i1":20,"i2":24,"j1":20,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03693","language":"Python","original_status":"Runtime Error","pass":"print(\"YES\" if int(\"\".join(list(input()))) % 4 == 0 else \"NO\")\n","fail":"print(\"YES\" if int(\"\".join(x for x in input().split())) % 4 == 0 else \"NO\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '4 3 2'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03693\/Python\/s741295906.py\", line 1, in \n print(\"YES\" if int(\"\".join(list(input()))) % 4 == 0 else \"NO\")\nValueError: invalid literal for int() with base 10: '4 3 2'\n","stdout":null} {"problem_id":"p03693","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = list(map(int, input().split()))\n\nmin_color = 0\nmax_color = 0\n\ncnt = 0\n\ncolor = [0] * 8\n\nfor i in a:\n if i < 400 and color[0] == 0:\n min_color += 1\n max_color += 1\n color[0] = 1\n\n elif 400 <= i and i < 800 and color[1] == 0:\n min_color += 1\n max_color += 1\n color[1] = 1\n\n elif 800 <= i and i < 1200 and color[2] == 0:\n min_color += 1\n max_color += 1\n color[2] = 1\n\n elif 1200 <= i and i < 1600 and color[3] == 0:\n min_color += 1\n max_color += 1\n color[3] = 1\n\n elif 1600 <= i and i < 2000 and color[4] == 0:\n min_color += 1\n max_color += 1\n color[4] = 1\n\n elif 2000 <= i and i < 2400 and color[5] == 0:\n min_color += 1\n max_color += 1\n color[5] = 1\n\n elif 2400 <= i and i < 2800 and color[6] == 0:\n min_color += 1\n max_color += 1\n color[6] = 1\n\n elif 2800 <= i and i < 3200 and color[7] == 0:\n min_color += 1\n max_color += 1\n color[7] = 1\n\n elif i >= 3200:\n max_color += 1\n cnt += 1\n\nif cnt == N:\n min_color = 1\n\nprint(min_color, max_color)\n","fail":"r, g, b = map(int, input().split())\nans = r * 100 + g * 10 + b\n\nprint(\"YES\" if ans % 4 == 0 else \"NO\")\n","change":"replace","i1":0,"i2":59,"j1":0,"j2":4,"error":"ValueError: invalid literal for int() with base 10: '4 3 2'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03693\/Python\/s757471291.py\", line 1, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '4 3 2'\n","stdout":null} {"problem_id":"p03693","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n print(\"YES\" if int(input()) % 4 == 0 else \"NO\")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n print(\"YES\" if int(\"\".join(input().split())) % 4 == 0 else \"NO\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"ValueError: invalid literal for int() with base 10: '4 3 2\\\\n'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03693\/Python\/s962788387.py\", line 11, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03693\/Python\/s962788387.py\", line 7, in main\n print(\"YES\" if int(input()) % 4 == 0 else \"NO\")\nValueError: invalid literal for int() with base 10: '4 3 2\\\\n'\n","stdout":null} {"problem_id":"p03693","language":"Python","original_status":"Runtime Error","pass":"print(\"NO \" if map(int, \"\".join(input().split())) % 4 else \"YES\")\n","fail":"print(\"NO \" if int(\"\".join(input().split())) % 4 else \"YES\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for %: 'map' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03693\/Python\/s438012053.py\", line 1, in \n print(\"NO \" if map(int, \"\".join(input().split())) % 4 else \"YES\")\nTypeError: unsupported operand type(s) for %: 'map' and 'int'\n","stdout":null} {"problem_id":"p03694","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = [*map(int, input().split())]\na.sort()\nans = 0\nfor i in range(n - 1):\n ans += a[i + 1] - a[i]\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\na.sort()\nans = 0\nfor i in range(n - 1):\n ans += a[i + 1] - a[i]\nprint(ans)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":7.0} {"problem_id":"p03694","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na_list = [int(i) for i in input().split()]\nprint(max[a_list] - min(a_list))\n","fail":"n = int(input())\na_list = [int(i) for i in input().split()]\nprint(max(a_list) - min(a_list))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: 'builtin_function_or_method' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03694\/Python\/s482748657.py\", line 3, in \n print(max[a_list] - min(a_list))\nTypeError: 'builtin_function_or_method' object is not subscriptable\n","stdout":null} {"problem_id":"p03694","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [int(input()) for i in range(N)]\nprint(max(A) - min(A))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nprint(max(A) - min(A))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"ValueError: invalid literal for int() with base 10: '2 3 7 9'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03694\/Python\/s043066443.py\", line 2, in \n A = [int(input()) for i in range(N)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03694\/Python\/s043066443.py\", line 2, in \n A = [int(input()) for i in range(N)]\nValueError: invalid literal for int() with base 10: '2 3 7 9'\n","stdout":null} {"problem_id":"p03695","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\n\nA = list(map(int, input().split()))\n\nC = [0] * 9\n\nfor i in range(N):\n if 1 <= A[i] <= 399:\n C[0] += 1\n elif 400 <= A[i] <= 799:\n C[1] += 1\n elif 800 <= A[i] <= 1199:\n C[2] += 1\n elif 1200 <= A[i] <= 1599:\n C[3] += 1\n elif 1600 <= A[i] <= 1999:\n C[4] += 1\n elif 2000 <= A[i] <= 2399:\n C[5] += 1\n elif 2400 <= A[i] <= 2799:\n C[6] += 1\n elif 2800 <= A[i] <= 3199:\n C[7] += 1\n else:\n C[8] += 1\n\nblank = C[0:8].count(0)\n\nif blank == 0:\n print(\"8 8\")\n exit()\n\nif C[8] == 0:\n ans = str(8 - blank)\n print(ans + \" \" + ans)\n exit()\nelif C[8] >= 8:\n ans = str(max(8 - blank, 1))\n print(ans + \" \" + 8)\nelif 1 <= C[8] <= 7:\n ans = str(8 - blank)\n ans2 = str(min(8, 8 - blank + C[8]))\n print(ans + \" \" + ans2)\n","fail":"N = int(input())\n\nA = list(map(int, input().split()))\n\nC = [0] * 9\n\nfor i in range(N):\n if 1 <= A[i] <= 399:\n C[0] = 1\n elif 400 <= A[i] <= 799:\n C[1] = 1\n elif 800 <= A[i] <= 1199:\n C[2] = 1\n elif 1200 <= A[i] <= 1599:\n C[3] = 1\n elif 1600 <= A[i] <= 1999:\n C[4] = 1\n elif 2000 <= A[i] <= 2399:\n C[5] = 1\n elif 2400 <= A[i] <= 2799:\n C[6] = 1\n elif 2800 <= A[i] <= 3199:\n C[7] = 1\n else:\n C[8] += 1\n\nnum = sum(C[0:8])\n\nans1 = str(max(num, 1))\nans2 = str(num + C[8])\nprint(ans1 + \" \" + ans2)\n","change":"replace","i1":8,"i2":43,"j1":8,"j2":31,"error":"0","stderr":null,"stdout":"2 2\n"} {"problem_id":"p03695","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nan = list(map(int, input().split()))\nover_cnt = 0\ncolors = []\nfor a in an:\n rate = a \/\/ 400\n if rate >= 8:\n over_cnt += 1\n elif rate not in colors:\n colors.append(rate)\n\nmin = len(colors)\nmax = min(len(colors) + over_cnt, 8)\nprint(min, max)\n","fail":"N = int(input())\nan = list(map(int, input().split()))\nover_cnt = 0\ncolors = []\nfor a in an:\n rate = a \/\/ 400\n if rate >= 8:\n over_cnt += 1\n elif rate not in colors:\n colors.append(rate)\n\nprint(max(len(colors), 1), len(colors) + over_cnt)\n","change":"replace","i1":11,"i2":14,"j1":11,"j2":12,"error":"TypeError: 'int' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03695\/Python\/s943970974.py\", line 13, in \n max = min(len(colors) + over_cnt, 8)\nTypeError: 'int' object is not callable\n","stdout":null} {"problem_id":"p03695","language":"Python","original_status":"Runtime Error","pass":"def main():\n _ = int(input())\n A = list(map(int, input().split()))\n c = [False] * (4800 \/\/ 400 - 1)\n d = [0] * (4800 \/\/ 400 - 1)\n for a in A:\n c[a \/\/ 400] = True\n d[a \/\/ 400] += 1\n mn = 1 if c[:8].count(True) == 0 else c[:8].count(True)\n mx = c[:8].count(True) + sum(d[8:])\n print(mn, mx)\n\n\nmain()\n","fail":"def main():\n _ = int(input())\n A = list(map(int, input().split()))\n c = [False] * (4800 \/\/ 400 + 1)\n d = [0] * (4800 \/\/ 400 + 1)\n for a in A:\n c[a \/\/ 400] = True\n d[a \/\/ 400] += 1\n mn = 1 if c[:8].count(True) == 0 else c[:8].count(True)\n mx = c[:8].count(True) + sum(d[8:])\n print(mn, mx)\n\n\nmain()\n","change":"replace","i1":3,"i2":5,"j1":3,"j2":5,"error":"0","stderr":null,"stdout":"2 2\n"} {"problem_id":"p03695","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = list(map(int, input().split()))\ncolors = [0] * 9\nfor i in range(N):\n if 1 <= a[i] and a[i] <= 399:\n colors[0] = 1\n elif 400 <= a[i] and a[i] <= 799:\n colors[1] = 1\n elif 800 <= a[i] and a[i] <= 1199:\n colors[2] = 1\n elif 1200 <= a[i] and a[i] <= 1599:\n colors[3] = 1\n elif 1600 <= a[i] and a[i] <= 1999:\n colors[4] = 1\n elif 2000 <= a[i] and a[i] <= 2399:\n colors[5] = 1\n elif 2400 <= a[i] and a[i] <= 2799:\n colors[6] = 1\n elif 2800 <= a[i] and a[i] <= 3199:\n colors[7] = 1\n else:\n colors[8] += 1\nif sum(colors[0:8] == 0) and colors[9] >= 1:\n MIN = 1\nelse:\n MIN = sum(colors[0:8])\nMAX = sum(colors)\n\nprint(MIN, MAX)\n","fail":"N = int(input())\na = list(map(int, input().split()))\ncolors = [0] * 9\nfor i in range(N):\n if 1 <= a[i] and a[i] <= 399:\n colors[0] = 1\n elif 400 <= a[i] and a[i] <= 799:\n colors[1] = 1\n elif 800 <= a[i] and a[i] <= 1199:\n colors[2] = 1\n elif 1200 <= a[i] and a[i] <= 1599:\n colors[3] = 1\n elif 1600 <= a[i] and a[i] <= 1999:\n colors[4] = 1\n elif 2000 <= a[i] and a[i] <= 2399:\n colors[5] = 1\n elif 2400 <= a[i] and a[i] <= 2799:\n colors[6] = 1\n elif 2800 <= a[i] and a[i] <= 3199:\n colors[7] = 1\n else:\n colors[8] += 1\n\nif sum(colors[0:8]) == 0 and colors[8] >= 1:\n MIN = 1\nelse:\n MIN = sum(colors[0:8])\nMAX = sum(colors)\n\nprint(MIN, MAX)\n","change":"replace","i1":22,"i2":23,"j1":22,"j2":24,"error":"TypeError: 'bool' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03695\/Python\/s269664657.py\", line 23, in \n if sum(colors[0:8] == 0) and colors[9] >= 1:\nTypeError: 'bool' object is not iterable\n","stdout":null} {"problem_id":"p03697","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ns = [int(input()) for _ in range(n)]\n\nscore = sum(s)\ns.sort()\ni = 0\nwhile score % 10 == 0:\n score -= s[i]\n i += 1\n if score == 0:\n break\nprint(score)\n","fail":"import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\na, b = map(int, readline().split())\nans = a + b if (a + b) < 10 else \"error\"\nprint(ans)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":9,"error":"ValueError: invalid literal for int() with base 10: '6 3'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03697\/Python\/s845938796.py\", line 1, in \n n = int(input())\nValueError: invalid literal for int() with base 10: '6 3'\n","stdout":null} {"problem_id":"p03697","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n# _*_ coding utf-8 _*_\n\nA = int(input())\nB = int(input())\n\nsum = A + B\n\nif sum <= 10:\n print(sum)\n\nelif sum > 10:\n print(\"error\")\n","fail":"#!\/usr\/bin\/env python\n# _*_ coding: utf-8 _*_\na = input()\na.split()\na.split()[1]\n\nA = int(a.split()[0])\nB = int(a.split()[1])\n\nsum = A + B\n\nif sum < 10:\n print(sum)\n\nelif sum >= 10:\n print(\"error\")\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":15,"error":"ValueError: invalid literal for int() with base 10: '6 3'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03697\/Python\/s815193612.py\", line 4, in \n A = int(input())\nValueError: invalid literal for int() with base 10: '6 3'\n","stdout":null} {"problem_id":"p03698","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n s = str(input())\n\n check = set()\n for i in range(s):\n check.add(s[i])\n\n if len(s) != len(s):\n print(\"no\")\n else:\n print(\"yes\")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"# -*- coding: utf-8 -*-\n\n\ndef main():\n \"\"\"Function.\"\"\"\n s = str(input())\n check = set()\n\n for i in range(len(s)):\n check.add(s[i])\n\n if len(s) != len(check):\n print(\"no\")\n else:\n print(\"yes\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":12,"j1":6,"j2":12,"error":"TypeError: 'str' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03698\/Python\/s295275910.py\", line 19, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03698\/Python\/s295275910.py\", line 9, in main\n for i in range(s):\nTypeError: 'str' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03699","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\ninput = sys.stdin.buffer.readline\nn = int(input())\nS = []\nfor _ in range(n):\n S.append(int(input()))\nans = 0\nfor i in range(1 << n):\n temp = 0\n for j in range(n):\n if (i >> j) & 1:\n temp += S[j]\n if temp % 10 == 0:\n temp = 0\n ans = max(temp, ans)\nprint(ans)\n","fail":"import sys\n\ninput = sys.stdin.buffer.readline\nn = int(input())\nS = []\nfor _ in range(n):\n S.append(int(input()))\nS.sort()\ngoukei = sum(S)\nif goukei % 10 != 0:\n print(goukei)\n exit()\nans = 0\nfor i in range(n):\n temp = goukei - S[i]\n if temp % 10 == 0:\n temp = 0\n ans = max(ans, temp)\n\nprint(ans)\n","change":"replace","i1":7,"i2":16,"j1":7,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03699","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ns = [int(input()) for _ in range(n)]\n\ndp = [set() for _ in range(n + 1)]\nfor i in range(n):\n dp[i + 1].update(dp[i])\n for x in dp[i]:\n dp[i + 1].add(x + s[i])\n dp[i + 1].add(s[i])\n\n\nans = max((x for x in dp[i + 1] if x % 10 != 0), default=0)\nprint(ans)\n","fail":"n = int(input())\ns = [int(input()) for _ in range(n)]\n\ndp = [set() for _ in range(n + 1)]\nfor i in range(n):\n dp[i + 1].update(dp[i])\n for x in dp[i]:\n dp[i + 1].add(x + s[i])\n dp[i + 1].add(s[i])\n\n\nans = 0\nfor x in dp[i + 1]:\n if x % 10 != 0:\n ans = max(ans, x)\nprint(ans)\n","change":"replace","i1":11,"i2":12,"j1":11,"j2":15,"error":"0","stderr":null,"stdout":25.0} {"problem_id":"p03699","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\ns = [int(input()) for _ in range(n)]\n\n\n# total:\u7d2f\u8a08, i:index\ndef dfs(total, i):\n if i == n:\n if total % 10 != 0:\n return total\n else:\n return 0\n return max(dfs(total, i + 1), dfs(total + s[i], i + 1))\n\n\nprint(dfs(0, 0))\n","fail":"n = int(input())\ns = [int(input()) for _ in range(n)]\n\ntotal = sum(s)\ns.sort()\nif total % 10 != 0:\n print(total)\nelse:\n for i in range(n):\n if (total - s[i]) % 10 != 0:\n print(total - s[i])\n exit()\n print(0)\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03699","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\ns = [int(input()) for _ in range(N)]\n\nresult = sum(s)\n\nif result % 10 == 0:\n while True:\n min_s = min(s)\n if min_s % 10 == 0:\n s.remove(min_s)\n else:\n result -= min_s\n break\n\nprint(result)\n","fail":"N = int(input())\ns = [int(input()) for _ in range(N)]\n\nresult = sum(s)\n\nif result % 10 == 0:\n for _ in range(N):\n min_s = min(s)\n if min_s % 10 == 0:\n s.remove(min_s)\n else:\n result -= min_s\n break\n\n if result % 10 == 0:\n result = 0\n\nprint(result)\n","change":"replace","i1":6,"i2":14,"j1":6,"j2":17,"error":"0","stderr":null,"stdout":25.0} {"problem_id":"p03699","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\nfrom itertools import combinations\n\n\ndef main():\n N = int(input())\n S = [int(input()) for _ in range(N)]\n result = 0\n\n for i in range(1, N + 1):\n for c in list(combinations(S, i)):\n tmp = max([0 if sum(c) % 10 == 0 else sum(c)])\n result = max(result, tmp)\n print(result)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\n\ndef main():\n N = int(input())\n S = [int(input()) for _ in range(N)]\n\n S.sort()\n result = sum(S)\n\n if result % 10 == 0:\n for s in S:\n if s % 10:\n print(result - s)\n exit()\n else:\n print(result)\n exit()\n\n print(0)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":2,"i2":15,"j1":2,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03699","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nS = sorted([int(input()) for _ in range(N)])\ns = sum(S)\nif s % 10 != 0:\n print(s)\n exit()\n\nfor si in range(S):\n if si % 10 != 0:\n print(s - si)\n exit()\n\nprint(0)\n","fail":"N = int(input())\nS = sorted([int(input()) for _ in range(N)])\ns = sum(S)\nif s % 10 != 0:\n print(s)\n exit()\n\nfor si in S:\n if si % 10 != 0:\n print(s - si)\n exit()\n\nprint(0)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TypeError: 'list' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03699\/Python\/s560177525.py\", line 8, in \n for si in range(S):\nTypeError: 'list' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03700","language":"Python","original_status":"Time Limit Exceeded","pass":"n, a, b = map(int, input().split())\nh = [int(input()) for i in range(n)]\n\nleft = 0\nright = 10**9\nmid = (left + right) \/\/ 2\nwhile right - left > 1:\n mid = (left + right) \/\/ 2\n count = 0\n for i in range(n):\n if h[i] - mid * b > 0:\n if (h[i] - mid * b) % (a - b) == 0:\n count += (h[i] - mid * b) \/\/ (a - b)\n else:\n count += (h[i] - mid * b) \/\/ (a - b) + 1\n if mid - count >= 0:\n right = mid\n else:\n left = mid\nprint(right)\n","fail":"n, a, b = map(int, input().split())\nh = [int(input()) for i in range(n)]\n\nleft = 0\nright = 10**10\nmid = (left + right) \/\/ 2\nwhile right - left > 1:\n mid = (left + right) \/\/ 2\n count = 0\n for i in range(n):\n if h[i] - mid * b > 0:\n if (h[i] - mid * b) % (a - b) == 0:\n count += (h[i] - mid * b) \/\/ (a - b)\n else:\n count += (h[i] - mid * b) \/\/ (a - b) + 1\n if mid - count >= 0:\n right = mid\n else:\n left = mid\nprint(right)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03703","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nimport numpy as np\n\n\nclass Bit:\n def __init__(self, n):\n self.size = n\n self.tree = [0] * (n + 1)\n\n def sum(self, i):\n s = 0\n while i > 0:\n s += self.tree[i]\n i -= i & -i\n return s\n\n def add(self, i, x):\n while i <= self.size:\n self.tree[i] += x\n i += i & -i\n\n\nn, k = map(int, input().split())\naaa = np.fromiter(sys.stdin, dtype=np.int64)\naaa = np.insert(aaa, 0, 0)\nacc = np.add.accumulate(aaa) - np.arange(0, k * n + 1, k)\ndct = {v: i for i, v in enumerate(np.unique(acc), start=1)}\nbit = Bit(n)\nans = 0\nfor d in acc:\n i = dct[d]\n ans += bit.sum(i)\n bit.add(i, 1)\nprint(ans)\n","fail":"import sys\n\nimport numpy as np\n\n\nclass Bit:\n def __init__(self, n):\n self.size = n\n self.tree = [0] * (n + 1)\n\n def sum(self, i):\n s = 0\n while i > 0:\n s += self.tree[i]\n i -= i & -i\n return s\n\n def add(self, i, x):\n while i <= self.size:\n self.tree[i] += x\n i += i & -i\n\n\nn, k = map(int, input().split())\naaa = np.fromiter(sys.stdin, dtype=np.int64)\naaa = np.insert(aaa, 0, 0)\nacc = np.add.accumulate(aaa) - np.arange(0, k * n + 1, k)\ndct = {v: i for i, v in enumerate(np.unique(acc), start=1)}\nbit = Bit(len(dct))\nans = 0\nfor d in acc:\n i = dct[d]\n ans += bit.sum(i)\n bit.add(i, 1)\nprint(ans)\n","change":"replace","i1":28,"i2":29,"j1":28,"j2":29,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03705","language":"Python","original_status":"Runtime Error","pass":"from itertools import combinations\n\n\ndef main(n: int, a: int, b: int):\n\n if a > b:\n print(0)\n return\n elif a == b:\n print(1)\n return\n\n if n < 3:\n if n == 1:\n print(0)\n elif n == 2:\n print(2)\n\n return\n\n ans = 2\n ans += sum(1 for _ in combinations(range(a, b + 1), n - 2))\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n n, a, b = map(int, input().split())\n\n main(n, a, b)\n","fail":"def main(n: int, a: int, b: int):\n if a > b:\n print(0)\n return\n\n if n == 1:\n if a == b:\n print(1)\n else:\n print(0)\n return\n\n if n == 2:\n if a > b:\n print(0)\n else:\n print(1)\n return\n\n print((n - 2) * (b - a) + 1)\n\n\nif __name__ == \"__main__\":\n n, a, b = map(int, input().split())\n\n main(n, a, b)\n","change":"replace","i1":0,"i2":24,"j1":0,"j2":20,"error":0,"stderr":null,"stdout":5} {"problem_id":"p03711","language":"Python","original_status":"Runtime Error","pass":"L = [0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]\n\nx, y = map(int, input().split())\n\nif L(x) == L(y):\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"L = [0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]\n\nx, y = map(int, input().split())\n\nprint([\"No\", \"Yes\"][L[x] == L[y]])\n","change":"replace","i1":4,"i2":8,"j1":4,"j2":5,"error":"TypeError: 'list' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03711\/Python\/s276766245.py\", line 5, in \n if L(x) == L(y):\nTypeError: 'list' object is not callable\n","stdout":null} {"problem_id":"p03711","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ngroup1 = [1, 3, 5, 7, 8, 10, 12]\ngroup2 = [4, 6, 9, 11]\ngroup3 = [2]\n\ninput_x = int(sys.argv[1])\ninput_y = int(sys.argv[2])\n\nexist_group1 = group1.count(input_x) + group1.count(input_y)\nexist_group2 = group2.count(input_x) + group2.count(input_y)\nexist_group3 = group3.count(input_x) + group3.count(input_y)\n\nif exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"group1 = [1, 3, 5, 7, 8, 10, 12]\ngroup2 = [4, 6, 9, 11]\ngroup3 = [2]\n\ninput = list(map(int, input().split()))\ninput_x = int(input[0])\ninput_y = int(input[1])\n\nexist_group1 = group1.count(input_x) + group1.count(input_y)\nexist_group2 = group2.count(input_x) + group2.count(input_y)\nexist_group3 = group3.count(input_x) + group3.count(input_y)\n\nif exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":7,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03711\/Python\/s235468671.py\", line 7, in \n input_x = int(sys.argv[1])\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03716","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nn = int(input())\na = list(map(int, input().split()))\n\nans = -float(\"inf\")\nfor i in range(n, 2 * n + 1):\n fh = a[:i].copy()\n fh.sort(reverse=True)\n sh = a[i:].copy()\n sh.sort()\n score = sum(fh[:n]) - sum(sh[:n])\n ans = max(ans, score)\n\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\n\nimport heapq\n\nn = int(input())\na = list(map(int, input().split()))\n\nfh_sum = 0\nfh = []\nsh_sum = 0\nsh = []\nfor i in range(n):\n heapq.heappush(fh, a[i])\n fh_sum += a[i]\n heapq.heappush(sh, -a[-(i + 1)])\n sh_sum += a[-(i + 1)]\n\nfh_sums = [fh_sum]\nsh_sums = [sh_sum]\nfor k in range(n, 2 * n):\n fh_sum += a[k]\n heapq.heappush(fh, a[k])\n fh_sum -= heapq.heappop(fh)\n fh_sums.append(fh_sum)\n sh_sum += a[-(k + 1)]\n heapq.heappush(sh, -a[-(k + 1)])\n sh_sum += heapq.heappop(sh)\n sh_sums.append(sh_sum)\n\nsh_sums = sh_sums[::-1]\n\nans = -float(\"inf\")\nfor fh_sum, sh_sum in zip(fh_sums, sh_sums):\n score = fh_sum - sh_sum\n ans = max(ans, score)\n\nprint(ans)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":34,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03719","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split)\nif a <= c <= b:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"a, b, c = map(int, input().split())\nif a <= c <= b:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: 'builtin_function_or_method' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03719\/Python\/s664562435.py\", line 1, in \n a, b, c = map(int, input().split)\nTypeError: 'builtin_function_or_method' object is not iterable\n","stdout":null} {"problem_id":"p03719","language":"Python","original_status":"Runtime Error","pass":"A, B, C = int(input().split())\nif A <= C and C <= B:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"A, B, C = map(int, input().split())\nif A <= C and C <= B:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03719\/Python\/s169732825.py\", line 1, in \n A, B, C = int(input().split())\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p03720","language":"Python","original_status":"Runtime Error","pass":"N, M = map(int, input().split())\nroad = [0] * N\n\nfor _ in range(N):\n a, b = [int(i) for i in input().split()]\n road[a - 1] += 1\n road[b - 1] += 1\nfor r in road:\n print(r)\n","fail":"N, M = map(int, input().split())\nroad = [0] * N\n\nfor _ in range(M):\n a, b = [int(i) for i in input().split()]\n road[a - 1] += 1\n road[b - 1] += 1\nfor r in road:\n print(r)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03720\/Python\/s740453725.py\", line 5, in \n a, b = [int(i) for i in input().split()]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03720","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(m)]\n\ncnt = [0] * n\n\nfor i in range(m):\n cnt[ab[i][0] - 1] += 1\n cnt[ab[i][1] - 1] += 1\n\nfor i in range(n):\n print(cnt(i))\n","fail":"n, m = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(m)]\n\ncnt = [0] * n\n\nfor i in range(m):\n cnt[ab[i][0] - 1] += 1\n cnt[ab[i][1] - 1] += 1\n\nfor i in range(n):\n print(cnt[i])\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"TypeError: 'list' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03720\/Python\/s115921394.py\", line 11, in \n print(cnt(i))\nTypeError: 'list' object is not callable\n","stdout":null} {"problem_id":"p03721","language":"Python","original_status":"Runtime Error","pass":"n, k = [int(i) for i in input().split()]\nd = {}\nfor i in range(n):\n a, b = [int(i) for i in input().split()]\n if a in d:\n d[a] += b\n else:\n d[a] = b\nc = []\nfor k, v in sorted(d.items(), key=lambda x: x[0]):\n c += [k] * v\nprint(c[k])\n","fail":"n, k = [int(i) for i in input().split()]\ncnt = [0] * int(10e5)\nfor i in range(n):\n a, b = [int(i) for i in input().split()]\n cnt[a] += b\n\nfor i in range(1, len(cnt)):\n if k <= cnt[i]:\n print(i)\n break\n k -= cnt[i]\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":11,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03721","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\narray = []\nfor _ in range(N):\n a, b = map(int, input().split())\n array.extend([a] * b)\narray.sort()\nprint(array[K - 1])\n","fail":"from collections import Counter\n\nN, K = map(int, input().split())\nc = Counter()\nfor _ in range(N):\n a, b = map(int, input().split())\n c[a] += b\nfor item in sorted(c.items(), key=lambda x: x[0]):\n if item[1] >= K:\n print(item[0])\n break\n else:\n K -= item[1]\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03723","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\nA, B, C = map(int, input().split())\n\nif (A \/ 2) % 2 == 1 and (B \/ 2) % 2 == 1 and (C \/ 2) % 2 == 1:\n print(-1)\n sys.exit()\n\ncnt = 0\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n a = B \/\/ 2 + C \/\/ 2\n b = A \/\/ 2 + C \/\/ 2\n c = A \/\/ 2 + B \/\/ 2\n A = a\n B = b\n C = c\n cnt += 1\nprint(cnt)\n","fail":"A, B, C = map(int, input().split())\n\n\ndef F(a, b, c):\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n return 0\n if a == b == c:\n return -1\n return F((a + b) \/\/ 2, (b + c) \/\/ 2, (c + a) \/\/ 2) + 1\n\n\nprint(F(A, B, C))\n","change":"replace","i1":0,"i2":18,"j1":0,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03723","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int(input().split()))\nans = 0\n\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n if a == b == c:\n print(-1)\n exit()\n a, b, c = (b + c) \/\/ 2, (c + a) \/\/ 2, (a + b) \/\/ 2\n ans += 1\nprint(ans)\n","fail":"a, b, c = map(int, input().split())\nans = 0\n\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n if a == b == c:\n print(-1)\n exit()\n a, b, c = (b + c) \/\/ 2, (c + a) \/\/ 2, (a + b) \/\/ 2\n ans += 1\nprint(ans)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03723\/Python\/s722350702.py\", line 1, in \n a, b, c = map(int(input().split()))\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p03724","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n N, M = map(int, input().split())\n count = [0] * (N + 1)\n for _ in range(N):\n a, b = map(int, input().split())\n count[a] += 1\n count[b] += 1\n\n if all(c % 2 == 0 for c in count):\n ans = \"YES\"\n else:\n ans = \"NO\"\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n N, M = map(int, input().split())\n count = [0] * (N + 1)\n for _ in range(M):\n a, b = map(int, input().split())\n count[a] += 1\n count[b] += 1\n\n if all(c % 2 == 0 for c in count):\n ans = \"YES\"\n else:\n ans = \"NO\"\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"0","stderr":null,"stdout":"YES\n"} {"problem_id":"p03724","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = list(map(int, input().split()))\nab = [list(map(int, input().split())) for i in range(M)]\n\ncount = [0 for i in range(N)]\n\nfor aibi in ab:\n ai = aibi[0]\n bi = aibi[1]\n\n if bi < ai:\n tmp = ai\n ai = bi\n bi = tmp\n\n for j in range(ai - 1, bi - 1):\n count[j] += 1\n\nyes_or_no = True\nfor num in count:\n if num % 2 == 1:\n yes_or_no = False\n\nif yes_or_no:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"N, M = list(map(int, input().split()))\nab = [list(map(int, input().split())) for i in range(M)]\n\ncount = [0 for i in range(N)]\n\n# for aibi in ab:\n# ai = aibi[0]\n# bi = aibi[1]\n#\n# if bi < ai:\n# tmp = ai\n# ai = bi\n# bi = tmp\n#\n# for j in range(ai - 1, bi - 1):\n# count[j] += 1\n\nfor aibi in ab:\n ai = aibi[0]\n bi = aibi[1]\n if ai != 1 and bi != 1:\n count[ai - 1] += 1\n count[bi - 1] += 1\n else:\n if ai == 1:\n count[bi - 1] += 1\n else:\n count[ai - 1] += 1\n\nyes_or_no = True\nfor num in count:\n if num % 2 == 1:\n yes_or_no = False\n\nif yes_or_no:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":5,"i2":16,"j1":5,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03724","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nN, M = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(M)]\n\nctr = Counter(sum(X, []))\nif all(v % 2 == 0 for v in ctr.values()):\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"from collections import Counter\n\nN, M = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(M)]\n\nctr = Counter()\nfor a, b in X:\n ctr[a] += 1\n ctr[b] += 1\n\nif all(v % 2 == 0 for v in ctr.values()):\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03725","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import deque\n\nINF = float(\"inf\")\n\nH, W, K = map(int, input().split())\nA = [list(input()) for _ in range(H)]\n\nSi, Sj = (0, 0)\nfor i, a in enumerate(A):\n if \"S\" in a:\n Si, Sj = (i, a.index(\"S\"))\n A[Si][Sj] = \".\"\n break\n\ndistance = INF\n\nQ = deque([(0, Si, Sj)])\nwhile Q:\n cnt, i, j = Q.popleft()\n\n if A[i][j] == \"#\":\n continue\n A[i][j] = \"#\"\n\n distance = min(distance, i, j, H - i - 1, W - j - 1)\n\n if cnt >= K:\n continue\n\n for ni, nj in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):\n if 0 <= ni < H and 0 <= nj < W and A[ni][nj] == \".\":\n Q.append((cnt + 1, ni, nj))\n\nprint(-(-distance \/\/ K) + 1)\n","fail":"from collections import deque\n\nINF = float(\"inf\")\n\nH, W, K = map(int, input().split())\nA = [list(input()) for _ in range(H)]\n\nSi, Sj = (0, 0)\nfor i, a in enumerate(A):\n if \"S\" in a:\n Si, Sj = (i, a.index(\"S\"))\n A[Si][Sj] = \"c\"\n break\n\ndistance = INF\n\nQ = deque([(0, Si, Sj)])\nwhile Q:\n cnt, i, j = Q.popleft()\n\n distance = min(distance, i, j, H - i - 1, W - j - 1)\n\n if cnt >= K:\n continue\n\n for ni, nj in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):\n if 0 <= ni < H and 0 <= nj < W and A[ni][nj] == \".\":\n A[ni][nj] = \"c\"\n Q.append((cnt + 1, ni, nj))\n\nprint(-(-distance \/\/ K) + 1)\n","change":"replace","i1":11,"i2":31,"j1":11,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03729","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input().split())\n\nif A[-1] == B[0] and B[-1] == C[0]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"A, B, C = input().split()\n\nif A[-1] == B[0] and B[-1] == C[0]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":6,"error":"ValueError: invalid literal for int() with base 10: 'rng'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03729\/Python\/s355598557.py\", line 1, in \n A, B, C = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'rng'\n","stdout":null} {"problem_id":"p03730","language":"Python","original_status":"Runtime Error","pass":"import math\n\nA, B, C = map(int, input().split())\n\ngcd = math.gcd(A, B)\nif C % gcd == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"import fractions\n\nA, B, C = map(int, input().split())\n\ngcd = fractions.gcd(A, B)\nif C % gcd == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":5,"error":0,"stderr":null,"stdout":"YES\n"} {"problem_id":"p03730","language":"Python","original_status":"Runtime Error","pass":"from math import gcd\n\nA, B, C = map(int, open(0).read().split())\n\nif C % gcd(A, B) == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"from fractions import gcd\n\nA, B, C = map(int, open(0).read().split())\n\nif C % gcd(A, B) == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":0,"stderr":null,"stdout":"YES\n"} {"problem_id":"p03732","language":"Python","original_status":"Runtime Error","pass":"N, W = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(N)]\n\ndp = [[0] * (W + 1) for _ in range(N + 1)]\ndp[0][0] = 0\nfor i in range(N):\n for j in range(W + 1):\n if j < X[i][0]:\n dp[i + 1][j] = dp[i][j]\n else:\n dp[i + 1][j] = max(dp[i][j], dp[i][j - X[i][0]] + X[i][1])\n\nprint(dp[-1][-1])\n","fail":"N, W = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(N)]\n\nw0 = X[0][0]\nctr = [[] for _ in range(4)]\nfor w, v in X:\n ctr[w - w0].append(v)\n\nfor n in range(4):\n values = sorted(ctr[n], reverse=True)\n s = [0] * (len(values) + 1)\n for i in range(len(values)):\n s[i + 1] = s[i] + values[i]\n ctr[n] = s\n\nans = 0\nfor i in range(len(ctr[0])):\n for j in range(len(ctr[1])):\n for k in range(len(ctr[2])):\n for l in range(len(ctr[3])):\n tmp = ctr[0][i] + ctr[1][j] + ctr[2][k] + ctr[3][l]\n w = w0 * i + (w0 + 1) * j + (w0 + 2) * k + (w0 + 3) * l\n if w <= W:\n ans = max(ans, tmp)\n\nprint(ans)\n","change":"replace","i1":3,"i2":13,"j1":3,"j2":26,"error":0,"stderr":null,"stdout":11} {"problem_id":"p03734","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\n\nN, W = map(int, input().split())\nw = [0] * N\nv = [0] * N\nfor i in range(N):\n w[i], v[i] = map(int, input().split())\n\ndp = [[0] * (W + 1) for i in range(N + 1)]\nfor i in range(N):\n for j in range(W + 1):\n if j < w[i]:\n dp[i + 1][j] = dp[i][j]\n else:\n dp[i + 1][j] = max(dp[i][j], dp[i][j - w[i]] + v[i])\n\nprint(dp[N][W])\n","fail":"#!\/usr\/bin\/env python3\n\n\ndef rec(i, j):\n if (i, j) in dp:\n return dp[(i, j)]\n\n if i == N:\n res = 0\n elif j < w[i]:\n res = rec(i + 1, j)\n else:\n res = max(rec(i + 1, j), rec(i + 1, j - w[i]) + v[i])\n\n dp[(i, j)] = res\n return res\n\n\nN, W = map(int, input().split())\nw = [0] * N\nv = [0] * N\nfor i in range(N):\n w[i], v[i] = map(int, input().split())\n\ndp = {}\nprint(rec(0, W))\n","change":"replace","i1":1,"i2":17,"j1":1,"j2":26,"error":0,"stderr":null,"stdout":11} {"problem_id":"p03737","language":"Python","original_status":"Runtime Error","pass":"print(str.upper(input()[0]) + str.upper(input()[0]) + str.upper(input()[0]))\n","fail":"s1, s2, s3 = input().split()\nprint(str.upper(s1[0] + s2[0] + s3[0]))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03737\/Python\/s377862248.py\", line 1, in \n print(str.upper(input()[0]) + str.upper(input()[0]) + str.upper(input()[0]))\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03738","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\n\nif a > b:\n print(\"GREATER\")\nelif a < b:\n print(\"LESS\")\nelse:\n print(\"EQUAL\")\n","fail":"a = int(input())\nb = int(input())\n\nif a > b:\n print(\"GREATER\")\nelif a < b:\n print(\"LESS\")\nelse:\n print(\"EQUAL\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03738\/Python\/s948998796.py\", line 1, in \n a, b = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03738","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\n\nif a > b:\n print(\"GREATER\")\nelif a < b:\n print(\"LESS\")\nelif a == b:\n print(\"EQUAL\")\n","fail":"a = int(input())\nb = int(input())\n\nif a > b:\n print(\"GREATER\")\nelif a < b:\n print(\"LESS\")\nelif a == b:\n print(\"EQUAL\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":2,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03738\/Python\/s534142813.py\", line 1, in \n a, b = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03738","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nprint(\"GREATER\" if a > b else \"LESS\" if a < b else \"EQUAL\")\n","fail":"a, b = [int(input()) for _ in range(2)]\nprint(\"GREATER\" if a > b else \"LESS\" if a < b else \"EQUAL\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03738\/Python\/s914975918.py\", line 1, in \n a, b = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03739","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\n\nsum = a[0]\ncount = 0\n\nif a[0] == 0:\n if a[1] > 0:\n sum -= 1\n count += 1\n elif a[1] < 0:\n sum += 1\n count += 1\n\nfor i in range(1, n):\n tmp = sum\n sum += a[i]\n while tmp > 0 and sum >= 0:\n sum -= 1\n count += 1\n while tmp < 0 and sum <= 0:\n sum += 1\n count += 1\n\nprint(count)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\n# +, -, +, -, ...\nsum = 0\ncount = 0\nfor i in range(n):\n sum += a[i]\n if i % 2 == 0:\n if sum <= 0:\n count += abs(sum) + 1\n sum = 1\n else:\n if sum >= 0:\n count += abs(sum) + 1\n sum = -1\n\n# -, +, -, +, ...\nsum2 = 0\ncount2 = 0\nfor i in range(n):\n sum2 += a[i]\n if i % 2 == 0:\n if sum2 >= 0:\n count2 += abs(sum2) + 1\n sum2 = -1\n else:\n if sum2 <= 0:\n count2 += abs(sum2) + 1\n sum2 = 1\n\nprint(min(count, count2))\n","change":"replace","i1":3,"i2":25,"j1":3,"j2":32,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03739","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nan = map(int, input().split())\n\nsum_an = []\ntmp = 0\nfor a in an:\n tmp += a\n sum_an.append(tmp)\n\nc = 0\nbefore_positive = sum_an[0] <= 0\nfor i in range(n):\n if before_positive and sum_an[i] >= 0:\n p = abs(sum_an[i]) + 1\n c += p\n for j in range(i, n):\n sum_an[j] -= p\n before_positive = False\n elif not before_positive and sum_an[i] <= 0:\n p = abs(sum_an[i]) + 1\n c += p\n for j in range(i, n):\n sum_an[j] += p\n before_positive = True\n else:\n before_positive = not before_positive\n\nprint(c)\n","fail":"n = int(input())\nan = list(map(int, input().split()))\n\nc1 = 0\nc2 = 0\nsum1 = 0 # \u5076\u6570\u756a\u76ee\u304c\u6b63\nsum2 = 0 # \u5947\u6570\u756a\u76ee\u304c\u6b63\nfor i in range(n):\n sum1 += an[i]\n sum2 += an[i]\n if i % 2 == 0:\n if sum1 <= 0:\n p = abs(sum1) + 1\n c1 += p\n sum1 += p\n if sum2 >= 0:\n p = abs(sum2) + 1\n c2 += p\n sum2 -= p\n else:\n if sum1 >= 0:\n p = abs(sum1) + 1\n c1 += p\n sum1 -= p\n if sum2 <= 0:\n p = abs(sum2) + 1\n c2 += p\n sum2 += p\n\nprint(min(c1, c2))\n","change":"replace","i1":1,"i2":28,"j1":1,"j2":30,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03741","language":"Python","original_status":"Runtime Error","pass":"_ = int(input())\nA = list(map(int, input().split()))\n\n\ndef solve(i, s, k, sign):\n if i >= len(A):\n return k\n\n if sign * (s + A[i]) > 0:\n return solve(i + 1, s + A[i], k, sign * -1)\n else:\n return solve(i + 1, sign, k + abs(s + A[i]) + 1, sign * -1)\n\n\nprint(min(solve(0, 0, 0, 1), solve(0, 0, 0, -1)))\n","fail":"_ = int(input())\nA = list(map(int, input().split()))\n\nret = float(\"inf\")\n\nsign = 1\ns = 0\nk = 0\nfor a in A:\n if sign * (s + a) > 0:\n s += a\n else:\n k += abs(s + a) + 1\n s = sign\n sign *= -1\nret = min(ret, k)\n\nsign = -1\ns = 0\nk = 0\nfor a in A:\n if sign * (s + a) > 0:\n s += a\n else:\n k += abs(s + a) + 1\n s = sign\n sign *= -1\n\nret = min(ret, k)\n\n\nprint(ret)\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":32,"error":0,"stderr":null,"stdout":4} {"problem_id":"p03745","language":"Python","original_status":"Runtime Error","pass":"def upper_or_lower(i):\n if A[i] < A[i + 1]:\n return \"upper\"\n elif A[i] > A[i + 1]:\n return \"lower\"\n else:\n return upper_or_lower(i + 1)\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\nstate = \"upper\" # state \u304c upper \u304b lower \u3067\u5224\u5b9a\nans = 1\n\n# i = 0 \u306e\u51e6\u7406\nif A[0] > A[1]:\n state = \"lower\"\n\nfor i in range(2, N):\n if (state == \"upper\") and (A[i - 1] > A[i]):\n ans += 1\n if i < N - 1:\n state = upper_or_lower(i)\n elif (state == \"lower\") and (A[i - 1] < A[i]):\n ans += 1\n if i < N - 1:\n state = upper_or_lower(i)\n else:\n continue\n\nprint(ans)\n","fail":"def upper_or_lower(i):\n if A[i] < A[i + 1]:\n return \"upper\"\n elif A[i] > A[i + 1]:\n return \"lower\"\n else:\n return upper_or_lower(i + 1)\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\nstate = \"upper\" # state \u304c upper \u304b lower \u3067\u5224\u5b9a\nans = 1\n\n# i = 0 \u306e\u51e6\u7406\nif (len(A) > 2) and (A[0] > A[1]):\n state = \"lower\"\n\nfor i in range(2, N):\n if (state == \"upper\") and (A[i - 1] > A[i]):\n ans += 1\n if i < N - 1:\n state = upper_or_lower(i)\n elif (state == \"lower\") and (A[i - 1] < A[i]):\n ans += 1\n if i < N - 1:\n state = upper_or_lower(i)\n else:\n continue\n\nprint(ans)\n","change":"replace","i1":16,"i2":17,"j1":16,"j2":17,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03745","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = list(map(int, input().split))\n# N = 9\n# A = [1, 2, 1, 2, 1, 2, 1, 2, 1]\n# N = 7\n# A = [1, 2, 3, 2, 1, 999999999, 1000000000]\n# N = 6\n# A = [1, 2, 3, 2, 2, 1]\n# N = 2\n# A = [1, 1]\nA = A + [A[-1]]\n\nd = 0\ni = 0\n\ninc = None\nwhile i < N:\n if inc is None:\n if A[i] < A[i + 1]:\n inc = True\n d += 1\n elif A[i] > A[i + 1]:\n inc = False\n d += 1\n else:\n inc = None\n else:\n if inc:\n if A[i] > A[i + 1]:\n inc = None\n else:\n if A[i] < A[i + 1]:\n inc = None\n i += 1\n\nif inc is None:\n d += 1\nprint(d)\n","fail":"N = int(input())\nA = list(map(int, input().split()))\n# N = 9\n# A = [1, 2, 1, 2, 1, 2, 1, 2, 1]\n# N = 7\n# A = [1, 2, 3, 2, 1, 999999999, 1000000000]\n# N = 6\n# A = [1, 2, 3, 2, 2, 1]\n# N = 2\n# A = [1, 1]\nA = A + [A[-1]]\n\nd = 0\ni = 0\n\ninc = None\nwhile i < N:\n if inc is None:\n if A[i] < A[i + 1]:\n inc = True\n d += 1\n elif A[i] > A[i + 1]:\n inc = False\n d += 1\n else:\n inc = None\n else:\n if inc:\n if A[i] > A[i + 1]:\n inc = None\n else:\n if A[i] < A[i + 1]:\n inc = None\n i += 1\n\nif inc is None:\n d += 1\nprint(d)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'builtin_function_or_method' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03745\/Python\/s158174043.py\", line 2, in \n A = list(map(int, input().split))\nTypeError: 'builtin_function_or_method' object is not iterable\n","stdout":null} {"problem_id":"p03746","language":"Python","original_status":"Time Limit Exceeded","pass":"from queue import deque\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\ns = 1\nt = links[s].pop()\nvisited = deque([s, t])\nwhile True:\n s_remains = links[s].difference(visited)\n s_flag, t_flag = True, True\n if s_remains:\n s = s_remains.pop()\n visited.appendleft(s)\n s_flag = False\n t_remains = links[t].difference(visited)\n if t_remains:\n t = t_remains.pop()\n visited.append(t)\n t_flag = False\n if s_flag and t_flag:\n break\nprint(len(visited))\nprint(*visited)\n","fail":"from queue import deque\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\ns = 1\npath = deque([s])\nvisited = {s}\n\nwhile True:\n s_remains = links[s] - visited\n if s_remains:\n s = s_remains.pop()\n path.appendleft(s)\n visited.add(s)\n else:\n break\n\nt = 1\n\nwhile True:\n t_remains = links[t] - visited\n if t_remains:\n t = t_remains.pop()\n path.append(t)\n visited.add(t)\n else:\n break\n\nprint(len(path))\nprint(*path)\n","change":"replace","i1":10,"i2":28,"j1":10,"j2":35,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03760","language":"Python","original_status":"Runtime Error","pass":"o = list(input())\ne = list(input())\nfor i in range(len(o)):\n print(o[i] + e[i], end=\"\")\n","fail":"o = list(input())\ne = list(input()) + [\"\"]\nfor i, j in zip(o, e):\n print(i + j, end=\"\")\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":4,"error":"WA","stderr":null,"stdout":"xaybzc"} {"problem_id":"p03761","language":"Python","original_status":"Runtime Error","pass":"n = int(input()) - 1\na = list(input())\nwhile n and a:\n n -= 1\n a = [i for i in a if i in input()]\nprint(a)\n","fail":"n = int(input())\n\ncnt = [10000] * 26\n\nfor i in range(n):\n s = input()\n tmp = [0] * 26\n for c in s:\n tmp[ord(c) - ord(\"a\")] += 1\n for j in range(26):\n cnt[j] = min(cnt[j], tmp[j])\n\na = \"\"\nfor i in range(26):\n if cnt[i]:\n a = a + chr(ord(\"a\") + i) * cnt[i]\nprint(a)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":16,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03761\/Python\/s024080261.py\", line 5, in \n a = [i for i in a if i in input()]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03761\/Python\/s024080261.py\", line 5, in \n a = [i for i in a if i in input()]\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03761","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\nalphabet_histgram = [[0 for _ in range(n)] for _ in range(25)]\nord_a = ord(\"a\")\n\nfor i in range(n):\n S = input()\n for c in S:\n alphabet_histgram[ord(c) - ord_a][i] += 1\n\nret = \"\"\nfor i, hist_c in enumerate(alphabet_histgram):\n ret += chr(ord_a + i) * min(hist_c)\n\nprint(ret)\n","fail":"n = int(input())\nalphabet_histgram = [[0 for _ in range(n)] for _ in range(26)]\nord_a = ord(\"a\")\n\nfor i in range(n):\n S = input()\n for c in S:\n alphabet_histgram[ord(c) - ord_a][i] += 1\n\nret = \"\"\nfor i, hist_c in enumerate(alphabet_histgram):\n ret += chr(ord_a + i) * min(hist_c)\n\nprint(ret)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":"aac\n"} {"problem_id":"p03762","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = list(map(int, input().split()))\nx = list(map(int, input().split()))\ny = list(map(int, input().split()))\n\nsum_x = 0\nfor i in range(0, n):\n tmp_x = x[i]\n sum_x += sum(list(filter(lambda ele: ele > 0, (map(lambda ele: ele - tmp_x, x)))))\n\nsum_y = 0\nfor i in range(0, m):\n tmp_y = y[i]\n sum_y += sum(list(filter(lambda ele: ele > 0, (map(lambda ele: ele - tmp_y, y)))))\n\nans = sum_x * sum_y\n\ndivide_num = pow(10, 9) + 7\nprint(ans % divide_num)\n","fail":"n, m = list(map(int, input().split()))\nx = list(map(int, input().split()))\ny = list(map(int, input().split()))\n\nsum_x = 0\nfor i in range(0, n):\n sum_x += i * x[i] - (n - (i + 1)) * x[i]\n\nsum_y = 0\nfor i in range(0, m):\n sum_y += i * y[i] - (m - (i + 1)) * y[i]\n\nans = sum_x * sum_y\n\ndivide_num = pow(10, 9) + 7\nprint(ans % divide_num)\n","change":"replace","i1":6,"i2":13,"j1":6,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03765","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef restore(s):\n while len(s) > 1:\n s = s.replace(\"AA\", \"B\")\n s = s.replace(\"BB\", \"A\")\n s = s.replace(\"AB\", \"\")\n s = s.replace(\"BA\", \"\")\n return s\n\n\nS = input()\nT = input()\nq = int(input())\nfor _ in range(q):\n a, b, c, d = map(int, input().split())\n r_s = restore(S[a - 1 : b])\n r_t = restore(T[c - 1 : d])\n print(\"YES\") if r_s == r_t else print(\"NO\")\n","fail":"import sys\nfrom itertools import accumulate\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef acc(li, n):\n res = [0] * (n + 1)\n for i in range(n):\n if li[i] == \"A\":\n res[i + 1] = 1\n elif li[i] == \"B\":\n res[i + 1] = 2\n return list(accumulate(res))\n\n\ndef restore(x, y, li):\n return (li[y] - li[x - 1]) % 3\n\n\nS = input()\nT = input()\nN = len(S)\nM = len(T)\n\nacc_S = acc(S, N)\nacc_T = acc(T, M)\n\nq = int(input())\nfor _ in range(q):\n a, b, c, d = map(int, input().split())\n v_S = restore(a, b, acc_S)\n v_T = restore(c, d, acc_T)\n print(\"YES\") if v_S == v_T else print(\"NO\")\n","change":"replace","i1":1,"i2":24,"j1":1,"j2":36,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03767","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nmember = sorted(map(int, input().split()))\nans = 0\nwhile member:\n member.pop()\n ans += member.pop()\n member.pop(0)\nprint(ans)\n","fail":"N = int(input())\nmember = sorted(map(int, input().split()))\nans = sum(member[N::2])\nprint(ans)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":3,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03768","language":"Python","original_status":"Time Limit Exceeded","pass":"from queue import deque\n\n\ndef dijkstra(s, d):\n queue = deque([(0, s)])\n paint = set()\n while queue:\n cost, v = queue.popleft()\n if cost > d:\n break\n paint.add(v)\n queue.extend((cost + 1, u) for u in links[v] if u not in paint)\n return paint\n\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\nq = int(input())\nqueries = [map(int, input().split()) for _ in range(q)]\npainted = set()\ncolors = [0] * (n + 1)\nwhile queries:\n v, d, c = queries.pop()\n paint = dijkstra(v, d) - painted\n for i in paint:\n colors[i] = c\n painted |= paint\n\nfor c in colors[1:]:\n print(c)\n","fail":"from queue import deque\n\n\ndef paint(s, d, c):\n queue = deque([(d, s)])\n while queue:\n remains, v = queue.popleft()\n if painted[v] >= remains:\n continue\n if colors[v] == 0:\n colors[v] = c\n painted[v] = remains\n if remains:\n queue.extend((remains - 1, u) for u in links[v])\n\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\nq = int(input())\nqueries = [map(int, input().split()) for _ in range(q)]\ncolors = [0] * (n + 1)\npainted = [-1] * (n + 1)\nwhile queries:\n paint(*queries.pop())\n\nfor c in colors[1:]:\n print(c)\n","change":"replace","i1":3,"i2":32,"j1":3,"j2":29,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03769","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nans = []\nc = 1\ncan = (1 << 40) - 1\nneeds = 41\n\nwhile n:\n if n >= can:\n n -= can\n ans.extend([c] * needs)\n c += 1\n else:\n can >>= 1\n needs -= 1\n\nassert len(ans) <= 200\n\nprint(len(ans))\nprint(*ans)\n","fail":"def test():\n from itertools import combinations\n\n s = \"111223111223\"\n result = 0\n for k in range(1, len(s) \/\/ 2 + 1):\n for idx in combinations(range(len(s)), 2 * k):\n success = True\n for ii in range(k):\n if s[idx[ii]] != s[idx[ii + k]]:\n success = False\n break\n if success:\n result += 1\n print(result)\n\n\nn = int(input())\n\nfactorials = [1, 1]\nfor i in range(2, 40):\n factorials.append(factorials[-1] * i)\n\npatterns = {}\nfor i in range(2, 40):\n base = (1 << (i - 1)) - 1\n gain = base\n chars = i\n if gain > n:\n break\n if gain not in patterns or chars < patterns[gain][0]:\n patterns[gain] = (chars, (i,))\n if i % 2 == 1:\n continue\n\n a = i \/\/ 2\n ncr1 = factorials[i] \/\/ factorials[a] \/\/ factorials[a] - 1\n\n for b in range(1, a + 1):\n base2 = (1 << (2 * b - 1)) - 1\n ncr2 = factorials[2 * b] \/\/ factorials[b] \/\/ factorials[b] - 1\n gain = base + base2 + ncr1 * ncr2\n chars = i + 2 * b\n if gain > n:\n break\n if gain not in patterns or chars < patterns[gain][0]:\n patterns[gain] = (chars, (a, b))\n\n for c in range(1, b + 1):\n base3 = (1 << (2 * c - 1)) - 1\n ncr3 = factorials[2 * c] \/\/ factorials[c] \/\/ factorials[c] - 1\n gain = (\n base\n + base2\n + base3\n + ncr1 * ncr2 * ncr3\n + ncr1 * ncr2\n + ncr2 * ncr3\n + ncr3 * ncr1\n )\n chars = i + 2 * b + 2 * c\n if gain > n:\n break\n if gain not in patterns or chars < patterns[gain][0]:\n patterns[gain] = (chars, (a, b, c))\n\n for d in range(1, c + 1):\n base4 = (1 << (2 * d - 1)) - 1\n ncr4 = factorials[2 * d] \/\/ factorials[d] \/\/ factorials[d] - 1\n gain = base + base2 + base3 + base4 + ncr1 * ncr2 * ncr3 * ncr4\n gain += (\n ncr1 * ncr2 * ncr3\n + ncr1 * ncr2 * ncr4\n + ncr1 * ncr3 * ncr4\n + ncr2 * ncr3 * ncr4\n )\n gain += (\n ncr1 * ncr2\n + ncr1 * ncr3\n + ncr1 * ncr4\n + ncr2 * ncr3\n + ncr2 * ncr4\n + ncr3 * ncr4\n )\n chars = i + 2 * b + 2 * c + 2 * d\n if gain > n:\n break\n if gain not in patterns or chars < patterns[gain][0]:\n patterns[gain] = (chars, (a, b, c, d))\n\n\ndef dfs(use, i, remaining, total_char):\n if remaining == 0:\n return total_char <= 200\n\n for j in range(i, len(patterns)):\n gain, (chars, lengths) = patterns[j]\n if total_char + remaining * chars \/ gain > 200:\n break\n if gain > remaining:\n continue\n use.append(lengths)\n result = dfs(use, j, remaining - gain, total_char + chars)\n if result:\n return True\n use.pop()\n\n return False\n\n\npatterns = sorted(patterns.items(), key=lambda item: item[0] \/ item[1][0], reverse=True)\n\nuse = []\nresult = dfs(use, 0, n, 0)\nassert result\n\nans = []\nc = 1\nfor lengths in use:\n if len(lengths) == 1:\n ans.extend([c] * lengths[0])\n c += 1\n else:\n for _ in range(2):\n for i, l in enumerate(lengths):\n ans.extend([c + i] * l)\n c += len(lengths)\n\nprint(len(ans))\nprint(*ans)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":127,"error":0,"stderr":null,"stdout":"4\n1 1 1 1\n"} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nmin_l = len(str(N))\no_min_l = min_l\n\nfor i in range(1, N):\n if N % i == 0:\n j = int(N \/ i)\n min_l = min(min_l, max(len(str(i)), len(str(j))))\nprint(min_l)\n","fail":"import math\n\nN = int(input())\n\nmin_l = len(str(N))\n\nfor i in range(1, int(math.sqrt(N)) + 1):\n if N % i == 0:\n j = int(N \/ i)\n min_l = min(min_l, max(len(str(i)), len(str(j))))\nprint(min_l)\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"# \u5165\u529b : \u81ea\u7136\u6570 ex) 12\n# \u51fa\u529b : \u7d04\u6570\u30ea\u30b9\u30c8 ex) [2, 2, 3]\ndef factorization(n):\n R = int(n)\n s = 0\n L = []\n div = 2\n while s == 0:\n for i in range(div, R + 1):\n if n % i == 0:\n n = n \/ i\n div = i\n if n == 1:\n s = 1\n L.append(i)\n break\n return L\n\n\nn = int(input())\nif n == 1:\n print(1)\n exit()\ndivs = factorization(n)\nN = [i for i in divs] # N = bit\u63a2\u7d22\u3059\u308b\u6841\u6570\nmaxDigit = n\n# N\u306e\u8981\u7d20\u306e\u5168\u7d44\u307f\u5408\u308f\u305b\u304c\u51fa\u529b\nfor i in range(1, 1 << len(N)):\n output = []\n nonout = []\n outNum = 1\n nonOutNum = 1\n for j in range(len(N)):\n if ((i >> j) & 1) == 1:\n output.append(N[j]) # \u3053\u306ej\u304c\u4eca\u56de\u63a2\u7d22\u3059\u308bindex\u306e1\u3064\n outNum *= N[j]\n else:\n nonout.append(N[j])\n nonOutNum *= N[j]\n # print(\"{} vs {}\".format(outNum, nonOutNum))\n digitOut = 0\n digitNonOut = 0\n while outNum > 0:\n digitOut += 1\n outNum = int(outNum \/ 10)\n while nonOutNum > 0:\n digitNonOut += 1\n nonOutNum = int(nonOutNum \/ 10)\n if max(digitOut, digitNonOut) < maxDigit:\n maxDigit = max(digitOut, digitNonOut)\nprint(maxDigit)\n","fail":"# \u5165\u529b : \u81ea\u7136\u6570 ex) 12\n# \u51fa\u529b : \u7d04\u6570\u30ea\u30b9\u30c8 ex) [(2,2),(3,1)]\ndef factorize(n):\n fct = [] # prime factor\n b, e = 2, 0 # base, exponent\n while b * b <= n:\n while n % b == 0:\n n = n \/\/ b\n e = e + 1\n if e > 0:\n fct.append((b, e))\n b, e = b + 1, 0\n if n > 1:\n fct.append((n, 1))\n return fct\n\n\ndef divisorize(fct):\n b, e = fct.pop() # base, exponent\n pre_div = divisorize(fct) if fct else [[]]\n suf_div = [[(b, k)] for k in range(e + 1)]\n return [pre + suf for pre in pre_div for suf in suf_div]\n\n\ndef num(fct):\n a = 1\n for base, exponent in fct:\n a = a * base**exponent\n return a\n\n\nn = int(input())\nif n == 1:\n print(1)\n exit()\nfct = factorize(n)\nmaxDigit = n\nfor div in divisorize(fct):\n outNum = num(div)\n nonOutNum = int(n \/ outNum)\n digitOut = 0\n digitNonOut = 0\n while outNum > 0:\n digitOut += 1\n outNum = int(outNum \/ 10)\n while nonOutNum > 0:\n digitNonOut += 1\n nonOutNum = int(nonOutNum \/ 10)\n if max(digitOut, digitNonOut) < maxDigit:\n maxDigit = max(digitOut, digitNonOut)\nprint(maxDigit)\n","change":"replace","i1":1,"i2":40,"j1":1,"j2":40,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"import math\n\nN = int(input())\n\nmin_length = -1\nfor i in range(int(math.sqrt(N))):\n for j in range(i + 1):\n A = j + 1\n if N % A == 0:\n B = int(N \/ A)\n len_a = len(str(A))\n len_b = len(str(B))\n length = len_a if len_a >= len_b else len_b\n if min_length == -1 or length < min_length:\n # print(\"len:{}, A:{}, B:{}\".format(length, A, B))\n min_length = length\nprint(min_length)\n","fail":"import math\n\nN = int(input())\n\nmin_length = -1\nfor A in range(1, int(math.sqrt(N)) + 1, 1):\n if N % A == 0:\n B = int(N \/ A)\n len_a = len(str(A))\n len_b = len(str(B))\n length = len_a if len_a >= len_b else len_b\n if min_length == -1 or length < min_length:\n # print(\"len:{}, A:{}, B:{}\".format(length, A, B))\n min_length = length\nprint(min_length)\n","change":"replace","i1":5,"i2":16,"j1":5,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03775","language":"Python","original_status":"Runtime Error","pass":"import math\n\nN = int(input())\n\nfor i in range(1, math.floor(math.sqrt(N))):\n if N % i == 0:\n factor = N \/ i\n\nfactor = int(factor)\nprint(len(str(factor)))\n","fail":"import math\n\nN = int(input())\n\nfor i in range(1, math.ceil(math.sqrt(N)) + 1):\n if N % i == 0:\n factor1 = N \/ i\n factor2 = i\n\nfactor1 = int(factor1)\n\nif factor1 < factor2:\n print(len(str(factor2)))\nelse:\n print(len(str(factor1)))\n","change":"replace","i1":4,"i2":10,"j1":4,"j2":15,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nres = 10**10 + 1\nfor A in range(1, N + 1):\n if N % A == 0:\n B = N \/\/ A\n a = len(str(A))\n b = len(str(B))\n if a > b:\n num = a\n else:\n num = b\n if res > num:\n res = num\nprint(res)\n","fail":"import math\n\nN = int(input())\nans = float(\"Inf\")\nsq = int(math.sqrt(N)) + 1\nfor i in range(1, sq):\n if N % i == 0:\n a = len(str(i))\n b = len(str(N \/\/ i))\n if a > b:\n num = a\n else:\n num = b\n if ans > num:\n ans = num\nprint(ans)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"from math import ceil, sqrt, floor, log10\n\nN = int(input())\n\nfor i in range(ceil(sqrt(N)), N + 1):\n if N % i == 0:\n print(floor(log10(i)) + 1)\n break\n","fail":"from math import floor, sqrt, log10\n\nN = int(input())\n\nfor i in range(floor(sqrt(N)), 0, -1):\n if N % i == 0:\n print(floor(log10(N \/\/ i)) + 1)\n break\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03775","language":"Python","original_status":"Runtime Error","pass":"import math\n\nN = int(input())\ntmp = math.isqrt(N)\nwhile N % tmp:\n tmp -= 1\nprint(len(str(N \/\/ tmp)))\n","fail":"import math\n\nN = int(input())\n\ntmp = math.floor(math.sqrt(N))\nwhile N % tmp:\n tmp -= 1\nprint(len(str(N \/\/ tmp)))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":5,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03775","language":"Python","original_status":"Runtime Error","pass":"from math import sqrt, ceil, floor, log10\n\nN = int(input())\n\nmin_f = ceil(log10(N))\nfor A in range(1, ceil(sqrt(N))):\n if N % A != 0:\n continue\n else:\n B = N \/\/ A\n f = floor(max(log10(A), log10(B))) + 1\n if f < min_f:\n min_f = f\n\nprint(f)\n","fail":"from math import sqrt, ceil, floor, log10\n\nN = int(input())\n\nmin_f = floor(log10(N)) + 1\nfor A in range(1, ceil(sqrt(N)) + 1):\n if N % A != 0:\n continue\n else:\n B = N \/\/ A\n f = floor(max(log10(A), log10(B))) + 1\n if f < min_f:\n min_f = f\n\nprint(f)\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":6,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03775","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\n\nsqr = int(n**0.5)\nl1 = len(str(sqr))\n\npf = {}\nfor i in range(2, int(n**0.5) + 1):\n while not n % i:\n pf[i] = pf.get(i, 0) + 1\n n \/\/= i\nif n > 1:\n pf[n] = 1\n\nls = sorted(pf.items(), key=lambda x: x[0], reverse=True)\nl2 = len(str(ls[0][0]))\n\nprint(max(l1, l2))\n","fail":"n = int(input())\nm = n * 1\n\nif n == 1:\n print(1)\n exit()\n\nsqr = int(n**0.5)\nl1 = len(str(sqr))\n\npf = {}\nfor i in range(2, int(m**0.5) + 1):\n while not m % i:\n pf[i] = pf.get(i, 0) + 1\n m \/\/= i\nif m > 1:\n pf[m] = 1\n\nls = sorted(pf.items(), key=lambda x: x[0], reverse=True)\nl2 = len(str(ls[0][0]))\nother = n \/\/ ls[0][0]\nl3 = len(str(other))\n\nif l1 <= l2 < l3:\n print(l3)\nelse:\n print(max(l1, l2))\n","change":"replace","i1":1,"i2":17,"j1":1,"j2":27,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03775","language":"Python","original_status":"Time Limit Exceeded","pass":"import math\n\nnum = int(input())\nnum_sqrt = int(math.sqrt(num))\n\nA = num_sqrt\nwhile num % A != 0:\n A += 1\nB = int(num \/ A)\nA, B = str(A), str(B)\nans = max(len(A), len(B))\nprint(ans)\n","fail":"import math\n\nnum = int(input())\nnum_sqrt = int(math.sqrt(num))\n\nans = 11\nfor A in range(1, num_sqrt + 1):\n if num % A == 0:\n B = int(num \/ A)\n A, B = str(A), str(B)\n now_ans = max(len(A), len(B))\n ans = min(ans, now_ans)\nprint(ans)\n","change":"replace","i1":5,"i2":11,"j1":5,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03776","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nfrom math import factorial\n\n\ndef comb(n, r):\n nf = factorial(n)\n rf = factorial(r)\n nrf = factorial(n - r)\n return int(nf \/ (rf * nrf))\n\n\nn, a, b = map(int, input().split())\ngoods = list(reversed(sorted([int(x) for x in input().split()])))\n\navg, total = sum(goods[:a]) \/ a, 0\n\nlastcount, lastindex = 0, 0\nfor i, val in enumerate(goods):\n if val == goods[a - 1]:\n lastcount += 1\n if i < a:\n lastindex += 1\n\nif a == 1 or goods[0] != goods[a - 1]:\n total += comb(lastcount, lastindex)\nelse:\n for i in range(a, b + 1):\n total += comb(lastcount, i)\n\nprint(avg)\nprint(total)\n","fail":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nfrom math import factorial\n\n\ndef comb(n, r):\n nf = factorial(n)\n rf = factorial(r)\n nrf = factorial(n - r)\n return int(nf \/ (rf * nrf))\n\n\nn, a, b = map(int, input().split())\ngoods = list(reversed(sorted([int(x) for x in input().split()])))\n\navg, total = sum(goods[:a]) \/ a, 0\n\nlastcount, lastindex = 0, 0\nfor i, val in enumerate(goods):\n if val == goods[a - 1]:\n lastcount += 1\n if i < a:\n lastindex += 1\n\nif goods[0] != goods[a - 1]:\n total += comb(lastcount, lastindex)\nelse:\n for i in range(a - 1, b):\n if goods[a - 1] != goods[i]:\n break\n total += comb(lastcount, i + 1)\n\nprint(\"{}\\\\n{}\".format(avg, total))\n","change":"replace","i1":25,"i2":33,"j1":25,"j2":34,"error":"WA","stderr":null,"stdout":"4.5\n1\n"} {"problem_id":"p03777","language":"Python","original_status":"Runtime Error","pass":"a, b = list(map(int, input().split()))\nif a == \"H\":\n print(b)\nelse:\n if b == \"H\":\n print(\"D\")\n else:\n print(\"H\")\n","fail":"a, b = input().split()\nif a == \"H\":\n print(b)\nelse:\n if b == \"H\":\n print(\"D\")\n else:\n print(\"H\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'H'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03777\/Python\/s798758303.py\", line 1, in \n a, b = list(map(int, input().split()))\nValueError: invalid literal for int() with base 10: 'H'\n","stdout":null} {"problem_id":"p03777","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nif a == \"H\":\n print(b)\nelse:\n if b == \"H\":\n print(\"D\")\n else:\n print(\"H\")\n","fail":"a, b = input().split()\nif a == \"H\":\n print(b)\nelse:\n if b == \"H\":\n print(\"D\")\n else:\n print(\"H\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'H'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03777\/Python\/s046292016.py\", line 1, in \n a, b = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'H'\n","stdout":null} {"problem_id":"p03778","language":"Python","original_status":"Runtime Error","pass":"w, a, b = map(int, input().split())\n\nif b > a + w:\n print(b - a - w)\nelif b + w < a:\n print(a - b - w)\nelse:\n print(0)\nw, a, b = map(int, input().split())\n\nif b > a + w:\n print(b - a - w)\nelif b + w < a:\n print(a - b - w)\nelse:\n print(0)\n","fail":"w, a, b = map(int, input().split())\n\nif b > a + w:\n print(b - a - w)\nelif b + w < a:\n print(a - b - w)\nelse:\n print(0)\n","change":"delete","i1":8,"i2":16,"j1":8,"j2":8,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03778\/Python\/s917667929.py\", line 9, in \n w, a, b = map(int, input().split())\nEOFError: EOF when reading a line\n","stdout":1} {"problem_id":"p03779","language":"Python","original_status":"Time Limit Exceeded","pass":"X = int(input())\ndp = set([0])\n\nans = 0\nwhile X not in dp:\n ans += 1\n for i in list(dp):\n if i + ans not in dp:\n dp.add(i + ans)\n if i - ans not in dp:\n dp.add(i - ans)\nprint(ans)\n","fail":"X = int(input())\n\nans = 0\nsums = 0\nwhile sums < X:\n ans += 1\n sums += ans\nprint(ans)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03779","language":"Python","original_status":"Time Limit Exceeded","pass":"X = int(input())\n# X > 0 \u306a\u306e\u3067\u30de\u30a4\u30ca\u30b9\u65b9\u5411\u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u9078\u629e\u80a2\u306f\u9078\u3070\u306a\u3044\ncnt = 0\nwhile X != 0:\n if X != cnt + 1:\n X -= cnt\n cnt += 1\nprint(cnt - 1)\n","fail":"X = int(input())\nacc = 0\n# X > 0 \u306a\u306e\u3067\u30de\u30a4\u30ca\u30b9\u65b9\u5411\u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u9078\u629e\u80a2\u306f\u9078\u3070\u306a\u3044\nfor i in range(X + 1):\n acc += i\n if X <= acc:\n ans = i\n break\nprint(i)\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03779","language":"Python","original_status":"Runtime Error","pass":"from itertools import combinations\n\nint_x = int(input())\n\nanswer = int_x\n\nfor i in range(1, int_x + 1):\n c = combinations(range(1, int_x + 1), i)\n for w_c in c:\n if sum(w_c) == int_x:\n answer = min(answer, max(w_c))\nprint(answer)\n","fail":"x = int(input())\n\nw = 0\nfor i in range(1, x + 1):\n w += i\n if w >= x:\n print(i)\n exit(0)\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":8,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03779","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\nprint([2, 1][m > 1])\n","fail":"x = int(input())\nans = i = 0\nwhile i < x:\n ans += 1\n i += ans\nprint(ans)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":6,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03779\/Python\/s896370113.py\", line 1, in \n n, m = map(int, input().split())\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03779","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nx = int(input())\ni, pos = 0, set([0])\n\nwhile True:\n inner = False\n new_pos = set()\n for p in pos:\n if p + i == x or p - i == x:\n inner = True\n break\n new_pos.add(p)\n new_pos.add(p + i)\n new_pos.add(p - i)\n\n if inner:\n print(i)\n break\n\n pos = new_pos\n i += 1\n","fail":"#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\nx = int(input())\n\n\ntotal = 0\nfor i in range(x + 1):\n total += i\n if total >= x:\n print(i)\n break\n","change":"replace","i1":4,"i2":23,"j1":4,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03780","language":"Python","original_status":"Runtime Error","pass":"N, K = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort()\n\n\n# [ok, ng) - Maximum\n# (ng, ok] - Minimum\n# ok \u304c \u6700\u7d42\u7684\u306a\u7b54\u3048\nok = N\nng = -1\nwhile abs(ok - ng) > 1:\n mid = (ok + ng) \/\/ 2\n n = mid\n dp = set()\n dp.add(0)\n ans = set(x for x in range(max(0, K - A[n] + 1), K))\n for i in range(N):\n a = A[i]\n if i == n or a >= K:\n continue\n for j in range(K - a - 1, -1, -1):\n if j in dp:\n if j + a in ans:\n rst = True\n break\n else:\n dp.add(j + a)\n else:\n rst = False\n if rst:\n ok = mid\n else:\n ng = mid\nprint(ok)\n","fail":"def main():\n N, K = map(int, input().split())\n A = list(map(int, input().split()))\n A.sort()\n\n # [ok, ng) - Maximum\n # (ng, ok] - Minimum\n # ok \u304c \u6700\u7d42\u7684\u306a\u7b54\u3048\n ok = N\n ng = -1\n while abs(ok - ng) > 1:\n mid = (ok + ng) \/\/ 2\n n = mid\n dp = [0] * (K + 1)\n dp[0] = 1\n for i in range(N):\n a = A[i]\n if i == n or a >= K:\n continue\n for j in range(K, -1, -1):\n dp[min(K, j + a)] |= dp[j]\n rst = any(dp[k] for k in range(max(0, K - A[n]), K))\n if rst:\n ok = mid\n else:\n ng = mid\n print(ok)\n\n\nmain()\n","change":"replace","i1":0,"i2":34,"j1":0,"j2":30,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03780","language":"Python","original_status":"Memory Limit Exceeded","pass":"import numpy as np\n\nN, K = map(int, input().split())\nA = tuple(map(int, input().split()))\n\ndp_left = np.zeros((N + 1, K), dtype=bool)\ndp_right = np.zeros((N + 1, K), dtype=bool)\ndp_left[0, 0] = 1\ndp_right[N, 0] = 1\n\nfor i in range(N):\n dp_left[i + 1] = dp_left[i]\n dp_right[N - i - 1] = dp_right[N - i]\n if (a := A[i]) < K:\n dp_left[i + 1, a:] |= dp_left[i, :-a]\n if (a := A[N - i - 1]) < K:\n dp_right[N - i - 1, a:] |= dp_right[N - i, :-a]\n\nleft_true = [np.nonzero(x)[0] for x in dp_left]\ndel dp_left\nright_true = [np.nonzero(x)[0] for x in dp_right]\ndel dp_right\n\nans = 0\nfor i, a in enumerate(A):\n ss = np.searchsorted(right_true[i + 1], K - left_true[i]) - 1\n if all(right_true[i + 1][ss] + left_true[i] + a < K):\n ans += 1\nprint(ans)\n","fail":"import numpy as np\n\nN, K = map(int, input().split())\nA = tuple(map(int, input().split()))\n\ndp_left = np.zeros((N + 1, K), dtype=bool)\ndp_right = np.zeros((N + 1, K), dtype=bool)\ndp_left[0, 0] = 1\ndp_right[N, 0] = 1\n\nfor i in range(N):\n dp_left[i + 1] = dp_left[i]\n dp_right[N - i - 1] = dp_right[N - i]\n if (a := A[i]) < K:\n dp_left[i + 1, a:] |= dp_left[i, :-a]\n if (a := A[N - i - 1]) < K:\n dp_right[N - i - 1, a:] |= dp_right[N - i, :-a]\n\nans = 0\nfor i, a in enumerate(A):\n left_true = np.nonzero(dp_left[i])[0]\n right_true = np.nonzero(dp_right[i + 1])[0]\n\n ss = np.searchsorted(right_true, K - left_true) - 1\n if all(right_true[ss] + left_true + a < K):\n ans += 1\n\nprint(ans)\n","change":"replace","i1":18,"i2":28,"j1":18,"j2":27,"error":"MLE","stderr":null,"stdout":null} {"problem_id":"p03781","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n\nx = int(input())\nS = {0}\ni = 0\nwhile x not in S:\n i += 1\n S = S | {s - i for s in S} | {s + i for s in S}\nprint(i)\n","fail":"#!\/usr\/bin\/env python3\n\nimport math\n\nprint(math.ceil((-1 + (8 * int(input()) + 1) ** 0.5) \/ 2))\n","change":"replace","i1":2,"i2":9,"j1":2,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03781","language":"Python","original_status":"Time Limit Exceeded","pass":"x = int(input())\nt = 1\nds = {0}\nwhile True:\n dc = ds.copy()\n for d in dc:\n if d + t == x or d - t == x:\n break\n ds.add(d + t)\n ds.add(d - t)\n else:\n t += 1\n continue\n break\n\nprint(t)\n","fail":"from math import ceil, sqrt\n\nx = int(input())\nprint(ceil((-1 + sqrt(8 * x + 1)) \/ 2))\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03785","language":"Python","original_status":"Time Limit Exceeded","pass":"N, C, K = list(map(int, input().split()))\n\npassengers = sorted([int(input()) for i in range(N)])\nres = {}\n\nfor p in passengers:\n key = False\n for k in res.keys():\n if k <= p and p <= k + K and res[k] <= C - 1:\n res[k] += 1\n key = True\n break\n if not key:\n res[p] = 1\nprint(len(res))\n","fail":"N, C, K = list(map(int, input().split()))\n\npassengers = sorted([int(input()) for i in range(N)])\nres = 0\nbus_time = passengers[0]\nbus_count = C\nfor p in passengers:\n if bus_count == 0 or p - bus_time > K:\n res += 1\n bus_time = p\n bus_count = C - 1\n else:\n bus_count -= 1\nif bus_count != C:\n res += 1\nprint(res)\n","change":"replace","i1":3,"i2":15,"j1":3,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03785","language":"Python","original_status":"Runtime Error","pass":"def resolve():\n n, c, k = map(int, input().split())\n t = list(int(input()) for _ in range(n))\n t.sort()\n ans = 0\n limit = t[0] + k\n bus = 0\n for i in range(n):\n if t[i] <= limit:\n bus += 1\n if bus == c:\n ans += 1\n bus = 0\n if i < n:\n limit = t[i + 1] + k\n else:\n ans += 1\n bus = 1\n limit = t[i] + k\n if bus > 0:\n ans += 1\n print(ans)\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n n, c, k = map(int, input().split())\n t = list(int(input()) for _ in range(n))\n t.sort()\n ans = 1\n limit = t[0] + k\n bus = 0\n for i in range(n):\n bus += 1\n if t[i] > limit or bus > c:\n limit = t[i] + k\n ans += 1\n bus = 1\n print(ans)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":4,"i2":21,"j1":4,"j2":13,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p03785","language":"Python","original_status":"Runtime Error","pass":"N, C, K = [int(i) for i in input().split()]\nT = sorted([int(input())] for i in range(N))\nans = 1\nlimit = 0\nti = T[0]\nfor i in range(N - 1):\n limit += 1\n if ti + K < T[i + 1] or limit == C:\n ti = T[i + 1]\n ans += 1\n limit = 0\nprint(ans)\n","fail":"N, C, K = [int(i) for i in input().split()]\nT = sorted([int(input()) for i in range(N)])\nans = 1\nlimit = 0\nti = T[0]\nfor i in range(N - 1):\n limit += 1\n if ti + K < T[i + 1] or limit == C:\n ti = T[i + 1]\n ans += 1\n limit = 0\nprint(ans)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: can only concatenate list (not \"int\") to list","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03785\/Python\/s415293443.py\", line 8, in \n if ti + K < T[i + 1] or limit == C:\nTypeError: can only concatenate list (not \"int\") to list\n","stdout":null} {"problem_id":"p03786","language":"Python","original_status":"Runtime Error","pass":"from fractions import gcd\nfrom functools import reduce\n\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\ng = reduce(gcd, A)\nif K <= max(A) and K % g == 0:\n print(\"POSSIBLE\")\nelse:\n print(\"IMPOSSIBLE\")\n","fail":"from itertools import accumulate\n\n\nN, *A = map(int, open(0).read().split())\nA.sort()\nacc = list(accumulate(A))\nans = N\nfor i in range(N - 1):\n if 3 * acc[i] < acc[i + 1]:\n ans = N - i - 1\nprint(ans)\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":11,"error":"ImportError: cannot import name 'gcd' from 'fractions' (\/usr\/lib\/python3.10\/fractions.py)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03786\/Python\/s206249495.py\", line 1, in \n from fractions import gcd\nImportError: cannot import name 'gcd' from 'fractions' (\/usr\/lib\/python3.10\/fractions.py)\n","stdout":null} {"problem_id":"p03795","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nif N > 15:\n discount = N \/\/ 15\nprint(N * 800 - discount * 200)\n","fail":"N = int(input())\ndiscount = 0\nif N > 15:\n discount = N \/\/ 15\nprint(N * 800 - discount * 200)\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":2,"error":0,"stderr":null,"stdout":15800} {"problem_id":"p03795","language":"Python","original_status":"Runtime Error","pass":"i = int(input())\nd = i * 800\nb = i \/\/ 15\n\nif 0 < b:\n c = d - (200 * b)\n print(c)\nelse:\n print(c)\n","fail":"i = int(input())\nd = i * 800\nb = i \/\/ 15\n\nif 0 <= b:\n c = d - (200 * b)\n print(c)\nelse:\n print(c)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":0,"stderr":null,"stdout":15800} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n N = int(input())\n ans = 1\n mod = 10**9 + 7\n for i in range(1, N + 1):\n ans *= i\n print(ans % mod)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import math\n\n\ndef main():\n N = int(input())\n ans = math.factorial(N)\n mod = 10**9 + 7\n print(ans % mod)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"N = range(1, int(input()) + 1)\nprod = 1\nfor i in N:\n prod *= i\nprint(prod % (10**9 + 7))\n","fail":"num = 1\nfor i in range(1, int(input()) + 1):\n num = (num * i) % (10**9 + 7)\nprint(num)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\ni = 1\npower = 1\nwhile i <= n:\n power *= i\n i += 1\nprint(power % (10**9 + 7))\n","fail":"n = int(input())\n\ni = 1\npower = 1\nwhile i <= n:\n if power >= 10**9 + 7:\n power %= 10**9 + 7\n power *= i\n i += 1\nprint(power % (10**9 + 7))\n","change":"insert","i1":5,"i2":5,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\npower = 1\nfor i in range(1, N + 1):\n power *= i\nprint(power % (10**9 + 7))\n","fail":"import math\n\nN = int(input())\n\nprint(math.factorial(N) % (10**9 + 7))\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\n\ndef main(n):\n pre = 1\n for i in range(1, n):\n pre = pre * i\n return pre * n % (pow(10, 9) + 7)\n\n\nans = main(n)\nprint(ans)\n","fail":"n = int(input())\n\n\nmod_num = pow(10, 9) + 7\n\n\ndef main(n):\n pre = 1\n for i in range(2, n + 1):\n pre = pre * i % mod_num\n return pre\n\n\nans = main(n)\nprint(ans)\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\nans = 1\n\nfor i in range(n):\n ans *= i + 1\n\nprint(ans % 1000000007)\n","fail":"#!\/usr\/bin\/env python3\nn = int(input())\n\nans = 1\n\nfor i in range(n):\n ans *= i + 1\n ans %= 1000000007\n\nprint(ans)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nn = 1000000007\np = 1\nfor i in range(1, N + 1):\n p *= i\nprint(p % n)\n","fail":"N = int(input())\nn = 1000000007\np = 1\nfor i in range(1, N + 1):\n p *= i\n p %= n\nprint(p)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\np = 1\nfor i in range(1, N + 1):\n p *= i\nprint(p % 1000000007)\n","fail":"import math\n\nN = int(input())\nprint(math.factorial(N) % 1000000007)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\np = 1\nfor i in range(1, n + 1):\n p = p * i\nprint(p % 1000000007)\n","fail":"import math\n\nn = int(input())\nprint(math.factorial(n) % 1000000007)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03796","language":"Python","original_status":"Time Limit Exceeded","pass":"INF = 1000000000 + 7\nN = int(input())\nans = 1\nfor i in range(1, N + 1):\n ans *= i\n\nprint(ans % INF)\n","fail":"INF = 1000000000 + 7\nN = int(input())\nans = 1\nfor i in range(1, N + 1):\n ans = ans * i % INF\n\nprint(ans)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03797","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\nc = 0\nwhile n > 0 and m > 2:\n n -= 1\n m -= 2\n c += 1\n\nwhile m >= 4:\n m -= 4\n c += 1\nprint(c)\n","fail":"n, m = map(int, input().split())\nif n <= m \/\/ 2:\n m -= n * 2\n print(n + m \/\/ 4)\nelse:\n print(m \/\/ 2)\n","change":"replace","i1":1,"i2":11,"j1":1,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03797","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\n\nans = 0\n\nwhile True:\n if N >= 1 and M >= 2:\n N -= 1\n M -= 2\n ans += 1\n elif M >= 4:\n M -= 4\n ans += 1\n else:\n break\nprint(ans)\n","fail":"N, M = map(int, input().split())\n\nans = 0\n\nans += min(N, M \/\/ 2)\n\nN -= ans\nM -= ans * 2\n\nans += M \/\/ 4\n\nprint(ans)\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03797","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\ncomb = 0\n\nwhile m >= 2 and n >= 1:\n comb += 1\n m -= 2\n n -= 1\n\ncomb += m \/\/ 4\n\nprint(comb)\n","fail":"n, m = map(int, input().split())\ncomb = 0\n\nif 2 * n >= m:\n comb += m \/\/ 2\n m -= comb * 2\nelse:\n comb += n\n m -= 2 * n\n\ncomb += m \/\/ 4\n\nprint(comb)\n","change":"replace","i1":3,"i2":7,"j1":3,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03797","language":"Python","original_status":"Time Limit Exceeded","pass":"N, M = map(int, input().split())\n\nans = 0\nwhile N > 0 and M > 0:\n if M < 2:\n break\n N -= 1\n M -= 2\n ans += 1\n\nwhile M >= 4:\n M -= 4\n ans += 1\n\nprint(ans)\n","fail":"N, M = map(int, input().split())\n\ns, c = N, M \/\/ 2\n\nans = 0\nif s > c:\n ans = c\nelse:\n ans = (M - s * 2) \/\/ 4 + s\nprint(ans)\n","change":"replace","i1":2,"i2":14,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03799","language":"Python","original_status":"Time Limit Exceeded","pass":"n, m = map(int, input().split())\n\ncnt = 0\nfor _ in range(n):\n if m >= 2:\n m -= 2\n cnt += 1\nfor _ in range(m \/\/ 4):\n if m >= 4:\n m -= 4\n cnt += 1\nprint(cnt)\n","fail":"n, m = map(int, input().split())\n\ncnt = min(n, m \/\/ 2)\nprint(cnt + (m - cnt * 2) \/\/ 4)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":4,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03805","language":"Python","original_status":"Runtime Error","pass":"from itertools import permutations\n\nN, M = map(int, input().split())\nG = [[] for _ in range(N)]\nfor _ in range(N):\n a, b = map(int, input().split())\n a, b = a - 1, b - 1\n G[a].append(b)\n G[b].append(a)\n\nres = 0\nfor P in permutations(range(N), N):\n if P[0] != 0:\n continue\n for i in range(N - 1):\n if P[i + 1] not in G[P[i]]:\n break\n else:\n res += 1\n\nprint(res)\n","fail":"from itertools import permutations\n\nN, M = map(int, input().split())\nG = [[] for _ in range(N)]\nfor _ in range(M):\n a, b = map(int, input().split())\n a, b = a - 1, b - 1\n G[a].append(b)\n G[b].append(a)\n\nres = 0\nfor P in permutations(range(N), N):\n if P[0] != 0:\n continue\n for i in range(N - 1):\n if P[i + 1] not in G[P[i]]:\n break\n else:\n res += 1\n\nprint(res)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03805","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\n\nN, M = map(int, input().split())\nedges = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(M)]\n\nres = 0\nif M < N - 1:\n print(res)\nelse:\n for path in itertools.permutations(edges, N - 1):\n vertex = [True] * N\n v = 0\n vertex[v] = False\n for edge in path:\n if v in edge:\n nv = edge[0] if v == edge[1] else edge[1]\n if vertex[nv]:\n vertex[nv] = False\n v = nv\n continue\n break\n else:\n res += 1\n print(res)\n","fail":"N, M = map(int, input().split())\n\nedges = [[] for _ in range(N)]\nfor _ in range(M):\n a, b = map(int, input().split())\n edges[a - 1].append(b - 1)\n edges[b - 1].append(a - 1)\n\n\ndef dfs(node, track):\n if len(track) == N:\n global res\n res += 1\n else:\n for dst in [x for x in edges[node] if x not in track]:\n dfs(dst, track + tuple([dst]))\n\n\nres = 0\ndfs(0, tuple([0]))\nprint(res)\n","change":"replace","i1":0,"i2":25,"j1":0,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03805","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\n\nN, M = map(int, input().split())\nedges = [tuple(map(lambda x: int(x) - 1, input().split())) for _ in range(M)]\n\nres = 0\nif M < N - 1:\n print(res)\nelse:\n for course in itertools.combinations(edges, N - 1):\n\n num_of_v = [0] * N\n for edge in course:\n num_of_v[edge[0]] += 1\n num_of_v[edge[1]] += 1\n if num_of_v[0] != 1 and max(num_of_v) != 2:\n continue\n\n for root in itertools.permutations(course):\n vertex = [False] + [True] * (N - 1)\n v = 0\n for edge in root:\n if v in edge:\n nv = edge[0] if v == edge[1] else edge[1]\n if vertex[nv]:\n vertex[nv] = False\n v = nv\n continue\n break\n else:\n res += 1\n print(res)\n","fail":"def main():\n import sys\n from itertools import permutations\n\n # readline = sys.stdin.buffer.readline\n readlines = sys.stdin.readlines\n N, M = map(int, input().split())\n edge = [[0] * N for _ in range(N)]\n for s in readlines():\n a, b = map(int, s.split())\n a -= 1\n b -= 1\n edge[a][b] = 1\n edge[b][a] = 1\n\n cnt = 0\n for path in permutations(range(1, N)):\n path = [0] + list(path)\n for i in range(N - 1):\n v = path[i]\n nv = path[i + 1]\n if edge[v][nv] == 0:\n break\n else:\n cnt += 1\n print(cnt)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":0,"i2":33,"j1":0,"j2":30,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03805","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nsys.setrecursionlimit(500 * 500)\n\nn, m = map(int, input().split())\ngraph = [[] for _ in range(n + 1)]\nfor _ in range(n):\n a, b = map(int, input().split())\n graph[a].append(b)\n graph[b].append(a)\n\nvisit = [0] * (n + 1)\n\n\ndef dfs(now, depth):\n if visit[now]:\n return 0\n if depth == n:\n return 1\n\n count = 0\n visit[now] = 1\n if graph[now]:\n for i in graph[now]:\n count += dfs(i, depth + 1)\n visit[now] = 0\n\n return count\n\n\nans = dfs(1, 1)\nprint(ans)\n","fail":"n, m = map(int, input().split())\ngraph = [[] for _ in range(n + 1)]\nfor _ in range(m):\n a, b = map(int, input().split())\n graph[a].append(b)\n graph[b].append(a)\n\nvisit = [0] * (n + 1)\n\n\ndef dfs(now, depth):\n if visit[now]:\n return 0\n if depth == n:\n return 1\n\n count = 0\n visit[now] = 1\n if graph[now]:\n for i in graph[now]:\n count += dfs(i, depth + 1)\n visit[now] = 0\n\n return count\n\n\nans = dfs(1, 1)\nprint(ans)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":3,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03805","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nsys.setrecursionlimit(10**6)\n\nN, M = map(int, input().split())\ngraph = [set([]) for _ in range(M)]\nfor _ in range(M):\n a, b = map(int, input().split())\n graph[a - 1].add(b - 1)\n graph[b - 1].add(a - 1)\n\n\ndef dfs(graph, visited, v):\n if all(visited):\n return 1\n\n cnt = 0\n for u in graph[v]:\n if visited[u]:\n continue\n visited[u] = True\n cnt += dfs(graph, visited, u)\n visited[u] = False\n\n return cnt\n\n\nvisited = [False] * len(graph)\nvisited[0] = True\nans = dfs(graph, visited, 0)\nprint(ans)\n","fail":"import sys\n\nsys.setrecursionlimit(10**6)\n\nN, M = map(int, input().split())\ngraph = [set([]) for _ in range(N)]\nfor _ in range(M):\n a, b = map(int, input().split())\n graph[a - 1].add(b - 1)\n graph[b - 1].add(a - 1)\n\n\ndef dfs(graph, visited, v):\n if all(visited):\n return 1\n\n cnt = 0\n for u in graph[v]:\n if visited[u]:\n continue\n visited[u] = True\n cnt += dfs(graph, visited, u)\n visited[u] = False\n\n return cnt\n\n\nvisited = [False] * len(graph)\nvisited[0] = True\nans = dfs(graph, visited, 0)\nprint(ans)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"0","stderr":null,"stdout":2.0} {"problem_id":"p03806","language":"Python","original_status":"Time Limit Exceeded","pass":"inf = float(\"inf\")\nN, Ma, Mb = map(int, input().split())\nABC = []\nfor _ in range(N):\n a, b, c = map(int, input().split())\n ABC.append((a, b, c))\n\n\ndef cost(bits):\n sa = sb = sc = 0\n for i, (a, b, c) in enumerate(ABC):\n if not bits & 1 << i:\n continue\n sa += a\n sb += b\n sc += c\n return sc if sa * Mb == sb * Ma else inf\n\n\nans = min([cost(bits) for bits in range(1, 1 << N)])\nprint(ans if ans < inf else -1)\n","fail":"inf = float(\"inf\")\nN, Ma, Mb = map(int, input().split())\nABC = []\nfor _ in range(N):\n a, b, c = map(int, input().split())\n ABC.append((a, b, c))\ndp = [[inf] * 420 for _ in range(420)]\ndp[0][0] = 0\nfor a, b, c in ABC:\n for i in range(410, -1, -1):\n for j in range(410, -1, -1):\n if dp[i][j] < inf:\n dp[i + a][j + b] = min(dp[i + a][j + b], dp[i][j] + c)\nans = inf\nn = 1\nwhile max(Ma * n, Mb * n) < 420:\n ans = min(ans, dp[Ma * n][Mb * n])\n n += 1\nprint(ans if ans < inf else -1)\n","change":"replace","i1":6,"i2":20,"j1":6,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03807","language":"Python","original_status":"Runtime Error","pass":"num_ints = int(input())\nsum_ints = sum([int(i) for i in input().split()])\n\nif sum % 2 == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"num_ints = int(input())\nsum_ints = sum([int(i) for i in input().split()])\n\nif sum_ints % 2 == 0:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"TypeError: unsupported operand type(s) for %: 'builtin_function_or_method' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03807\/Python\/s361602990.py\", line 4, in \n if sum % 2 == 0:\nTypeError: unsupported operand type(s) for %: 'builtin_function_or_method' and 'int'\n","stdout":null} {"problem_id":"p03813","language":"Python","original_status":"Runtime Error","pass":"x = input()\n\n\nif x < 1200:\n print(\"ABC\")\n\nelse:\n print(\"ARC\")\n","fail":"x = int(input())\n\n\nif x < 1200:\n print(\"ABC\")\n\nelse:\n print(\"ARC\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: '<' not supported between instances of 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03813\/Python\/s733703116.py\", line 4, in \n if x < 1200:\nTypeError: '<' not supported between instances of 'str' and 'int'\n","stdout":null} {"problem_id":"p03813","language":"Python","original_status":"Runtime Error","pass":"print(\"ARC\" if int(input) > 1200 else \"ABC\")\n","fail":"print(\"ARC\" if int(input()) >= 1200 else \"ABC\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03813\/Python\/s654716081.py\", line 1, in \n print(\"ARC\" if int(input) > 1200 else \"ABC\")\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p03814","language":"Python","original_status":"Runtime Error","pass":"s = input()\n\nstart = s.index(\"A\")\n\nfor i in range(len(s), start, -1):\n if s[i] == \"Z\":\n print(i - start + 1)\n break\n","fail":"s = input()\n\nstart = s.index(\"A\")\n\nfor i in range(len(s) - 1, start, -1):\n if s[i] == \"Z\":\n print(i - start + 1)\n break\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"IndexError: string index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03814\/Python\/s942139210.py\", line 6, in \n if s[i] == \"Z\":\nIndexError: string index out of range\n","stdout":null} {"problem_id":"p03815","language":"Python","original_status":"Runtime Error","pass":"# 6, 5, 6, 5, ...\n\nx = int(input())\nq = x \/\/ 11\nr = x % 11\nif r == 0:\n ans = q * 2\nelif 1 <= r <= 5:\n ans = q * 2 + 1\nelif 6 <= ans <= 10:\n ans = q * 2 + 2\nprint(ans)\n","fail":"# 6, 5, 6, 5, ...\n\nx = int(input())\nq = x \/\/ 11\nr = x % 11\nif r == 0:\n ans = q * 2\nelif 1 <= r <= 6:\n ans = q * 2 + 1\nelif 7 <= r <= 10:\n ans = q * 2 + 2\nprint(ans)\n","change":"replace","i1":7,"i2":10,"j1":7,"j2":10,"error":"NameError: name 'ans' is not defined. Did you mean: 'abs'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03815\/Python\/s609603869.py\", line 10, in \n elif 6 <= ans <= 10:\nNameError: name 'ans' is not defined. Did you mean: 'abs'?\n","stdout":null} {"problem_id":"p03815","language":"Python","original_status":"Runtime Error","pass":"N, M = [int(i) for i in input().split()]\nroad = [list() for i in range(N + 1)]\nfor i in range(M):\n a, b = [int(i) for i in input().split()]\n road[a].append(b)\n road[b].append(a)\n\n\ndef solve(before, visited, now):\n visited.append(now)\n print(visited)\n if len(visited) is N:\n return 1\n pattern = 0\n for way in road[now]:\n if way is now:\n continue\n if way in visited:\n continue\n pattern += solve(now, visited[:], way)\n return pattern\n\n\nprint(solve(0, [], 1))\n","fail":"x = int(input())\nif x < 7:\n print(1)\n exit()\nelif x % 11 is 0:\n print((x \/\/ 11) * 2)\nelif x % 11 < 7:\n print((x \/\/ 11) * 2 + 1)\nelse:\n print((x \/\/ 11) * 2 + 2)\n","change":"replace","i1":0,"i2":24,"j1":0,"j2":10,"error":"ValueError: not enough values to unpack (expected 2, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03815\/Python\/s263394591.py\", line 1, in \n N, M = [int(i) for i in input().split()]\nValueError: not enough values to unpack (expected 2, got 1)\n","stdout":null} {"problem_id":"p03817","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint((x \/\/ 11) * 2 + (2 if x % 11 > 6 else 1))\n","fail":"x = int(input())\nans = (x \/\/ 11) * 2\nif x % 11:\n if x % 11 > 6:\n ans += 2\n else:\n ans += 1\nprint(ans)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":8,"error":"TypeError: unsupported operand type(s) for \/\/: 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03817\/Python\/s232589342.py\", line 2, in \n print((x \/\/ 11) * 2 + (2 if x % 11 > 6 else 1))\nTypeError: unsupported operand type(s) for \/\/: 'str' and 'int'\n","stdout":null} {"problem_id":"p03818","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\na.sort()\nc = 0\ne = 0\ni = 0\nwhile i < len(a):\n c += 1\n cai = 1\n while a[i] == a[i + 1]:\n cai += 1\n i += 1\n if cai % 2 == 0:\n e += 1\n i += 1\nans = c - (e % 2)\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\na.sort()\nc = 0\ne = 0\ni = 0\nwhile True:\n c += 1\n cai = 1\n while i != n - 1 and a[i] == a[i + 1]:\n cai += 1\n if i != n - 1:\n i += 1\n else:\n break\n if cai % 2 == 0:\n e += 1\n if i != n - 1:\n i += 1\n else:\n break\nans = c - (e % 2)\nprint(ans)\n","change":"replace","i1":6,"i2":15,"j1":6,"j2":21,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03818\/Python\/s388445088.py\", line 10, in \n while a[i] == a[i + 1]:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03821","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\n\ncount = 0\nfor i in reversed(range(n)):\n c = b[i] * (-(-a[i] \/\/ b[i])) - a[i]\n for j in range(i):\n a[j] += c\n count += c\nprint(count)\n","fail":"n = int(input())\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\n\ncount = 0\nfor i in reversed(range(n)):\n c = b[i] * (-(-a[i] \/\/ b[i])) - a[i]\n # for j in range(i):\n # a[j] += c\n count += c\n if i >= 1:\n a[i - 1] += count\nprint(count)\n","change":"replace","i1":9,"i2":12,"j1":9,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03821","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [0 for _ in range(N)]\nB = [0 for _ in range(N)]\nfor i in range(N):\n a, b = map(int, input().split())\n A[i] = a\n B[i] = b\n\nA = A[::-1]\nB = B[::-1]\nR = [0 for _ in range(N)]\nfor i, (a, b) in enumerate(zip(A, B)):\n r = a % b\n if r > 0:\n r = b - r\n R[i] = r\n\nans = 0\nfor i in range(0, N):\n r = R[i]\n ans += r\n for j in range(i + 1, N):\n rj = R[j]\n rj -= r\n R[j] = rj % B[j]\n\nprint(ans)\n","fail":"N = int(input())\nA = [0 for _ in range(N)]\nB = [0 for _ in range(N)]\nfor i in range(N):\n a, b = map(int, input().split())\n A[i] = a\n B[i] = b\n\nA = A[::-1]\nB = B[::-1]\nR = [0 for _ in range(N)]\nfor i, (a, b) in enumerate(zip(A, B)):\n r = a % b\n if r > 0:\n r = b - r\n R[i] = r\n\nans = R[0]\nfor i in range(1, N):\n r = R[i]\n r = r - ans\n r = r % B[i]\n ans += r\n\nprint(ans)\n","change":"replace","i1":17,"i2":25,"j1":17,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03821","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\ncnt = 0\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\n\nfor i in range(n - 1, -1, -1):\n if a[i] % b[i] != 0:\n r = b[i] - a[i] % b[i]\n cnt += r\n for j in range(i + 1):\n a[j] += r\n\nprint(cnt)\n","fail":"n = int(input())\ncnt = 0\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\n\nfor i in range(n - 1, -1, -1):\n r = b[i] - (a[i] + cnt) % b[i]\n if r != b[i]:\n cnt += r\nprint(cnt)\n","change":"replace","i1":8,"i2":14,"j1":8,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03822","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\ngraph = [[] for _ in range(n)]\nfor i in range(1, n):\n graph[int(input()) - 1].append(i)\n\n\ndef dfs(x):\n arr = [dfs(y) for y in graph[x]]\n if not (arr):\n return 0\n arr.sort(reverse=True)\n return max(i + a for i, a in enumerate(arr, 1))\n\n\nprint(dfs(0))\n","fail":"import sys\n\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**7)\nn = int(input())\ngraph = [[] for _ in range(n)]\nfor i in range(1, n):\n graph[int(input()) - 1].append(i)\n\n\ndef dfs(x):\n arr = [dfs(y) for y in graph[x]]\n if not (arr):\n return 0\n arr.sort(reverse=True)\n return max(i + a for i, a in enumerate(arr, 1))\n\n\nprint(dfs(0))\n","change":"insert","i1":0,"i2":0,"j1":0,"j2":4,"error":0,"stderr":null,"stdout":3} {"problem_id":"p03834","language":"Python","original_status":"Runtime Error","pass":"k, s = [int(x) for x in input().split()]\ncnt = 0\nfor x in range(k + 1):\n if x > s:\n continue\n for y in range(x, k + 1):\n if y > s:\n break\n for z in range(y, k + 1):\n if z > s:\n break\n if x + y + z == s:\n if x == y == z:\n cnt += 1\n elif x == y or y == z:\n cnt += 3\n else:\n cnt += 3\nprint(cnt)\n","fail":"a, b, c = input().split(\",\")\nprint(a, b, c)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'happy,newyear,enjoy'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03834\/Python\/s432875580.py\", line 1, in \n k, s = [int(x) for x in input().split()]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03834\/Python\/s432875580.py\", line 1, in \n k, s = [int(x) for x in input().split()]\nValueError: invalid literal for int() with base 10: 'happy,newyear,enjoy'\n","stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = [int(i) for i in input().split()]\nans = 0\nfor x in range(k, -1, -1):\n for y in range(k, -1, -1):\n for z in range(k, -1, -1):\n if x + y + z is s:\n ans += 1\nprint(ans)\n","fail":"k, s = [int(i) for i in input().split()]\nans = 0\nfor x in range(k, -1, -1):\n for y in range(k, -1, -1):\n if 0 <= s - x - y <= k:\n ans += 1\nprint(ans)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# 0 \u2266 X, Y, Z \u2266 K\n# X + Y + Z = S\n# 2 \u2266 K \u2266 2500\n# 0 \u2266 S \u2266 3K\n\nK, S = list(map(int, input().split()))\n\ncnt = 0\n# X\nfor i in range(K + 1):\n if i > S:\n break\n # Y\n for j in range(K + 1):\n if i + j > S:\n break\n # Z\n for k in range(K + 1):\n if i + j + k > S:\n break\n if i + j + k == S:\n cnt += 1\nprint(cnt)\n","fail":"# 0 \u2266 X, Y, Z \u2266 K\n# X + Y + Z = S\n# 2 \u2266 K \u2266 2500\n# 0 \u2266 S \u2266 3K\n\nK, S = list(map(int, input().split()))\n\ncnt = 0\n# X\nfor i in range(K + 1):\n # Y\n for j in range(K + 1):\n Z = S - i - j\n if 0 <= Z and Z <= K:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":10,"i2":22,"j1":10,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nans = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n for h in range(k + 1):\n if h + i + j == s:\n ans += 1\n\nprint(ans)\n","fail":"k, s = map(int, input().split())\n\nans = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n z = s - i - j\n if 0 <= z <= k:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\nmax_range, sum_ = map(int, input().split())\n\ncount = 0\nfor x, y, z in itertools.combinations_with_replacement(range(max_range + 1), r=3):\n if x + y + z == sum_:\n len_set = len({x, y, z})\n if len_set == 1:\n count += 1\n elif len_set == 2:\n count += 3\n else:\n count += 6\n\nprint(count)\n","fail":"max_range, sum_ = map(int, input().split())\n\ncount = 0\nfor x in range(0, min(max_range + 1, sum_ + 1)):\n for y in range(0, min(max_range + 1, sum_ - x + 1)):\n if sum_ - x - y <= max_range:\n count += 1\n\nprint(count)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"from sys import stdin\n\n\ndef main():\n K, S = [int(x) for x in stdin.readline().rstrip().split()]\n result = 0\n for X in range(S + 1):\n for Y in range(S + 1):\n Z = S - (X + Y)\n if Z < 0:\n break\n if X <= K and Y <= K and Z <= K:\n result += 1\n print(result)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"from sys import stdin\n\n\ndef main():\n K, S = [int(x) for x in stdin.readline().rstrip().split()]\n result = 0\n for X in range(S + 1):\n if K < X:\n break\n for Y in range(S + 1):\n if K < Y:\n break\n Z = S - (X + Y)\n if Z < 0:\n break\n if X <= K and Y <= K and Z <= K:\n result += 1\n print(result)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\ncnt = 0\n\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n cnt += 1\nprint(cnt)\n","fail":"k, s = map(int, input().split())\ncnt = 0\n\nfor i in range(k + 1):\n t = s - i\n if t >= 0:\n cnt += max(0, (t + 1) - 2 * (max(0, t - k)))\nprint(cnt)\n","change":"replace","i1":3,"i2":8,"j1":3,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nresult = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n result += 1\n\n break\n\nprint(result)\n","fail":"k, s = map(int, input().split())\n\nresult = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n z = s - x - y\n if 0 <= z <= k:\n result += 1\n\nprint(result)\n","change":"replace","i1":5,"i2":10,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Runtime Error","pass":"import math\n\n\ndef inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n points = list(map(lambda x: sp(x), inputs))\n N = len(points)\n distances = []\n for i, _ in enumerate(points):\n for j in range(i + 1, N):\n distances.append(\n math.sqrt(\n (points[i][0] - points[j][0]) ** 2\n + (points[i][1] - points[j][1]) ** 2\n )\n )\n max = 0\n for d in distances:\n max = d if max < d else max\n return \"%.6f\" % max\n\n\ndef sp(s):\n new_s = s.split()\n return list(map(lambda x: int(x), new_s))\n\n\nif __name__ == \"__main__\":\n N = int(input())\n ret = solve(inputs(N))\n print(ret)\n","fail":"def inputs(num_of_input):\n ins = [input() for i in range(num_of_input)]\n return ins\n\n\ndef solve(inputs):\n [K, S] = list(map(lambda x: int(x), inputs[0].split()))\n pattern = 0\n for x in range(0, K + 1):\n for y in range(0, K + 1):\n tmp_z = S - x - y\n if tmp_z <= K and tmp_z >= 0:\n pattern += 1\n\n return pattern\n\n\nif __name__ == \"__main__\":\n ret = solve(inputs(1))\n print(ret)\n","change":"replace","i1":0,"i2":34,"j1":0,"j2":19,"error":"ValueError: invalid literal for int() with base 10: '2 2'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03835\/Python\/s943911857.py\", line 33, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '2 2'\n","stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\n\nk, s = map(int, input().split())\n\ncnt = 0\n\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n cnt += 1\n\nprint(cnt)\n","fail":"# -*- coding: utf-8 -*-\n\nk, s = map(int, input().split())\n\ncnt = 0\n\nfor x in range(k + 1):\n for y in range(k + 1):\n z = s - x - y\n if 0 <= z <= k:\n cnt += 1\n\nprint(cnt)\n","change":"replace","i1":8,"i2":11,"j1":8,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nsum_set = []\nfor i in range(k + 1):\n for j in range(k + 1):\n m = s - i - j\n if 0 <= m <= k:\n comb = [i, j, m]\n sum_set.append(comb)\n else:\n continue\nprint(len(sum_set))\n","fail":"k, s = map(int, input().split())\n\ncount = 0\nfor i in range(k + 1):\n for j in range(k + 1):\n m = s - i - j\n if 0 <= m <= k:\n count += 1\nprint(count)\n","change":"replace","i1":2,"i2":12,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n ans += 1\n if x + y + z > s:\n break\n\nprint(ans)\n","fail":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n if 0 <= s - x - y <= k:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":5,"i2":10,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(k + 1):\n for y in range(min(k + 1, s - x + 1)):\n for z in range(min(k + 1, s - x - y + 1)):\n if x + y + z == s:\n ans += 1\n\nprint(ans)\n","fail":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n if 0 <= s - x - y <= k:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":4,"i2":8,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Runtime Error","pass":"k, s = map(int, input().split(\" \"))\nanswer = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n rem = 3 * k - i - j\n if 0 <= rem <= k:\n answer += 1\nprint(answer)\n","fail":"k, s = map(int, input().split(\" \"))\nanswer = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n rem = s - i - j\n if 0 <= rem <= k:\n answer += 1\nprint(answer)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"WA","stderr":null,"stdout":1.0} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# https:\/\/atcoder.jp\/contests\/abc051\/tasks\/abc051_b\n\n# n n,\nK, S = map(int, input().split())\n\n# initialize\nans = 0\n\n# logic: \u5168\u63a2\u7d22: \u57fa\u672c\u5f62\nfor i in range(K + 1):\n if i + K + 1 + K + 1 < S:\n continue\n for j in range(K + 1):\n if i + j + K + 1 < S:\n continue\n if 0 <= S - i - j <= K:\n ans += 1\n\nprint(ans)\n","fail":"k, s = map(int, input().split())\ncount = 0\nfor a in range(k + 1):\n for b in range(k + 1):\n if 0 <= s - a - b <= k:\n count += 1\nprint(count)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\n\ncounter = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n for z in range(K + 1):\n if S == x + y + z:\n counter += 1\nprint(counter)\n","fail":"K, S = map(int, input().split())\n\ncounter = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - x - y\n if 0 <= z and z <= K:\n counter += 1\nprint(counter)\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\nK, S = map(int, input().split())\ncnt = 0\n\nfor X in range(K + 1):\n for Y in range(K + 1):\n for Z in range(K + 1):\n if X + Y + Z == S:\n cnt += 1\nprint(cnt)\n","fail":"# -*- coding: utf-8 -*-\nK, S = map(int, input().split())\ncnt = 0\n\nfor X in range(K + 1):\n for Y in range(K + 1):\n Z = S - X - Y\n if 0 <= Z <= K:\n cnt += 1\n\nprint(cnt)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\nans = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n for z in range(K + 1):\n # print(x, y, z)\n if x + y + z == S:\n ans += 1\nprint(ans)\n","fail":"K, S = map(int, input().split())\nans = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n ans += 1 if 0 <= S - x - y <= K else 0\nprint(ans)\n","change":"replace","i1":4,"i2":8,"j1":4,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Runtime Error","pass":"import itertools\n\nK, S = map(int, input().split())\n\ncnt = 0\n\nK = list(range(K + 1))\n\nfor i, j in itertools.product(K, repeat=2):\n if 0 <= S - i - j <= K:\n cnt += 1\n\nprint(cnt)\n","fail":"import itertools\n\nK, S = map(int, input().split())\n\ncnt = 0\n\nl = list(range(K + 1))\n\nfor i, j in itertools.product(l, repeat=2):\n if 0 <= S - i - j <= K:\n cnt += 1\n\nprint(cnt)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":9,"error":"TypeError: '<=' not supported between instances of 'int' and 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03835\/Python\/s440098409.py\", line 10, in \n if 0 <= S - i - j <= K:\nTypeError: '<=' not supported between instances of 'int' and 'list'\n","stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# coding: utf-8\n# Your code here!\n\nmaximum, equal = map(int, input().split())\ncounter = 0\n\nfor i in range(maximum + 1):\n for j in range(maximum + 1):\n for k in range(maximum + 1):\n if equal == i + j + k:\n counter += 1\n\nprint(counter)\n","fail":"# coding: utf-8\n# Your code here!\n\nK, S = map(int, input().split())\ncounter = 0\n\nfor i in range(K + 1):\n for j in range(K + 1):\n if S - (i + j) >= 0 and S - (i + j) <= K:\n counter += 1\nprint(counter)\n","change":"replace","i1":3,"i2":12,"j1":3,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = [int(x) for x in input().split()]\ncnt = 0\nfor x in range(k + 1):\n if x > s:\n continue\n for y in range(x, k + 1):\n if y > s:\n break\n for z in range(y, k + 1):\n if z > s:\n break\n if x + y + z == s:\n if x == y == z:\n cnt += 1\n elif x == y or y == z:\n cnt += 3\n else:\n cnt += 6\nprint(cnt)\n","fail":"k, s = [int(x) for x in input().split()]\ncnt = 0\nfor x in range(k + 1):\n if x > s:\n continue\n for y in range(x, k + 1):\n if y > s:\n break\n z = s - x - y\n if y <= z and z <= k:\n if x + y + z == s:\n if x == y == z:\n cnt += 1\n elif x == y or y == z:\n cnt += 3\n else:\n cnt += 6\nprint(cnt)\n","change":"replace","i1":8,"i2":11,"j1":8,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\n\ninput = sys.stdin.readline\n\n\ndef ii():\n return int(input())\n\n\ndef il():\n return list(map(int, input().split()))\n\n\nK, S = il()\nc = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n for z in range(K + 1):\n if (x + y + z) == S:\n c += 1\nprint(c)\n","fail":"import sys\n\ninput = sys.stdin.readline\n\n\ndef ii():\n return int(input())\n\n\ndef il():\n return list(map(int, input().split()))\n\n\nK, S = il()\nc = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n if 0 <= (S - (x + y)) <= K:\n c += 1\nprint(c)\n","change":"replace","i1":17,"i2":20,"j1":17,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\ncount = 0\nk += 1\nfor x in range(k):\n for y in range(k):\n for z in range(k):\n if x + y + z == s:\n count += 1\n\nprint(count)\n","fail":"k, s = map(int, input().split())\ncount = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n if s - x - y <= k and s - x - y >= 0:\n # print(x, y)\n count += 1\n\nprint(count)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\n\n# a = []\nans = 0\nfor i in range(K + 1):\n for j in range(i + 1):\n for k in range(j + 1):\n # print(i, j, k)\n if i + j + k == S:\n # print(i, j, k)\n # tmp = [i, j, k]\n # a.append(tmp)\n if i == j and j == k:\n ans += 1\n elif i == j or j == k:\n ans += 3\n else:\n ans += 6\n\nprint(ans)\n","fail":"K, S = map(int, input().split())\n\n# a = []\nans = 0\nfor i in range(K + 1):\n for j in range(i + 1):\n k = S - i - j\n if k >= 0 and k <= j:\n # print(i, j, k)\n if i == j and j == k:\n ans += 1\n elif i == j or j == k:\n ans += 3\n else:\n ans += 6\n\nprint(ans)\n","change":"replace","i1":6,"i2":18,"j1":6,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = list(map(int, input().rstrip().split()))\n\nn = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n if x + y > S:\n break\n\n for z in range(K + 1):\n if x + y + z > S:\n break\n\n if (x + y + z) == S:\n n += 1\n\nprint(n)\n","fail":"K, S = list(map(int, input().rstrip().split()))\n\nn = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - x - y\n if 0 <= z and z <= K:\n n += 1\n\nprint(n)\n","change":"replace","i1":5,"i2":14,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nk += 1\n\nans = 0\nfor x in range(k):\n for y in range(k):\n for z in range(k):\n if x + y + z == s:\n ans += 1\n\nprint(ans)\n","fail":"k, s = map(int, input().split())\n\nk += 1\n\nans = 0\nfor x in range(k):\n for y in range(k):\n if s - (x + y) >= 0 and s - (x + y) <= k - 1:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":7,"i2":10,"j1":7,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"import itertools\n\nK, S = map(int, input().split())\n\nprint(sum([1 for xyz in itertools.product(range(K + 1), repeat=3) if sum(xyz) == S]))\n","fail":"K, S = map(int, input().split())\n\n\ndef f():\n if K * 3 >= S:\n for x in range(min(K, S), -1, -1):\n if K * 2 >= S - x:\n for y in range(min(K, S - x), -1, -1):\n if K >= S - x - y:\n yield 1\n\n\nprint(sum(list(f())))\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\nr = range(0, k + 1)\ncnt = 0\nfor x in r:\n for y in r:\n if x + y > s:\n continue\n for z in r:\n if x + y + z == s:\n cnt += 1\n\nprint(cnt)\n","fail":"k, s = map(int, input().split())\nr = range(0, k + 1)\ncnt = 0\nfor x in r:\n for y in r:\n if s - k <= x + y <= s:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":5,"i2":11,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"[K, S] = map(int, input().split())\nret = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n for z in range(K + 1):\n if (x + y + z) == S:\n ret += 1\nprint(ret)\n","fail":"[K, S] = map(int, input().split())\nret = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - x - y\n if 0 <= z and z <= K:\n ret += 1\nprint(ret)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\nn = 0\nfor i in range(K + 1):\n for j in range(K + 1):\n if (i + j) > S:\n continue\n elif (S - i - j) > K:\n continue\n for k in range(K + 1):\n if (i + j + k) == S:\n n += 1\nprint(str(n))\n","fail":"K, S = map(int, input().split())\nn = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n if (x + y) > S:\n break\n elif (S - (x + y)) <= K:\n n += 1\nprint(str(n))\n","change":"replace","i1":2,"i2":11,"j1":2,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\ncnt = 0\nfor x in range(K + 1):\n pass\n for y in range(K + 1):\n pass\n for z in range(K + 1):\n if x + y + z == S:\n cnt += 1\nprint(cnt)\n","fail":"K, S = map(int, input().split())\ncnt = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - x - y\n if z >= 0 and z <= K:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"def solve():\n k, s = map(int, input().split())\n c = 0\n for x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n c += 1\n return c\n\n\nif __name__ == \"__main__\":\n print(solve())\n","fail":"def solve():\n k, s = map(int, input().split())\n c = 0\n for x in range(k + 1):\n for y in range(k + 1):\n if 0 <= s - (x + y) <= k:\n c += 1\n return c\n\n\nif __name__ == \"__main__\":\n print(solve())\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\ncount = 0\nfor i in range(K + 1):\n for j in range(K + 1):\n for k in range(K + 1):\n if i + j + k == S:\n count = count + 1\n\nprint(count)\n","fail":"K, S = map(int, input().split())\ncount = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - x - y\n if 0 <= z <= K:\n count = count + 1\n\nprint(count)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, (input().split()))\n\nans = 0\n\nfor x in range(0, K + 1):\n for y in range(0, K + 1):\n for z in range(0, K + 1):\n if x + y + z == S:\n ans += 1\n\nprint(ans)\n","fail":"K, S = map(int, (input().split()))\n\nans = 0\n\nfor x in range(0, K + 1):\n for y in range(0, K + 1):\n\n z = S - x - y\n if z <= K and z >= 0:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = map(int, input().split())\ncount = 0\nfor i in range(S + 1):\n X = S - i\n for j in range(i + 1):\n Y = j\n Z = S - X - Y\n if K >= X >= 0 and K >= Y >= 0 and K >= Z >= 0:\n count += 1\nprint(count)\n","fail":"K, S = map(int, input().split())\ncount = 0\nfor i in range(K + 1):\n for j in range(K + 1):\n Z = S - i - j\n if K >= Z >= 0:\n count += 1\nprint(count)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"# coding: utf-8\nK, S = map(int, input().split())\nans = 0\nfor i in range(K + 1):\n if S > 2 * K + i:\n continue\n for j in range(K + 1):\n if S > K + i + j:\n continue\n for k in range(K + 1):\n if i + j + k == S:\n ans += 1\nprint(ans)\n","fail":"# coding: utf-8\nK, S = map(int, input().split())\nans = 0\nfor i in range(K + 1):\n if S - i > 2 * K:\n continue\n elif S - i < 0:\n break\n if S - i > K:\n ans += 2 * K + 1 - S + i\n else:\n ans += S - i + 1\nprint(ans)\n","change":"replace","i1":4,"i2":12,"j1":4,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Memory Limit Exceeded","pass":"k, s = map(int, input().split())\n\n\ndef calc_xyz(target, limit):\n xyz_list = []\n for x in range(min(limit, target) + 1):\n yz_sum = target - x\n for y in range(min(limit, yz_sum) + 1):\n z = target - x - y\n if 0 <= z <= limit:\n xyz_list.append([x, y, z])\n return xyz_list\n\n\nprint(len(calc_xyz(s, k)))\n","fail":"k, s = map(int, input().split())\n\n\ndef calc_xyz(target, limit):\n cnt = 0\n for x in range(min(limit, target) + 1):\n yz_sum = target - x\n for y in range(min(limit, yz_sum) + 1):\n if 0 <= target - x - y <= limit:\n cnt += 1\n return cnt\n\n\nprint(calc_xyz(s, k))\n","change":"replace","i1":4,"i2":15,"j1":4,"j2":14,"error":"MLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\ncnt = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if s == x + y + z:\n cnt += 1\n\nprint(cnt)\n","fail":"k, s = map(int, input().split())\n\ncnt = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n z = s - x - y\n if 0 <= z <= k:\n cnt += 1\n\nprint(cnt)\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(0, k + 1):\n for y in range(0, k + 1):\n for z in range(0, k + 1):\n if x + y + z == s:\n ans += 1\nprint(ans)\n","fail":"k, s = map(int, input().split())\n\nans = 0\nfor x in range(0, k + 1):\n for y in range(0, k + 1):\n if 0 <= s - (x + y) <= k:\n ans += 1\nprint(ans)\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = list(map(int, input().split()))\ncnt = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if s == x + y + z:\n cnt += 1\nprint(cnt)\n","fail":"k, s = list(map(int, input().split()))\ncnt = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n if 0 <= s - x - y <= k:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\nK, S = map(int, input().split())\n\nr = 0\nfor i in range(K + 1):\n for j in range(K + 1):\n for k in range(K + 1):\n if i + j + k == S:\n r += 1\n\nprint(r)\n","fail":"#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\nK, S = map(int, input().split())\n\nr = 0\nfor i in range(K + 1):\n for j in range(K + 1):\n k = S - i - j\n if k >= 0 and k <= K:\n r += 1\n\nprint(r)\n","change":"replace","i1":8,"i2":11,"j1":8,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"kk, s = map(int, input().split(\" \"))\ncount = 0\nfor i in range(0, kk + 1):\n for j in range(0, kk + 1):\n for k in range(0, kk + 1):\n if i + j + k == s:\n count += 1\n\nprint(count)\n","fail":"k, s = map(int, input().split(\" \"))\ncount = 0\nfor i in range(0, k + 1):\n for j in range(0, k + 1):\n if 0 <= s - i - j <= k:\n count += 1\n\nprint(count)\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n k, s = map(int, input().split())\n\n pattern = 0\n\n if s > 3 * k:\n print(pattern)\n return\n\n for x in range(k + 1):\n for y in range(min(k + 1, s - x + 1)):\n for z in range(min(k + 1, s - x - y + 1)):\n if x + y + z == s:\n pattern += 1\n\n print(pattern)\n\n\nif __name__ == \"__main__\":\n\n main()\n","fail":"def main():\n k, s = map(int, input().split())\n\n pattern = 0\n\n for x in range(k + 1):\n for y in range(k + 1):\n if (s - x - y >= 0) and (s - x - y <= k):\n pattern += 1\n\n # Wrong Anser\n #\n # # 3,4 --> 0 start\n # # 3,5 --> 0 start\n # # 3,7 --> 1 start\n # # 3,8 --> 2 start\n # # 3,9 --> 3 start\n # # 4,8 --> 0 start\n # # 4,9 --> 1 start\n # # 4,10 --> 2 start\n # # s \/\/ k * 2\n #\n # for x in range(s \/\/ 3, k + 1):\n # for y in range(s \/\/ 3, min(k + 1, s - x + 1)):\n # for z in range(s \/\/ 3, min(k + 1, s - x - y + 1)):\n # if x + y + z == s:\n # pattern += 1\n #\n\n print(pattern)\n\n\nif __name__ == \"__main__\":\n\n main()\n","change":"replace","i1":5,"i2":14,"j1":5,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\ncount = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n if s - i - j in range(k + 1):\n count += 1\n\nprint(count)\n","fail":"k, s = map(int, input().split())\ncount = 0\n\nfor i in range(k + 1):\n for j in range(k + 1):\n if 0 <= s - i - j <= k:\n count += 1\n\nprint(count)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = list(map(int, input().split()))\nres = 0\n\nfor x in range(K + 1):\n tmp = S\n if tmp - x == 0:\n res += 1\n continue\n for y in range(K + 1):\n if tmp - x - y == 0:\n res += 1\n continue\n for z in range(K + 1):\n if tmp - x - y - z == 0:\n res += 1\n continue\nprint(res)\n","fail":"K, S = list(map(int, input().split()))\nres = 0\n\nfor x in range(K + 1):\n for y in range(K + 1):\n if S - x - y >= 0 and S - x - y <= K:\n res += 1\nprint(res)\n","change":"replace","i1":4,"i2":16,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"K, S = [int(v) for v in input().split()]\n\ncnt = 0\nfor x in range(K + 1):\n if x > S:\n break\n for y in range(K + 1):\n if x + y > S:\n break\n for z in range(K + 1):\n if x + y + z > S:\n break\n if x + y + z == S:\n cnt += 1\nprint(cnt)\n","fail":"K, S = [int(v) for v in input().split()]\n\ncnt = 0\nfor x in range(K + 1):\n for y in range(K + 1):\n if S - (x + y) >= 0 and S - (x + y) <= K:\n cnt += 1\nprint(cnt)\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = list(map(int, input().split()))\n\ncount = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n for z in range(k + 1):\n if x + y + z == s:\n count += 1\n break\n\nprint(count)\n","fail":"k, s = list(map(int, input().split()))\n\ncount = 0\nfor x in range(k + 1):\n for y in range(k + 1):\n if x + y <= s <= x + y + k:\n count += 1\n\nprint(count)\n","change":"replace","i1":5,"i2":9,"j1":5,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03835","language":"Python","original_status":"Time Limit Exceeded","pass":"k, s = map(int, input().split())\ncnt = 0\nfor x in range(max(s - 2 * k, 0), k + 1):\n for y in range(k + 1):\n if s - x - y > k:\n continue\n elif s - x - y < 0:\n continue\n z = s - x - y\n if 0 <= z <= k:\n cnt += 1\nprint(cnt)\n","fail":"k, s = map(int, input().split())\ncnt = 0\nfor x in range(max(s - 2 * k, 0), k + 1):\n for y in range(max(s - x - k, 0), min(s - x + 1, k + 1)):\n z = s - x - y\n if 0 <= z <= k:\n cnt += 1\n else:\n continue\nprint(cnt)\n","change":"replace","i1":3,"i2":11,"j1":3,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03837","language":"Python","original_status":"Time Limit Exceeded","pass":"from scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse import csr_matrix\n\nn, m = map(int, input().split())\nabc = [list(map(int, input().split())) for _ in range(m)]\n\ngraph = [[0] * n for _ in range(n)]\nfor a, b, c in abc:\n a -= 1\n b -= 1\n graph[a][b] = c\n graph[b][a] = c\n\ndist, pre = floyd_warshall(csr_matrix(graph), return_predecessors=True)\n\nedges = set()\nfor s in range(n):\n for g in range(s + 1, n):\n while g != s:\n par_g = pre[s][g]\n edge = sorted([par_g, g])\n edge = tuple(edge)\n edges.add(edge)\n g = par_g\n\nans = m - len(edges)\nprint(ans)\n","fail":"from scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse import csr_matrix\n\nn, m = map(int, input().split())\nabc = [list(map(int, input().split())) for _ in range(m)]\n\ngraph = [[0] * n for _ in range(n)]\nfor a, b, c in abc:\n a -= 1\n b -= 1\n graph[a][b] = c\n graph[b][a] = c\n\ndist = floyd_warshall(csr_matrix(graph))\n\nans = 0\nfor a, b, c in abc:\n a -= 1\n b -= 1\n\n if dist[a][b] != c:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":13,"i2":26,"j1":13,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03838","language":"Python","original_status":"Runtime Error","pass":"x, y = list(map(int, input().split()))\nif y - x >= 0:\n ans = y - x\nif y + x >= 0:\n ans = min(ans, y + x + 1)\nif -1 * y - x >= 0:\n ans = min(ans, -1 * y - x + 1)\nif -1 * y + x >= 0:\n ans = min(ans, -1 * y + x + 2)\nprint(ans)\n","fail":"x, y = list(map(int, input().split()))\nans = []\nif y - x >= 0:\n ans.append(y - x)\nif y + x >= 0:\n ans.append(y + x + 1)\nif -1 * y - x >= 0:\n ans.append(-1 * y - x + 1)\nif -1 * y + x >= 0:\n ans.append(-1 * y + x + 2)\nprint(min(ans))\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":11,"error":0,"stderr":null,"stdout":10} {"problem_id":"p03838","language":"Python","original_status":"Runtime Error","pass":"# https:\/\/atcoder.jp\/contests\/agc008\/tasks\/agc008_a\n# \u3069\u3046\u898b\u3066\u3082\u7b26\u53f7\u53cd\u8ee2\u306f1\u56de\u3059\u308b\u306e\u304c\u6700\u9069\n# \u3072\u305f\u3059\u3089\u5834\u5408\u5206\u3051\n\n\nx, y = map(int, input().split())\nif x * y < 0: # \u7570\u7b26\u53f7\u306a\u3089\u3070\u7b54\u3048\u306f\u4e00\u3064\n print(abs(abs(x) - abs(y)) + 1)\nelif 0 <= x < y:\n print(y - x)\nelif 0 <= y < x:\n print(x + y + 1)\n raise ValueError()\nelif x < y <= 0:\n print(y - x)\nelse:\n print(2 + x - y)\n","fail":"# https:\/\/atcoder.jp\/contests\/agc008\/tasks\/agc008_a\n# \u3069\u3046\u898b\u3066\u3082\u7b26\u53f7\u53cd\u8ee2\u306f1\u56de\u3059\u308b\u306e\u304c\u6700\u9069\n# \u3072\u305f\u3059\u3089\u5834\u5408\u5206\u3051\n\n\nx, y = map(int, input().split())\nif x * y < 0: # \u7570\u7b26\u53f7\u306a\u3089\u3070\u7b54\u3048\u306f\u4e00\u3064\n print(abs(abs(x) - abs(y)) + 1)\n exit()\nelif 0 <= x < y:\n print(y - x)\n exit()\nelif 0 < y < x:\n print(2 + x - y)\n exit()\nelif y == 0 and y < x:\n print(1 + x)\n exit()\nelif x < y <= 0:\n print(y - x)\n exit()\nelif y < x < 0:\n print(2 + x - y)\n exit()\nelif x == 0 and y < x:\n print(1 - y)\n exit()\nraise ValueError()\n","change":"replace","i1":8,"i2":17,"j1":8,"j2":28,"error":0,"stderr":null,"stdout":10} {"problem_id":"p03838","language":"Python","original_status":"Runtime Error","pass":"def main():\n x, y = map(int, input().split())\n\n if 0 <= x <= y or x <= y <= 0:\n ans = abs(abs(x) - abs(y))\n\n elif x < 0 < y or y < 0 < x:\n ans = abs(abs(x) - abs(y)) + 1\n\n elif y < x < 0 or 0 < y < x:\n ans = abs(abs(x) - abs(y)) + 2\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n x, y = map(int, input().split())\n\n if 0 <= x <= y or x <= y <= 0:\n ans = abs(abs(x) - abs(y))\n\n elif x <= 0 <= y or y <= 0 <= x:\n ans = abs(abs(x) - abs(y)) + 1\n\n elif y < x < 0 or 0 < y < x:\n ans = abs(abs(x) - abs(y)) + 2\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":0,"stderr":null,"stdout":10} {"problem_id":"p03838","language":"Python","original_status":"Runtime Error","pass":"x, y = map(int, input().split())\nd = abs(abs(y) - abs(x))\nif x \/\/ abs(x) == y \/\/ abs(y):\n if x > y:\n d += 2\nelse:\n d += 1\n\nprint(d)\n","fail":"x, y = map(int, input().split())\n\nd = abs(abs(y) - abs(x))\n\nif (x > 0 and y <= 0) or (x >= 0 and y < 0) or (x < 0 and y > 0):\n d += 1\nelif x > y:\n d += 2\n\nprint(d)\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":8,"error":0,"stderr":null,"stdout":10} {"problem_id":"p03838","language":"Python","original_status":"Runtime Error","pass":"def main():\n x, y = map(int, input().split())\n A = abs(abs(x) - abs(y))\n\n if x * y > 0:\n if x < y:\n B = 0\n else:\n B = 2\n elif x == 0:\n if x < y:\n B = 0\n else:\n B = 1\n elif y == 0:\n if x < y:\n B = 0\n else:\n B = 1\n\n print(A + B)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n x, y = map(int, input().split())\n A = abs(abs(x) - abs(y))\n\n if x * y > 0:\n if x < y:\n B = 0\n else:\n B = 2\n elif x == 0:\n if x < y:\n B = 0\n else:\n B = 1\n elif y == 0:\n if x < y:\n B = 0\n else:\n B = 1\n else:\n B = 1\n\n print(A + B)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"insert","i1":19,"i2":19,"j1":19,"j2":21,"error":0,"stderr":null,"stdout":10} {"problem_id":"p03844","language":"Python","original_status":"Runtime Error","pass":"A, op, B = map(int, input().split())\n\nif op == \"+\":\n print(A + B)\n\nif op == \"-\":\n print(A - B)\n","fail":"A, op, B = map(str, input().split())\n\nif op == \"+\":\n print(int(A) + int(B))\n\nif op == \"-\":\n print(int(A) - int(B))\n","change":"replace","i1":0,"i2":7,"j1":0,"j2":7,"error":"ValueError: invalid literal for int() with base 10: '+'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03844\/Python\/s927597638.py\", line 1, in \n A, op, B = map(int, input().split())\nValueError: invalid literal for int() with base 10: '+'\n","stdout":null} {"problem_id":"p03844","language":"Python","original_status":"Runtime Error","pass":"equa = input().split()\nif equa[1] == \"+\":\n print(int(equa[0]) + int(equa[1]))\nelse:\n print(int(equa[0]) - int(equa[1]))\n","fail":"equa = input().split()\nif equa[1] == \"+\":\n print(int(equa[0]) + int(equa[2]))\nelse:\n print(int(equa[0]) - int(equa[2]))\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":5,"error":"ValueError: invalid literal for int() with base 10: '+'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03844\/Python\/s614588163.py\", line 3, in \n print(int(equa[0]) + int(equa[1]))\nValueError: invalid literal for int() with base 10: '+'\n","stdout":null} {"problem_id":"p03844","language":"Python","original_status":"Runtime Error","pass":"A, op, B = list(map(str, input().split()))\nif op == \"+\":\n print(A + B)\nelse:\n print(A - B)\n","fail":"A, op, B = list(map(str, input().split()))\nif op == \"+\":\n print(int(A) + int(B))\nelse:\n print(int(A) - int(B))\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":5,"error":"WA","stderr":null,"stdout":12.0} {"problem_id":"p03844","language":"Python","original_status":"Runtime Error","pass":"a, op, b = [int(i) for i in input().split()]\nif op == \"+\":\n print(int(a) + int(b))\nelse:\n print(int(a) - int(b))\n","fail":"a, op, b = [i for i in input().split()]\nif op == \"+\":\n print(int(a) + int(b))\nelse:\n print(int(a) - int(b))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '+'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03844\/Python\/s761760339.py\", line 1, in \n a, op, b = [int(i) for i in input().split()]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03844\/Python\/s761760339.py\", line 1, in \n a, op, b = [int(i) for i in input().split()]\nValueError: invalid literal for int() with base 10: '+'\n","stdout":null} {"problem_id":"p03844","language":"Python","original_status":"Runtime Error","pass":"A, op, B = input().split()\nif op == \"+\":\n print(A + B)\nelse:\n print(A - B)\n","fail":"A, op, B = input().split()\nA = int(A)\nB = int(B)\nif op == \"+\":\n print(A + B)\nelse:\n print(A - B)\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":3,"error":"WA","stderr":null,"stdout":12.0} {"problem_id":"p03845","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nT = [int(i) for i in input().split()]\nM = int(input())\n\nPX = []\n\nfor i in range(M):\n # 0-indexed\n PX.append([int(j) for j in input().split()])\n PX[i][0] -= 1\n\nans = sum(T)\n\nfor i in range(M):\n print(ans - T[PX[i][0]] + T[PX[i][1]])\n","fail":"N = int(input())\nT = [int(i) for i in input().split()]\nM = int(input())\n\nPX = []\n\nfor i in range(M):\n # 0-indexed\n PX.append([int(j) for j in input().split()])\n PX[i][0] -= 1\n\nans = sum(T)\n\nfor i in range(M):\n print(ans - T[PX[i][0]] + PX[i][1])\n","change":"replace","i1":14,"i2":15,"j1":14,"j2":15,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03845\/Python\/s001873582.py\", line 15, in \n print(ans - T[PX[i][0]] + T[PX[i][1]])\nIndexError: list index out of range\n","stdout":6.0} {"problem_id":"p03845","language":"Python","original_status":"Runtime Error","pass":"def main(n, t, m, p_x):\n for p, x in p_x:\n _t = t.copy()\n _t[p - 1] = x\n\n print(sum(_t))\n\n\nif __name__ == \"__main__\":\n n = int(input())\n t = list(map(int, input().split()))\n m = int(input())\n p_x = [int(input()) for _ in range(m)]\n\n main(n, t, m, p_x)\n","fail":"def main(n, t, m, p_x):\n for p, x in p_x:\n _t = t.copy()\n _t[p - 1] = x\n\n print(sum(_t))\n\n\nif __name__ == \"__main__\":\n n = int(input())\n t = list(map(int, input().split()))\n m = int(input())\n p_x = [list(map(int, input().split())) for _ in range(m)]\n\n main(n, t, m, p_x)\n","change":"replace","i1":12,"i2":13,"j1":12,"j2":13,"error":"ValueError: invalid literal for int() with base 10: '1 1'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03845\/Python\/s833373985.py\", line 13, in \n p_x = [int(input()) for _ in range(m)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03845\/Python\/s833373985.py\", line 13, in \n p_x = [int(input()) for _ in range(m)]\nValueError: invalid literal for int() with base 10: '1 1'\n","stdout":null} {"problem_id":"p03846","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(i) for i in input().split()]\nans = 0\nif N % 2 != 0:\n num_list = [int(i) for i in range(2, N, 2)]\n for num in num_list:\n if A.count(num) != 2:\n break\n else:\n if A.count(0) == 1:\n ans = (2 ** (N \/\/ 2)) % (10**7 + 7)\n\nelse:\n num_list = [int(i) for i in range(1, N, 2)]\n for num in num_list:\n if A.count(num) != 2:\n break\n else:\n ans = 2 ** (N \/\/ 2) % (10**7 + 7)\n\nprint(ans)\n","fail":"import collections\n\nN = int(input())\nA = [int(i) for i in input().split()]\nans = 0\ndi = collections.Counter(A)\nif N % 2 != 0:\n num_list = [int(i) for i in range(2, N, 2)]\n for num in num_list:\n if di[num] != 2:\n break\n else:\n if A.count(0) == 1:\n ans = (2 ** (N \/\/ 2)) % (10**9 + 7)\n\nelse:\n num_list = [int(i) for i in range(1, N, 2)]\n for i in num_list:\n if di[i] != 2:\n break\n else:\n ans = (2 ** (N \/\/ 2)) % (10**9 + 7)\nprint(ans)\n","change":"replace","i1":0,"i2":20,"j1":0,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03846","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\nif N % 2 == 1:\n if A.count(0) != 1:\n print(0)\n exit()\n for i in range(2, N, 2):\n if A.count(i) != 2:\n print(0)\n exit()\n print(2 ** ((N - 1) \/\/ 2))\nelse:\n for i in range(1, N, 2):\n if A.count(i) != 2:\n print(0)\n exit()\n print(2 ** (N \/\/ 2))\n","fail":"N = int(input())\nA = list(map(int, input().split()))\nC = [0] * N\nfor a in A:\n C[a] += 1\nif N % 2 == 1:\n if C[0] != 1:\n print(0)\n exit()\n for i in range(2, N, 2):\n if C[i] != 2:\n print(0)\n exit()\n print(2 ** ((N - 1) \/\/ 2) % 1000000007)\nelse:\n for i in range(1, N, 2):\n if C[i] != 2:\n print(0)\n exit()\n print(2 ** (N \/\/ 2) % 1000000007)\n","change":"replace","i1":2,"i2":17,"j1":2,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03848","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = [int(i) for i in input().split()]\n\nif N % 2 == 1:\n for i in range(N \/\/ 2):\n if A.count(i * 2) != 2 and i != 0:\n print(0)\n exit()\n if i == 0 and A.count(i) != 1:\n print(0)\n exit()\n\nif N % 2 == 0:\n for i in range(N \/\/ 2):\n if A.count(i * 2 + 1) != 2:\n print(0)\n exit()\n\nprint(2 ** (N \/\/ 2))\n","fail":"N = int(input())\nA = [int(i) for i in input().split()]\n\ncheck = True\nA = sorted(A)\nif N % 2 == 0:\n for i in range(N):\n if i % 2 == 0 and A[i] != i + 1:\n check = False\n if i % 2 == 1 and A[i] != i:\n check = False\n\nif N % 2 != 0:\n for i in range(N):\n if i % 2 == 0 and A[i] != i:\n check = False\n if i % 2 == 1 and A[i] != i + 1:\n check = False\n\nif check:\n print((2 ** (N \/\/ 2)) % (10**9 + 7))\nelse:\n print(0)\n","change":"replace","i1":3,"i2":19,"j1":3,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03848","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nA = list(map(int, input().split()))\n\n\ndef solve():\n for a in A:\n if N % 2 == 1:\n if a % 2 == 1:\n return 0\n else:\n if a == 0 and A.count(a) != 1:\n return 0\n elif a != 0 and A.count(a) != 2:\n return 0\n else:\n if a % 2 == 0:\n return 0\n else:\n if A.count(a) != 2:\n return 0\n return 2 ** (N \/\/ 2)\n\n\nprint(solve())\n","fail":"N = int(input())\nA = list(map(int, input().split()))\n\n\ndef solve():\n cnt = {i + (1 - N % 2): 0 for i in range(0, 2 * N \/\/ 2, 2)}\n for a in A:\n if a not in cnt:\n return 0\n\n if N % 2 == 1:\n if a % 2 == 1:\n return 0\n cnt[a] += 1\n else:\n if a % 2 == 0:\n return 0\n cnt[a] += 1\n\n for key, value in cnt.items():\n if key == 0:\n if value != 1:\n return 0\n else:\n if value != 2:\n return 0\n\n return 2 ** (N \/\/ 2) % (10**9 + 7)\n\n\nprint(solve())\n","change":"replace","i1":5,"i2":21,"j1":5,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03852","language":"Python","original_status":"Runtime Error","pass":"c = int(input())\nprint(\"vowel\" if c in \"aiueo\" else \"consonant\")\n","fail":"c = input()\nprint(\"vowel\" if c in \"aiueo\" else \"consonant\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'a'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03852\/Python\/s125917047.py\", line 1, in \n c = int(input())\nValueError: invalid literal for int() with base 10: 'a'\n","stdout":null} {"problem_id":"p03852","language":"Python","original_status":"Runtime Error","pass":"def main():\n h, _ = map(int, input().split())\n c = [input() for _ in range(h)]\n for cn in c:\n print(cn)\n print(cn)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n print(\"vowel\" if input() in \"aeiou\" else \"consonant\")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'a'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03852\/Python\/s011405155.py\", line 10, in \n main()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03852\/Python\/s011405155.py\", line 2, in main\n h, _ = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'a'\n","stdout":null} {"problem_id":"p03853","language":"Python","original_status":"Runtime Error","pass":"C = open(0)\nfor i in C[1:]:\n print(i)\n print(i)\n","fail":"import sys\n\nH, W = sys.stdin.readline().split()\nC = map(str, sys.stdin)\nfor i in C:\n print(i)\n print(i)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":5,"error":"TypeError: '_io.TextIOWrapper' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03853\/Python\/s894840056.py\", line 2, in \n for i in C[1:]:\nTypeError: '_io.TextIOWrapper' object is not subscriptable\n","stdout":null} {"problem_id":"p03853","language":"Python","original_status":"Runtime Error","pass":"H, W = map(int, input().split())\npx = []\nans = []\nfor x in range(H):\n px.append(input())\n ans.append(px[x])\n ans.append(px[x])\n\nfor x in range(ans):\n print(ans[x])\n","fail":"H, W = map(int, input().split())\npx = []\nans = []\nfor x in range(H):\n px.append(input())\n ans.append(px[x])\n ans.append(px[x])\n\nfor x in range(len(ans)):\n print(ans[x])\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":9,"error":"TypeError: 'list' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03853\/Python\/s440756858.py\", line 9, in \n for x in range(ans):\nTypeError: 'list' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03854","language":"Python","original_status":"Time Limit Exceeded","pass":"import re\n\n\ndef main():\n S = input()\n lens = len(S)\n while len(S):\n S = re.sub(\"dreamer$\", \"\", S)\n S = re.sub(\"eraser$\", \"\", S)\n S = re.sub(\"dream$\", \"\", S)\n S = re.sub(\"erase$\", \"\", S)\n if lens == len(S):\n print(\"NO\")\n return\n print(\"YES\")\n return\n\n\nmain()\n","fail":"dreamer = \"dreamer\"\neraser = \"eraser\"\ndream = \"dream\"\nerase = \"erase\"\n\n\ndef main():\n S = input()\n\n while len(S):\n lens = len(S)\n if S[lens - len(dreamer) :] == dreamer:\n S = S[: lens - len(dreamer)]\n elif S[lens - len(eraser) :] == eraser:\n S = S[: lens - len(eraser)]\n elif S[lens - len(dream) :] == dream:\n S = S[: lens - len(dream)]\n elif S[lens - len(erase) :] == erase:\n S = S[: lens - len(erase)]\n if lens == len(S):\n print(\"NO\")\n return\n print(\"YES\")\n return\n\n\nmain()\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03854","language":"Python","original_status":"Runtime Error","pass":"S = input()\n\n\ndef is_composable(s):\n if len(s) == 0:\n return True\n\n if s.startswith(\"dreamer\"):\n dream_s = s[5:]\n dreamer_s = s[7:]\n return is_composable(dream_s) or is_composable(dreamer_s)\n elif s.startswith(\"dream\"):\n dream_s = s[5:]\n return is_composable(dream_s)\n elif s.startswith(\"eraser\"):\n erase_s = s[5:]\n eraser_s = s[6:]\n return is_composable(erase_s) or is_composable(eraser_s)\n elif s.startswith(\"erase\"):\n erase_s = s[5:]\n return is_composable(erase_s)\n else:\n return False\n\n\nif len(S) > 0 and is_composable(S):\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"S = input()\n\nS = S[::-1]\n\ndream = \"maerd\"\ndreamer = \"remaerd\"\nerase = \"esare\"\neraser = \"resare\"\n\nif len(S) > 0:\n while len(S) > 0:\n if S.startswith(dream):\n S = S[len(dream) :]\n elif S.startswith(dreamer):\n S = S[len(dreamer) :]\n elif S.startswith(erase):\n S = S[len(erase) :]\n elif S.startswith(eraser):\n S = S[len(eraser) :]\n else:\n break\n if len(S) > 0:\n print(\"NO\")\n else:\n print(\"YES\")\n\nelse:\n print(\"NO\")\n","change":"replace","i1":2,"i2":27,"j1":2,"j2":26,"error":"0","stderr":null,"stdout":"YES\n"} {"problem_id":"p03854","language":"Python","original_status":"Time Limit Exceeded","pass":"s = list(input())\n\ndream = list(\"dream\")\ndreamer = list(\"dreamer\")\nerase = list(\"erase\")\neraser = list(\"eraser\")\n\ns.reverse()\ndream.reverse()\ndreamer.reverse()\nerase.reverse()\neraser.reverse()\n\nwhile s != []:\n if s[0:7] == dreamer:\n del s[0:7]\n elif s[0:6] == eraser:\n del s[0:6]\n elif s[0:5] == dream:\n del s[0:5]\n elif s[0:5] == erase:\n del s[0:5]\n else:\n print(\"NO\")\n exit()\n\nprint(\"YES\")\n","fail":"s = input()\n\ndreamer = \"dreamer\"\neraser = \"eraser\"\ndream = \"dream\"\nerase = \"erase\"\n\n\nwhile s != \"\":\n if s.endswith(dreamer):\n s = s[:-7]\n elif s.endswith(eraser):\n s = s[:-6]\n elif s.endswith(dream):\n s = s[:-5]\n elif s.endswith(erase):\n s = s[:-5]\n else:\n print(\"NO\")\n exit()\n\nprint(\"YES\")\n","change":"replace","i1":0,"i2":22,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03854","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nN = int(input())\nA = list(map(int, input().split()))\n\nans = 0\nnew_a = A.copy()\nwhile 1:\n new_a = [a \/\/ 2 if a % 2 == 0 else -1 for a in new_a]\n if -1 in new_a:\n print(ans)\n exit()\n ans += 1\n\nprint(ans)\n","fail":"# -*- coding: utf-8 -*-\n\nS = input()\ndream_set = {\"dream\", \"dreamer\", \"erase\", \"eraser\"}\n# \u611f\u52d5\u7684\u8a08\u753b\u6cd5\u3084\u308b\u305e\n\nwhile len(S) > 0:\n if S.endswith(\"dream\") or S.endswith(\"erase\"):\n S = S[:-5]\n elif S.endswith(\"eraser\"):\n S = S[:-6]\n elif S.endswith(\"dreamer\"):\n S = S[:-7]\n else:\n print(\"NO\")\n exit()\n\nprint(\"YES\")\n","change":"replace","i1":2,"i2":15,"j1":2,"j2":18,"error":"ValueError: invalid literal for int() with base 10: 'erasedream'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03854\/Python\/s693915852.py\", line 3, in \n N = int(input())\nValueError: invalid literal for int() with base 10: 'erasedream'\n","stdout":null} {"problem_id":"p03854","language":"Python","original_status":"Time Limit Exceeded","pass":"from re import sub\n\ndest = input().rstrip(\"\\\\n\")\n\nsuffixes = [\"dream$\", \"dreamer$\", \"erase$\", \"eraser$\"]\n\nwhile True:\n len_before = len(dest)\n for suffix in suffixes:\n dest = sub(suffix, \"\", dest)\n if len(dest) == len_before:\n break\n\nprint(\"YES\" if not dest else \"NO\")\n","fail":"dest = input().rstrip(\"\\\\n\")\n\nsuffixes = [\"dream\", \"dreamer\", \"erase\", \"eraser\"]\ncut_lens = [-5, -7, -5, -6]\n\nwhile True:\n for suffix, cut_len in zip(suffixes, cut_lens):\n if dest.endswith(suffix):\n dest = dest[:cut_len]\n break\n else:\n break\n\nprint(\"YES\" if not dest else \"NO\")\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03854","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\nimport sys\n\nPARTS = [\"eraser\", \"erase\", \"dreamer\", \"dream\"]\nPARTS2 = []\n\n\ndef main():\n global PARTS2\n sys.setrecursionlimit(100000)\n S = input()\n\n for i in range(0, 4):\n for j in range(0, 4):\n PARTS2.append(PARTS[i] + PARTS[j])\n\n PARTS2 = PARTS2 + PARTS\n\n if judgeStr(S):\n print(\"YES\")\n else:\n print(\"NO\")\n\n\ndef judgeStr(target: str) -> bool:\n for item in PARTS2:\n if target.startswith(item):\n tempStr = target.replace(item, \"\", 1)\n if tempStr == \"\" or judgeStr(tempStr):\n return True\n\n return False\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"#!\/usr\/bin\/env python3\nimport sys\n\nPARTS = [\"eraser\", \"erase\", \"dreamer\", \"dream\"]\n# PARTS2 = []\n\n\ndef main():\n global PARTS2\n sys.setrecursionlimit(100000)\n S = input()\n\n # for i in range(0, 4):\n # for j in range(0, 4):\n # PARTS2.append(PARTS[i] + PARTS[j])\n\n # PARTS2 = PARTS2 + PARTS\n\n if judgeStr2(S):\n print(\"YES\")\n else:\n print(\"NO\")\n\n\ndef judgeStr2(target: str) -> bool:\n currentStr = target\n while currentStr != \"\":\n isNextOK = False\n for item in PARTS:\n if not currentStr.startswith(item):\n continue\n\n tempStr = currentStr.replace(item, \"\", 1)\n if tempStr == \"\":\n return True\n\n for item2 in PARTS:\n if tempStr.startswith(item2):\n isNextOK = True\n break\n\n if isNextOK:\n currentStr = tempStr\n break\n if isNextOK:\n continue\n else:\n break\n return currentStr == \"\"\n\n\ndef judgeStr(target: str) -> bool:\n for item in PARTS:\n if target.startswith(item):\n tempStr = target.replace(item, \"\", 1)\n if tempStr == \"\" or judgeStr(tempStr):\n return True\n\n return False\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":4,"i2":26,"j1":4,"j2":53,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03855","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\nimport numpy as np\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\nclass UnionFind:\n def __init__(self, n_nodes):\n self.n_nodes = n_nodes\n self.parent = [i for i in range(n_nodes)]\n self.rank = [1] * n_nodes\n self.size = [1] * n_nodes\n\n def find(self, x):\n if self.parent[x] == x:\n return x\n else:\n self.parent[x] = self.find(self.parent[x])\n return self.parent[x]\n\n def unite(self, x, y):\n x = self.find(x)\n y = self.find(y)\n if x == y:\n return\n if self.rank[x] > self.rank[y]:\n self.parent[y] = x\n self.size[x] += self.size[y]\n else:\n self.parent[x] = y\n self.size[y] += self.size[x]\n if self.rank[x] == self.rank[y]:\n self.rank[y] += 1\n\n def check(self, x, y):\n return self.find(x) == self.find(y)\n\n def get_parent_list(self):\n return [i for i in range(self.n_nodes) if self.find(i) == i]\n\n def get_n_groups(self):\n return len(self.get_parent_list())\n\n def get_members(self, x):\n parent = self.find(x)\n return [i for i in range(self.n_nodes) if self.find(i) == parent]\n\n def get_members_dict(self):\n return {par: self.get_members(par) for par in self.get_parent_list()}\n\n\ndef main():\n N, K, L = map(int, input().split())\n Tree_road = UnionFind(N)\n Tree_train = UnionFind(N)\n for _ in range(K):\n p, q = map(int, input().split())\n Tree_road.unite(p - 1, q - 1)\n for _ in range(L):\n p, q = map(int, input().split())\n Tree_train.unite(p - 1, q - 1)\n road = Tree_road.get_members_dict()\n train = Tree_train.get_members_dict()\n answer = []\n for i in range(N):\n R = np.array(road[Tree_road.find(i)])\n T = np.array(train[Tree_train.find(i)])\n answer.append(len(np.intersect1d(R, T)))\n print(*answer, sep=\" \")\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"import sys\nfrom collections import defaultdict\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\nclass UnionFind:\n def __init__(self, n_nodes):\n self.n_nodes = n_nodes\n self.parent = [i for i in range(n_nodes)]\n self.rank = [1] * n_nodes\n self.size = [1] * n_nodes\n\n def find(self, x):\n if self.parent[x] == x:\n return x\n else:\n self.parent[x] = self.find(self.parent[x])\n return self.parent[x]\n\n def unite(self, x, y):\n x = self.find(x)\n y = self.find(y)\n if x == y:\n return\n if self.rank[x] > self.rank[y]:\n self.parent[y] = x\n self.size[x] += self.size[y]\n else:\n self.parent[x] = y\n self.size[y] += self.size[x]\n if self.rank[x] == self.rank[y]:\n self.rank[y] += 1\n\n def check(self, x, y):\n return self.find(x) == self.find(y)\n\n def get_parent_list(self):\n return [i for i in range(self.n_nodes) if self.find(i) == i]\n\n def get_n_groups(self):\n return len(self.get_parent_list())\n\n def get_members(self, x):\n parent = self.find(x)\n return [i for i in range(self.n_nodes) if self.find(i) == parent]\n\n def get_members_dict(self):\n return {par: self.get_members(par) for par in self.get_parent_list()}\n\n\ndef main():\n N, K, L = map(int, input().split())\n Tree_road = UnionFind(N)\n Tree_train = UnionFind(N)\n for _ in range(K):\n p, q = map(int, input().split())\n Tree_road.unite(p - 1, q - 1)\n for _ in range(L):\n p, q = map(int, input().split())\n Tree_train.unite(p - 1, q - 1)\n DD = defaultdict(int)\n for i in range(N):\n DD[(Tree_road.find(i), Tree_train.find(i))] += 1\n answer = []\n for i in range(N):\n answer.append(DD[(Tree_road.find(i), Tree_train.find(i))])\n\n print(*answer, sep=\" \")\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":1,"i2":70,"j1":1,"j2":70,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03855","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import defaultdict\nimport sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n\ndef root(par, x):\n if par[x] == x:\n return x\n else:\n return root(par, par[x])\n\n\ndef unite(rank, par, x, y):\n x = root(par, x)\n y = root(par, y)\n\n if x == y:\n return\n\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n\n\ndef main():\n N, K, L = map(int, readline().split())\n m = map(int, read().split())\n pq = list(zip(m, m))\n pq, rs = pq[:K], pq[K:]\n\n d_c = defaultdict(list)\n d_t = defaultdict(list)\n\n par = list(range(N))\n rank = [0] * N\n for p, q in pq:\n p -= 1\n q -= 1\n unite(rank, par, p, q)\n\n par_t = list(range(N))\n rank_t = [0] * N\n for r, s in rs:\n r -= 1\n s -= 1\n unite(rank_t, par_t, r, s)\n\n for i in range(N):\n par[i] = root(par, i)\n par_t[i] = root(par_t, i)\n d_c[par[i]].append(i)\n d_t[par_t[i]].append(i)\n\n for i in range(N):\n d_c[i] = d_c[par[i]]\n d_t[i] = d_t[par_t[i]]\n\n cnt = [0] * N\n for i in range(N):\n cnt[i] = len(list(set(d_c[i]) & set(d_t[i])))\n\n print(*cnt)\n\n\nmain()\n","fail":"from collections import defaultdict\nimport sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n\ndef root(par, x):\n if par[x] == x:\n return x\n else:\n return root(par, par[x])\n\n\ndef unite(rank, par, x, y):\n x = root(par, x)\n y = root(par, y)\n\n if x == y:\n return\n\n if rank[x] < rank[y]:\n par[x] = y\n else:\n par[y] = x\n if rank[x] == rank[y]:\n rank[x] += 1\n\n\ndef main():\n N, K, L = map(int, readline().split())\n m = map(int, read().split())\n pq = list(zip(m, m))\n pq, rs = pq[:K], pq[K:]\n\n par = list(range(N))\n rank = [0] * N\n for p, q in pq:\n p -= 1\n q -= 1\n unite(rank, par, p, q)\n\n par_t = list(range(N))\n rank_t = [0] * N\n for r, s in rs:\n r -= 1\n s -= 1\n unite(rank_t, par_t, r, s)\n\n pp = [(0, 0)] * N\n dd = defaultdict(list)\n for i in range(N):\n par[i] = root(par, i)\n par_t[i] = root(par_t, i)\n pp[i] = (par[i], par_t[i])\n dd[pp[i]].append(i)\n\n cnt = [0] * N\n for i in range(N):\n cnt[i] = len(dd[pp[i]])\n\n print(*cnt)\n\n\nmain()\n","change":"replace","i1":36,"i2":66,"j1":36,"j2":61,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03855","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import defaultdict\n\nN, K, L = map(int, input().split())\n\n\n# union-find\u3092\u5b9f\u88c5\nroot_road = [-1] * N\nroot_train = [-1] * N\n\n\ndef find_road(x):\n if root_road[x] < 0:\n return x\n\n root_road[x] = find_road(root_road[x])\n return root_road[x]\n\n\ndef union_road(x, y):\n x = find_road(x)\n y = find_road(y)\n if x == y:\n return\n\n root_road[x] += root_road[y]\n root_road[y] = x\n\n\ndef same_road(x, y):\n return find_road(x) == find_road(y)\n\n\ndef find_train(x):\n if root_train[x] < 0:\n return x\n\n root_train[x] = find_train(root_train[x])\n return root_train[x]\n\n\ndef union_train(x, y):\n x = find_train(x)\n y = find_train(y)\n if x == y:\n return\n\n root_train[x] += root_train[y]\n root_train[y] = x\n\n\ndef same_train(x, y):\n return find_train(x) == find_train(y)\n\n\ndc = defaultdict(list)\ndt = defaultdict(list)\nfor _ in range(K):\n p, q = map(int, input().split())\n p -= 1\n q -= 1\n dc[p].append(q)\n dc[q].append(p)\n union_road(p, q)\n\nfor _ in range(L):\n r, s = map(int, input().split())\n r -= 1\n s -= 1\n dt[r].append(s)\n dt[s].append(r)\n union_train(r, s)\n\n\nans = [0] * N\nfor i in range(N):\n for j in range(i + 1, N):\n if same_road(i, j):\n if same_train(i, j) and ans[i] <= 1 and ans[j] <= 1:\n ans[i] = 2\n ans[j] = 2\n elif not same_train(i, j) and ans[i] != 2 and ans[j] != 2:\n ans[i] = 1\n ans[j] = 1\n\n if same_train(i, j):\n if same_road(i, j):\n ans[i] = 2\n ans[j] = 2\n elif not same_road(i, j) and ans[i] != 2 and ans[j] != 2:\n ans[i] = 1\n ans[j] = 1\nprint(*ans)\n","fail":"from collections import defaultdict\n\nN, K, L = map(int, input().split())\n\n\n# union-find\u3092\u5b9f\u88c5\nroot_road = [-1] * N\nroot_train = [-1] * N\n\n\ndef find_road(x):\n if root_road[x] < 0:\n return x\n\n root_road[x] = find_road(root_road[x])\n return root_road[x]\n\n\ndef union_road(x, y):\n x = find_road(x)\n y = find_road(y)\n if x == y:\n return\n\n root_road[x] += root_road[y]\n root_road[y] = x\n\n\ndef same_road(x, y):\n return find_road(x) == find_road(y)\n\n\ndef find_train(x):\n if root_train[x] < 0:\n return x\n\n root_train[x] = find_train(root_train[x])\n return root_train[x]\n\n\ndef union_train(x, y):\n x = find_train(x)\n y = find_train(y)\n if x == y:\n return\n\n root_train[x] += root_train[y]\n root_train[y] = x\n\n\ndef same_train(x, y):\n return find_train(x) == find_train(y)\n\n\ndc = defaultdict(list)\ndt = defaultdict(list)\nfor _ in range(K):\n p, q = map(int, input().split())\n p -= 1\n q -= 1\n dc[p].append(q)\n dc[q].append(p)\n union_road(p, q)\n\nfor _ in range(L):\n r, s = map(int, input().split())\n r -= 1\n s -= 1\n dt[r].append(s)\n dt[s].append(r)\n union_train(r, s)\n\n# print(root_road, root_train)\ndic = {}\nfor i in range(N):\n if (find_road(i), find_train(i)) not in dic:\n dic[(find_road(i), find_train(i))] = 1\n continue\n else:\n dic[(find_road(i), find_train(i))] += 1\n\nans = []\nfor i in range(N):\n ans.append(dic[(find_road(i), find_train(i))])\nprint(*ans)\n","change":"replace","i1":72,"i2":91,"j1":72,"j2":84,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03857","language":"Python","original_status":"Time Limit Exceeded","pass":"class UnionFind3:\n def __init__(self, size):\n # \u8ca0\u306e\u5024\u306f\u30eb\u30fc\u30c8 (\u96c6\u5408\u306e\u4ee3\u8868) \u3067\u96c6\u5408\u306e\u500b\u6570\n # \u6b63\u306e\u5024\u306f\u6b21\u306e\u8981\u7d20\u3092\u8868\u3059\n self.table = [-1 for _ in range(size)]\n\n # \u96c6\u5408\u306e\u4ee3\u8868\u3092\u6c42\u3081\u308b\n def find(self, x):\n if self.table[x] < 0:\n return x\n else:\n # \u7d4c\u8def\u306e\u5727\u7e2e\n self.table[x] = self.find(self.table[x])\n return self.table[x]\n\n # \u4f75\u5408\n def union(self, x, y):\n s1 = self.find(x)\n s2 = self.find(y)\n if s1 != s2:\n if self.table[s1] <= self.table[s2]:\n # \u5c0f\u3055\u3044\u307b\u3046\u304c\u500b\u6570\u304c\u591a\u3044\n self.table[s1] += self.table[s2]\n self.table[s2] = s1\n else:\n self.table[s2] += self.table[s1]\n self.table[s1] = s2\n return True\n return False\n\n\nn, k, l = map(int, input().split())\nufd, ufr = UnionFind3(n), UnionFind3(n)\nfor _ in range(k):\n p, q = map(int, input().split())\n ufd.union(p - 1, q - 1)\nfor _ in range(l):\n r, s = map(int, input().split())\n ufr.union(r - 1, s - 1)\nresult = [1] * n\nfor i in range(n):\n for j in range(i + 1, n):\n if ufd.find(i) == ufd.find(j) and ufr.find(i) == ufr.find(j):\n result[i] += 1\n result[j] += 1\nprint(*result)\n","fail":"from collections import defaultdict\n\n\nclass UnionFind3:\n def __init__(self, size):\n self.table = [-1 for _ in range(size)]\n\n def find(self, x):\n while self.table[x] >= 0:\n x = self.table[x]\n return x\n\n def root(self, x):\n if self.table[x] < 0:\n return x\n else:\n self.table[x] = self.root(self.table[x])\n return self.table[x]\n\n def union(self, x, y):\n s1 = self.find(x)\n s2 = self.find(y)\n if s1 != s2:\n if self.table[s1] <= self.table[s2]:\n self.table[s1] += self.table[s2]\n self.table[s2] = s1\n else:\n self.table[s2] += self.table[s1]\n self.table[s1] = s2\n\n\nn, k, l = map(int, input().split())\nufd, ufr = UnionFind3(n), UnionFind3(n)\nfor _ in range(k):\n p, q = map(int, input().split())\n ufd.union(p - 1, q - 1)\nfor _ in range(l):\n r, s = map(int, input().split())\n ufr.union(r - 1, s - 1)\nd = defaultdict(int)\nfor i in range(n):\n d[ufd.root(i), ufr.root(i)] += 1\nprint(*(d[ufd.root(i), ufr.root(i)] for i in range(n)))\n","change":"replace","i1":0,"i2":46,"j1":0,"j2":43,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03860","language":"Python","original_status":"Runtime Error","pass":"a, b, c = str(input().split())\nprint(a[0], b[0], c[0])\n","fail":"[print(i[0], end=\"\") for i in input().split()]\nprint()\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"ValueError: too many values to unpack (expected 3)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03860\/Python\/s197123700.py\", line 1, in \n a, b, c = str(input().split())\nValueError: too many values to unpack (expected 3)\n","stdout":null} {"problem_id":"p03860","language":"Python","original_status":"Runtime Error","pass":"a, s, c = map(int, input().split())\nprint(a[0] + s[0] + c[0])\n","fail":"a, s, c = map(str, input().split())\nprint(a[0] + s[0] + c[0])\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'AtCoder'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03860\/Python\/s937750481.py\", line 1, in \n a, s, c = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'AtCoder'\n","stdout":null} {"problem_id":"p03860","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split())\nprint(a[0] + b[0] + c[0])\n","fail":"a, b, c = map(str, input().split())\nprint(a[0] + b[0] + c[0])\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: 'AtCoder'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03860\/Python\/s356083073.py\", line 1, in \n a, b, c = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'AtCoder'\n","stdout":null} {"problem_id":"p03860","language":"Python","original_status":"Runtime Error","pass":"N, x = map(int, input().split())\nA = list(map(int, input().split()))\n\nif len(A) % 2 == 0:\n A = A + [0]\n# print('A', A)\n\nans = 0\nfor i in range(1, N, 2):\n total = A[i - 1] + A[i]\n diff = total - x\n if diff <= 0:\n continue\n v1 = min(A[i], diff)\n v2 = diff - v1\n A[i] -= v1\n A[i - 1] -= v2\n ans += v1 + v2\n # print('A', A)\nprint(ans)\n","fail":"S = input().split()\nans = f\"A{S[1][0]}C\"\nprint(ans)\n","change":"replace","i1":0,"i2":19,"j1":0,"j2":2,"error":"ValueError: invalid literal for int() with base 10: 'AtCoder'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03860\/Python\/s510991095.py\", line 1, in \n N, x = map(int, input().split())\nValueError: invalid literal for int() with base 10: 'AtCoder'\n","stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = [int(n) for n in input().split()]\n\nres = 0\nfor n in range(a, b + 1):\n if n % x == 0:\n res += 1\nprint(res)\n","fail":"a, b, x = [int(n) for n in input().split()]\n\nqa = a \/\/ x\nqb = b \/\/ x\nra = a % x\nrb = b % x\nres = qb - qa\nif ra == 0:\n res += 1\n\nprint(res)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\n\nans = 0\nfor i in range(a, b + 1):\n if i % x == 0:\n ans += 1\n\nprint(ans)\n","fail":"a, b, x = map(int, input().split())\n\n\nans = b \/\/ x - (a - 1) \/\/ x\n\n\nprint(ans)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Runtime Error","pass":"a, b, x = map(int, input().split())\n\nif x % a == 0:\n print((b - a + 1) \/\/ x + 1)\nelse:\n print((b - a + 1) \/\/ x)\n","fail":"a, b, x = map(int, input().split())\nprint(b \/\/ x - (a - 1) \/\/ x)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":2,"error":"WA","stderr":null,"stdout":2.0} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = tuple(int(x) for x in input().split())\n\ny = -1\nfor i in range(a, b + 1):\n if i % x == 0:\n y = i\n break\n\nif y == -1:\n ans = 0\nelse:\n ans = (b - y) \/\/ x + 1\n\nprint(ans)\n","fail":"a, b, x = tuple(int(x) for x in input().split())\n\nif a == 0:\n y = 0\nelse:\n y = x * ((a - 1) \/\/ x + 1)\n\n\nif y == -1:\n ans = 0\nelse:\n ans = (b - y) \/\/ x + 1\n\nprint(ans)\n","change":"replace","i1":2,"i2":7,"j1":2,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\nwhile b % x:\n b -= 1\nif a == 0:\n print(b \/\/ x + 1)\nelse:\n print((b \/\/ x) - ((a - 1) \/\/ x))\n","fail":"a, b, x = map(int, input().split())\nif a == 0:\n print(b \/\/ x + 1)\nelse:\n print((b \/\/ x) - ((a - 1) \/\/ x))\n","change":"delete","i1":1,"i2":3,"j1":1,"j2":1,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\nint_list = [i for i in range(a, b + 1)]\ncounter = 0\nfor i in range(len(int_list)):\n if int_list[i] % x == 0:\n counter += 1\n\nprint(counter)\n","fail":"a, b, x = map(int, input().split())\nprint(b \/\/ x - (a - 1) \/\/ x)\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":2,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\n\nstart = a if a >= x else x\nend = b\nwhile start <= end:\n if start % x == 0:\n break\n if start == end:\n print(0)\n exit()\n start += 1\n\nresult = (end - start) \/\/ x + 1\nif a == 0:\n result += 1\nprint(result)\n","fail":"a, b, x = map(int, input().split())\n\nstart = 0\nend = b\nif a > x:\n if a % x == 0:\n start = a\n else:\n start = x * (a \/\/ x + 1)\nelse:\n start = x\n\nif start > end:\n result = 0\nelse:\n result = (end - start) \/\/ x + 1\nif a == 0:\n result += 1\nprint(result)\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Runtime Error","pass":"# coding: utf-8\n\na, b, x = map(int, input().split(\" \"))\n\nn = b - a - 1\n# coding: utf-8\n\na, b, x = map(int, input().split(\" \"))\n\nn = b - a\nif a % x == 0 or b % x == 0:\n print(n \/\/ x + 1)\nelse:\n print(n \/\/ x)\n","fail":"# coding: utf-8\n\na, b, x = map(int, input().split(\" \"))\n\n\ndef f(n):\n if n == -1:\n return 0\n else:\n return n \/\/ x + 1\n\n\nprint(f(b) - f(a - 1))\n","change":"replace","i1":4,"i2":14,"j1":4,"j2":13,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03861\/Python\/s822708116.py\", line 8, in \n a, b, x = map(int, input().split(\" \"))\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"# \u975e\u8ca0\u306e\u6574\u6570a, b(a \u2264 b)\u3068 \u3001 \u6b63\u306e\u6574\u6570x\u304c\u4e0e\u3048\u3089\u308c\u307e\u3059 \u3002\n# a\u4ee5\u4e0ab\u4ee5\u4e0b\u306e\u6574\u6570\u306e\u3046\u3061 \u3001 x\u3067\u5272\u308a\u5207\u308c\u308b\u3082\u306e\u306e\u500b\u6570\u3092\u6c42\u3081\u3066\u304f\u3060\u3055\u3044 \u3002\na, b, x = [int(i) for i in input().split()]\n\ncou = 0\nfor i in range(a, b + 1):\n if i % x == 0:\n cou += 1\n\nprint(cou)\n","fail":"a, b, x = [int(i) for i in input().split()]\n\n\ndef ret(n):\n if n >= 0:\n return n \/\/ x + 1\n else:\n return 0\n\n\nprint(ret(b) - ret(a - 1))\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"def resolve():\n a, b, x = map(int, input().split())\n\n cnt = 0\n for i in range(a, b + 1):\n if i % x == 0:\n cnt += 1\n\n print(cnt)\n\n\nresolve()\n","fail":"# import bisect\n# import copy\n# import fractions\n# import math\n# import numpy as np\n# from collections import Counter, deque\n# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product\n\n\ndef resolve():\n a, b, x = map(int, input().split())\n\n print(b \/\/ x - (a - 1) \/\/ x)\n\n\nresolve()\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\ncnt = 0\nfor i in range(a, b + 1):\n if i % x == 0:\n cnt += 1\nprint(cnt)\n","fail":"a, b, x = map(int, input().split())\nzenbu = b \/\/ x + 1\ntmp = 0\nif a % x == 0:\n tmp += 1\nbubun = a \/\/ x + 1\nans = zenbu - bubun + tmp\nprint(ans)\n","change":"replace","i1":1,"i2":6,"j1":1,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\nans = 0\n\nfor i in range(a, b + 1):\n if i % x == 0:\n ans += 1\nprint(ans)\n","fail":"a, b, x = map(int, input().split())\nprint(b \/\/ x - (a - 1) \/\/ x)\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":2,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"# input\na, b, x = map(int, input().split())\n\nans = 0\n\nfor i in range(a, b + 1):\n if i % x == 0:\n ans += 1\n\nprint(ans)\n","fail":"# input\nimport math\n\na, b, x = map(int, input().split())\n\n# 0,...,n\u306e\u4e2d\u3067x\u3067\u5272\u308a\u5207\u308c\u308b\u306e\u306f\n# 0, x, 2x,..., (n \/\/ x)* x \u306e(n \/\/x) + 1\u500b\n\nif a % x == 0:\n ans = ((b \/\/ x) + 1) - ((a \/\/ x) + 1) + 1\n print(ans)\nelse:\n ans = ((b \/\/ x) + 1) - ((a \/\/ x) + 1)\n print(ans)\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03861","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b, x = map(int, input().split())\n\ncnt = 0\nfor i in range(a, b + 1):\n if i % x == 0:\n cnt += 1\n\nprint(cnt)\n","fail":"a, b, x = map(int, input().split())\n\nif a % x == 0:\n ans = (b \/\/ x) - (a \/\/ x) + 1\nelse:\n ans = (b \/\/ x) - (a \/\/ x)\n\n\nprint(ans)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03862","language":"Python","original_status":"Time Limit Exceeded","pass":"n, x = map(int, input().split())\na = list(map(int, input().split()))\nans = 0\nfor i in range(n - 1):\n while a[i] + a[i + 1] > x:\n if a[i + 1] != 0:\n ans += 1\n a[i + 1] -= 1\n else:\n ans += 1\n a[i] -= 1\nprint(ans)\n","fail":"n, x = map(int, input().split())\na = list(map(int, input().split()))\nans = 0\nfor i in range(n - 1):\n if a[i] + a[i + 1] > x:\n ans += a[i + 1] + a[i] - x\n a[i + 1] = x - a[i]\n if a[i + 1] < 0:\n a[i + 1] = 0\nprint(ans)\n","change":"replace","i1":4,"i2":11,"j1":4,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03862","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8\n\nn, x = map(int, input().split())\na = list(map(int, input().split()))\ncount = 0\n\nif a[0] > x:\n count += a[0] - x\n a[0] = x\n\n\nfor i in range(len(a) - 1):\n\n while a[i] + a[i + 1] > x:\n a[i + 1] -= 1\n count += 1\nprint(count)\n","fail":"# -*- coding: utf-8\n\nn, x = map(int, input().split())\na = list(map(int, input().split()))\n\ncount = max(0, a[0] - x)\na[0] = min(a[0], x)\n\nfor i in range(len(a) - 1):\n if a[i] + a[i + 1] > x:\n tmp_num = max(0, a[i] + a[i + 1] - x)\n count += tmp_num\n a[i + 1] -= tmp_num\nprint(count)\n","change":"replace","i1":4,"i2":16,"j1":4,"j2":13,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03862","language":"Python","original_status":"Runtime Error","pass":"n, x = map(int, input().split())\na = list(map(int, input().split()))\ncount = 0\nfor i in range(n - 2):\n if a[i] + a[i + 1] > x:\n count += a[i] + a[i + 1] - x\n a[i + 1] = x - a[i]\nif a[n - 1] + a[n] > x:\n count += a[n - 1] + a[n] - x\nprint(int(count))\n","fail":"n, x = map(int, input().split())\na = list(map(int, input().split()))\ncount = 0\nfor i in range(n - 1):\n if a[i] + a[i + 1] > x:\n count += a[i] + a[i + 1] - x\n if a[i + 1] >= a[i] + a[i + 1] - x:\n a[i + 1] = x - a[i]\n else:\n a[i + 1] = 0\n a[i] = x\nprint(int(count))\n","change":"replace","i1":3,"i2":9,"j1":3,"j2":11,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03862\/Python\/s859205699.py\", line 8, in \n if a[n - 1] + a[n] > x:\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03864","language":"Python","original_status":"Time Limit Exceeded","pass":"n, x = map(int, input().split())\n\na = list(map(int, input().split()))\n\nans = 0\n\nfor i in range(n - 1):\n while a[i] + a[i + 1] > x:\n a[i + 1] -= 1\n ans += 1\n\nprint(ans)\n","fail":"n, x = map(int, input().split())\na = list(map(int, input().split()))\n\ncnt, a[0] = sum(a), min(a[0], x)\nfor i in range(1, n):\n if a[i - 1] + a[i] > x:\n a[i] = x - a[i - 1]\nprint(cnt - sum(a))\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03865","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python\n# -*- coding:utf-8 -*-\n\ns = input()\nif len(s) % 2 == 0 ^ s[0] == s[-1]:\n print(\"Second\")\nelse:\n print(\"First\")\n","fail":"#!\/usr\/bin\/env python\n# -*- coding:utf-8 -*-\n\ns = input()\nif (len(s) % 2 == 0) and (s[0] == s[-1]):\n print(\"First\")\nelif (len(s) % 2 == 0) or (s[0] == s[-1]):\n print(\"Second\")\nelse:\n print(\"First\")\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":7,"error":"TypeError: unsupported operand type(s) for ^: 'int' and 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03865\/Python\/s528270335.py\", line 5, in \n if len(s) % 2 == 0 ^ s[0] == s[-1]:\nTypeError: unsupported operand type(s) for ^: 'int' and 'str'\n","stdout":null} {"problem_id":"p03888","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split())\nprint((a * b \/ (a + b)))\n","fail":"a, b = map(int, input().split())\nprint((a * b \/ (a + b)))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: not enough values to unpack (expected 3, got 2)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03888\/Python\/s684233987.py\", line 1, in \n a, b, c = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 2)\n","stdout":null} {"problem_id":"p03910","language":"Python","original_status":"Memory Limit Exceeded","pass":"from itertools import accumulate\nimport bisect\n\nN = int(input())\nli = [i for i in range(1, N + 1)]\nacc_list = list(accumulate(li))\nindex = bisect.bisect_left(acc_list, N)\ngarbage = acc_list[index] - N\nfor i in range(index + 1):\n if li[i] != garbage:\n print(li[i])\n","fail":"N = int(input())\nli = [i for i in range(1, N + 1)]\nacc = 0\nindex = 0\nfor i in range(N):\n acc += li[i]\n if acc >= N:\n index = i\n break\ngarbage = acc - N\nfor i in range(index + 1):\n if li[i] != garbage:\n print(li[i])\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":10,"error":"MLE","stderr":null,"stdout":null} {"problem_id":"p03910","language":"Python","original_status":"Time Limit Exceeded","pass":"# \u6700\u5927\u5024\u306e\u6700\u5c0f\u5024\u3001\u3061\u3087\u3046\u3069n\/2\u81ed\u3044\n# \u3042\u3068\u306f\u5e33\u5c3b\u5408\u308f\u305b\u304c\u52b9\u304d\u305d\u3046\n# 14\u3068\u304b\u3060\u30687+4+2+1 \uff087+5+2\u3067\u30827+4+3\u3067\u3082\u3044\u3044\n# \u304b\u3068\u601d\u3044\u304d\u3084 1+2+3+4+5\u306715\u3044\u304f\u306e\u3067, 5+4+3+2\u3067\u3088\u304b\u3063\u305f\n# 10^7\u306a\u306e\u3067\u6bce\u56de\u8db3\u3057\u3066\u3082\u3069\u3046\u305b\u9593\u306b\u5408\u3046\u3002\u3053\u308c\u3067\u7b54\u3048\u306e\u96c6\u5408\u306e\u3046\u3061\u6700\u5927\u5024\u306f\u78ba\u5b9a\n# \u3042\u3068\u306f\u305d\u308c\u3067n\u3092\u5f15\u3044\u30660\u306b\u306a\u308b\u307e\u3067\n\nn = int(input())\nans = []\ncur = 0\n\nwhile cur != n:\n tmp = 0\n for i in range(1, n + 1 - cur):\n if i + tmp >= n - cur:\n tmp = i\n break\n tmp += i\n ans.append(tmp)\n cur += tmp\n # print(\"tmp = {}, cur = {}\".format(tmp, cur))\n# print(ans)\nfor a in ans:\n print(a)\n","fail":"# \u6700\u5927\u5024\u306e\u6700\u5c0f\u5024\u3001\u3061\u3087\u3046\u3069n\/2\u81ed\u3044\n# \u3042\u3068\u306f\u5e33\u5c3b\u5408\u308f\u305b\u304c\u52b9\u304d\u305d\u3046\n# 14\u3068\u304b\u3060\u30687+4+2+1 \uff087+5+2\u3067\u30827+4+3\u3067\u3082\u3044\u3044\n# \u304b\u3068\u601d\u3044\u304d\u3084 1+2+3+4+5\u306715\u3044\u304f\u306e\u3067, 5+4+3+2\u3067\u3088\u304b\u3063\u305f\n# 10^7\u306a\u306e\u3067\u6bce\u56de\u8db3\u3057\u3066\u3082\u3069\u3046\u305b\u9593\u306b\u5408\u3046\u3002\u3053\u308c\u3067\u7b54\u3048\u306e\u96c6\u5408\u306e\u3046\u3061\u6700\u5927\u5024\u306f\u78ba\u5b9a\n# \u3042\u3068\u306f\u305d\u308c\u3067n\u3092\u5f15\u3044\u30660\u306b\u306a\u308b\u307e\u3067 -> \u3053\u308c\u3060\u3068\u9593\u306b\u5408\u308f\u306a\u3044\n\nn = int(input())\nans = []\ncur = 0\n\nwhile cur != n:\n tmp = 0\n for i in range(1, n + 1 - cur):\n if i + tmp >= n - cur:\n tmp = i\n break\n tmp += i\n ans.append(tmp)\n cur += tmp\n # print(\"tmp = {}, cur = {}\".format(tmp, cur))\n# print(ans)\nfor a in ans:\n print(a)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03921","language":"Python","original_status":"Runtime Error","pass":"#!\/usr\/bin\/env python3\nN = int(input())\n\nsum = 0\nm = 0\nfor i in range(1, 10**3 + 1):\n sum += i\n if sum >= N:\n m = i\n break\n\nsum = N\nfor i in range(1, m + 1)[::-1]:\n if sum - i >= 0:\n sum -= i\n print(i)\n","fail":"#!\/usr\/bin\/env python3\nclass UnionFind:\n def __init__(self, size):\n self.table = [-1] * size\n\n def find(self, x):\n if self.table[x] < 0:\n return x\n else:\n self.table[x] = self.find(self.table[x])\n return self.table[x]\n\n def union(self, x, y):\n s1 = self.find(x)\n s2 = self.find(y)\n if s1 != s2:\n if self.table[s2] < self.table[s1]:\n s1, s2 = s2, s1\n self.table[s1] += self.table[s2]\n self.table[s2] = s1\n return s1 != s2\n\n\nN, M = map(int, input().split())\nuf = UnionFind(N + M)\nfor i in range(N):\n L = [int(x) - 1 for x in input().split()]\n L[0] += 1\n for j in range(L[0]):\n uf.union(L[j + 1], M + i)\n\nans = True\nfor i in range(N):\n if uf.find(M + i) != uf.find(M):\n ans = False\nprint((\"NO\", \"YES\")[ans])\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":36,"error":"ValueError: invalid literal for int() with base 10: '4 6'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03921\/Python\/s228366956.py\", line 2, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '4 6'\n","stdout":null} {"problem_id":"p03929","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\nd = [11, 16, 10, 25, 9, 24, 19, 13, 18, 12, 17]\nprint(len([x for x in range(d[k], 7 * (n - 1), 11) if x % 7 > 1]))\n","fail":"n, k = map(int, input().split())\nd = [11, 16, 10, 25, 9, 24, 19, 13, 18, 12, 17]\ne = 7 * (n - 1)\nr = (e - d[k] - 1) \/\/ 77\nprint(5 * r + len([x for x in range(d[k] + 77 * r, e, 11) if x % 7 > 1]))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03937","language":"Python","original_status":"Runtime Error","pass":"# \u53f3\u3068\u4e0b\u306e\u4e21\u65b9\u306b#\u304c\u3042\u3063\u305f\u3089\u7d42\u4e86\u3060\u3057\u3069\u3061\u3089\u306b\u3082\u306a\u304f\u3066\u3082\u7d42\u4e86\n# \u306a\u3093\u3084\u3053\u306e\u30af\u30bd\u307f\u305f\u3044\u306a\u5b9f\u88c5\u306f\n\nh, w = map(int, input().split())\ntable = []\nfor _ in range(h):\n table.append(input())\n\nflag = False\npos = [0, 0]\nwhile True:\n if pos == [h - 1, w - 1]:\n flag = True\n break\n if h <= pos[0] or w <= pos[1]:\n break\n if (\n pos[0] < h - 1\n and pos[1] < w - 1\n and table[pos[0] + 1][pos[1]] == \"#\"\n and table[pos[0]][pos[1] + 1] == \"#\"\n ):\n break\n if pos[0] < h - 1 and pos[1] < w - 1 and table[pos[0] + 1][pos[1]] == \"#\":\n pos[0] += 1\n continue\n elif pos[0] < h - 1 and pos[1] < w - 1 and table[pos[0]][pos[1] + 1] == \"#\":\n pos[1] += 1\n continue\n if pos[0] == h - 1 and pos[1] < w - 1 and table[pos[0]][pos[1] + 1] == \"#\":\n pos[1] += 1\n continue\n elif pos[0] < h - 1 and pos[1] == w - 1 and table[pos[0] + 1][pos[0]] == \"#\":\n pos[0] += 1\n continue\n else:\n break\n\nprint(\"Possible\" if flag else \"Impossible\")\n","fail":"# \u53f3\u3068\u4e0b\u306e\u4e21\u65b9\u306b#\u304c\u3042\u3063\u305f\u3089\u7d42\u4e86\u3060\u3057\u3069\u3061\u3089\u306b\u3082\u306a\u304f\u3066\u3082\u7d42\u4e86\n# \u306a\u3093\u3084\u3053\u306e\u30af\u30bd\u307f\u305f\u3044\u306a\u5b9f\u88c5\u306f\n\nh, w = map(int, input().split())\ntable = []\nsharp = 0\nfor _ in range(h):\n get = input()\n table.append(get)\n sharp += get.count(\"#\")\n\nflag = False\npos = [0, 0]\npath = 0\nwhile True:\n if pos == [h - 1, w - 1]:\n path += 1\n flag = True\n break\n if h <= pos[0] or w <= pos[1]:\n break\n if (\n pos[0] < h - 1\n and pos[1] < w - 1\n and table[pos[0] + 1][pos[1]] == \"#\"\n and table[pos[0]][pos[1] + 1] == \"#\"\n ):\n break\n if pos[0] < h - 1 and pos[1] < w - 1 and table[pos[0] + 1][pos[1]] == \"#\":\n pos[0] += 1\n path += 1\n continue\n elif pos[0] < h - 1 and pos[1] < w - 1 and table[pos[0]][pos[1] + 1] == \"#\":\n pos[1] += 1\n path += 1\n continue\n if pos[0] == h - 1 and pos[1] < w - 1 and table[pos[0]][pos[1] + 1] == \"#\":\n pos[1] += 1\n path += 1\n continue\n elif pos[0] < h - 1 and pos[1] == w - 1 and table[pos[0] + 1][pos[1]] == \"#\":\n pos[0] += 1\n path += 1\n continue\n else:\n break\n\nprint(\"Possible\" if flag and path == sharp else \"Impossible\")\n","change":"replace","i1":5,"i2":39,"j1":5,"j2":48,"error":0,"stderr":null,"stdout":"Possible\n"} {"problem_id":"p03938","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\np_list = list(map(int, input().split()))\n\nr = {}\nfor i in range(N):\n r[p_list[i]] = i + 1\n\na_list = []\nb_list = []\n\nfor i in range(1, N + 1):\n a_list.append(30000 * i)\n b_list.append(30000 * (N - i) + r[i - 1])\n\nprint(*a_list)\nprint(*b_list)\n","fail":"N = int(input())\np_list = list(map(int, input().split()))\n\nr = {}\nfor i in range(N):\n r[p_list[i]] = i + 1\n\na_list = []\nb_list = []\nfor i in range(1, N + 1):\n a_list.append(30000 * i)\n b_list.append(30000 * (N - i) + r[i])\n\nprint(*a_list)\nprint(*b_list)\n","change":"replace","i1":9,"i2":13,"j1":9,"j2":12,"error":"KeyError: 0","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03938\/Python\/s221768182.py\", line 13, in \n b_list.append(30000 * (N - i) + r[i - 1])\nKeyError: 0\n","stdout":null} {"problem_id":"p03939","language":"Python","original_status":"Time Limit Exceeded","pass":"from decimal import Decimal\n\nn, d, x = map(Decimal, input().split())\nprint((d + (2 * n - 1) * x \/ 2) * sum((n - i) \/ (i + 1) for i in range(int(n))))\n","fail":"def solve(n, d, x):\n ans = 0\n while n:\n ans += d + (2 * n - 1) * x \/ 2\n d = ((n + 1) * d + 5 * x \/ 2) \/ n\n x *= (n + 2) \/ n\n n -= 1\n return ans\n\n\nprint(\"{:.10f}\".format(solve(*map(float, input().split()))))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03943","language":"Python","original_status":"Runtime Error","pass":"packs = list(map(int, input().split())).sort()\nif packs[2] - packs[1] == packs[0]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"packs = sorted(list(map(int, input().split())))\nif packs[2] - packs[1] == packs[0]:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: 'NoneType' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03943\/Python\/s546754965.py\", line 2, in \n if packs[2] - packs[1] == packs[0]:\nTypeError: 'NoneType' object is not subscriptable\n","stdout":null} {"problem_id":"p03943","language":"Python","original_status":"Runtime Error","pass":"# 3\u500b\u306e\u30d1\u30c3\u30af\u306b\u305d\u308c\u305e\u308c\u3001a,b,c\u500b\u306e\u30ad\u30e3\u30f3\u30c7\u30a3\u30fc\u304c\u5165\u3063\u3066\u3044\u308b\n# \u30ad\u30e3\u30f3\u30c7\u30a3\u30fc\u30922\u4eba\u306b\u5206\u3051\u308b\u969b\u3001\u500b\u6570\u304c\u7b49\u3057\u304f\u306a\u308b\u304b\u5224\u5b9a\n\n# \u5165\u529b\na = int(input())\nb = int(input())\nc = int(input())\n\n# \u51e6\u7406\nif a == b + c or b == a + c or c == a + b:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"# 3\u500b\u306e\u30d1\u30c3\u30af\u306b\u305d\u308c\u305e\u308c\u3001a,b,c\u500b\u306e\u30ad\u30e3\u30f3\u30c7\u30a3\u30fc\u304c\u5165\u3063\u3066\u3044\u308b\n# \u30ad\u30e3\u30f3\u30c7\u30a3\u30fc\u30922\u4eba\u306b\u5206\u3051\u308b\u969b\u3001\u500b\u6570\u304c\u7b49\u3057\u304f\u306a\u308b\u304b\u5224\u5b9a\n\n# \u5165\u529b\na, b, c = map(int, input().split())\n\n# \u51e6\u7406\nif a == b + c or b == a + c or c == a + b:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":4,"i2":7,"j1":4,"j2":5,"error":"ValueError: invalid literal for int() with base 10: '10 30 20'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03943\/Python\/s124699189.py\", line 5, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '10 30 20'\n","stdout":null} {"problem_id":"p03943","language":"Python","original_status":"Runtime Error","pass":"from functools import reduce\nfrom operator import add\n\nA = list(map(int, input().split()))\nprint(\"Yes\" if max(A) == reduce(add, [i for i in A if i != max(A)]) else \"No\")\n","fail":"from functools import reduce\nfrom operator import add\n\nA = list(map(int, input().split()))\nM = max(A)\nT = [i for i in A if i != M]\nif len(T) == 0:\n print(\"No\")\nelse:\n print(\"Yes\" if M == reduce(add, T) else \"No\")\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":10,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p03944","language":"Python","original_status":"Runtime Error","pass":"w, h, n = [int(i) for i in input().split()]\nw2, h2 = w, h\nwb, hb = [False] * w, [False] * h\nfor i in range(n):\n x, y, a = [int(i) for i in input().split()]\n if a == 1 and not wb[x]:\n w2 -= x\n wb[x] = True\n elif a == 2 and not wb[x]:\n w2 -= w - x\n wb[x] = True\n elif a == 3 and not hb[y]:\n h2 -= y\n hb[y] = True\n elif a == 4 and not hb[y]:\n h2 -= h - y\n hb[y] = True\nans = w2 * h2\nprint(ans if ans > 0 else 0)\n","fail":"w, h, n = [int(i) for i in input().split()]\nW = set(range(w))\nH = set(range(h))\nfor i in range(n):\n x, y, a = [int(i) for i in input().split()]\n if a == 1:\n W &= set(range(x, w))\n elif a == 2:\n W &= set(range(0, x))\n elif a == 3:\n H &= set(range(y, h))\n elif a == 4:\n H &= set(range(0, y))\nprint(len(W) * len(H))\n","change":"replace","i1":1,"i2":19,"j1":1,"j2":14,"error":0,"stderr":null,"stdout":9} {"problem_id":"p03945","language":"Python","original_status":"Runtime Error","pass":"def solve(n):\n if n == 1:\n return 0\n else:\n if S[n - 2] == S[n - 1]:\n return solve(n - 1)\n else:\n return solve(n - 1) + 1\n\n\nif __name__ == \"__main__\":\n S = input()\n first_s = S[0]\n S = [1 if first_s == s else 0 for s in S]\n\n print(solve(len(S)))\n","fail":"import threading\nimport sys\n\n\ndef main():\n def solve(n):\n if n == 1:\n return 0\n else:\n if S[n - 2] == S[n - 1]:\n return solve(n - 1)\n else:\n return solve(n - 1) + 1\n\n S = input()\n first_s = S[0]\n S = [1 if first_s == s else 0 for s in S]\n\n print(solve(len(S)))\n\n\nif __name__ == \"__main__\":\n\n sys.setrecursionlimit(1024 * 1024 * 2)\n threading.stack_size(128 * 1024 * 1024 * 2)\n threading.Thread(target=main).start()\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":26,"error":"0","stderr":null,"stdout":1.0} {"problem_id":"p03945","language":"Python","original_status":"Time Limit Exceeded","pass":"s = input()\nans = 0\nwhile len(set(s)) == 2:\n c = s[0]\n for i in range(len(s)):\n if s[i] != c:\n idx = i\n break\n s = s[i:]\n ans += 1\nprint(ans)\n","fail":"s = input()\nans = 0\nwhile len(s):\n c = s[0]\n for i in range(len(s)):\n if s[i] != c:\n idx = i\n break\n idx2 = i\n if idx2 == len(s) - 1:\n break\n s = s[idx:]\n ans += 1\n\nprint(ans)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03945","language":"Python","original_status":"Time Limit Exceeded","pass":"S = input()\n\n# 1\u4ee5\u4e0a\u306e\u540c\u3058\u8272\u306e\u77f3\u306e\u5217\u306f1\u3064\u306b\u96c6\u7d04\u3067\u304d\u308b\nT = S[0]\nprev = T\nfor s in S[1:]:\n if prev != s:\n T += s\n prev = s\n\nprint(len(T) - 1)\n","fail":"S = input()\n\n# 1\u4ee5\u4e0a\u306e\u540c\u3058\u8272\u306e\u77f3\u306e\u5217\u306f1\u3064\u306b\u96c6\u7d04\u3067\u304d\u308b\ncnt = 1\nprev = S[0]\nfor s in S[1:]:\n if prev != s:\n cnt += 1\n prev = s\n\nprint(cnt - 1)\n","change":"replace","i1":3,"i2":11,"j1":3,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03946","language":"Python","original_status":"Time Limit Exceeded","pass":"N, T = map(int, input().split())\nA = [int(Ai) for Ai in input().split()]\nB = [0] * len(A)\nfor i in range(1, len(A)):\n B[i] = A[i] - min(A[:i])\nprint(sum([Bi == max(B) for Bi in B]))\n","fail":"N, T = map(int, input().split())\nA = [int(Ai) for Ai in input().split()]\nAmin = A[0]\nBmax = 0\ncount = 0\nfor i in range(1, len(A)):\n Amin = min(A[i - 1], Amin)\n Bi = A[i] - Amin\n if Bmax == Bi:\n count += 1\n elif Bmax < Bi:\n Bmax = Bi\n count = 1\nprint(count)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03946","language":"Python","original_status":"Runtime Error","pass":"n, t = list(map(int, input().split()))\na = list(map(int, input().split()))\nmin = 1000000000\nmin_c = 0\nmax_dif = 0\nmax_dif_c = 0\nfor i in range(n):\n if a[i] < min:\n min = a[i]\n min_c = 1\n continue\n elif a[i] == min:\n min_c += 1\n continue\n if a[i] - min > max_dif:\n max_dif = a[i] - min\n max_dif_c = 1\n elif a[i] - min == max_dif:\n max_dif_c += 1\nc = min([min_c, max_dif_c])\nprint(str(c))\n","fail":"n, t = list(map(int, input().split()))\na = list(map(int, input().split()))\nmin_a = 1000000000\nmax_dif = 0\nmax_dif_c = 0\nfor i in range(n):\n if a[i] < min_a:\n min_a = a[i]\n elif a[i] - min_a > max_dif:\n max_dif = a[i] - min_a\n max_dif_c = 1\n elif a[i] - min_a == max_dif:\n max_dif_c += 1\nprint(str(max_dif_c))\n","change":"replace","i1":2,"i2":21,"j1":2,"j2":14,"error":"TypeError: 'int' object is not callable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03946\/Python\/s626493298.py\", line 20, in \n c = min([min_c, max_dif_c])\nTypeError: 'int' object is not callable\n","stdout":null} {"problem_id":"p03951","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nn = int(input())\ns = list(input())\nt = list(input())\n\nfor i in range(n):\n match = True\n for j in range(n):\n if i + j < n:\n if s[i + j] != t[j]:\n match = False\n if match:\n if i == 0:\n print(n)\n else:\n print(n + i)\n break\nelse:\n print(len(n * 2))\n","fail":"# -*- coding: utf-8 -*-\n\nn = int(input())\ns = list(input())\nt = list(input())\n\nfor i in range(n):\n match = True\n for j in range(n):\n if i + j < n:\n if s[i + j] != t[j]:\n match = False\n if match:\n if i == 0:\n print(n)\n else:\n print(n + i)\n break\nelse:\n print(n * 2)\n","change":"replace","i1":19,"i2":20,"j1":19,"j2":20,"error":0,"stderr":null,"stdout":5} {"problem_id":"p03957","language":"Python","original_status":"Runtime Error","pass":"s = input()\nprint(\"Yes\" if 0 <= s.index(\"C\") < s.rindex(\"F\") else \"No\")\n","fail":"s = input()\nprint(\"Yes\" if 0 <= s.find(\"C\") < s.rfind(\"F\") else \"No\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":0,"stderr":null,"stdout":"Yes\n"} {"problem_id":"p03958","language":"Python","original_status":"Runtime Error","pass":"k, t = list(map(int, input().split()))\nnums = list(map(int, input().split()))\n\nm = max(nums)\nrest = k - m\nif max - rest - 1 > 0:\n print(max - rest - 1)\nelse:\n print(0)\n","fail":"k, t = list(map(int, input().split()))\nnums = list(map(int, input().split()))\n\nm = max(nums)\nrest = k - m\nif m - rest - 1 > 0:\n print(m - rest - 1)\nelse:\n print(0)\n","change":"replace","i1":5,"i2":7,"j1":5,"j2":7,"error":"TypeError: unsupported operand type(s) for -: 'builtin_function_or_method' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03958\/Python\/s472647627.py\", line 6, in \n if max - rest - 1 > 0:\nTypeError: unsupported operand type(s) for -: 'builtin_function_or_method' and 'int'\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, (input()))\n\nif a == b and a == c:\n print(1)\nelif a == b or a == c or b == c:\n print(2)\nelse:\n print(3)\n","fail":"a, b, c = map(int, input().split())\n\nif a == b and a == c:\n print(1)\nelif a == b or a == c or b == c:\n print(2)\nelse:\n print(3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: ' '","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s879938212.py\", line 1, in \n a, b, c = map(int, (input()))\nValueError: invalid literal for int() with base 10: ' '\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"print(len(set([input().split()])))\n","fail":"print(len(set(list(input().split()))))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unhashable type: 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s122319226.py\", line 1, in \n print(len(set([input().split()])))\nTypeError: unhashable type: 'list'\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"from collections import Counter\n\nprint(len(Counter([int(input()) for i in range(3)])))\n","fail":"# A\nfrom collections import Counter\n\nprint(len(Counter([int(i) for i in input().split()])))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":4,"error":"ValueError: invalid literal for int() with base 10: '3 1 4'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s782636979.py\", line 3, in \n print(len(Counter([int(input()) for i in range(3)])))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s782636979.py\", line 3, in \n print(len(Counter([int(input()) for i in range(3)])))\nValueError: invalid literal for int() with base 10: '3 1 4'\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"print(len({input().split()}))\n","fail":"print(len(set(input().split())))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unhashable type: 'list'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s798226179.py\", line 1, in \n print(len({input().split()}))\nTypeError: unhashable type: 'list'\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"n = list(map(int, input().split()))\n\nans = set(n)\nprint(ans.count)\n","fail":"n = list(int(x) for x in input().split(\" \"))\n\nans = set(n)\nprint(len(ans))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"error":"AttributeError: 'set' object has no attribute 'count'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s857335382.py\", line 4, in \n print(ans.count)\nAttributeError: 'set' object has no attribute 'count'\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input().split())\nprint(len(set(a, b, c)))\n","fail":"a, b, c = map(int, input().split())\nprint(len(set([a, b, c])))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: set expected at most 1 argument, got 3","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s707893021.py\", line 2, in \n print(len(set(a, b, c)))\nTypeError: set expected at most 1 argument, got 3\n","stdout":null} {"problem_id":"p03962","language":"Python","original_status":"Runtime Error","pass":"from sys import stdin\n\na = map((int(x) for x in stdin.readline().split()))\n\nprint(len(a))\n","fail":"from sys import stdin\n\na = set((int(x) for x in stdin.readline().split()))\n\nprint(len(a))\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: map() must have at least two arguments.","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03962\/Python\/s114624251.py\", line 3, in \n a = map((int(x) for x in stdin.readline().split()))\nTypeError: map() must have at least two arguments.\n","stdout":null} {"problem_id":"p03964","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nvotes = [list(map(int, input().split())) for _ in range(n)]\n\ncurr_a, curr_b = 0, 0\n\nfor v1, v2 in votes:\n a, b = v1, v2\n i = min(curr_a \/\/ v1, curr_b \/\/ v2)\n\n while a < curr_a or b < curr_b:\n a = v1 * i\n b = v2 * i\n i += 1\n\n curr_a, curr_b = a, b\n\nprint(curr_a + curr_b)\n","fail":"n = int(input())\nvotes = [list(map(int, input().split())) for _ in range(n)]\n\ncurr_a, curr_b = 0, 0\n\nfor v1, v2 in votes:\n a, b = v1, v2\n i = max(curr_a \/\/ v1, curr_b \/\/ v2)\n\n while a < curr_a or b < curr_b:\n a = v1 * i\n b = v2 * i\n i += 1\n\n curr_a, curr_b = a, b\n\nprint(curr_a + curr_b)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03964","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nratio = [list(map(int, input().split())) for _ in range(n)]\n\nt_voted, a_voted = ratio[0][0], ratio[0][1]\nfor t, a in ratio[1:]:\n tt, aa = t, a\n while tt < t_voted or aa < a_voted:\n tt += t\n aa += a\n t_voted, a_voted = tt, aa\n\nprint(t_voted + a_voted)\n","fail":"from decimal import Decimal\nfrom math import ceil\n\nn = int(input())\nratio = [list(map(int, input().split())) for _ in range(n)]\n\nt_voted = a_voted = 1\nfor t, a in ratio:\n val = max(ceil(Decimal(t_voted) \/ Decimal(t)), ceil(Decimal(a_voted) \/ Decimal(a)))\n t_voted = t * val\n a_voted = a * val\n\nprint(t_voted + a_voted)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03964","language":"Python","original_status":"Runtime Error","pass":"import math\n\nn = int(input())\nvote = [0, 0]\n# \u6700\u521d\u306e\u5f97\u7968\u306f\u3001\u6700\u5c0f\u5024\u3092\u76ee\u6307\u3059\u306e\u3067\n# \u5358\u7d14\u306b\u5165\u529b\u6bd4\u3092\u305d\u306e\u307e\u307e\u4f7f\u7528\n# \u5404\u5165\u529b\u306b\u5bfe\u3057\u3001vote[0]<=t*k, vote[1]<=a*k\u3068\u306a\u308b\n# \u6700\u5c0f\u306et*k,a*k\u3067vote\u3092\u66f4\u65b0\nvote = [1, 1]\nfor i in range(n):\n t, a = [int(i) for i in input().split()]\n k = max(math.ceil(vote[0] \/ t), math.ceil(vote[1] \/ a))\n vote = [t * k, a * k]\n if sum(vote) > 10**10:\n t[1000000000] = 1\n # print(\"i:{} vote:{}\".format(i, vote))\nprint(vote[0] + vote[1])\n","fail":"import math\n\nn = int(input())\nvote = [0, 0]\n# \u6700\u521d\u306e\u5f97\u7968\u306f\u3001\u6700\u5c0f\u5024\u3092\u76ee\u6307\u3059\u306e\u3067\n# \u5358\u7d14\u306b\u5165\u529b\u6bd4\u3092\u305d\u306e\u307e\u307e\u4f7f\u7528\n# \u5404\u5165\u529b\u306b\u5bfe\u3057\u3001vote[0]<=t*k, vote[1]<=a*k\u3068\u306a\u308b\n# \u6700\u5c0f\u306et*k,a*k\u3067vote\u3092\u66f4\u65b0\nvote = [1, 1]\nfor i in range(n):\n t, a = [int(i) for i in input().split()]\n if vote[0] % t == 0:\n k = vote[0] \/\/ t\n else:\n k = vote[0] \/\/ t + 1\n if vote[1] % a == 0:\n k = max(k, vote[1] \/\/ a)\n else:\n k = max(k, vote[1] \/\/ a + 1)\n # k = max(math.ceil(vote[0] \/ t), math.ceil(vote[1] \/ a))\n vote = [t * k, a * k]\n # a \/ b + (a % b == 0 ? 0: 1)\n # print(\"i:{} vote:{}\".format(i, vote))\nprint(vote[0] + vote[1])\n","change":"replace","i1":11,"i2":15,"j1":11,"j2":22,"error":"0","stderr":null,"stdout":10.0} {"problem_id":"p03964","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nta = [tuple(int(x) for x in input().split()) for _ in range(n)]\n\na = 0\nb = 0\nfor x, y in ta:\n if x >= a and y >= b:\n a = x\n b = y\n else:\n temp = 2\n while x * temp < a or y * temp < b:\n temp += 1\n a = x * temp\n b = y * temp\n\nprint(a + b)\n","fail":"n = int(input())\nta = [tuple(int(x) for x in input().split()) for _ in range(n)]\n\na = 0\nb = 0\nfor x, y in ta:\n if x >= a and y >= b:\n a = x\n b = y\n else:\n temp = max(a \/\/ x, b \/\/ y)\n while x * temp < a or y * temp < b:\n temp += 1\n a = x * temp\n b = y * temp\n\nprint(a + b)\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03966","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nT = []\nA = []\n\nfor _ in range(N):\n t, a = list(map(int, input().split()))\n T.append(t)\n A.append(a)\n\nt_num = 1\na_num = 1\nfor i in range(N):\n # TA\u306f\u5e38\u306bn\u500d\u305a\u3064\u5897\u52a0\u3057\u3066\u3044\u304f\n n = 1\n while T[i] * n < t_num or A[i] * n < a_num:\n n += 1\n t_num = T[i] * n\n a_num = A[i] * n\n\nprint(t_num + a_num)\n","fail":"from math import ceil\n\nN = int(input())\nT = []\nA = []\n\nfor _ in range(N):\n t, a = list(map(int, input().split()))\n T.append(t)\n A.append(a)\n\nt_num = T[0]\na_num = A[0]\nfor i in range(1, N):\n tn = (t_num + T[i] - 1) \/\/ T[i]\n an = (a_num + A[i] - 1) \/\/ A[i]\n n = max(tn, an)\n t_num = T[i] * n\n a_num = A[i] * n\n\nprint(t_num + a_num)\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03966","language":"Python","original_status":"Time Limit Exceeded","pass":"a = int(input())\nd = e = 0\nfor i in range(a):\n b, c = map(int, input().split())\n if i == 0:\n d = b\n e = c\n else:\n f = b\n g = c\n while True:\n if d <= f and e <= g:\n d = f\n e = g\n break\n else:\n f += b\n g += c\nprint(d + e)\n","fail":"a = int(input())\nd = e = 0\nfor i in range(a):\n b, c = map(int, input().split())\n if i == 0:\n d = b\n e = c\n else:\n if d <= b and e <= c:\n d = b\n e = c\n else:\n h = max((b + d - 1) \/\/ b, (c + e - 1) \/\/ c)\n d = b * h\n e = c * h\nprint(d + e)\n","change":"replace","i1":8,"i2":18,"j1":8,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03971","language":"Python","original_status":"Time Limit Exceeded","pass":"n, a, b = list(map(int, input().split()))\ns = input()\n\n# a: \u56fd\u5185\u306e\u5b66\u751f\n# b: \u6d77\u5916\u306e\u5b66\u751f\n# c: \u305d\u306e\u4ed6\n# i\u756aidx\u306fi\u4f4d\n\n# # \u6d77\u5916\u306e\u5b66\u751f\n# foregin_list = []\n# for i, c in enumerate(s):\n# if c == \"b\":\n# foregin_list.append(i)\n\n\npasses_num = 0\nforegin_list = []\nthredshould = a + b\nfor i, c in enumerate(s):\n if c == \"c\":\n print(\"No\")\n elif c == \"a\":\n if passes_num < thredshould:\n passes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n foregin_list.append(i)\n if passes_num < thredshould and foregin_list.index(i) + 1 <= b:\n passes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n","fail":"n, a, b = list(map(int, input().split()))\ns = input()\n\n# a: \u56fd\u5185\u306e\u5b66\u751f\n# b: \u6d77\u5916\u306e\u5b66\u751f\n# c: \u305d\u306e\u4ed6\n# i\u756aidx\u306fi\u4f4d\n\n\npasses_num = 0 # \u901a\u904e\u3057\u305f\u4eba\u306e\u6570\nforegin_rank = 1 # \u6d77\u5916\u306e\u5b66\u751f\u306e\u4e2d\u3067\u306e\u9806\u4f4d\nthredshould = a + b\nfor c in s:\n if c == \"c\":\n print(\"No\")\n elif c == \"a\":\n if passes_num < thredshould:\n passes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n if passes_num < thredshould and foregin_rank <= b:\n passes_num += 1\n foregin_rank += 1\n print(\"Yes\")\n else:\n print(\"No\")\n","change":"replace","i1":8,"i2":31,"j1":8,"j2":25,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03971","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nX = list(map(int, input().split()))\n\nHP = []\nfor p in range(1, 101, 1):\n P = [p] * len(X)\n delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])\n HP.append(delta)\n\nprint(min(HP))\n","fail":"N, A, B = map(int, input().split())\nS = str(input())\n\nAB = A + B\n\ncount_all = 0\ncount_abroad = 0\nfor i in range(N):\n if S[i] == \"a\" and count_all < AB:\n count_all += 1\n print(\"Yes\")\n\n elif S[i] == \"b\" and count_abroad < B and count_all < AB:\n count_all += 1\n count_abroad += 1\n print(\"Yes\")\n\n else:\n print(\"No\")\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":19,"error":"ValueError: invalid literal for int() with base 10: '10 2 3'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03971\/Python\/s777154586.py\", line 1, in \n N = int(input())\nValueError: invalid literal for int() with base 10: '10 2 3'\n","stdout":null} {"problem_id":"p03971","language":"Python","original_status":"Time Limit Exceeded","pass":"N, A, B = map(int, input().split())\nS = list(input())\n\nanswer = [0] * len(S)\nb_list = []\nfor idx, moji in enumerate(S):\n if moji == \"a\" and sum(answer) < A + B:\n answer[idx] = 1\n print(\"Yes\")\n continue\n elif moji == \"b\":\n b_list.append(1)\n if sum(answer) < A + B and sum(b_list) <= B:\n answer[idx] = 1\n print(\"Yes\")\n continue\n print(\"No\")\n","fail":"N, A, B = map(int, input().split())\nS = list(input())\n\nanswer = 0\nb_list = 0\nfor idx, moji in enumerate(S):\n if moji == \"a\" and answer < A + B:\n answer += 1\n print(\"Yes\")\n continue\n elif moji == \"b\":\n b_list += 1\n if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\n continue\n print(\"No\")\n","change":"replace","i1":3,"i2":14,"j1":3,"j2":14,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03986","language":"Python","original_status":"Time Limit Exceeded","pass":"X = input()\n\nwhile X.count(\"ST\"):\n X = X.replace(\"ST\", \"\")\n\nprint(len(X))\n","fail":"X = input()\n\nans = [\"foo\"]\nfor i in range(len(X)):\n ans.append(X[i])\n if ans[-2] == \"S\" and ans[-1] == \"T\":\n ans.pop()\n ans.pop()\n\nprint(len(ans) - 1)\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03986","language":"Python","original_status":"Time Limit Exceeded","pass":"X = input()\nX_length = len(X)\nchange = True\nwhile change:\n X = X.replace(\"ST\", \"\", 1)\n change = len(X) != X_length\n X_length = len(X)\nprint(X_length)\n","fail":"X = input()\nstack = []\nfor s in X:\n if s == \"S\":\n stack.append(s)\n elif s == \"T\":\n if len(stack) == 0 or stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop(-1)\nprint(len(stack))\n","change":"replace","i1":1,"i2":8,"j1":1,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03986","language":"Python","original_status":"Runtime Error","pass":"# coding: utf-8\n# Your code here!\n\nX = list(input())\nnum = len(X)\nstack = []\n\nfor i in X:\n if i == \"S\":\n stack.append(i)\n else:\n if stack[-1] == \"T\" or stack[0] == \"\":\n stack.append(i)\n else:\n stack.pop()\nprint(len(stack))\n","fail":"# coding: utf-8\n# Your code here!\n\nX = list(input())\nnum = len(X)\nstack = []\n\nfor i in X:\n if i == \"S\":\n stack.append(i)\n else:\n if stack == [] or stack[-1] == \"T\":\n stack.append(i)\n else:\n stack.pop()\nprint(len(stack))\n","change":"replace","i1":11,"i2":12,"j1":11,"j2":12,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03986\/Python\/s803491766.py\", line 12, in \n if stack[-1] == \"T\" or stack[0] == \"\":\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p03986","language":"Python","original_status":"Time Limit Exceeded","pass":"_x = input()\nx = []\nfor i in _x:\n x.append(i)\ncount = 0\ni = 0\nwhile i < len(x):\n # print(\"i:{} x:{}\".format(i, x))\n if i < len(x) - 1 and x[i] == \"S\" and x[i + 1] == \"T\":\n del x[i]\n del x[i]\n if i > 0:\n i -= 1\n continue\n else:\n count += 1\n i += 1\nprint(len(x))\n","fail":"_x = input()\nx = []\nfor i in _x:\n x.append(i)\ncount = 0\n\n# \u4eca\u307e\u3067\u78ba\u8a8d\u3057\u3066\u304d\u305f\u3082\u306e\u306f\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\n# \u30b9\u30bf\u30c3\u30af\u306e\u9802\u4e0a\u304cS\u3067\u6b21\u306e\u5165\u529b\u304cT\u306a\u3089\u30b9\u30bf\u30c3\u30af\u3092\u30dd\u30c3\u30d7\nstack = []\ni = 0\nwhile i < len(x):\n if len(stack) > 0 and stack[-1] == \"S\" and x[i] == \"T\":\n del stack[-1]\n else:\n stack.append(x[i])\n i += 1\nprint(len(stack))\n# print(stack)\n","change":"replace","i1":5,"i2":18,"j1":5,"j2":18,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03987","language":"Python","original_status":"Time Limit Exceeded","pass":"import sys\nfrom operator import itemgetter\n\n\nclass BinaryIndexedTreeCustom:\n def __init__(self, n, init, func):\n self.size = n\n self.tree = [init] * (n + 1)\n self.depth = n.bit_length()\n self.init = init\n self.func = func\n\n def get(self, i):\n s = self.init\n tr = self.tree\n f = self.func\n while i > 0:\n s = f(s, tr[i])\n i -= i & -i\n return s\n\n def put(self, i, x):\n n = self.size\n tr = self.tree\n f = self.func\n while i <= n:\n y = tr[i]\n tr[i] = f(tr[i], x)\n if y == tr[i]:\n break\n i += i & -i\n\n\nn, *aaa = map(int, sys.stdin.buffer.read().split())\nbit1 = BinaryIndexedTreeCustom(n, 0, max)\nbit2 = BinaryIndexedTreeCustom(n, n + 1, min)\naaa_with_index = list(enumerate(aaa, start=1))\naaa_with_index.sort(key=itemgetter(1))\nans = 0\nfor i, a in aaa_with_index:\n li = bit1.get(i)\n ri = bit2.get(n - i)\n ans += a * (i - li) * (ri - i)\n bit1.put(i, i)\n bit2.put(n + 1 - i, i)\nprint(ans)\n","fail":"import sys\nfrom operator import itemgetter\n\nn, *aaa = map(int, sys.stdin.buffer.read().split())\naaa_with_index = list(enumerate(aaa, start=1))\naaa_with_index.sort(key=itemgetter(1), reverse=True)\nleft = list(range(-1, n + 1))\nright = list(range(1, n + 3))\nans = 0\nfor i, a in aaa_with_index:\n li = left[i]\n ri = right[i]\n ans += a * (i - li) * (ri - i)\n left[ri] = li\n right[li] = ri\n\nprint(ans)\n","change":"replace","i1":3,"i2":45,"j1":3,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = list(map(int, input().split()))\nans = 0\nopp_list = []\nfor i in range(1, n + 1):\n opp = a[a[i - 1] - 1]\n if i == opp and i not in opp_list:\n opp_list.append(a[i - 1])\n ans += 1\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\nans = 0\nfor i in range(1, n + 1):\n opp = a[a[i - 1] - 1]\n if i == opp:\n ans += 1\nprint(ans \/\/ 2)\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = list(map(int, input().split()))\n\nlike = {}\nans = 0\n\nfor i, r in enumerate(a):\n like[i] = r\n if like.get(r, default=0) == i:\n ans += 1\n\nprint(ans)\n","fail":"n = int(input())\na = list(map(int, input().split()))\n\nlike = {}\nans = 0\n\nfor i, r in enumerate(a):\n like[i + 1] = r\n if r in like and like[r] == i + 1:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":7,"i2":9,"j1":7,"j2":9,"error":"TypeError: dict.get() takes no keyword arguments","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03993\/Python\/s578229972.py\", line 9, in \n if like.get(r, default=0) == i:\nTypeError: dict.get() takes no keyword arguments\n","stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Time Limit Exceeded","pass":"size = int(input())\n\nr_str = input().split()\n\nrabs = []\nfor r in r_str:\n rabs.append(int(r) - 1)\n\nvisited = []\nt = 0\n\nfor i in range(0, size):\n if rabs[rabs[i]] == i and (i not in visited):\n visited.append(i)\n visited.append(rabs[i])\n t += 1\n\nprint(t)\n","fail":"size = int(input())\n\nr_str = input().split()\n\nrabs = []\nfor r in r_str:\n rabs.append(int(r) - 1)\n\n# visited = []\nt = 0\n\nfor i in range(0, size):\n if rabs[rabs[i]] == i and (not rabs[i] < i):\n # visited.append(i)\n # visited.append(rabs[i])\n t += 1\n\nprint(t)\n","change":"replace","i1":8,"i2":15,"j1":8,"j2":15,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Runtime Error","pass":"N = map(int, input().split())\na = list(map(int, input().split()))\nans = 0\nfor i in range(N):\n j = a[i] - 1\n if i < j and a[j] - 1 == i:\n ans += 1\nprint(ans)\n","fail":"N = int(input())\na = list(map(int, input().split()))\nans = 0\nfor i in range(N):\n j = a[i] - 1\n if i < j and a[j] - 1 == i:\n ans += 1\nprint(ans)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: 'map' object cannot be interpreted as an integer","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03993\/Python\/s832397420.py\", line 4, in \n for i in range(N):\nTypeError: 'map' object cannot be interpreted as an integer\n","stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Time Limit Exceeded","pass":"# -*- coding: utf-8 -*-\nn = int(input())\na = [int(i) for i in input().split()]\n\nans = 0\nfor i in range(n):\n for j in range(i + 1, n):\n if a[i] == j + 1 and a[j] == i + 1:\n ans += 1\nprint(ans)\n","fail":"n = int(input())\na = [int(i) for i in input().split()]\n\nans = 0\nfor i in range(n):\n if a[a[i] - 1] == i + 1:\n ans += 1\nprint(ans \/\/ 2)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03993","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nn = int(input())\na = list(map(int, input().split()))\npair = []\ncp = [None]\nfor i, tgt in enumerate(a):\n cp.clear()\n if a.index(tgt) == i:\n cp = [str(a[i]), str(i + 1)]\n cp.sort()\n cpj = \"\".join(cp)\n pair.append(cpj)\n\npcnt = Counter(pair)\npcv = list(pcnt.values())\nprint(pcv.count(2))\n","fail":"n = int(input())\na = list(map(int, input().split()))\ncnt = 0\nfor i, tgt in enumerate(a, 1):\n if a[tgt - 1] == i:\n cnt += 1\nprint(cnt \/\/ 2)\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03994","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n s = input()\n K = int(input())\n a = ord(\"a\")\n code = [ord(c) - a for c in s]\n for i in range(len(s)):\n x = 26 - code[i] % 26\n if x <= K:\n code[i] = 0\n K -= x\n code[-1] = code[-1] + K % 26\n ans = \"\"\n for x in code:\n ans += chr(a + x)\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n s = input()\n K = int(input())\n a = ord(\"a\")\n code = [ord(c) - a for c in s]\n for i in range(len(s)):\n x = (26 - code[i]) % 26\n if x <= K:\n code[i] = 0\n K -= x\n code[-1] = code[-1] + K % 26\n ans = \"\".join([chr(a + x) for x in code])\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":6,"i2":14,"j1":6,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03994","language":"Python","original_status":"Time Limit Exceeded","pass":"alphabet = \"abcdefghijklmnopqrstuvwxyz\"\na_len = len(alphabet)\ntable = {c: idx for idx, c in enumerate(alphabet)}\n\ns = input()\nk = int(input())\n\nans = \"\"\nfor i in range(len(s[:-1])):\n gap = a_len - table[s[i]]\n if gap <= k:\n ans += \"a\"\n k -= gap\n elif k == 0:\n ans += s[i:-1]\n else:\n ans += s[i]\n\nans += alphabet[(table[s[-1]] + k) % a_len]\nprint(ans)\n","fail":"import sys\n\nsys.setrecursionlimit(10**7)\nrl = sys.stdin.readline\n\n\ndef solve():\n s = rl().rstrip()\n K = int(rl())\n\n ans = []\n for si in s:\n if si == \"a\":\n ans.append(\"a\")\n continue\n cnt = ord(\"z\") - ord(si) + 1\n if cnt <= K:\n ans.append(\"a\")\n K -= cnt\n else:\n ans.append(si)\n\n ans[-1] = chr(ord(\"a\") + (ord(ans[-1]) - ord(\"a\") + K % 26) % 26)\n print(\"\".join(ans))\n\n\nif __name__ == \"__main__\":\n solve()\n","change":"replace","i1":0,"i2":20,"j1":0,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p03997","language":"Python","original_status":"Runtime Error","pass":"a, b, h = [input() for _ in range(3)]\nprint(int((a + b) * h \/ 2))\n","fail":"a, b, h = [int(input()) for _ in range(3)]\nprint(int((a + b) * h \/ 2))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: can't multiply sequence by non-int of type 'str'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s114340775.py\", line 2, in \n print(int((a + b) * h \/ 2))\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p03997","language":"Python","original_status":"Runtime Error","pass":"a, b, h = map(int, input().split())\n\nprint((a + b) * h \/ 2)\n","fail":"a = int(input())\nb = int(input())\nh = int(input())\nprint((a + b) * h \/\/ 2)\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":4,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s538426615.py\", line 1, in \n a, b, h = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03997","language":"Python","original_status":"Runtime Error","pass":"a, b, h = map(int, input().split())\n\nprint((a + b) * h \/ 2)\n","fail":"a = int(input())\nb = int(input())\nh = int(input())\n\narea = int((a + b) * h \/ 2)\nprint(area)\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":6,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s214643900.py\", line 1, in \n a, b, h = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03997","language":"Python","original_status":"Runtime Error","pass":"\"\"\" AtCoder \"\"\"\n\na, b, h = map(int, input().split())\n\nprint((a + b) * h \/ 2)\n","fail":"\"\"\" AtCoder \"\"\"\n\na = int(input())\nb = int(input())\nh = int(input())\n\nprint(int((a + b) * h \/ 2))\n","change":"replace","i1":2,"i2":5,"j1":2,"j2":7,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s944882816.py\", line 3, in \n a, b, h = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03997","language":"Python","original_status":"Runtime Error","pass":"def resolve():\n a, b, h = map(int, input().split())\n print((a + b) * h \/\/ 2)\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n a = int(input())\n b = int(input())\n h = int(input())\n print((a + b) * h \/\/ 2)\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":4,"error":"ValueError: not enough values to unpack (expected 3, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s259788820.py\", line 7, in \n resolve()\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p03997\/Python\/s259788820.py\", line 2, in resolve\n a, b, h = map(int, input().split())\nValueError: not enough values to unpack (expected 3, got 1)\n","stdout":null} {"problem_id":"p03998","language":"Python","original_status":"Runtime Error","pass":"SA = list(input())\nSB = list(input())\nSC = list(input())\n\nturn = SA.pop(0)\nwhile True:\n if turn == \"a\":\n turn = SA.pop(0)\n elif turn == \"b\":\n turn = SB.pop(0)\n elif turn == \"c\":\n turn = SC.pop(0)\n\n if turn == \"a\":\n if not SA:\n print(\"A\")\n break\n elif turn == \"b\":\n if not SB:\n print(\"B\")\n break\n elif turn == \"c\":\n if not SC:\n print(\"C\")\n break\n","fail":"SA = list(input())\nSB = list(input())\nSC = list(input())\n\nturn = SA.pop(0)\nwhile True:\n if turn == \"a\":\n try:\n turn = SA.pop(0)\n except:\n print(\"A\")\n break\n elif turn == \"b\":\n try:\n turn = SB.pop(0)\n except:\n print(\"B\")\n break\n elif turn == \"c\":\n try:\n turn = SC.pop(0)\n except:\n print(\"C\")\n break\n","change":"replace","i1":7,"i2":23,"j1":7,"j2":22,"error":"0","stderr":null,"stdout":"A\n"} {"problem_id":"p03998","language":"Python","original_status":"Runtime Error","pass":"Sa = list(input())\nSb = list(input())\nSc = list(input())\nfor _ in range(10**8):\n if _ == 0:\n s = Sa[0]\n if s == \"a\":\n s = Sa[1]\n del Sa[0]\n elif s == \"b\":\n s = Sb[1]\n del Sb[0]\n else:\n s = Sc[1]\n del Sc[0]\n elif len(Sa) == 1 and s == \"a\":\n print(\"A\")\n break\n elif len(Sb) == 1 and s == \"b\":\n print(\"B\")\n break\n elif len(Sc) == 1 and s == \"c\":\n print(\"C\")\n break\n else:\n if s == \"a\":\n s = Sa[1]\n del Sa[0]\n elif s == \"b\":\n s = Sb[1]\n del Sb[0]\n else:\n s = Sc[1]\n del Sc[0]\n","fail":"Sa = list(input())\nSb = list(input())\nSc = list(input())\nc = 0\nfor _ in range(10**9):\n if c == \"a\" and not Sa:\n print(\"A\")\n break\n if c == \"b\" and not Sb:\n print(\"B\")\n break\n if c == \"c\" and not Sc:\n print(\"C\")\n break\n if _ == 0:\n c = Sa[0]\n del Sa[0]\n elif c == \"a\":\n c = Sa[0]\n del Sa[0]\n elif c == \"b\":\n c = Sb[0]\n del Sb[0]\n else:\n c = Sc[0]\n del Sc[0]\n","change":"replace","i1":3,"i2":34,"j1":3,"j2":26,"error":"0","stderr":null,"stdout":"A\n"} {"problem_id":"p03998","language":"Python","original_status":"Runtime Error","pass":"def resolve():\n a = input()\n b = input()\n c = input()\n d = {\"a\": a, \"b\": b, \"c\": c}\n now = d[\"a\"][0]\n d[\"a\"] = d[\"a\"][1:]\n next = d[now][0]\n while True:\n if len(d[next]) == 0:\n print(next.upper())\n return 0\n next = d[next][0]\n d[next] = d[next][1:]\n\n\nif __name__ == \"__main__\":\n resolve()\n","fail":"def resolve():\n a = list(input())\n b = list(input())\n c = list(input())\n d = {\"a\": a, \"b\": b, \"c\": c}\n now = \"a\"\n while d[now]:\n now = d[now].pop(0)\n print(now.upper())\n\n\nif __name__ == \"__main__\":\n resolve()\n","change":"replace","i1":1,"i2":14,"j1":1,"j2":9,"error":"0","stderr":null,"stdout":"A\n"} {"problem_id":"p03998","language":"Python","original_status":"Runtime Error","pass":"a = list(input())\nb = list(input())\nc = list(input())\n\nn = a[0]\ndel a[0]\nif len(a) == 0:\n print(\"A\")\nwhile True:\n if n == \"a\":\n n = a[0]\n del a[0]\n if len(a) == 0:\n print(\"A\")\n break\n elif n == \"b\":\n n = b[0]\n del b[0]\n if len(b) == 0:\n print(\"B\")\n break\n elif n == \"c\":\n n = c[0]\n del c[0]\n if len(c) == 0:\n print(\"C\")\n break\n","fail":"a = list(input())\nb = list(input())\nc = list(input())\n\nn = a[0]\nif len(a) < 1:\n del a[0]\n\nwhile True:\n if n == \"a\":\n n = a[0]\n del a[0]\n if len(a) == 0:\n print(\"A\")\n break\n elif n == \"b\":\n n = b[0]\n del b[0]\n if len(b) == 0:\n print(\"B\")\n break\n elif n == \"c\":\n n = c[0]\n del c[0]\n if len(c) == 0:\n print(\"C\")\n break\n","change":"replace","i1":5,"i2":8,"j1":5,"j2":8,"error":"WA","stderr":null,"stdout":"C\n"} {"problem_id":"p04000","language":"Python","original_status":"Runtime Error","pass":"from collections import defaultdict\n\nh, w, n = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(n)]\n\nd = defaultdict(int)\n\nfor a, b in ab:\n for hi in range(a - 2, a + 1):\n for wi in range(b - 2, b + 1):\n if 1 <= hi <= h - 2 and 1 <= wi <= w - 2:\n d[(hi, wi)] += 1\n\ncnt = [0] * 9\nfor v in d.values():\n cnt[v] += 1\n\ncnt[0] = (h - 2) * (w - 2) - sum(cnt[1:])\nprint(*cnt, sep=\"\\\\n\")\n","fail":"from collections import defaultdict\n\nh, w, n = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(n)]\n\nd = defaultdict(int)\n\nfor a, b in ab:\n for hi in range(a - 2, a + 1):\n for wi in range(b - 2, b + 1):\n if 1 <= hi <= h - 2 and 1 <= wi <= w - 2:\n d[(hi, wi)] += 1\n\ncnt = [0] * 10\nfor v in d.values():\n cnt[v] += 1\n\ncnt[0] = (h - 2) * (w - 2) - sum(cnt[1:])\nprint(*cnt, sep=\"\\\\n\")\n","change":"replace","i1":13,"i2":14,"j1":13,"j2":14,"error":"WA","stderr":null,"stdout":"0\n0\n0\n2\n4\n0\n0\n0\n0\n"} {"problem_id":"p04001","language":"Python","original_status":"Runtime Error","pass":"import sys\n\ninput = sys.stdin.readline\n\ns = input()\nn = len(s)\n\ntotal_sum = 0\n# +\u3092\u633f\u5165\u3059\u308b\u4e8b\u8c61\u306f\n# s\u304c2\u6587\u5b57\u306a\u30892\u901a\u308a\uff0c3\u6587\u5b57\u306a\u30894\u901a\u308a\uff0cn\u6587\u5b57\u306a\u30892^(n-1)\u901a\u308a\u3042\u308b\nfor i in range(2 ** (n - 1)):\n # i\u306f\u5404\u6841\u306b+\u3092\u633f\u5165\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u6c7a\u5b9a\u3059\u308b\n # \u4f8b\u3048\u3070 s=12345, i=0b0111, ss=1+2+3+45\n now_sum = 0\n reg = int(s[0])\n for j in range(n - 1):\n if i & 1 << j:\n now_sum += reg\n reg = 0\n reg *= 10\n reg += int(s[j + 1])\n now_sum += reg\n\n total_sum += now_sum\n\nprint(total_sum)\n","fail":"import sys\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ns = input()\nn = len(s)\n\ntotal_sum = 0\n# +\u3092\u633f\u5165\u3059\u308b\u4e8b\u8c61\u306f\n# s\u304c2\u6587\u5b57\u306a\u30892\u901a\u308a\uff0c3\u6587\u5b57\u306a\u30894\u901a\u308a\uff0cn\u6587\u5b57\u306a\u30892^(n-1)\u901a\u308a\u3042\u308b\nfor i in range(2 ** (n - 1)):\n # i\u306f\u5404\u6841\u306b+\u3092\u633f\u5165\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u6c7a\u5b9a\u3059\u308b\n # \u4f8b\u3048\u3070 s=12345, i=0b0111, ss=1+2+3+45\n now_sum = 0\n reg = int(s[0])\n for j in range(n - 1):\n if i & 1 << j:\n now_sum += reg\n reg = 0\n reg *= 10\n reg += int(s[j + 1])\n now_sum += reg\n\n total_sum += now_sum\n\nprint(total_sum)\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":6,"error":"ValueError: invalid literal for int() with base 10: '\\\\n'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04001\/Python\/s281925188.py\", line 21, in \n reg += int(s[j + 1])\nValueError: invalid literal for int() with base 10: '\\\\n'\n","stdout":null} {"problem_id":"p04001","language":"Python","original_status":"Runtime Error","pass":"def dfs(i, formula):\n if i + 1 == num_digits:\n return sum(list(map(int, formula.split(\"+\"))))\n\n return sum(dfs(i + 1, formula + \"+\" + s[i + 1]), dfs(i + 1, formula + s[i + 1]))\n\n\ns = input()\nnum_digits = len(s)\n\nprint(dfs(0, s[0]))\n","fail":"def dfs(formula, index):\n if index + 1 == max_index:\n return sum(list(map(int, formula.split(\"+\"))))\n\n else:\n return dfs(formula + \"+\" + S[index + 1], index + 1) + dfs(\n formula + S[index + 1], index + 1\n )\n\n\nS = input()\nmax_index = len(S)\n\nprint(dfs(S[0], 0))\n","change":"replace","i1":0,"i2":11,"j1":0,"j2":14,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04001\/Python\/s203029944.py\", line 11, in \n print(dfs(0, s[0]))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04001\/Python\/s203029944.py\", line 5, in dfs\n return sum(dfs(i + 1, formula + \"+\" + s[i + 1]), dfs(i + 1, formula + s[i + 1]))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04001\/Python\/s203029944.py\", line 5, in dfs\n return sum(dfs(i + 1, formula + \"+\" + s[i + 1]), dfs(i + 1, formula + s[i + 1]))\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p04003","language":"Python","original_status":"Runtime Error","pass":"import sys\nfrom collections import deque, defaultdict\n\n\ndef bfs01(s, t, links):\n q = deque([(0, s, -1)]) # cost, station, last-company\n visited = set()\n while q:\n d, v, e = q.popleft()\n if v == t:\n return d\n if (v, e) in visited:\n continue\n visited.add((v, e))\n if e == 0:\n for c, us in links[v]:\n for u in us:\n if (u, c) in visited:\n continue\n q.append((d + 1, u, c))\n else:\n for u in links[v][e]:\n if (u, e) in visited:\n continue\n q.appendleft((d, u, e))\n if (v, 0) not in visited:\n q.appendleft((d, v, 0))\n\n return -1\n\n\nreadline = sys.stdin.buffer.readline\nread = sys.stdin.buffer.read\n\nn, m = map(int, readline().split())\nlinks = [defaultdict(set) for _ in range(n)]\npqc = list(map(int, read().split()))\nfor p, q, c in zip(pqc[0::3], pqc[1::3], pqc[2::3]):\n p -= 1\n q -= 1\n links[p][c].add(q)\n links[q][c].add(p)\n\nprint(bfs01(0, n - 1, links))\n","fail":"import sys\nfrom collections import deque, defaultdict\n\n\ndef bfs01(s, t, links):\n q = deque([(0, s, -1)]) # cost, station, last-company\n visited = set()\n while q:\n d, v, e = q.popleft()\n if v == t:\n return d\n if (v, e) in visited:\n continue\n visited.add((v, e))\n if e == 0:\n for c, us in links[v].items():\n for u in us:\n if (u, c) in visited:\n continue\n q.append((d + 1, u, c))\n else:\n for u in links[v][e]:\n if (u, e) in visited:\n continue\n q.appendleft((d, u, e))\n if (v, 0) not in visited:\n q.appendleft((d, v, 0))\n\n return -1\n\n\nreadline = sys.stdin.buffer.readline\nread = sys.stdin.buffer.read\n\nn, m = map(int, readline().split())\nlinks = [defaultdict(set) for _ in range(n)]\npqc = list(map(int, read().split()))\nfor p, q, c in zip(pqc[0::3], pqc[1::3], pqc[2::3]):\n p -= 1\n q -= 1\n links[p][c].add(q)\n links[q][c].add(p)\n\nprint(bfs01(0, n - 1, links))\n","change":"replace","i1":15,"i2":16,"j1":15,"j2":16,"error":"TypeError: cannot unpack non-iterable int object","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04003\/Python\/s188482754.py\", line 44, in \n print(bfs01(0, n - 1, links))\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04003\/Python\/s188482754.py\", line 16, in bfs01\n for c, us in links[v]:\nTypeError: cannot unpack non-iterable int object\n","stdout":null} {"problem_id":"p04005","language":"Python","original_status":"Runtime Error","pass":"A, B, C = map(int, input().split())\n\nif any(i % 2 == 0 for i in [A, B, C]):\n print(0)\nelse:\n AB = A * B\n lis = [AB] * C\n mid = len(lis) \/\/ 2\n print(sum(lis[mid:]) - sum(lis[0:mid]))\n","fail":"A, B, C = map(int, input().split())\n\nif any(i % 2 == 0 for i in [A, B, C]):\n print(0)\nelse:\n print(min(A * B, B * C, C * A))\n","change":"replace","i1":5,"i2":9,"j1":5,"j2":6,"error":0,"stderr":null,"stdout":9} {"problem_id":"p04011","language":"Python","original_status":"Runtime Error","pass":"n, k, x, y = map(int, input().split())\n\nprint(int(k * x + y * (n - k)))\n","fail":"# x, y = [int(input()) for i in range(2)]\nn, k, x, y = [int(input()) for i in range(4)]\n\nif n > k:\n print(int(k * x + y * (n - k)))\nelse:\n print(int(n * x))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":7,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04011\/Python\/s781359504.py\", line 1, in \n n, k, x, y = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p04011","language":"Python","original_status":"Runtime Error","pass":"N, K, X, Y = map(int, input().split())\n\n\nprint(abs(X * K + (N - K) * Y))\n","fail":"n = int(input())\nk = int(input())\nx = int(input())\ny = int(input())\n\nif n > k:\n print(x * k + (n - k) * y)\nelse:\n print(n * x)\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":9,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04011\/Python\/s526628482.py\", line 1, in \n N, K, X, Y = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p04011","language":"Python","original_status":"Runtime Error","pass":"# abc044_a\n# https:\/\/atcoder.jp\/contests\/abc044\/tasks\/abc044_a\n\n# \u6700\u521d\u306eK\u6cca\u307e\u3067\u306f\u3001X\u5186\n# K\uff0b1\u6cca\u76ee\u4ee5\u964d\u306f\u3001Y\u5186\n\n# N\u6cca\u9023\u7d9a\u3067\u5bbf\u6cca\u3057\u305f\u969b\u306e\u5bbf\u6cca\u8cbb\n\n# \u5165\u529b\nn, k, x, y = map(int, input().split())\n\n# \u51e6\u7406\n\n# x\u5186\u3068y\u5186\nif n > k:\n answer = k * x + (n - k) * y\n# x\u5186\u306e\u307f\nelse:\n answer = n * x\n\nprint(answer)\n","fail":"# abc044_a\n# https:\/\/atcoder.jp\/contests\/abc044\/tasks\/abc044_a\n\n# \u6700\u521d\u306eK\u6cca\u307e\u3067\u306f\u3001X\u5186\n# K\uff0b1\u6cca\u76ee\u4ee5\u964d\u306f\u3001Y\u5186\n\n# N\u6cca\u9023\u7d9a\u3067\u5bbf\u6cca\u3057\u305f\u969b\u306e\u5bbf\u6cca\u8cbb\n\n# \u5165\u529b\nn = int(input())\nk = int(input())\nx = int(input())\ny = int(input())\n\n# \u51e6\u7406\n\n# x\u5186\u3068y\u5186\nif n > k:\n answer = k * x + (n - k) * y\n# x\u5186\u306e\u307f\nelse:\n answer = n * x\n\nprint(answer)\n","change":"replace","i1":9,"i2":10,"j1":9,"j2":13,"error":"ValueError: not enough values to unpack (expected 4, got 1)","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04011\/Python\/s608595389.py\", line 10, in \n n, k, x, y = map(int, input().split())\nValueError: not enough values to unpack (expected 4, got 1)\n","stdout":null} {"problem_id":"p04012","language":"Python","original_status":"Runtime Error","pass":"li = list(input())\nli.sort()\nwhile True:\n if len(li) == 0:\n print(\"Yes\")\n break\n elif li[0] == li[1]:\n li.pop(0)\n li.pop(0)\n else:\n print(\"No\")\n break\n","fail":"li = list(input())\nli.sort()\nwhile True:\n if len(li) == 0:\n print(\"Yes\")\n break\n elif not len(li) % 2 == 0:\n print(\"No\")\n break\n elif li[0] == li[1]:\n li.pop(0)\n li.pop(0)\n else:\n print(\"No\")\n break\n","change":"insert","i1":5,"i2":5,"j1":5,"j2":8,"error":"0","stderr":null,"stdout":"Yes\n"} {"problem_id":"p04012","language":"Python","original_status":"Runtime Error","pass":"W = input()\n\nr = {}\nfor w in W:\n r.setdefault(w, 0)\n r[w] += 1\n\nprint(\"Yes\" if len(list(filter(lambda x: x % 2 == 1, r))) == 0 else \"No\")\n","fail":"W = input()\n\nr = {}\nfor w in W:\n r.setdefault(w, 0)\n r[w] += 1\n\nprint(\"Yes\" if len(list(filter(lambda x: x % 2 == 1, r.values()))) == 0 else \"No\")\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":"TypeError: not all arguments converted during string formatting","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04012\/Python\/s253647568.py\", line 8, in \n print(\"Yes\" if len(list(filter(lambda x: x % 2 == 1, r))) == 0 else \"No\")\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04012\/Python\/s253647568.py\", line 8, in \n print(\"Yes\" if len(list(filter(lambda x: x % 2 == 1, r))) == 0 else \"No\")\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p04013","language":"Python","original_status":"Time Limit Exceeded","pass":"n, a = map(int, input().split())\nx = list(map(int, input().split()))\n\ndp = [[[0] * (50 * (n + 10)) for _ in range(n + 10)] for _ in range(n + 10)]\ndp[0][0][0] = 1\n\nfor i in range(n):\n for use in range(n):\n for total in range(n * a):\n dp[i + 1][use][total] += dp[i][use][total]\n dp[i + 1][use + 1][total + x[i]] += dp[i][use][total]\n\nans = 0\nfor i in range(1, n + 1):\n ans += dp[n][i][a * i]\n\nprint(ans)\n","fail":"n, a = map(int, input().split())\nx = list(map(int, input().split()))\n\ndp = [[[0] * (50 * (n + 10)) for _ in range(n + 10)] for _ in range(n + 10)]\ndp[0][0][0] = 1\n\nfor i in range(n):\n for use in range(n):\n for total in range(n * a):\n if dp[i][use][total]:\n dp[i + 1][use][total] += dp[i][use][total]\n dp[i + 1][use + 1][total + x[i]] += dp[i][use][total]\n\nans = 0\nfor i in range(1, n + 1):\n ans += dp[n][i][a * i]\n\nprint(ans)\n","change":"replace","i1":9,"i2":11,"j1":9,"j2":12,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04013","language":"Python","original_status":"Runtime Error","pass":"n, a = [int(i) for i in input().split()]\nx = [int(i) for i in input().split()]\n\nnx = n * max(max(x), a)\ndp = [[[0 for k in range(nx + 1)] for j in range(n + 1)] for i in range(n + 1)]\ndp[0][0][0] = 1\n\nfor i in range(n):\n for j in range(n):\n for k in range(nx):\n if k + x[j] <= n * a:\n dp[i + 1][j + 1][k + x[i]] += dp[i][j][k]\n dp[i + 1][j][k] += dp[i][j][k]\n\nans = sum([dp[n][k][k * a] for k in range(1, n + 1)])\nprint(ans)\n","fail":"n, a = [int(i) for i in input().split()]\nx = [int(i) for i in input().split()]\n\nnx = n * max(max(x), a)\ny = [xi - a for xi in x]\ndp = [[0 for j in range(2 * nx + 1)] for i in range(n + 1)]\ndp[0][nx] = 1\n\nfor i in range(n):\n for j in range(2 * nx + 1):\n if not 0 <= j - y[i] <= 2 * nx:\n dp[i + 1][j] = dp[i][j]\n elif j - y[i] <= 2 * nx:\n dp[i + 1][j] = dp[i][j] + dp[i][j - y[i]]\n\nprint(dp[n][nx] - 1)\n","change":"replace","i1":4,"i2":16,"j1":4,"j2":16,"error":"0","stderr":null,"stdout":5.0} {"problem_id":"p04013","language":"Python","original_status":"Time Limit Exceeded","pass":"def tak_and_cards(N: int, A: int, x: list) -> int:\n count = 0\n for b in range(1, 1 << N):\n n, s = 0, 0\n for i in range(N):\n if (b >> i) & 1 == 0:\n continue\n n += 1\n s += x[i]\n\n if s == n * A:\n count += 1\n return count\n\n\nif __name__ == \"__main__\":\n N, A = map(int, input().split())\n x = [int(s) for s in input().split()]\n ans = tak_and_cards(N, A, x)\n print(ans)\n","fail":"def tak_and_cards(N: int, A: int, X: list) -> int:\n # \u90e8\u5206\u70b9\u89e3\u6cd5\n # :---------:\n # count = 0\n # for b in range(1, 1 << N):\n # n, s = 0, 0\n # for i in range(N):\n # if (b >> i) & 1 == 0:\n # continue\n # n += 1\n # s += X[i]\n\n # if s == n * A:\n # count += 1\n # return count\n max_X = max(X)\n dp = [[0] * (2 * max_X * N + 1) for _ in range(N + 1)]\n dp[0][max_X * N] = 1\n\n for k, x in enumerate(X):\n for t in range(2 * max_X * N + 1):\n y = x - A\n\n dp[k + 1][t] = dp[k][t]\n if 0 <= t - y and t - y <= 2 * max_X * N:\n dp[k + 1][t] += dp[k][t - y]\n\n return dp[N][max_X * N] - 1\n\n\nif __name__ == \"__main__\":\n N, A = map(int, input().split())\n x = [int(s) for s in input().split()]\n ans = tak_and_cards(N, A, x)\n print(ans)\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":28,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04013","language":"Python","original_status":"Time Limit Exceeded","pass":"n, a = map(int, input().split())\nx = list(map(int, input().split()))\nx_max = max(x)\nx_sum = sum(x)\nans = 0\nif x_max >= a:\n dp = [[[0 for k in range(x_sum + 1)] for j in range(n + 1)] for i in range(2)]\n dp[0][0][0] = 1\n for i in range(1, n + 1):\n idx = i % 2\n for j in range(n + 1):\n for k in range(x[i - 1]):\n dp[idx][j][k] = dp[1 - idx][j][k]\n if j > 0:\n for k in range(x[i - 1], x_sum + 1):\n dp[idx][j][k] = dp[1 - idx][j][k] + dp[1 - idx][j - 1][k - x[i - 1]]\n\n for j in range(1, min(x_sum \/\/ a + 1, n + 1)):\n ans += dp[idx][j][j * a]\nprint(ans)\n","fail":"n, a = map(int, input().split())\nx = list(map(int, input().split()))\nx_max = max(x)\nx_sum = sum(x)\nans = 0\nif x_max >= a:\n dp = [[0 for j in range(2 * x_sum + 1)] for i in range(2)]\n dp[0][x_sum] = 1\n for i in range(1, n + 1):\n idx = i % 2\n y = x[i - 1] - a\n for j in range(2 * x_sum + 1):\n if 0 <= j - y <= 2 * x_sum:\n dp[idx][j] = dp[1 - idx][j] + dp[1 - idx][j - y]\n else:\n dp[idx][j] = dp[1 - idx][j]\n ans = dp[n % 2][x_sum] - 1\nprint(ans)\n","change":"replace","i1":6,"i2":19,"j1":6,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04013","language":"Python","original_status":"Runtime Error","pass":"N, A = map(int, input().split())\n# X = list(map(lambda x: int(x) - A, input().split()))\nX = list(map(int, input().split()))\n\ndp = [[[0 for _ in range(max(X) * N + 1)] for _ in range(N + 1)] for _ in range(N + 1)]\ndp[0][0][0] = 1\n\nfor i in range(N):\n for j in range(N):\n for k in range(max(X) * N + 1):\n dp[i + 1][j][k] += dp[i][j][k]\n if k >= X[i]:\n dp[i + 1][j + 1][k] += dp[i][j][k - X[i]]\n\nans = 0\nfor j in range(1, N + 1):\n ans += dp[N][j][j * A]\n\nprint(ans)\n","fail":"N, A = map(int, input().split())\nX = list(map(lambda x: int(x) - A, input().split()))\nmaxn = max(max(X), A)\n\ndp = [[0 for _ in range(2 * N * maxn + 1)] for _ in range(N + 1)]\ndp[0][N * maxn] = 1\n\nfor i in range(N):\n for k in range(2 * N * maxn + 1):\n dp[i + 1][k] = dp[i][k]\n if 0 <= k - X[i] <= 2 * N * maxn:\n dp[i + 1][k] += dp[i][k - X[i]]\n\nprint(dp[N][N * maxn] - 1)\n","change":"replace","i1":1,"i2":19,"j1":1,"j2":14,"error":"0","stderr":null,"stdout":5.0} {"problem_id":"p04014","language":"Python","original_status":"Time Limit Exceeded","pass":"def func(b, n):\n res = 0\n while n > 0:\n res += n % b\n n \/\/= b\n return res\n\n\ndef solve():\n n = int(input())\n s = int(input())\n\n if n == s:\n return n + 1\n elif n < s:\n return -1\n\n for b in range(2, n + 1):\n if b**2 > n:\n break\n if func(b, n) == s:\n return b\n\n b_cand = []\n for p in range(1, n + 1):\n if p**2 > n:\n break\n b = (n - s) \/\/ p + 1\n b_cand.append(b)\n b_cand = b_cand[::-1]\n\n for b in b_cand:\n if func(b, n) == s:\n return b\n\n return -1\n\n\nans = solve()\nprint(ans)\n","fail":"def func(b, n):\n res = 0\n while n > 0:\n res += n % b\n n \/\/= b\n return res\n\n\ndef solve():\n n = int(input())\n s = int(input())\n\n if n == s:\n return n + 1\n elif n < s:\n return -1\n\n for b in range(2, n + 1):\n if b**2 > n:\n break\n if func(b, n) == s:\n return b\n\n b_cand = []\n for p in range(1, n + 1):\n if p**2 > n:\n break\n b = (n - s) \/\/ p + 1\n if b > 1:\n b_cand.append(b)\n b_cand = b_cand[::-1]\n\n for b in b_cand:\n # print(b)\n if func(b, n) == s:\n return b\n\n return -1\n\n\nans = solve()\nprint(ans)\n","change":"replace","i1":28,"i2":32,"j1":28,"j2":34,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04014","language":"Python","original_status":"Runtime Error","pass":"from math import floor, sqrt, ceil\n\n\ndef f(b, n):\n if n < b:\n return n\n\n return f(b, floor(n \/ b)) + n % b\n\n\nn = int(input())\ns = int(input())\n\nif n == s:\n print(n + 1)\n exit()\n\nfor b in range(2, floor(sqrt(n)) + 1):\n if f(b, n) == s:\n print(b)\n exit()\n\nfor p in range(1, ceil(sqrt(n)))[::-1]:\n b = (n - s) \/ p + 1\n if b.is_integer():\n b = int(b)\n if f(b, n) == s:\n print(b)\n exit()\n\nprint(-1)\n","fail":"from math import floor, sqrt, ceil\n\n\ndef f(b, n):\n if b < 2:\n return 0\n\n if n < b:\n return n\n\n return f(b, floor(n \/ b)) + n % b\n\n\nn = int(input())\ns = int(input())\n\nif n == s:\n print(n + 1)\n exit()\n\nfor b in range(2, floor(sqrt(n)) + 1):\n if f(b, n) == s:\n print(b)\n exit()\n\nfor p in range(1, ceil(sqrt(n)))[::-1]:\n b = (n - s) \/ p + 1\n if b.is_integer():\n b = int(b)\n if f(b, n) == s:\n print(b)\n exit()\n\nprint(-1)\n","change":"insert","i1":4,"i2":4,"j1":4,"j2":7,"error":"0","stderr":null,"stdout":10.0} {"problem_id":"p04015","language":"Python","original_status":"Time Limit Exceeded","pass":"import numpy as np\n\nN, A = map(int, input().split())\nX = [0] + list(map(int, input().split()))\nNX = N * max(X + [A])\n\ndp = np.zeros((N + 1, N + 1, NX + 1), dtype=int)\n\ndp[0][0][0] = 1\n\nfor j in range(N + 1):\n for k in range(N + 1):\n for s in range(NX + 1):\n if j >= 1 and s < X[j]:\n dp[j][k][s] = dp[j - 1][k][s]\n elif j >= 1 and k >= 1 and s >= X[j]:\n dp[j][k][s] = dp[j - 1][k][s] + dp[j - 1][k - 1][s - X[j]]\n\nret = 0\n\nfor k in range(1, N + 1):\n ret += dp[N][k][k * A]\n\nprint(ret)\n","fail":"import numpy as np\n\nN, A = map(int, input().split())\nX = [0] + list(map(int, input().split()))\nNX = N * max(X + [A])\n\ndp = np.zeros((N + 1, 2 * NX + 1), dtype=int)\n\ndp[0][NX] = 1\n\nfor j in range(1, N + 1):\n y = X[j] - A\n for t in range(2 * NX + 1):\n if 0 <= t - y < 2 * NX:\n dp[j][t] = dp[j - 1][t] + dp[j - 1][t - y]\n else:\n dp[j][t] = dp[j - 1][t]\n\nprint(dp[N][NX] - 1)\n","change":"replace","i1":6,"i2":24,"j1":6,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04021","language":"Python","original_status":"Runtime Error","pass":"class FenwickTree:\n def __init__(self, n):\n self.n = n\n self.data = [0] * (n + 1)\n self.k_init = 2 ** (self.n - 1).bit_length()\n\n def sum(self, i):\n s = 0\n while i > 0:\n s += self.data[i]\n i -= i & -i\n return s\n\n def add(self, i, x):\n while i <= self.n:\n self.data[i] += x\n i += i & -i\n\n\ndef get_invnum(li):\n n = len(li)\n t = FenwickTree(max(li))\n res = 0\n for i in range(n):\n res += i - t.sum(li[i])\n t.add(li[i], 1)\n return res\n\n\nN, *A = map(int, open(0).read().split())\ntriplet_sorted_A = [0] * N\ntriplet_sorted_A[::2] = sorted(A[::2])\ntriplet_sorted_A[1::2] = sorted(A[1::2])\nprint(get_invnum(triplet_sorted_A))\n","fail":"from bisect import bisect_left\n\n\nN, *A = map(int, open(0).read().split())\nsorted_A = sorted(A)\nans = 0\nfor i in range(N):\n idx = bisect_left(sorted_A, A[i])\n if i % 2 != idx % 2:\n ans += 1\nprint(ans \/\/ 2)\n","change":"replace","i1":0,"i2":34,"j1":0,"j2":11,"error":0,"stderr":null,"stdout":1} {"problem_id":"p04021","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\nA = [0] * N\nfor i in range(N):\n A[i] = int(input()) + 1\n\nA_even = A[::2]\nA_odd = A[1::2]\nA_even = sorted(A_even)\nA_odd = sorted(A_odd)\nA_sorted = [0] * N\nfor i in range(N):\n if i % 2 == 0:\n A_sorted[i] = A_even[i \/\/ 2]\n else:\n A_sorted[i] = A_odd[i \/\/ 2]\n\n\nclass Bit:\n def __init__(self, n):\n self.size = n\n self.tree = [0] * (n + 1)\n\n def sum(self, idx):\n s = 0\n while idx > 0:\n s += self.tree[idx]\n idx -= idx & -idx\n return s\n\n def add(self, idx, x):\n while idx <= self.size:\n self.tree[idx] += x\n idx += idx & -idx\n\n\nbit = Bit(max(A) + 1)\nans = 0\nfor i in range(N):\n bit.add(A_sorted[i], 1)\n ans += i + 1 - bit.sum(A_sorted[i])\n\nprint(ans)\n","fail":"N = int(input())\nA_raw = [0] * N\nfor i in range(N):\n A_raw[i] = (int(input()), i)\nA_raw.sort(key=lambda x: x[0])\nA = [0] * N\nfor i in range(N):\n A[A_raw[i][1]] = i\n\nans = 0\nfor i in range(N):\n if i % 2 == 0:\n if A[i] % 2 == 1:\n ans += 1\n\nprint(ans)\n","change":"replace","i1":1,"i2":40,"j1":1,"j2":14,"error":0,"stderr":null,"stdout":1} {"problem_id":"p04029","language":"Python","original_status":"Runtime Error","pass":"N = input()\nprint(N * (N + 1) \/ 2)\n","fail":"N = int(input())\nprint(int(N * (N + 1) \/ 2))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"TypeError: can only concatenate str (not \"int\") to str","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04029\/Python\/s208468169.py\", line 2, in \n print(N * (N + 1) \/ 2)\nTypeError: can only concatenate str (not \"int\") to str\n","stdout":null} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"s = input()\nans = []\nfor c in s:\n if c == \"0\":\n ans.append(\"0\")\n if c == \"1\":\n ans.append(\"1\")\n if c == \"B\":\n ans.pop(-1)\nprint(\"\".join(ans))\n","fail":"s = input()\nans = []\nfor c in s:\n if c == \"0\":\n ans.append(\"0\")\n if c == \"1\":\n ans.append(\"1\")\n if c == \"B\":\n if ans:\n ans.pop(-1)\n else:\n pass\nprint(\"\".join(ans))\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":12,"error":"0","stderr":null,"stdout":0} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"s = input()\nans = []\nfor i in s:\n if i != \"B\":\n ans.append(i)\n continue\n if len(i) == 0:\n continue\n elif len(i) != 0:\n ans.pop()\nprint(*ans, sep=\"\")\n","fail":"s = input()\nans = []\nfor i in s:\n if i != \"B\":\n ans.append(i)\n continue\n if len(ans) == 0:\n continue\n elif len(ans) != 0:\n ans.pop()\nprint(*ans, sep=\"\")\n","change":"replace","i1":6,"i2":9,"j1":6,"j2":9,"error":"0","stderr":null,"stdout":0} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"lines = list(input())\nanswers = []\nout = \"\"\nfor line in lines:\n if line == \"0\" or line == \"1\":\n answers.append(line)\n else:\n answers.pop()\nfor answer in answers:\n out += answer\nprint(out)\n","fail":"lines = list(input())\nanswers = []\nout = \"\"\nfor line in lines:\n if line == \"0\" or line == \"1\":\n answers.append(line)\n elif answers:\n answers.pop()\nfor answer in answers:\n out += answer\nprint(out)\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"0","stderr":null,"stdout":0} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"s = input()\nans = []\nfor x in s:\n if x == \"0\" or x == \"1\":\n ans.append(x)\n else:\n ans.pop()\nprint(\"\".join(ans))\n","fail":"s = input()\nans = []\nfor x in s:\n if x == \"0\" or x == \"1\":\n ans.append(x)\n else:\n if len(ans) > 0:\n ans.pop()\nprint(\"\".join(ans))\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":8,"error":"0","stderr":null,"stdout":0} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"set = input()\nwords = []\nfor i in range(len(set)):\n if set[i] == \"0\":\n words.append(\"0\")\n if set[i] == \"1\":\n words.append(\"1\")\n if set[i] == \"B\":\n words.pop(-1)\nword = \"\"\nfor i in words:\n word += i\nprint(word)\n","fail":"set = input()\nwords = []\nfor i in range(len(set)):\n if set[i] == \"0\":\n words.append(\"0\")\n if set[i] == \"1\":\n words.append(\"1\")\n if set[i] == \"B\":\n try:\n words.pop(-1)\n except:\n pass\nword = \"\"\nfor i in words:\n word += i\nprint(word)\n","change":"replace","i1":8,"i2":9,"j1":8,"j2":12,"error":"0","stderr":null,"stdout":0} {"problem_id":"p04030","language":"Python","original_status":"Runtime Error","pass":"s = input()\ns_list = list(s)\nout_list = []\n\nfor i in range(len(s_list)):\n if s_list[i] == \"0\":\n out_list.append(\"0\")\n elif s_list[i] == \"1\":\n out_list.append(\"1\")\n elif s_list[i] == \"B\":\n del out_list[-1]\n\nfor ol in out_list:\n print(ol, end=\"\")\n","fail":"s = input()\ns_list = list(s)\nout_list = []\n\nfor i in range(len(s_list)):\n if s_list[i] == \"0\":\n out_list.append(\"0\")\n elif s_list[i] == \"1\":\n out_list.append(\"1\")\n elif s_list[i] == \"B\":\n if out_list:\n del out_list[-1]\n\nfor ol in out_list:\n print(ol, end=\"\")\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":12,"error":"WA","stderr":null,"stdout":0} {"problem_id":"p04031","language":"Python","original_status":"Runtime Error","pass":"N = int(input())\na = [int(i) for i in input().split()]\n\nli_ans = []\nans = 0\n\nfor j in range(min(a), max(a)):\n for k in a:\n ans += abs(k - j) ** 2\n else:\n li_ans.appned(ans)\n ans = 0\n\nif len(li_ans) == 0:\n print(0)\nelse:\n print(min(li_ans))\n","fail":"N = int(input())\na = [int(i) for i in input().split()]\n\nli_ans = []\nans = 0\n\nfor j in range(min(a), max(a)):\n for k in a:\n ans += abs(k - j) ** 2\n else:\n li_ans.append(ans)\n ans = 0\n\nif len(li_ans) == 0:\n print(0)\nelse:\n print(min(li_ans))\n","change":"replace","i1":10,"i2":11,"j1":10,"j2":11,"error":"AttributeError: 'list' object has no attribute 'appned'. Did you mean: 'append'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04031\/Python\/s677254688.py\", line 11, in \n li_ans.appned(ans)\nAttributeError: 'list' object has no attribute 'appned'. Did you mean: 'append'?\n","stdout":null} {"problem_id":"p04033","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nnumbers = list(range(a, b + 1))\nif a <= 0:\n if 0 <= b or a == 0 or b == 0:\n print(\"Zero\")\n exit()\n if len(numbers) % 2 != 0:\n print(\"Negative\")\n else:\n print(\"Positive\")\nelse:\n print(\"Positive\")\n","fail":"a, b = map(int, input().split())\nif 0 < a <= b:\n print(\"Positive\")\n\nelif a <= b < 0:\n if (b - a + 1) % 2 == 0:\n print(\"Positive\")\n\n else:\n print(\"Negative\")\nelif a <= 0 <= b:\n print(\"Zero\")\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":12,"error":"0","stderr":null,"stdout":"Positive\n"} {"problem_id":"p04033","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b = map(int, input().split())\np = 1\nfor i in range(a, b + 1):\n p *= i\nif p > 0:\n print(\"Positive\")\nelif p == 0:\n print(\"Zero\")\nelse:\n print(\"Negative\")\n","fail":"a, b = map(int, input().split())\nres = \"Positive\"\nif b < 0:\n if (b - a + 1) & 1:\n res = \"Negative\"\nelif b >= 0:\n if a <= 0:\n res = \"Zero\"\nprint(res)\n","change":"replace","i1":1,"i2":10,"j1":1,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04033","language":"Python","original_status":"Time Limit Exceeded","pass":"a, b = map(int, input().split())\n\nans = 1\nfor i in range(a, b + 1):\n ans *= i\n\nif ans > 0:\n print(\"Positive\")\nelif ans < 0:\n print(\"Negative\")\nelif ans == 0:\n print(\"Zero\")\nelse:\n pass\n","fail":"a, b = map(int, input().split())\n\nif a > 0 and b > 0:\n print(\"Positive\")\nelif a < 0 and b > 0:\n print(\"Zero\")\nelse:\n if (b - a + 1) % 2 == 0:\n print(\"Positive\")\n else:\n print(\"Negative\")\n","change":"replace","i1":2,"i2":14,"j1":2,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04034","language":"Python","original_status":"Time Limit Exceeded","pass":"#!\/usr\/bin\/env python3\n\nN, M = list(map(int, input().split()))\nxy_table = []\n\nfor _ in range(M):\n x, y = list(map(int, input().split()))\n xy_table.append((x, y))\n\nred_box_list = [1]\n# \u6dfb\u5b570\u306f\u30c0\u30df\u30fc\n# \u6dfb\u5b57 = \u7bb1\u306e\u756a\u53f7\u3068\u3057\u3066\u6271\u3046\nn_box_list = [0] + [1] * N\n\nfor xy in xy_table:\n x, y = xy\n n_box_list[x] -= 1\n n_box_list[y] += 1\n if x in red_box_list:\n if y not in red_box_list:\n red_box_list.append(y)\n\n if n_box_list[x] == 0:\n red_box_list.remove(x)\n\nans = len(red_box_list)\n\nprint(ans)\n","fail":"#!\/usr\/bin\/env python3\n\nN, M = list(map(int, input().split()))\nxy_table = []\n\nfor _ in range(M):\n x, y = list(map(int, input().split()))\n xy_table.append((x, y))\n\nred_box_dict = {i: False for i in range(1, N + 1)}\nred_box_dict[1] = True\n# \u6dfb\u5b570\u306f\u30c0\u30df\u30fc\n# \u6dfb\u5b57 = \u7bb1\u306e\u756a\u53f7\u3068\u3057\u3066\u6271\u3046\nn_box_list = [0] + [1] * N\n\nfor xy in xy_table:\n x, y = xy\n n_box_list[x] -= 1\n n_box_list[y] += 1\n if red_box_dict[x]:\n red_box_dict[y] = True\n\n if n_box_list[x] == 0:\n red_box_dict[x] = False\n\nans = len([v for v in red_box_dict.values() if v])\n\nprint(ans)\n","change":"replace","i1":9,"i2":26,"j1":9,"j2":26,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04039","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nD = set(input())\n\nn = N\nwhile True:\n if set(str(n)) in D:\n print(n)\n break\n n += 1\n","fail":"N, K = map(int, input().split())\nD = set(input())\n\nn = N\nwhile True:\n if len(set(str(n)) & D) == 0:\n print(n)\n break\n n += 1\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04039","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\nd = list(input().split())\nfor i in reversed(range(n, 10001)):\n for j in range(k):\n if d[j] in str(i):\n break\n else:\n ans = i\nprint(ans)\n","fail":"n, k = map(int, input().split())\nd = list(input().split())\nans = 100000\nfor i in range(n, 100001):\n for j in range(k):\n if d[j] in str(i):\n break\n else:\n if ans > i:\n ans = i\nprint(ans)\n","change":"replace","i1":2,"i2":8,"j1":2,"j2":10,"error":"0","stderr":null,"stdout":2000.0} {"problem_id":"p04043","language":"Python","original_status":"Runtime Error","pass":"x = list(map(int, input().split()))\nif x.count[5] == 2 and x.count[7] == 1:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"x = list(map(int, input().split()))\nif x.count(5) == 2 and x.count(7) == 1:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'builtin_function_or_method' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04043\/Python\/s312793810.py\", line 2, in \n if x.count[5] == 2 and x.count[7] == 1:\nTypeError: 'builtin_function_or_method' object is not subscriptable\n","stdout":null} {"problem_id":"p04043","language":"Python","original_status":"Runtime Error","pass":"A = int(input())\nB = int(input())\nC = int(input())\nA = [A, B, C]\n\nif A.count(5) == 2 and A.count(7) == 1:\n print(\"YES\")\nelse:\n print(\"NO\")\n","fail":"A = input()\n\nif A.count(\"5\") == 2 and A.count(\"7\") == 1:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":6,"j1":0,"j2":3,"error":"ValueError: invalid literal for int() with base 10: '5 5 7'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04043\/Python\/s730415764.py\", line 1, in \n A = int(input())\nValueError: invalid literal for int() with base 10: '5 5 7'\n","stdout":null} {"problem_id":"p04043","language":"Python","original_status":"Runtime Error","pass":"import asyncio\n\n\nasync def main(input: list):\n possible575 = sorted(input) == [5, 5, 7]\n print(possible575)\n\n\ninput = list(map(int, input().split()))\nasyncio.run(main(input))\n","fail":"def main(input: list):\n possible575 = sorted(input) == [5, 5, 7]\n print(\"YES\" if possible575 else \"NO\")\n\n\ninput = list(map(int, input().split()))\nmain(input)\n","change":"replace","i1":0,"i2":10,"j1":0,"j2":7,"error":"WA","stderr":null,"stdout":"True\n"} {"problem_id":"p04043","language":"Python","original_status":"Runtime Error","pass":"A = input()\nB = input()\nC = input()\n\nL = [A, B, C]\n\nfor x in L:\n if len(x) == 7:\n L.remove(x)\n for y in L:\n if len(y) != 5:\n break\n else:\n print(\"YES\")\n break\nelse:\n print(\"NO\")\n","fail":"L = [int(x) for x in input().split()]\nL.sort()\n\nif L == [5, 5, 7]:\n print(\"YES\")\nelse:\n print(\"NO\")\n","change":"replace","i1":0,"i2":15,"j1":0,"j2":5,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p04043\/Python\/s688466594.py\", line 2, in \n B = input()\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p04044","language":"Python","original_status":"Runtime Error","pass":"L, N = map(int, input().split())\nS = [input() for _ in range(N)]\nS.sort()\nprint(\"\".join(S))\n","fail":"N, L = map(int, input().split())\nS = [input() for _ in range(N)]\nS.sort()\nprint(\"\".join(S))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":0,"stderr":null,"stdout":"axxcxxdxx\n"} {"problem_id":"p04044","language":"Python","original_status":"Runtime Error","pass":"N, L = map(int, input().split())\nS = list(input() for i in range(L))\nS.sort()\nstr = \"\"\nfor i in S:\n str += i\nprint(str)\n","fail":"N, L = map(int, input().split())\nS = list(input() for i in range(N))\nstr = \"\"\nfor i in range(N - 1):\n for j in range(N - 1):\n if S[j + 1] + S[j] <= S[j] + S[j + 1]:\n S[j], S[j + 1] = S[j + 1], S[j]\nfor i in S:\n str += i\nprint(str)\n","change":"replace","i1":1,"i2":4,"j1":1,"j2":7,"error":0,"stderr":null,"stdout":"axxcxxdxx\n"} {"problem_id":"p04044","language":"Python","original_status":"Runtime Error","pass":"N, L = map(int, input().split())\ns = [0 for i in range(N)]\nfor i in range(N):\n s[i] = input()\n\ns.sort()\noutput = \"\"\nfor i in range(L):\n output += s[i]\nprint(output)\n","fail":"N, L = map(int, input().split())\ns = [0 for i in range(N)]\nfor i in range(N):\n s[i] = input()\n\ns.sort()\noutput = \"\"\nfor i in range(N):\n output += s[i]\nprint(output)\n","change":"replace","i1":7,"i2":8,"j1":7,"j2":8,"error":0,"stderr":null,"stdout":"axxcxxdxx\n"} {"problem_id":"p04044","language":"Python","original_status":"Runtime Error","pass":"L, N = map(int, input().split())\ns = [input() for i in range(N)]\nprint(\"\".join(sorted(s)))\n","fail":"N, L = map(int, input().split())\ns = [input() for i in range(N)]\ns.sort()\nprint(\"\".join(s))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":4,"error":0,"stderr":null,"stdout":"axxcxxdxx\n"} {"problem_id":"p04045","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\nmoney = n\ndislike_digits = list(map(int, input().split()))\n\nok = False\nfound = False\nwhile not ok:\n money_digits = [int(mon) for mon in str(money)]\n\n for digit in money_digits:\n for dis_digit in dislike_digits:\n if digit == dis_digit:\n found = True\n break\n if found:\n money += 1\n break\n\n if not found:\n ok = True\n\nprint(money)\n","fail":"price, size = map(int, input().split())\ndislikes = list(map(int, input().split()))\nlikes = list(set(range(10)) - set(dislikes))\ndigits = [int(digit) for digit in str(price)]\nr_digits = list(reversed(digits))\nres = []\nfor i in range(len(r_digits)):\n if r_digits[i] in likes:\n res.append(r_digits[i])\n elif max(likes) > r_digits[i]:\n res = [min(likes) for i in range(i)] + [min(x for x in likes if x > r_digits[i])]\n else:\n res = [min(likes) for i in range(i + 1)]\n if i == len(r_digits) - 1:\n res.append(min(x for x in likes if x > 0))\n\n else:\n r_digits[i + 1] += 1\n\nans = \"\".join([str(num) for num in list(reversed(res))])\nprint(ans)\n","change":"replace","i1":0,"i2":22,"j1":0,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p04045","language":"Python","original_status":"Runtime Error","pass":"def irohas_obsession(N: int, K: int, D: list) -> int:\n # D \u306b\u542b\u307e\u308c\u306a\u3044\u6700\u5c0f\u306e\u5024\n min_not_d = min(d for d in range(10) if d not in D)\n min_not_d_and_not_zero = min(d for d in range(10) if d not in D and d != 0)\n\n # \u6570\u5b57\u3092\u5404\u6841\u306b\u5206\u89e3\u3059\u308b\u3002\n nums = []\n while N > 0:\n nums = [N % 10] + nums\n N \/\/= 10\n\n # \u4e0a\u4f4d\u306e\u6841\u304b\u3089\u898b\u3066\u3044\u3063\u3066\u6700\u521d\u306b D \u306b\u542b\u307e\u308c\u308b\u6570\u5b57\u3092\u63a2\u3059\u3002\n # convert_idx = len(nums)\n for i, n in enumerate(nums):\n if n not in D:\n # \u5909\u63db\u306e\u5fc5\u8981\u304c\u306a\u3044\n continue\n\n convert_idx = i\n break\n # print(convert_idx)\n for i in range(convert_idx, -1, -1):\n n = nums[i]\n if n > 9:\n n %= 10\n if i > 0:\n nums[i - 1] += 1\n else:\n nums = [min_not_d_and_not_zero] + nums\n\n for d in range(n, 10):\n # \u5909\u63db\u5148\u304c n \u4ee5\u4e0a 9 \u4ee5\u4e0b\n if d in D:\n # NG\n continue\n\n nums[i] = d\n break\n else:\n # \u5909\u63db\u5148\u304c n \u672a\u6e80\n for d in range(n, 10):\n if d in D:\n # NG\n continue\n\n nums[i] = d\n\n # \u4e0a\u4f4d\u306e\u6841\u306b\u7e70\u308a\u4e0a\u304c\u308a\u3092\u4f1d\u642c\n if i > 0:\n nums[i - 1] += 1\n else:\n nums = [min_not_d_and_not_zero] + nums\n\n # \u6b8b\u308a\u306e\u6841\u306f D \u306b\u542b\u307e\u308c\u306a\u3044\u6700\u5c0f\u306e\u5024\u306b\u5909\u63db\u3059\u308b\u3002\n nums = [min_not_d if n in D else n for n in nums]\n\n ret = 0\n digit = 1\n # print(nums)\n for n in reversed(nums):\n ret += n * digit\n digit *= 10\n\n return ret\n\n\nif __name__ == \"__main__\":\n N, K = map(int, input().split())\n D = [int(s) for s in input().split()]\n ans = irohas_obsession(N, K, D)\n print(ans)\n","fail":"def irohas_obsession(N: int, K: int, D: list) -> int:\n # D \u306b\u542b\u307e\u308c\u306a\u3044\u6700\u5c0f\u306e\u5024\n min_not_d = min(d for d in range(10) if d not in D)\n min_not_d_and_not_zero = min(d for d in range(10) if d not in D and d != 0)\n\n # \u6570\u5b57\u3092\u5404\u6841\u306b\u5206\u89e3\u3059\u308b\u3002\n nums = []\n while N > 0:\n nums = [N % 10] + nums\n N \/\/= 10\n\n # \u4e0a\u4f4d\u306e\u6841\u304b\u3089\u898b\u3066\u3044\u3063\u3066\u6700\u521d\u306b D \u306b\u542b\u307e\u308c\u308b\u6570\u5b57\u3092\u63a2\u3059\u3002\n convert_idx = -1\n for i, n in enumerate(nums):\n if n not in D:\n # \u5909\u63db\u306e\u5fc5\u8981\u304c\u306a\u3044\n continue\n\n convert_idx = i\n break\n # print(convert_idx)\n for i in range(convert_idx, -1, -1):\n n = nums[i]\n if n > 9:\n n %= 10\n if i > 0:\n nums[i - 1] += 1\n else:\n nums = [min_not_d_and_not_zero] + nums\n\n for d in range(n, 10):\n # \u5909\u63db\u5148\u304c n \u4ee5\u4e0a 9 \u4ee5\u4e0b\n if d in D:\n # NG\n continue\n\n nums[i] = d\n break\n else:\n # \u5909\u63db\u5148\u304c n \u672a\u6e80\n for d in range(n, 10):\n if d in D:\n # NG\n continue\n\n nums[i] = d\n\n # \u4e0a\u4f4d\u306e\u6841\u306b\u7e70\u308a\u4e0a\u304c\u308a\u3092\u4f1d\u642c\n if i > 0:\n nums[i - 1] += 1\n else:\n nums = [min_not_d_and_not_zero] + nums\n\n # \u6b8b\u308a\u306e\u6841\u306f D \u306b\u542b\u307e\u308c\u306a\u3044\u6700\u5c0f\u306e\u5024\u306b\u5909\u63db\u3059\u308b\u3002\n nums = [min_not_d if n in D else n for n in nums]\n\n ret = 0\n digit = 1\n # print(nums)\n for n in reversed(nums):\n ret += n * digit\n digit *= 10\n\n return ret\n\n\nif __name__ == \"__main__\":\n N, K = map(int, input().split())\n D = [int(s) for s in input().split()]\n ans = irohas_obsession(N, K, D)\n print(ans)\n","change":"replace","i1":12,"i2":13,"j1":12,"j2":13,"error":"0","stderr":null,"stdout":2000.0} {"problem_id":"p04045","language":"Python","original_status":"Runtime Error","pass":"n, k = map(int, input().split())\ndlist = list(map(int, input().split()))\n\nfor i in range(n, 10000):\n flg: bool = True\n for s in str(i):\n if int(s) in dlist:\n flg = False\n break\n if flg:\n print(i)\n break\n","fail":"n, k = map(int, input().split())\ndlist = input().split()\nflg = True\nwhile flg:\n s = str(n)\n for t in s:\n if t in dlist:\n n += 1\n break\n else:\n flg = False\nprint(n)\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":12,"error":"0","stderr":null,"stdout":2000.0}