{"problem_id":"p00001","language":"Python","original_status":"Runtime Error","pass":"num = [int(input()) for i in range(10)]\nnum.sort(reverse=True)\nfor i in range[0:3]:\n print(num[i])\n","fail":"num = [int(input()) for i in range(10)]\nnum.sort(reverse=True)\nfor i in range(3):\n print(num[i])\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"error":"TypeError: 'type' object is not subscriptable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p00001\/Python\/s016107060.py\", line 3, in \n for i in range[0:3]:\nTypeError: 'type' object is not subscriptable\n","stdout":null} {"problem_id":"p00002","language":"Python","original_status":"Runtime Error","pass":"while True:\n try:\n a = int(input())\n b = int(input())\n print(len(str(a + b)))\n except EOFError:\n break\n","fail":"while True:\n try:\n a, b = map(int, input().split(\" \"))\n print(len(str(a + b)))\n except:\n break\n","change":"replace","i1":2,"i2":6,"j1":2,"j2":5,"error":"ValueError: invalid literal for int() with base 10: '5 7'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p00002\/Python\/s313564811.py\", line 3, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '5 7'\n","stdout":null} {"problem_id":"p00006","language":"Python","original_status":"Runtime Error","pass":"print(input[::-1])\n","fail":"print(input()[::-1])\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\/p00006\/Python\/s441661847.py\", line 1, in \n print(input[::-1])\nTypeError: 'builtin_function_or_method' object is not subscriptable\n","stdout":null} {"problem_id":"p00018","language":"Python","original_status":"Runtime Error","pass":"print(*sorted(map(int, input().spilt()))[::-1])\n","fail":"print(*sorted(map(int, input().split()))[::-1])\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"AttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p00018\/Python\/s371735785.py\", line 1, in \n print(*sorted(map(int, input().spilt()))[::-1])\nAttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'?\n","stdout":null} {"problem_id":"p00208","language":"Python","original_status":"Runtime Error","pass":"def ge(arr):\n for i in range(len(arr)):\n tmp = int(arr[i])\n if tmp >= 4:\n tmp += 1\n if tmp >= 6:\n tmp += 1\n arr[i] = str(tmp)\n\n\nwhile True:\n n = int(input)\n if n == 0:\n break\n print(\"\".join(ge(list(oct(n))[2:])))\n","fail":"def ge(arr):\n for i in range(len(arr)):\n tmp = int(arr[i])\n if tmp >= 4:\n tmp += 1\n if tmp >= 6:\n tmp += 1\n arr[i] = str(tmp)\n return arr\n\n\nwhile True:\n n = int(input())\n if n == 0:\n break\n print(\"\".join(ge(list(oct(n))[2:])))\n","change":"replace","i1":8,"i2":12,"j1":8,"j2":13,"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\/p00208\/Python\/s656682715.py\", line 12, 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":"p00481","language":"Python","original_status":"Runtime Error","pass":"import copy\n\n(h, w, n) = list(map(int, input().split()))\ndis = [[] for i in range(n + 1)]\n\n\ndef setArr(ph):\n global dis\n res = [False for i in range(w + 2)]\n for i, x in enumerate(list(input())):\n if x == \"X\":\n continue\n res[i + 1] = True\n if x == \".\":\n continue\n if x == \"S\":\n dis[0] = [ph, i + 1]\n continue\n dis[int(x)] = [ph, i + 1]\n return res\n\n\narr = [[] for i in range(h + 2)]\narr[0] = [False for i in range(h + 2)]\narr[-1] = [False for i in range(h + 2)]\nfor i in range(1, h + 1):\n arr[i] = setArr(i)\nres = 0\nmove = [[1, 0], [0, 1], [-1, 0], [0, -1]]\n\n\ndef ze(start, goal):\n arra = copy.deepcopy(arr)\n global res\n queue = [start, [-1, -1]]\n ap = queue.append\n zu = False\n for q in queue:\n if q[0] < 0:\n res += 1\n ap([-1, -1])\n continue\n if not arra[q[0]][q[1]]:\n continue\n for m in move:\n de = [q[0] + m[0], q[1] + m[1]]\n if de == goal:\n res += 1\n zu = True\n break\n if arra[de[0]][de[1]]:\n ap(de)\n if zu:\n break\n arra[q[0]][q[1]] = False\n\n\nfor i in range(n):\n ze(dis[i], dis[i + 1])\n\nprint(res)\n","fail":"import copy\n\n(h, w, n) = list(map(int, input().split()))\ndis = [[] for i in range(n + 1)]\n\n\ndef setArr(ph):\n global dis\n res = [False for i in range(w + 2)]\n for i, x in enumerate(list(input())):\n if x == \"X\":\n continue\n res[i + 1] = True\n if x == \".\":\n continue\n if x == \"S\":\n dis[0] = [ph, i + 1]\n continue\n dis[int(x)] = [ph, i + 1]\n return res\n\n\narr = [[] for i in range(h + 2)]\narr[0] = [False for i in range(w + 2)]\narr[-1] = [False for i in range(w + 2)]\nfor i in range(1, h + 1):\n arr[i] = setArr(i)\n\nres = 0\nmove = [[1, 0], [0, 1], [-1, 0], [0, -1]]\n\n\ndef ze(start, goal):\n arra = copy.deepcopy(arr)\n global res\n queue = [start, [-1, -1]]\n ap = queue.append\n zu = False\n for q in queue:\n if q[0] < 1:\n res += 1\n ap([-1, -1])\n continue\n if not arra[q[0]][q[1]]:\n continue\n for m in move:\n de = [q[0] + m[0], q[1] + m[1]]\n\n if de == goal:\n res += 1\n zu = True\n break\n if arra[de[0]][de[1]]:\n ap(de)\n if zu:\n break\n arra[q[0]][q[1]] = False\n\n\nfor i in range(n):\n ze(dis[i], dis[i + 1])\n\nprint(res)\n","change":"replace","i1":23,"i2":46,"j1":23,"j2":48,"error":"0","stderr":null,"stdout":"4\n"} {"problem_id":"p00505","language":"Python","original_status":"Runtime Error","pass":"result = [0] * 3\nwhile 1:\n a, b, c = sorted(list(map(int, input().split())))\n if a + b > c:\n flag = c * c - b * b - a * a\n if flag == 0:\n result[0] += 1\n elif flag > 0:\n result[1] += 1\n else:\n result[2] += 1\nprint(sum(result), *result)\n","fail":"acute, right, obtuse = 0, 0, 0\nwhile True:\n a, b, c = sorted(map(int, input().split()))\n if a + b <= c:\n print(acute + right + obtuse, right, acute, obtuse)\n break\n d = a**2 + b**2\n e = c**2\n if d == e:\n right += 1\n elif d < e:\n obtuse += 1\n else:\n acute += 1\n","change":"replace","i1":0,"i2":12,"j1":0,"j2":14,"error":"EOFError: EOF when reading a line","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p00505\/Python\/s014459241.py\", line 3, in \n a, b, c = sorted(list(map(int, input().split())))\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p00559","language":"Python","original_status":"Time Limit Exceeded","pass":"n, q, s, t = map(int, input().split())\na = [int(input()) for _ in range(n + 1)]\nfor _ in range(q):\n l, r, x = map(int, input().split())\n for i in range(l, r + 1):\n a[i] += x\n temp = 0\n for i in range(1, n + 1):\n temp += (a[i - 1] - a[i]) * s if a[i] > a[i - 1] else (a[i - 1] - a[i]) * t\n print(temp)\n","fail":"n, q, s, t = map(int, input().split())\na = [int(input()) for _ in range(n + 1)]\nfor i in range(1, n + 1)[::-1]:\n a[i] -= a[i - 1]\ncount = 0\nfor i in range(n + 1):\n count -= a[i] * s if a[i] > 0 else a[i] * t\nfor _ in range(q):\n l, r, x = map(int, input().split())\n count += a[l] * s if a[l] > 0 else a[l] * t\n a[l] += x\n count -= a[l] * s if a[l] > 0 else a[l] * t\n if r < n:\n count += a[r + 1] * s if a[r + 1] > 0 else a[r + 1] * t\n a[r + 1] -= x\n count -= a[r + 1] * s if a[r + 1] > 0 else a[r + 1] * t\n print(count)\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p00586","language":"Python","original_status":"Time Limit Exceeded","pass":"x = input()\nwhile x:\n a, b = x.split(\" \")\n print(int(a) + int(b))\n","fail":"import sys\n\nfor line in sys.stdin:\n if line == None or line == \"\/n\":\n break\n a, b = line.split(\" \")\n print(int(a) + int(b))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":6,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p00705","language":"Python","original_status":"Runtime Error","pass":"import collections\n\nwhile True:\n N, Q = map(int, input().split())\n if N == 0 and Q == 0:\n break\n D = []\n for _ in range(N):\n i = list(map(int, input().split()))\n del i[0]\n [D.append(ii) for ii in i]\n c = collections.Counter(D)\n cc = c.most_common()\n if cc[0][1] >= Q:\n print(cc[0][0])\n else:\n print(0)\n","fail":"import collections\n\nwhile True:\n N, Q = map(int, input().split())\n if N == 0 and Q == 0:\n break\n D = []\n for _ in range(N):\n i = list(map(int, input().split()))\n del i[0]\n [D.append(ii) for ii in i]\n if not len(D) == 0:\n c = collections.Counter(D)\n cc = c.most_common()\n # print(cc)\n if cc[0][1] >= Q:\n ans = 1000000\n tmp = cc[0][1]\n for i in range(len(cc)):\n if cc[i][1] == tmp:\n ans = min(cc[i][0], ans)\n print(ans)\n else:\n print(0)\n else:\n print(0)\n","change":"replace","i1":11,"i2":15,"j1":11,"j2":24,"error":"0","stderr":null,"stdout":"4\n5\n0\n2\n"} {"problem_id":"p01140","language":"Python","original_status":"Runtime Error","pass":"while True:\n n, m = map(int, input().split())\n if n == 0 and m == 0:\n break\n h = [0]\n for i in range(n):\n h.append(int(input()) + h[i])\n w = [0]\n for i in range(m):\n w.append(int(input()) + w[i])\n\n hList = [0] * 1000\n for i in range(n + 1):\n for j in range(i, n + 1):\n if i == j:\n continue\n else:\n hList[abs(h[i] - h[j])] += 1\n wList = [0] * 1000\n for i in range(m + 1):\n for j in range(i, m + 1):\n if i == j:\n continue\n else:\n wList[abs(w[i] - w[j])] += 1\n\n squareList = []\n for i in range(1000):\n squareList.append(hList[i] * wList[i])\n print(sum(squareList))\n","fail":"while True:\n n, m = map(int, input().split())\n if n == 0 and m == 0:\n break\n h = [0]\n for i in range(n):\n h.append(int(input()) + h[i])\n w = [0]\n for i in range(m):\n w.append(int(input()) + w[i])\n\n hDict = {}\n for i in range(n + 1):\n for j in range(i, n + 1):\n if i == j:\n continue\n else:\n diff = abs(h[i] - h[j])\n if diff in hDict:\n hDict[diff] += 1\n else:\n hDict[diff] = 1\n wDict = {}\n for i in range(m + 1):\n for j in range(i, m + 1):\n if i == j:\n continue\n else:\n diff = abs(w[i] - w[j])\n if diff in wDict:\n wDict[diff] += 1\n else:\n wDict[diff] = 1\n\n ans = 0\n for diff in hDict.keys():\n if diff in wDict:\n ans += hDict[diff] * wDict[diff]\n print(ans)\n","change":"replace","i1":11,"i2":30,"j1":11,"j2":39,"error":"0","stderr":null,"stdout":"6\n2\n"} {"problem_id":"p01227","language":"Python","original_status":"Runtime Error","pass":"for i in range(int(input())):\n n, k = map(int, input().split())\n d = list(map(int, input().split()))\n if k >= n:\n print(0)\n elif k == 1:\n d.sort()\n print(d[-1] - d[0])\n else:\n k = [0] * (k - 1)\n d.sort()\n for i in range(1, n):\n if d[i] - d[i - 1] > k[0]:\n k[0] = d[i] - d[i - 1]\n k.sort()\n print(d[-1] - d[0] - sum(k))\n","fail":"for i in range(int(input())):\n t, k = map(int, input().split())\n d = list(map(int, input().split()))\n d = sorted([d[i + 1] - d[i] for i in range(t - 1)])\n print(sum(d[: t - k]) if t > k else 0)\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":5,"error":"0","stderr":null,"stdout":"60\n13\n0\n1000000\n0\n20\n"} {"problem_id":"p01981","language":"Python","original_status":"Runtime Error","pass":"while True:\n a = list(map(str, input().split()))\n if a[0] == \"0\":\n break\n elif int(a[1]) <= 30:\n print(\" \".join(a))\n elif int(a[1]) == 31 and int(a[2]) <= 4:\n print(\" \".join(a))\n else:\n a[0] = \"?\"\n s = int(a[1])\n s -= 30\n a[1] = str(s)\n print(\" \".join(a))\n","fail":"while True:\n a = list(map(str, input().split()))\n if a[0] == \"#\":\n break\n elif int(a[1]) <= 30:\n print(\" \".join(a))\n elif int(a[1]) == 31 and int(a[2]) <= 4:\n print(\" \".join(a))\n else:\n a[0] = \"?\"\n s = int(a[1])\n s -= 30\n a[1] = str(s)\n print(\" \".join(a))\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\/p01981\/Python\/s158524109.py\", line 5, in \n elif int(a[1]) <= 30:\nIndexError: list index out of range\n","stdout":"HEISEI 1 1 8\nHEISEI 31 4 30\n? 1 5 1\n? 69 12 31\n? 8 8 30\n? 68 2 22\nHEISEI 2 3 26\nHEISEI 28 4 23\n"} {"problem_id":"p02099","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\na = [float(input()) for _ in range(n)]\nb = sorted(a)\nfor i in range(n):\n print(b.index(a[i]) * 3 + b.count(a[i]) - 1)\n","fail":"import bisect\n\nn = int(input())\na = [float(input()) for _ in range(n)]\nb = sorted(a)\nfor i in range(n):\n x = bisect.bisect_left(b, a[i])\n y = bisect.bisect_right(b, a[i])\n print(x * 2 + y - 1)\n","change":"replace","i1":0,"i2":5,"j1":0,"j2":9,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02235","language":"Python","original_status":"Time Limit Exceeded","pass":"q = int(input())\nfor _ in range(q):\n x = input()\n y = input()\n m = len(x)\n n = len(y)\n c = [0] * (n + 1)\n for i in range(m):\n tmp = x[i]\n c_ = c[:]\n for j in range(n):\n if tmp == y[j]:\n c[j + 1] = c_[j] + 1\n elif c[j + 1] < c[j]:\n c[j + 1] = c[j]\n print(c[-1])\n","fail":"def lcs(x, y):\n a = len(x)\n b = len(y)\n c1 = [0] * (b + 1)\n for i in range(a):\n e1 = x[i]\n c2 = c1[:]\n for j in range(b):\n if e1 == y[j]:\n c1[j + 1] = c2[j] + 1\n elif c1[j + 1] < c1[j]:\n c1[j + 1] = c1[j]\n return c1[-1]\n\n\nn = int(input().rstrip())\nret = []\nfor i in range(n):\n s1 = input().rstrip()\n s2 = input().rstrip()\n ret.append(lcs(s1, s2))\nprint(*ret, sep=\"\\\\n\")\n","change":"replace","i1":0,"i2":16,"j1":0,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02235","language":"Python","original_status":"Time Limit Exceeded","pass":"q = int(input())\nans = []\nfor _ in range(q):\n x = input()\n y = input()\n m = len(x)\n n = len(y)\n c = [0] * (n + 1)\n for i in range(m):\n tmp = x[i]\n c_ = c[:]\n for j in range(n):\n if tmp == y[j]:\n c[j + 1] = c_[j] + 1\n elif c[j + 1] < c[j]:\n c[j + 1] = c[j]\n ans.append(c[-1])\n\nprint(*ans, sep=\"\\\\n\")\n","fail":"def lcs(x, y):\n m = len(x)\n n = len(y)\n c = [0] * (n + 1)\n for i in range(m):\n tmp = x[i]\n c_ = c[:]\n for j in range(n):\n if tmp == y[j]:\n c[j + 1] = c_[j] + 1\n elif c[j + 1] < c[j]:\n c[j + 1] = c[j]\n return c[-1]\n\n\nq = int(input())\nans = []\nfor _ in range(q):\n x = input()\n y = input()\n ans.append(lcs(x, y))\n\nprint(*ans, sep=\"\\\\n\")\n","change":"replace","i1":0,"i2":17,"j1":0,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02257","language":"Python","original_status":"Time Limit Exceeded","pass":"prime = set([2])\nfor i in range(3, 100000000, 2):\n for j in prime:\n if i % j == 0:\n break\n else:\n prime.add(i)\nn = int(input())\ncnt = 0\nfor i in (int(input()) for _ in range(n)):\n if i in prime:\n cnt += 1\nprint(cnt)\n","fail":"import sys\nfrom math import *\n\nreadline = sys.stdin.readline\n\n\ndef isPrime(x):\n if x == 2 or x == 3:\n return True\n elif x % 2 == 0 or x % 3 == 0:\n return False\n s = ceil(sqrt(x))\n for i in range(5, s + 1, 2):\n if x % i == 0:\n return False\n return True\n\n\nprint(sum(isPrime(int(readline())) for _ in range(int(input()))))\n","change":"replace","i1":0,"i2":13,"j1":0,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02258","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nR = [int(input()) for i in range(N)]\n\nsa = R[N - 1] - R[N - 2]\nfor i in reversed(range(N)):\n for j in reversed(range(i)):\n tmp = R[i] - R[j]\n if tmp > sa:\n sa = tmp\nprint(sa)\n","fail":"N = int(input())\nR = [int(input()) for i in range(N)]\n\nmin_v = R[0]\nmax_v = R[1] - R[0]\nfor i in range(1, len(R)):\n if min_v > R[i - 1]:\n min_v = R[i - 1]\n if max_v < R[i] - min_v:\n max_v = R[i] - min_v\nprint(max_v)\n","change":"replace","i1":3,"i2":10,"j1":3,"j2":11,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02258","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\nls = [int(input()) for _ in range(n)]\n\np = min(ls) - max(ls)\n\nfor i, x in enumerate(ls, 1):\n if i == len(ls):\n break\n v = max(ls[i:]) - x\n if v > p:\n p = v\nprint(p)\n","fail":"n = int(input())\nm = [int(input()) for _ in range(n)]\n\n\ndef fx(raw):\n min_n = raw[0]\n max_n = raw[1] - raw[0]\n for i in raw[1:]:\n if i - min_n >= max_n:\n max_n = i - min_n\n if i < min_n:\n min_n = i\n return max_n\n\n\nif __name__ == \"__main__\":\n print(fx(m))\n","change":"replace","i1":1,"i2":12,"j1":1,"j2":17,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02268","language":"Python","original_status":"Time Limit Exceeded","pass":"input()\ns = list(map(int, input().split()))\ninput()\nt = list(map(int, input().split()))\n\ncnt = 0\nfor i in t:\n if i in s:\n cnt += 1\nprint(cnt)\n","fail":"def binary_search(ary, key, imin, imax):\n if imax < imin:\n return False\n else:\n imid = imin + (imax - imin) \/\/ 2\n if ary[imid] > key:\n return binary_search(ary, key, imin, imid - 1)\n elif ary[imid] < key:\n return binary_search(ary, key, imid + 1, imax)\n else:\n return True\n\n\nn = int(input())\ns = list(map(int, input().split()))\nq = int(input())\nt = list(map(int, input().split()))\n\ncnt = 0\nfor i in t:\n if binary_search(s, i, 0, n - 1):\n cnt += 1\nprint(cnt)\n","change":"replace","i1":0,"i2":8,"j1":0,"j2":21,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02268","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\ninput()\ns = set(input().split())\ninput()\nt = set(input().split())\nprint(int(s & t))\n","fail":"# -*- coding: utf-8 -*-\n\ninput()\ns = set(input().split())\ninput()\nt = set(input().split())\nprint(len(s & t))\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 'set'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02268\/Python\/s343168177.py\", line 7, in \n print(int(s & t))\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'set'\n","stdout":null} {"problem_id":"p02268","language":"Python","original_status":"Runtime Error","pass":"def binarySearch(array, key):\n left = 0\n right = len(array)\n while left < right:\n mid = (left + right) \/ 2\n if key == array[mid]:\n return True\n elif key > array[mid]:\n left = mid + 1\n elif key < array[mid]:\n right = mid\n else:\n print(\"ERROR\")\n return False\n\n\nn = int(input())\ns = [int(x) for x in input().split()]\nq = int(input())\nt = [int(x) for x in input().split()]\na = [x for x in t if binarySearch(s, x)]\nprint(len(a))\n","fail":"def binarySearch(array, key):\n left = 0\n right = len(array)\n while left < right:\n mid = int((left + right) \/ 2)\n if key == array[mid]:\n return True\n elif key > array[mid]:\n left = mid + 1\n elif key < array[mid]:\n right = mid\n else:\n print(\"ERROR\")\n return False\n\n\nn = int(input())\ns = [int(x) for x in input().split()]\nq = int(input())\nt = [int(x) for x in input().split()]\na = [x for x in t if binarySearch(s, x)]\nprint(len(a))\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"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\/p02268\/Python\/s716545650.py\", line 21, in \n a = [x for x in t if binarySearch(s, x)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02268\/Python\/s716545650.py\", line 21, in \n a = [x for x in t if binarySearch(s, x)]\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02268\/Python\/s716545650.py\", line 6, in binarySearch\n if key == array[mid]:\nTypeError: list indices must be integers or slices, not float\n","stdout":null} {"problem_id":"p02379","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nimport math\n\nx1, y1, x2, y2 = map(int, input().split())\ndis = math.sqrt((x1 + x2) * (x1 + x2) + (y1 + y2) * (y1 + y2))\nprint(dis)\n","fail":"# -*- coding: utf-8 -*-\n\nimport math\n\nx1, y1, x2, y2 = map(float, input().split())\ndis = math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))\nprint(dis)\n","change":"replace","i1":4,"i2":6,"j1":4,"j2":6,"error":"WA","stderr":null,"stdout":1.4142135624} {"problem_id":"p02381","language":"Python","original_status":"Runtime Error","pass":"# -*- coding: utf-8 -*-\n\nimport math\n\nwhile True:\n n = int(input())\n\n if n == 0:\n break\n\n s = list(map(float, input().split()))\n mean = sum(s) \/ len(s)\n\n for i in range(len(s)):\n s[i] = (s[i] - sum) * (s[i] - sum)\n\n variance = sum(s) \/ len(s)\n stdev = math.sqrt(variance)\n\n print(stdev)\n","fail":"# -*- coding: utf-8 -*-\n\nimport math\n\nwhile True:\n n = int(input())\n\n if n == 0:\n break\n\n s = list(map(float, input().split()))\n mean = sum(s) \/ len(s)\n\n for i in range(len(s)):\n s[i] = (s[i] - mean) * (s[i] - mean)\n\n variance = sum(s) \/ len(s)\n stdev = math.sqrt(variance)\n\n print(stdev)\n","change":"replace","i1":14,"i2":15,"j1":14,"j2":15,"error":"TypeError: unsupported operand type(s) for -: 'float' and 'builtin_function_or_method'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02381\/Python\/s289178962.py\", line 15, in \n s[i] = (s[i] - sum) * (s[i] - sum)\nTypeError: unsupported operand type(s) for -: 'float' and 'builtin_function_or_method'\n","stdout":null} {"problem_id":"p02381","language":"Python","original_status":"Runtime Error","pass":"import statistics as st\n\nwhile True:\n n = float(input())\n if n == 0:\n break\n scores = list(map(float, input().split()))\n std = st.stdev(scores)\n print(std)\n","fail":"import math\n\nwhile True:\n n = float(input())\n aan = 0\n if n == 0:\n break\n scores = list(map(float, input().split()))\n total = sum(scores)\n avg = total \/ len(scores)\n for score in scores:\n aan += (score - avg) ** 2\n aa = aan \/ len(scores)\n a = math.sqrt(aa)\n print(a)\n","change":"replace","i1":0,"i2":9,"j1":0,"j2":15,"error":"WA","stderr":null,"stdout":"31.144823004794873\n0.0\n"} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\n\nans = x * x * x\n\nprint(ans)\n","fail":"x = int(input())\n\nans = x * x * x\n\nprint(ans)\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\/p02388\/Python\/s517488440.py\", line 3, in \n ans = x * x * x\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\n\nprint(x * x * x)\n","fail":"x = int(input())\nprint(x * x * x)\n","change":"replace","i1":0,"i2":2,"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\/p02388\/Python\/s272745096.py\", line 3, in \n print(x * x * x)\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"print(input() ** 3)\n","fail":"print(int(input()) ** 3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s376152712.py\", line 1, in \n print(input() ** 3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"import sys\n\nargs = sys.argv\n\nnum = int(args[1])\nprint(str(num**3))\n","fail":"s = input()\nnum = int(s)\nprint(str(num**3))\n","change":"replace","i1":0,"i2":5,"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\/p02388\/Python\/s550015206.py\", line 5, in \n num = int(args[1])\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint(x**3)\n","fail":"x = int(input())\nprint(x**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s314503322.py\", line 2, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"number = input(int())\nprint(number**3)\n","fail":"number = int(input())\nprint(number**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s272552751.py\", line 2, in \n print(number**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":0.0} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\n\nprint(x**3)\n","fail":"x = int(input())\n\nprint(x**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s482874964.py\", line 3, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"print(input() ** 3)\n","fail":"print(int(input()) ** 3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s627402686.py\", line 1, in \n print(input() ** 3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint(x**3)\n","fail":"x = input()\nx = int(x)\nprint(x**3)\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":2,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s725747490.py\", line 2, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint(x**3)\n","fail":"x = int(input())\nprint(x**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s709080194.py\", line 2, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"n = input()\nprint(n * n * n)\n","fail":"s = input()\nn = int(s)\nprint(n**3)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":3,"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\/p02388\/Python\/s234463127.py\", line 2, in \n print(n * n * n)\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"input = input()\nprint(input**3)\n","fail":"input = input()\nprint(int(input) ** 3)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s516531505.py\", line 2, in \n print(input**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"N = input()\nprint(N**3)\n","fail":"N = int(input())\nprint(N**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s645472377.py\", line 2, in \n print(N**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = int(input())\nprint(**3)\n","fail":"x = int(input())\nprint(x**3)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: print() argument after ** must be a mapping, not int","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s451360688.py\", line 2, in \n print(**3)\nTypeError: print() argument after ** must be a mapping, not int\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint(x**3)\n","fail":"x = int(input())\nprint(x**3)\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s996581497.py\", line 2, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"s = input(\"\")\nans = s * s * s\nprint(ans)\n","fail":"user = input(\"\")\nnum = int(user)\nans = num * num * num\nprint(ans)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":3,"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\/p02388\/Python\/s469089457.py\", line 2, in \n ans = s * s * s\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p02388","language":"Python","original_status":"Runtime Error","pass":"x = input()\nprint(x**3)\n","fail":"input_1 = int(input())\ncal = (input_1) ** 3\nprint(cal)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":3,"error":"TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02388\/Python\/s257611309.py\", line 2, in \n print(x**3)\nTypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"a, b = [int(elem) for elem in input().split]\nprint(a * b, (a + b) * 2)\n","fail":"a, b = [int(elem) for elem in input().split()]\nprint(a * b, (a + b) * 2)\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\/p02389\/Python\/s283815234.py\", line 1, in \n a, b = [int(elem) for elem in input().split]\nTypeError: 'builtin_function_or_method' object is not iterable\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"nums = input().split()\nx = nums[0] * nums[1]\ny = nums[0] * 2 + nums[1] * 2\nprint(str(x) + \" \" + str(y))\n","fail":"nums = [int(e) for e in input().split()]\nx = nums[0] * nums[1]\ny = nums[0] * 2 + nums[1] * 2\nprint(str(x) + \" \" + str(y))\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\/p02389\/Python\/s858282912.py\", line 2, in \n x = nums[0] * nums[1]\nTypeError: can't multiply sequence by non-int of type 'str'\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"n = input()\na, b = int(n.split())\nx = a * b\ny = 2 * (a + b)\nprint(x, y)\n","fail":"n = input()\na, b = n.split()\na = int(a)\nb = int(b)\nx = a * b\ny = 2 * (a + b)\nprint(x, y)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":4,"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\/p02389\/Python\/s485129018.py\", line 2, in \n a, b = int(n.split())\nTypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"x = int(input().split(\" \"))\na = x[0] * x[1]\nb = x[0] + x[1] + x[0] + x[1]\nprint(str(a) + str(b))\n","fail":"x = input().split(\" \")\na = int(x[0]) * int(x[1])\nb = int(x[0]) + int(x[1]) + int(x[0]) + int(x[1])\nprint(str(a) + \" \" + str(b))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"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\/p02389\/Python\/s525009394.py\", line 1, in \n x = 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":"p02389","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().split())\nprint(a * b, 2(a + b))\n","fail":"a, b = map(int, input().split())\nprint(a * b, 2 * (a + b))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"TypeError: 'int' object is not callable","stderr":"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02389\/Python\/s046135584.py:2: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?\n print(a * b, 2(a + b))\nTraceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02389\/Python\/s046135584.py\", line 2, in \n print(a * b, 2(a + b))\nTypeError: 'int' object is not callable\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"a, b = [int(x) for x in input().split(\" \")]\n\nprint(\"{} {}\".format(a * b, 2 * a + 2 * b))\n","fail":"a, b = [int(x) for x in input().split()]\n\nprint(\"{} {}\".format(a * b, 2 * a + 2 * b))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"0","stderr":null,"stdout":"15 16\n"} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"nums = list(map(int, input().split(\" \")))\narea = nums[0] * nums[1]\nperimeter = nums[0] * 2 + nums[1] * 2\nprint(area + \" \" + perimeter)\n","fail":"nums = list(map(int, input().split(\" \")))\narea = nums[0] * nums[1]\nperimeter = nums[0] * 2 + nums[1] * 2\nprint(str(area) + \" \" + str(perimeter))\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"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\/p02389\/Python\/s255812565.py\", line 4, in \n print(area + \" \" + perimeter)\nTypeError: unsupported operand type(s) for +: 'int' and 'str'\n","stdout":null} {"problem_id":"p02389","language":"Python","original_status":"Runtime Error","pass":"a, b = map(int, input().splot())\nprint(str(a * b) + str(2 * a + 2 * b))\n","fail":"a, b = map(int, input().split())\nprint(str(a * b) + \" \" + str(2 * a + 2 * b))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"AttributeError: 'str' object has no attribute 'splot'. Did you mean: 'split'?","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02389\/Python\/s991335921.py\", line 1, in \n a, b = map(int, input().splot())\nAttributeError: 'str' object has no attribute 'splot'. Did you mean: 'split'?\n","stdout":null} {"problem_id":"p02390","language":"Python","original_status":"Runtime Error","pass":"time = int(input)\nh = time \/ 3600\nm = (time % 3600) \/ 60\ns = time % 60\nprint(str(h) + \":\" + str(m) + \":\" + str(s))\n","fail":"time = int(input())\ns = time % 60\nh = time \/\/ 3600\nm = (time - h * 3600) \/\/ 60\nprint(str(h) + \":\" + str(m) + \":\" + str(s))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":4,"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\/p02390\/Python\/s278670958.py\", line 1, in \n time = 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":"p02390","language":"Python","original_status":"Runtime Error","pass":"x = input()\ns = x % 60\nx \/\/= 60\nm = x % 60\nx \/\/= 60\nprint(\"{}:{}:{}\".format(x, m, s))\n","fail":"x = int(input())\ns = x % 60\nx \/\/= 60\nm = x % 60\nx \/\/= 60\nprint(\"{}:{}:{}\".format(x, m, s))\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\/p02390\/Python\/s450465833.py\", line 2, in \n s = x % 60\nTypeError: not all arguments converted during string formatting\n","stdout":null} {"problem_id":"p02390","language":"Python","original_status":"Runtime Error","pass":"sho = int(input()) \/\/ 60\namari = int(input()) % 60\n\nh = sho \/\/ 60\nm = sho % 60\ns = amari\n\nprint(\"{}:{}:{}\".format(h, m, s))\n","fail":"sho, s = divmod(int(input()), 60)\nh, m = divmod(sho, 60)\nprint(\"{}:{}:{}\".format(h, m, s))\n","change":"replace","i1":0,"i2":7,"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\/p02390\/Python\/s320807078.py\", line 2, in \n amari = int(input()) % 60\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p02392","language":"Python","original_status":"Runtime Error","pass":"d = input()\na, b, c = map(d.split())\n\nif (a < b) and (b < c):\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"d = input()\na, b, c = map(int, d.split())\nif (a < b) and (b < c):\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":1,"i2":3,"j1":1,"j2":2,"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\/p02392\/Python\/s458135705.py\", line 2, in \n a, b, c = map(d.split())\nTypeError: map() must have at least two arguments.\n","stdout":null} {"problem_id":"p02392","language":"Python","original_status":"Runtime Error","pass":"a, b, c = map(int, input.split())\nif a < b < c:\n print(\"Yes\")\nelse:\n print(\"No\")\n","fail":"a, b, c = map(int, input().split())\nif a < b < c:\n print(\"Yes\")\nelse:\n print(\"No\")\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"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\/p02392\/Python\/s498567988.py\", line 1, in \n a, b, c = map(int, input.split())\nAttributeError: 'builtin_function_or_method' object has no attribute 'split'\n","stdout":null} {"problem_id":"p02393","language":"Python","original_status":"Runtime Error","pass":"array = input().split().sort()\n\nfor i in array:\n print(i, end=\"\")\n","fail":"l = list(map(int, input().split()))\nl.sort()\nprint(l[0], l[1], l[2])\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":3,"error":"TypeError: 'NoneType' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02393\/Python\/s939623185.py\", line 3, in \n for i in array:\nTypeError: 'NoneType' object is not iterable\n","stdout":null} {"problem_id":"p02393","language":"Python","original_status":"Runtime Error","pass":"a = list(map(int, input().split()))\n[print(*i) for i in a.sort()]\n","fail":"a = list(map(int, input().split()))\na.sort()\nprint(\" \".join(map(str, a)))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":3,"error":"TypeError: 'NoneType' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02393\/Python\/s980569282.py\", line 2, in \n [print(*i) for i in a.sort()]\nTypeError: 'NoneType' object is not iterable\n","stdout":null} {"problem_id":"p02393","language":"Python","original_status":"Runtime Error","pass":"print(*sorted.map(int, input().split()))\n","fail":"print(*sorted(map(int, input().split())))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"AttributeError: 'builtin_function_or_method' object has no attribute 'map'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02393\/Python\/s363098812.py\", line 1, in \n print(*sorted.map(int, input().split()))\nAttributeError: 'builtin_function_or_method' object has no attribute 'map'\n","stdout":null} {"problem_id":"p02396","language":"Python","original_status":"Runtime Error","pass":"for i in range():\n inpu = int(input())\n if inpu == 0:\n break\n else:\n print(\"Case %d: %d\" % (i, inpu))\n","fail":"for i in range(1, 10001):\n inpu = int(input())\n if inpu == 0:\n break\n else:\n print(\"Case %d: %d\" % (i, inpu))\n","change":"replace","i1":0,"i2":1,"j1":0,"j2":1,"error":"TypeError: range expected at least 1 argument, got 0","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02396\/Python\/s685911962.py\", line 1, in \n for i in range():\nTypeError: range expected at least 1 argument, got 0\n","stdout":null} {"problem_id":"p02396","language":"Python","original_status":"Runtime Error","pass":"i = 1\nwhile True:\n x = int(input)\n if x == 0:\n break\n print(f\"Case {i}: {x}\")\n i += 1\n","fail":"i = 1\nwhile True:\n x = int(input())\n if x == 0:\n break\n print(f\"Case {i}: {x}\")\n i += 1\n","change":"replace","i1":2,"i2":3,"j1":2,"j2":3,"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\/p02396\/Python\/s606427724.py\", line 3, in \n x = 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":"p02396","language":"Python","original_status":"Runtime Error","pass":"array = []\nx = input()\nwhile x != 0:\n array.append(x)\n x = input()\nfor i, x in enumerate(array):\n print(\"Case %d: %d\" % (i + 1, x))\n","fail":"array = []\nx = input()\nwhile x != \"0\":\n array.append(x)\n x = input()\nfor i, x in enumerate(array):\n print(\"Case %d: %s\" % (i + 1, x))\n","change":"replace","i1":2,"i2":7,"j1":2,"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\/p02396\/Python\/s875412235.py\", line 5, in \n x = input()\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p02400","language":"Python","original_status":"Runtime Error","pass":"r = int(input())\nprint(r * r * 3.14159265359, 2 * r * 3.14159265359)\n","fail":"r = float(input())\nprint(\"{:.6f} {:.6f}\".format(r * r * 3.14159265359, 2 * r * 3.14159265359))\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"WA","stderr":null,"stdout":"12.56637061436 12.56637061436\n"} {"problem_id":"p02400","language":"Python","original_status":"Runtime Error","pass":"r = int(input())\npi = 3.141592653589793238\nprint(pi * r * r, 2 * pi * r)\n","fail":"r = float(input())\npi = 3.1415926535897932384626\nprint(pi * r * r, 2 * pi * r)\n","change":"replace","i1":0,"i2":2,"j1":0,"j2":2,"error":"WA","stderr":null,"stdout":"12.566370614359172 12.566370614359172\n"} {"problem_id":"p02400","language":"Python","original_status":"Runtime Error","pass":"r = int(input())\npi = 3.141592653589793\narea = pi * r * r\ncircum = 2 * pi * r\nprint(str(\"{0:.6f}\".format(area)) + \" \" + str(\"{0:.6f}\".format(circum)))\n","fail":"import math\n\nr = float(input())\n\narea = math.pi * r * r\ncircum = 2 * math.pi * r\nprint(str(\"{0:.6f}\".format(area)) + \" \" + str(\"{0:.6f}\".format(circum)))\n","change":"replace","i1":0,"i2":4,"j1":0,"j2":6,"error":"0","stderr":null,"stdout":"12.566371 12.566371\n"} {"problem_id":"p02400","language":"Python","original_status":"Runtime Error","pass":"from math import pi\n\nr = int(input())\n\n# \u9762\u7a4d\ncircle_area = r * r * pi\n# \u5186\u5468\ncircumference = 2.0 * r * pi\n\nprint(\"{} {}\".format(circle_area, circumference))\n","fail":"from math import pi\n\nr = float(input())\nprint(\"{} {}\".format(r * r * pi, 2 * pi * r))\n","change":"replace","i1":2,"i2":10,"j1":2,"j2":4,"error":"WA","stderr":null,"stdout":"12.566370614359172 12.566370614359172\n"} {"problem_id":"p02400","language":"Python","original_status":"Runtime Error","pass":"pi = 3.14159265359\nr = int(input())\n\nprint(f\"{r*r*pi:.6f} {2*r*pi:.6f}\")\n","fail":"pi = 3.14159265359\nr = float(input())\n\nprint(f\"{r*r*pi:.6f} {2*r*pi:.6f}\")\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"error":"0","stderr":null,"stdout":"12.566371 12.566371\n"} {"problem_id":"p02401","language":"Python","original_status":"Runtime Error","pass":"while True:\n a, op, b = map(str, input().split(\" \"))\n if a == 0 and b == 0:\n break\n a, b = int(a), int(b)\n if op == \"+\":\n c = a + b\n elif op == \"-\":\n c = a - b\n elif op == \"*\":\n c = a * b\n else:\n c = a \/ b\n print(c)\n","fail":"while True:\n a, op, b = map(str, input().split(\" \"))\n if op == \"?\":\n break\n a, b = int(a), int(b)\n if op == \"+\":\n c = a + b\n elif op == \"-\":\n c = a - b\n elif op == \"*\":\n c = a * b\n else:\n c = a \/\/ b\n print(c)\n","change":"replace","i1":2,"i2":13,"j1":2,"j2":13,"error":"ZeroDivisionError: division by zero","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02401\/Python\/s740971831.py\", line 13, in \n c = a \/ b\nZeroDivisionError: division by zero\n","stdout":"3\n38\n26\n10.0\n108\n"} {"problem_id":"p02402","language":"Python","original_status":"Runtime Error","pass":"x = [int(v) for v in input().split()]\ndel x[0]\nprint(min(x), max(x), sum(x))\n","fail":"n = int(input())\nx = [int(v) for v in input().split()]\nprint(min(x), max(x), sum(x))\n","change":"replace","i1":0,"i2":2,"j1":0,"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\/p02402\/Python\/s204473454.py\", line 3, in \n print(min(x), max(x), sum(x))\nValueError: min() arg is an empty sequence\n","stdout":null} {"problem_id":"p02402","language":"Python","original_status":"Runtime Error","pass":"input()\nli = map(int, input().split())\nprint(min(li), max(li), sum(li))\n","fail":"input()\nli = list(map(int, input().split()))\nprint(min(li), max(li), sum(li))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"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\/p02402\/Python\/s227796707.py\", line 3, in \n print(min(li), max(li), sum(li))\nValueError: max() arg is an empty sequence\n","stdout":null} {"problem_id":"p02402","language":"Python","original_status":"Runtime Error","pass":"n = int(input())\na = map(int, input().split())\nprint(min(a), max(a), sum(a))\n","fail":"n = int(input())\na = list(map(int, input().split()))\nprint(min(a), max(a), sum(a))\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"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\/p02402\/Python\/s610106422.py\", line 3, in \n print(min(a), max(a), sum(a))\nValueError: max() arg is an empty sequence\n","stdout":null} {"problem_id":"p02402","language":"Python","original_status":"Runtime Error","pass":"input()\n\na = list(map(int, input().split()))\n\ns = 0\n\nfor i in len(a):\n s = s + i\n\nprint(min(a), max(a), s)\n","fail":"input()\n\na = list(map(int, input().split()))\n\ns = 0\n\nfor i in a:\n s = s + i\n\nprint(min(a), max(a), s)\n","change":"replace","i1":6,"i2":7,"j1":6,"j2":7,"error":"TypeError: 'int' object is not iterable","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02402\/Python\/s130438338.py\", line 7, in \n for i in len(a):\nTypeError: 'int' object is not iterable\n","stdout":null} {"problem_id":"p02407","language":"Python","original_status":"Runtime Error","pass":"n = int(input)\nlst = list(map(int, input().split()))\nprint(\" \".join(lst[::-1]))\n","fail":"input()\nprint(\" \".join(input().split()[::-1]))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":2,"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\/p02407\/Python\/s871236231.py\", line 1, 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":"p02408","language":"Python","original_status":"Runtime Error","pass":"suit = {\"S\": 0, \"H\": 1, \"C\": 2, \"D\": 3}\nsuit_keys = list(suit.keys())\ndeck = [[suit_keys[i] + \" \" + str(j + 1) for j in range(13)] for i in range(4)]\nfor _ in range(int(input())):\n card = input().split()\n deck[suit[card[0]]][int(card[1])] = \"\"\nfor i in range(4):\n for j in deck[i]:\n if j != \"\":\n print(j)\n","fail":"suit = {\"S\": 0, \"H\": 1, \"C\": 2, \"D\": 3}\nsuit_keys = list(suit.keys())\ndeck = [[suit_keys[i] + \" \" + str(j + 1) for j in range(13)] for i in range(4)]\nfor _ in range(int(input())):\n card = input().split()\n deck[suit[card[0]]][int(card[1]) - 1] = \"\"\nfor i in range(4):\n for j in deck[i]:\n if j != \"\":\n print(j)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"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\/p02408\/Python\/s709538093.py\", line 6, in \n deck[suit[card[0]]][int(card[1])] = \"\"\nIndexError: list assignment index out of range\n","stdout":null} {"problem_id":"p02410","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\na = [list(map(int, input().split())) for _ in range(n)]\nb = [int(input()) for _ in range(m)]\nfor i in a:\n c = 0\n for j, k in i, b:\n c += j * k\n print(c)\n","fail":"n, m = map(int, input().split())\na = [list(map(int, input().split())) for _ in range(n)]\nb = [int(input()) for _ in range(m)]\nfor i in a:\n c = 0\n for j, k in zip(i, b):\n c += j * k\n print(c)\n","change":"replace","i1":5,"i2":6,"j1":5,"j2":6,"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\/p02410\/Python\/s783362048.py\", line 6, in \n for j, k in i, b:\nValueError: too many values to unpack (expected 2)\n","stdout":null} {"problem_id":"p02410","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\na = [[None] * n]\nb = [None] * m\nfor i in range(n):\n a[i] = list(map(int, input().split()))\nfor i in range(m):\n b[i] = int(input())\nfor i in range(n):\n c = 0\n for j in range(m):\n c += a[i][j] * b[j]\n print(c)\n","fail":"n, m = map(int, input().split())\na = [None] * n\nb = [None] * m\nfor i in range(n):\n a[i] = list(map(int, input().split()))\nfor i in range(m):\n b[i] = int(input())\nfor i in range(n):\n c = 0\n for j in range(m):\n c += a[i][j] * b[j]\n print(c)\n","change":"replace","i1":1,"i2":2,"j1":1,"j2":2,"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\/p02410\/Python\/s486424590.py\", line 5, in \n a[i] = list(map(int, input().split()))\nIndexError: list assignment index out of range\n","stdout":null} {"problem_id":"p02410","language":"Python","original_status":"Runtime Error","pass":"from sys import stdin\nimport numpy as np\n\nn, m = [int(x) for x in stdin.readline().rstrip().split()]\na = np.asarray([[int(x) for x in stdin.readline().rstrip().split()] for _ in range(n)])\nb = np.asarray([[int(stdin.readline().rstrip())] for _ in range(m)])\nc = a.dot(b)\nfor i in range(n):\n print(*c[i])\n","fail":"from sys import stdin\n\nn, m = [int(x) for x in stdin.readline().rstrip().split()]\na = [[int(x) for x in stdin.readline().rstrip().split()] for _ in range(n)]\nb = [[int(stdin.readline().rstrip())] for _ in range(m)]\nc = [[0] for _ in range(n)]\nfor i in range(n):\n for j in range(m):\n c[i][0] += a[i][j] * b[j][0]\n\nfor i in range(n):\n print(*c[i])\n","change":"replace","i1":1,"i2":7,"j1":1,"j2":10,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02410","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\nList1 = [[0 for i in range(m)] for i in range(n)]\nfor x in range(n):\n List1[x] = list(map(int, input().split()))\nList2 = [int(input()) for _ in range(n)]\nsum = [0 for i in range(n)]\nfor x in range(n):\n for y in range(m):\n sum[x] += List1[x][y] * List2[y]\nfor x in range(n):\n print(sum[x])\n","fail":"n, m = map(int, input().split())\nList1 = [[0 for i in range(m)] for i in range(n)]\nfor x in range(n):\n List1[x] = list(map(int, input().split()))\nList2 = [int(input()) for i in range(m)]\nsum = [0 for i in range(n)]\nfor x in range(n):\n for y in range(m):\n sum[x] += List1[x][y] * List2[y]\nfor x in range(n):\n print(sum[x])\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"error":"IndexError: list index out of range","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02410\/Python\/s586106678.py\", line 9, in \n sum[x] += List1[x][y] * List2[y]\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p02413","language":"Python","original_status":"Runtime Error","pass":"n, m = map(int, input().split())\na = []\nb = []\nfor i in range(n):\n a = [list(map(int, input().split()))]\n a[i] += [sum(a[i])]\nfor i in range(m):\n b += [a[:][i]]\n a += [b]\nfor i in range(n):\n print(*a[i])\n","fail":"n, m = map(int, input().split())\na = []\nb = []\nfor i in range(n):\n a += [list(map(int, input().split()))]\n a[i] += [sum(a[i])]\nfor i in range(m + 1):\n b += [sum(x[i] for x in a)]\na += [b]\nfor i in range(n + 1):\n print(*a[i])\n","change":"replace","i1":4,"i2":10,"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\/p02413\/Python\/s373324762.py\", line 6, in \n a[i] += [sum(a[i])]\nIndexError: list index out of range\n","stdout":null} {"problem_id":"p02415","language":"Python","original_status":"Runtime Error","pass":"print(input().swapcase())\n\ns = input()\n\nfor c in s:\n if c.islower():\n print(c.upper(), end=\"\")\n else:\n print(c.lower(), end=\"\")\nprint()\n","fail":"s = input()\n\nfor c in s:\n if c.islower():\n print(c.upper(), end=\"\")\n else:\n print(c.lower(), end=\"\")\nprint()\n","change":"delete","i1":0,"i2":2,"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\/p02415\/Python\/s623323382.py\", line 3, in \n s = input()\nEOFError: EOF when reading a line\n","stdout":"Fair, later, occasionally cloudy.\n"} {"problem_id":"p02417","language":"Python","original_status":"Runtime Error","pass":"count = [0 for i in range(26)]\nalpha = \"abcdefghijklmnopqrstuvwxyz\"\nwhile True:\n sentence = input()\n if sentence == \"\":\n break\n for letter in sentence:\n letter.lower()\n num = 0\n for j in alpha:\n if letter == j:\n count[num] += 1\n else:\n num += 1\nnum = 0\nfor k in alpha:\n print(k + \" : \" + str(count[num]))\n num += 1\n","fail":"import sys\n\ns = sys.stdin.read().lower()\ncount = [0 for i in range(26)]\nfor j in s:\n num = ord(j) - ord(\"a\")\n if num >= 0 and num <= 25:\n count[num] += 1\nfor k in range(26):\n print(chr(k + 97) + \" : \" + str(count[k]))\n","change":"replace","i1":0,"i2":18,"j1":0,"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\/p02417\/Python\/s778377943.py\", line 4, in \n sentence = input()\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p02419","language":"Python","original_status":"Runtime Error","pass":"W = input().lower()\nT = \"\"\nwhile True:\n t = input().lower()\n if t == \"END_OF_TEXT\":\n break\n T += t\nprint(T.count(W))\n","fail":"W = input().upper()\nT = []\nwhile True:\n t = input()\n if t == \"END_OF_TEXT\":\n break\n T += [x.upper() for x in t.split()]\nprint(T.count(W))\n","change":"replace","i1":0,"i2":7,"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\/p02419\/Python\/s097940891.py\", line 4, in \n t = input().lower()\nEOFError: EOF when reading a line\n","stdout":null} {"problem_id":"p02472","language":"Python","original_status":"Runtime Error","pass":"a = int(input())\nb = int(input())\nprint(a + b)\n","fail":"print(sum(map(int, input().split())))\n","change":"replace","i1":0,"i2":3,"j1":0,"j2":1,"error":"ValueError: invalid literal for int() with base 10: '5 8'","stderr":"Traceback (most recent call last):\n File \"\/home\/alex\/Documents\/bug-detection\/input\/Project_CodeNet\/data\/p02472\/Python\/s921485887.py\", line 1, in \n a = int(input())\nValueError: invalid literal for int() with base 10: '5 8'\n","stdout":null} {"problem_id":"p02536","language":"Python","original_status":"Runtime Error","pass":"import sys\n\n\ndef dfs(idx):\n for x in arr[idx]:\n if not vis[x]:\n vis[x] = True\n dfs(x)\n\n\nn, m = map(int, input().split())\n\narr = [[] * (n + 1) for _ in range(n + 1)]\nvis = [False] * (n + 1)\n\nfor _ in range(m):\n a, b = map(int, sys.stdin.readline().split())\n arr[a].append(b)\n arr[b].append(a)\n\nans = 0\n\ndfs(1)\nfor i in range(2, n + 1):\n if not vis[i]:\n vis[i] = True\n dfs(i)\n ans += 1\nfor i in range(1, n + 1):\n if not vis[i]:\n ans += 1\nprint(ans)\n","fail":"import sys\n\nsys.setrecursionlimit(10**6)\n\n\ndef dfs(idx):\n for x in arr[idx]:\n if not vis[x]:\n vis[x] = True\n dfs(x)\n\n\nn, m = map(int, input().split())\n\narr = [[] * (n + 1) for _ in range(n + 1)]\nvis = [False] * (n + 1)\n\nfor _ in range(m):\n a, b = map(int, sys.stdin.readline().split())\n arr[a].append(b)\n arr[b].append(a)\n\nans = 0\n\nif m == 0:\n print(n - 1)\n sys.exit()\n\ndfs(1)\nfor i in range(2, n + 1):\n if not vis[i]:\n vis[i] = True\n dfs(i)\n ans += 1\n\nprint(ans)\n","change":"replace","i1":1,"i2":31,"j1":1,"j2":35,"error":"0","stderr":null,"stdout":"1\n"} {"problem_id":"p02537","language":"Python","original_status":"Runtime Error","pass":"class SegmentTree:\n def __init__(self, n, op, e):\n self.n = 1 << (n - 1).bit_length()\n self.op = op\n self.e = e\n self.data = [e] * (2 * self.n)\n\n def update(self, k, v):\n k += self.n\n self.data[k] = v\n while k > 0:\n k >>= 1\n self.data[k] = self.op(self.data[2 * k], self.data[2 * k + 1])\n\n def query(self, left, right):\n left += self.n\n right += self.n\n l_res = self.e\n r_res = self.e\n while left < right:\n if left & 1:\n l_res = self.op(l_res, self.data[left])\n left += 1\n left >>= 1\n if right & 1:\n right -= 1\n r_res = self.op(self.data[right], r_res)\n right >>= 1\n return self.op(l_res, r_res)\n\n\nN, K, *A = map(int, open(0).read().split())\nt = SegmentTree(400_000, max, 0)\ndp = [1] * N\nans = 0\nfor i in range(N):\n a = A[i]\n t.update(a, 1 + t.query(max(1, a - K), a + K + 1))\nprint(t.query(0, 400_000))\n","fail":"class SegmentTree:\n def __init__(self, n, op, e):\n self.n = 1 << (n - 1).bit_length()\n self.op = op\n self.e = e\n self.data = [e] * (2 * self.n)\n\n def update(self, k, v):\n k += self.n\n self.data[k] = v\n while k > 0:\n k >>= 1\n self.data[k] = self.op(self.data[2 * k], self.data[2 * k + 1])\n\n def query(self, left, right):\n left += self.n\n right += self.n\n l_res = self.e\n r_res = self.e\n while left < right:\n if left & 1:\n l_res = self.op(l_res, self.data[left])\n left += 1\n left >>= 1\n if right & 1:\n right -= 1\n r_res = self.op(self.data[right], r_res)\n right >>= 1\n return self.op(l_res, r_res)\n\n\nN, K, *A = map(int, open(0).read().split())\nt = SegmentTree(650_000, max, 0)\nans = 0\nfor a in A:\n t.update(a, 1 + t.query(max(0, a - K), min(a + K, 300_000) + 1))\nprint(t.query(0, 300_001))\n","change":"replace","i1":32,"i2":39,"j1":32,"j2":37,"error":"0","stderr":null,"stdout":7.0} {"problem_id":"p02540","language":"Python","original_status":"Time Limit Exceeded","pass":"class 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 self.size = [1 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 self.size[x] += self.size[y]\n\n def is_same(self, x, y):\n return self.find(x) == self.find(y)\n\n def get_size(self, x):\n x = self.find(x)\n return self.size[x]\n\n\nN = int(input())\n\nuf = UnionFind(N)\n\nxy = []\nmin_y = []\nfor i in range(N):\n x, y = map(int, input().split())\n xy.append((x, y, i))\n min_y.append(y)\n\nxy.sort()\n\ns = set()\n\nfor i in range(N):\n x, y, a = xy[i]\n s.add(i)\n\n remove = set()\n for j in s:\n if j == i:\n continue\n\n x2, y2, b = xy[j]\n\n if y2 < y:\n uf.union(b, a)\n root = uf.find(b)\n if min_y[root] > y:\n min_y[root] = y\n remove.add(j)\n else:\n remove.add(i)\n s -= remove\n\nfor i in range(N):\n print(uf.get_size(i))\n","fail":"class 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 self.size = [1 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 self.size[x] += self.size[y]\n\n def is_same(self, x, y):\n return self.find(x) == self.find(y)\n\n def get_size(self, x):\n x = self.find(x)\n return self.size[x]\n\n\nN = int(input())\n\nuf = UnionFind(N)\n\nxy = []\nmin_y = []\nfor i in range(N):\n x, y = map(int, input().split())\n xy.append((x, y, i))\n min_y.append(y)\n\nxy.sort()\n\nmin_y = N + 1\n\nfor i in range(N - 1):\n x, y, a = xy[i]\n x1, y1, b = xy[i + 1]\n min_y = min(min_y, y)\n if min_y != N - i:\n uf.union(a, b)\n\nfor i in range(N):\n print(uf.get_size(i))\n","change":"replace","i1":45,"i2":67,"j1":45,"j2":53,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02542","language":"Python","original_status":"Runtime Error","pass":"import networkx as nx\n\nn, m = map(int, input().split())\n\nS = [list(input()) for _ in range(n)]\nG = nx.DiGraph()\n\nstart = (n, m)\ncnt = 0\ngoal = (n, m + 1)\n\nfor i in range(n):\n for j in range(n):\n if S[i][j] != \"#\":\n if S[i][j] == \"o\":\n cnt += 1\n G.add_edge(start, (i, j), capacity=1)\n if i + 1 < n:\n if S[i + 1][j] != \"#\":\n G.add_edge((i, j), (i + 1, j), weight=-1)\n if j + 1 < m:\n if S[i][j + 1] != \"#\":\n G.add_edge((i, j), (i, j + 1), weight=-1)\n G.add_edge((i, j), goal, capacity=1)\n# G.add_node(start, demand=cnt)\n# G.add_node(goal, demand=-cnt)\nmincostflow = nx.max_flow_min_cost(G, start, goal)\nans = nx.cost_of_flow(G, mincostflow)\nprint(abs(ans))\n","fail":"import networkx as nx\n\nn, m = map(int, input().split())\n\nS = [list(input()) for _ in range(n)]\nG = nx.DiGraph()\n\nstart = (n, m)\ncnt = 0\ngoal = (n, m + 1)\n\nfor i in range(n):\n for j in range(m):\n if S[i][j] != \"#\":\n if S[i][j] == \"o\":\n cnt += 1\n G.add_edge(start, (i, j), capacity=1)\n if i + 1 < n:\n if S[i + 1][j] != \"#\":\n G.add_edge((i, j), (i + 1, j), weight=-1)\n if j + 1 < m:\n if S[i][j + 1] != \"#\":\n G.add_edge((i, j), (i, j + 1), weight=-1)\n G.add_edge((i, j), goal, capacity=1)\n# G.add_node(start, demand=cnt)\n# G.add_node(goal, demand=-cnt)\nmincostflow = nx.max_flow_min_cost(G, start, goal)\nans = nx.cost_of_flow(G, mincostflow)\nprint(abs(ans))\n","change":"replace","i1":12,"i2":13,"j1":12,"j2":13,"error":"0","stderr":null,"stdout":4.0} {"problem_id":"p02546","language":"Python","original_status":"Runtime Error","pass":"N = input()\n\nif N[len(N) - 1] == \"s\":\n N += \"es\"\nelse:\n N += \"s\"\nprint(N)\nN = input()\n\nif N[len(N) - 1] == \"s\":\n N += \"es\"\nelse:\n N += \"s\"\nprint(N)\n","fail":"N = input()\n\nif N[len(N) - 1] == \"s\":\n N += \"es\"\nelse:\n N += \"s\"\nprint(N)\n","change":"delete","i1":7,"i2":14,"j1":7,"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\/p02546\/Python\/s030233294.py\", line 8, in \n N = input()\nEOFError: EOF when reading a line\n","stdout":"apples\n"} {"problem_id":"p02548","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\nresult = 0\nfor i in range(1, N + 1):\n s = int(N \/ i) + 1\n for j in range(1, s + 1):\n if N - i * j > 0:\n result = result + 1\n else:\n break\nprint(result)\n","fail":"N = int(input())\nresult = 0\nfor i in range(1, N + 1):\n s = int(N \/ i) + 1\n for j in range(s + 1, 0, -1):\n if N - i * j > 0:\n result = result + j\n break\nprint(result)\n","change":"replace","i1":4,"i2":8,"j1":4,"j2":7,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02548","language":"Python","original_status":"Time Limit Exceeded","pass":"N = int(input())\n\nresult = 0\nfor A in range(1, N + 1):\n for B in range(1, (N \/\/ A) + 1):\n C = N - A * B\n if C == 0:\n continue\n result += 1\nprint(result)\n","fail":"N = int(input())\n\nresult = 0\nfor A in range(1, N + 1):\n result += (N - 1) \/\/ A\nprint(result)\n","change":"replace","i1":4,"i2":9,"j1":4,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02548","language":"Python","original_status":"Time Limit Exceeded","pass":"n = int(input())\n\n# \u7d04\u6570\u5217\u6319O(\u221aN)\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5) + 1):\n if n % i == 0:\n divisors.append(i)\n if i != n \/\/ i:\n divisors.append(n \/\/ i)\n\n return divisors\n\n\nans = 0\nfor c in range(1, n):\n ans += len(make_divisors(n - c))\nprint(ans)\n","fail":"n = int(input())\nans = 0\nfor a in range(1, n):\n for b in range(1, n):\n if a * b >= n:\n break\n else:\n ans += 1\nprint(ans)\n","change":"replace","i1":1,"i2":19,"j1":1,"j2":8,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02548","language":"Python","original_status":"Time Limit Exceeded","pass":"from collections import Counter\n\nN = int(input())\n\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n \/\/= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n \/\/= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\n\ncount = 0\nfor c in range(1, N):\n d = Counter(prime_factorize(N - c))\n\n tmp = 1\n for x in d.values():\n tmp *= x + 1\n count += tmp\n\nprint(count)\n","fail":"N = int(input())\nans = 0\nfor a in range(1, N):\n ans += (N - 1) \/\/ a\nprint(ans)\n","change":"replace","i1":0,"i2":32,"j1":0,"j2":5,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02548","language":"Python","original_status":"Runtime Error","pass":"# coding:utf-8\nn = int(input())\nans = 0\n\nfor a in range(n):\n ans += (n - 1) \/\/ a\n\nprint(ans)\n","fail":"# coding:utf-8\nn = int(input())\nans = 0\n\nfor a in range(1, n):\n ans += (n - 1) \/\/ a\n\nprint(ans)\n","change":"replace","i1":4,"i2":5,"j1":4,"j2":5,"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\/p02548\/Python\/s983821669.py\", line 6, in \n ans += (n - 1) \/\/ a\nZeroDivisionError: integer division or modulo by zero\n","stdout":null} {"problem_id":"p02549","language":"Python","original_status":"Runtime Error","pass":"p = 998244353\nn, k = map(int, input().split())\nLRs = [tuple(map(int, input().split())) for _ in range(k)]\nA = [0] * (2 * n)\nfor lj, rj in LRs:\n A[lj] += 1\n A[rj + 1] -= 1\ns = 0\nfor i in range(1, n):\n s = (s + A[i]) % p\n for lj, rj in LRs:\n A[i + lj] += s\n A[i + rj + 1] -= s\nprint(s)\n","fail":"p = 998244353\nn, k = map(int, input().split())\nLRs = [tuple(map(int, input().split())) for _ in range(k)]\nA = [0] * (2 * n + 1)\nfor lj, rj in LRs:\n A[lj] += 1\n A[rj + 1] -= 1\ns = 0\nfor i in range(1, n):\n s = (s + A[i]) % p\n for lj, rj in LRs:\n A[i + lj] += s\n A[i + rj + 1] -= s\nprint(s)\n","change":"replace","i1":3,"i2":4,"j1":3,"j2":4,"error":"0","stderr":null,"stdout":"4\n"} {"problem_id":"p02549","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nLR = [list(map(int, input().split())) for _ in range(K)]\n\ndp = [0] * (N + 1)\ndpsum = [0] * (N + 1)\ndp[1] = 1\ndpsum[1] = 1\nfor i in range(2, N + 1):\n for j in range(K):\n li = max(i - LR[j][1], 1)\n ri = i - LR[j][0]\n if ri < 0:\n continue\n dp[i] += dpsum[ri] - dpsum[li - 1]\n dpsum[i] = dpsum[i - 1] + dp[i]\n\nprint(dp[N] % 998244353)\n","fail":"N, K = map(int, input().split())\nLR = [list(map(int, input().split())) for _ in range(K)]\n\n\nmod = 998244353\ndp = [0] * (N + 1)\ndpsum = [0] * (N + 1)\ndp[1] = 1\ndpsum[1] = 1\nfor i in range(2, N + 1):\n for j in range(K):\n li = max(i - LR[j][1], 1)\n ri = i - LR[j][0]\n if ri < 0:\n continue\n dp[i] += dpsum[ri] - dpsum[li - 1]\n dp[i] %= mod\n dpsum[i] = dpsum[i - 1] + dp[i]\n\nprint(dp[N])\n","change":"replace","i1":3,"i2":17,"j1":3,"j2":20,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02549","language":"Python","original_status":"Time Limit Exceeded","pass":"n, k = map(int, input().split())\nmod = 998244353\ns = list()\nfor _ in range(k):\n l, r = map(int, input().split())\n s += range(l, r + 1)\ns.sort()\ndp = [0 for _ in range(n)]\ndp[0] = 1\nfor i in range(n):\n for x in s:\n if x + i > n - 1:\n break\n dp[i + x] = (dp[i + x] + dp[i]) % mod\n\nprint(dp[-1])\n","fail":"n, k = map(int, input().split())\nLR = [tuple(map(int, input().split())) for _ in range(k)]\ndp = [0 for _ in range(n + 1)]\ndp[1] = 1\ns = 0\nmod = 998244353\n\nfor i in range(1, n + 1):\n s += dp[i]\n for l, r in LR:\n if i + l <= n:\n dp[i + l] = (dp[i + l] + s) % mod\n if i + r + 1 <= n:\n dp[i + r + 1] = (dp[i + r + 1] - s) % mod\n\nprint(dp[n])\n","change":"replace","i1":1,"i2":16,"j1":1,"j2":16,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02549","language":"Python","original_status":"Time Limit Exceeded","pass":"def main():\n n, k = map(int, input().split())\n ds = set()\n for _ in range(k):\n l, r = map(int, input().split())\n ds = ds | {i for i in range(l, r + 1)}\n dp = [0] * (n + 1)\n dp[1] = 1\n\n for i in range(1, n + 1):\n for d in ds:\n if i + d <= n:\n dp[i + d] = (dp[i + d] + dp[i]) % 998244353\n\n print(dp[-1] % 998244353)\n\n\nif __name__ == \"__main__\":\n main()\n","fail":"def main():\n n, k = map(int, input().split())\n lr = [list(map(int, input().split())) for _ in range(k)]\n dp = [0] * (n + 1)\n dp[1] = 1\n dpsum = [0] * (n + 1)\n dpsum[1] = 1\n mod = 998244353\n\n for i in range(2, n + 1):\n for j in range(k):\n li = i - lr[j][1]\n ri = i - lr[j][0]\n if ri < 0:\n continue\n dp[i] = (dp[i] + dpsum[ri] - dpsum[li - 1]) % mod\n dpsum[i] = dpsum[i - 1] + dp[i]\n\n print(dp[-1] % mod)\n\n\nif __name__ == \"__main__\":\n main()\n","change":"replace","i1":2,"i2":15,"j1":2,"j2":19,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02549","language":"Python","original_status":"Time Limit Exceeded","pass":"N, K = map(int, input().split())\nmod = 998244353\n\nLR = [tuple(map(int, input().split())) for _ in range(K)]\nLR.sort()\n\ndp = [0] * (N + 1)\ndp[1] = 1\nfor i in range(1, N):\n if dp[i] <= 0:\n continue\n for L, R in LR:\n for d in range(L, R + 1):\n if i + d < N + 1:\n dp[i + d] += dp[i]\n dp[i + d] %= mod\n\nprint(dp[N])\n","fail":"N, K = map(int, input().split())\nmod = 998244353\n\nLR = [tuple(map(int, input().split())) for _ in range(K)]\nLR.sort()\n\ndpsum = [0] * (N + 1)\ndpsum[1] = 1\ndp = [0] * (N + 1)\ndp[1] = 1\n\nfor i in range(2, N + 1):\n for L, R in LR:\n l = i - R\n r = i - L\n\n if r < 0:\n continue\n l = max(l, 0)\n\n dp[i] += dpsum[r] - dpsum[l - 1]\n dp[i] %= mod\n dpsum[i] = dpsum[i - 1] + dp[i]\n\nprint(dp[N])\n","change":"replace","i1":6,"i2":16,"j1":6,"j2":23,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02555","language":"Python","original_status":"Runtime Error","pass":"S = int(input())\nMOD = 10**9 + 7\nA = [0] * (S + 1)\nA[0] = 1\nA[1] = 0\nA[2] = 0\n\ncumsum = 1\nfor i in range(3, len(A)):\n A[i] = cumsum\n cumsum += A[i - 2]\n cumsum %= MOD\nprint(A[-1])\n","fail":"S = int(input())\nif S == 1:\n print(0)\n exit()\nMOD = 10**9 + 7\nA = [0] * (S + 1)\nA[0] = 1\nA[1] = 0\nA[2] = 0\n\ncumsum = 1\nfor i in range(3, len(A)):\n A[i] = cumsum\n cumsum += A[i - 2]\n cumsum %= MOD\nprint(A[-1])\n","change":"insert","i1":1,"i2":1,"j1":1,"j2":4,"error":"0","stderr":null,"stdout":3.0} {"problem_id":"p02555","language":"Python","original_status":"Time Limit Exceeded","pass":"s = int(input())\n\n\ndef dfs(n):\n if n <= 2:\n return 0\n elif n == 3:\n return 1\n else:\n count = 1\n for i in range(3, n + 1):\n count += dfs(n - i)\n\n return count\n\n\nans = dfs(s)\nprint(ans)\n","fail":"from functools import lru_cache\nimport sys\n\nsys.setrecursionlimit(2000)\n\ns = int(input())\nmod = 10**9 + 7\n\n\n@lru_cache(maxsize=None)\ndef dfs(n):\n if n <= 2:\n return 0\n elif n == 3:\n return 1\n else:\n count = 1\n for i in range(3, n + 1):\n count += dfs(n - i)\n count %= mod\n\n return count % mod\n\n\nans = dfs(s)\nprint(ans)\n","change":"replace","i1":0,"i2":14,"j1":0,"j2":22,"error":"TLE","stderr":null,"stdout":null} {"problem_id":"p02558","language":"Python","original_status":"Time Limit Exceeded","pass":"from typing import List\n\n\nclass DSU:\n def __init__(self, n: int) -> None:\n self._n = n\n self.parent_or_size = [-1] * n\n\n def merge(self, a: int, b: int) -> int:\n assert 0 <= a <= self._n\n assert 0 <= b <= self._n\n x, y = self.leader(a), self.leader(b)\n if x == y:\n return x\n if -self.parent_or_size[x] < -self.parent_or_size[y]:\n x, y = y, x\n self.parent_or_size[x] += self.parent_or_size[y]\n self.parent_or_size[y] = x\n return x\n\n def same(self, a: int, b: int) -> bool:\n assert 0 <= a <= self._n\n assert 0 <= b <= self._n\n return self.leader(a) == self.leader(b)\n\n def leader(self, a: int) -> int:\n assert 0 <= a < self._n\n stack = []\n while self.parent_or_size[a] >= 0:\n stack.append(a)\n for i in stack:\n self.parent_or_size[i] = a\n return a\n\n def size(self, a: int) -> int:\n assert 0 <= a <= self._n\n return -self.parent_or_size[self.leader(a)]\n\n def groups(self) -> List[List[int]]:\n leader_buf = [self.leader(i) for i in range(self._n)]\n group_size = [0] * self._n\n for i in leader_buf:\n group_size[i] += 1\n result = [[] for _ in range(self._n)]\n for i in range(self._n):\n result[leader_buf[i]].append(i)\n result = [i for i in result if i]\n return result\n\n\nn, q = map(int, input().split())\ndsu = DSU(n)\n\nfor _ in range(q):\n t, u, v = map(int, input().split())\n if t == 0:\n dsu.merge(u, v)\n else:\n print(1 if dsu.same(u, v) else 0)\n","fail":"from typing import List\n\n\nclass DSU:\n def __init__(self, n: int) -> None:\n self._n = n\n self.parent_or_size = [-1] * n\n\n def merge(self, a: int, b: int) -> int:\n assert 0 <= a <= self._n\n assert 0 <= b <= self._n\n x, y = self.leader(a), self.leader(b)\n if x == y:\n return x\n if -self.parent_or_size[x] < -self.parent_or_size[y]:\n x, y = y, x\n self.parent_or_size[x] += self.parent_or_size[y]\n self.parent_or_size[y] = x\n return x\n\n def same(self, a: int, b: int) -> bool:\n assert 0 <= a <= self._n\n assert 0 <= b <= self._n\n return self.leader(a) == self.leader(b)\n\n def leader(self, a: int) -> int:\n assert 0 <= a < self._n\n stack = []\n while self.parent_or_size[a] >= 0:\n stack.append(a)\n a = self.parent_or_size[a]\n for i in stack:\n self.parent_or_size[i] = a\n return a\n\n def size(self, a: int) -> int:\n assert 0 <= a <= self._n\n return -self.parent_or_size[self.leader(a)]\n\n def groups(self) -> List[List[int]]:\n leader_buf = [self.leader(i) for i in range(self._n)]\n group_size = [0] * self._n\n for i in leader_buf:\n group_size[i] += 1\n result = [[] for _ in range(self._n)]\n for i in range(self._n):\n result[leader_buf[i]].append(i)\n result = [i for i in result if i]\n return result\n\n\nn, q = map(int, input().split())\ndsu = DSU(n)\n\nfor _ in range(q):\n t, u, v = map(int, input().split())\n if t == 0:\n dsu.merge(u, v)\n else:\n print(1 if dsu.same(u, v) else 0)\n","change":"insert","i1":30,"i2":30,"j1":30,"j2":31,"error":"TLE","stderr":null,"stdout":null}