problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p02661 | u497952650 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nab = []\nfor i in range(N):\n ab.append(tuple(map(int,input().split())))\n \nup = sorted(ab,key=lambda a:a[0],reverse=True)\ndown = sorted(ab,key=lambda a:a[1],reverse=True)\n \nif N%2 == 1:\n print(up[N//2][1]-down[N//2][0]+1)\nelse:\n up2 = sorted(ab,key=lambda a:a[0],reverse=True)\n down2... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s295446843', 's605282059', 's448027746'] | [9072.0, 25348.0, 42184.0] | [26.0, 455.0, 575.0] | [441, 275, 343] |
p02661 | u521866787 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n=int(input())\na=[]\nb=[]\nfor i in range(n):\n tmpa,tmpb = map(int,input().split())\n a.append(tmpa)\n b.append(tmpb)\n\na.sort()\nb.sort()\n\nif n%2==1:\n print(b[n//2] - a[n//2] +1)\nelse:\n print((b[n//2+2]-b[n//2+1]) - (a[n//2+2]-a[n//2+1]) +1)\n', '\nn=int(input())\na=[]\nb=[]\nfor i in range(n)... | ['Runtime Error', 'Accepted'] | ['s264638746', 's627098023'] | [25352.0, 25476.0] | [469.0, 470.0] | [252, 249] |
p02661 | u522945737 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\n\na = np.zeros(n,dtype=int)\nb = np.zeros(n,dtype=int)\n\nfor i in range(n):\n a[i],b[i] = map(float, input().split())\n\n\nif n==2:\n a0 = [a[0]]\n b0 = [b[0]]\n if a[1]>=a[0]:\n a0.append(a[1])\n else:\n a0.insert(0,a[1])\n if b[1]>=a[0]:\n b0.append(b[1])\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s401792062', 's528606738', 's609617722', 's213782287'] | [9284.0, 9224.0, 9360.0, 29656.0] | [23.0, 26.0, 24.0, 504.0] | [1444, 1338, 1405, 436] |
p02661 | u525796732 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys\nimport math\nimport fractions\nfrom collections import defaultdict\nstdin = sys.stdin\n \nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\n\n\nN=int(input())\nmi... | ['Wrong Answer', 'Accepted'] | ['s268149310', 's869102225'] | [26716.0, 26704.0] | [315.0, 328.0] | [570, 575] |
p02661 | u561231954 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ["import sys\nsys.setrecursionlimit(10000000)\nMOD = 10 ** 9 + 7\nINF = 10 ** 15\n \ndef main():\n N = int(input())\n A = []\n B = []\n for _ in range(N):\n a,b = map(int,input().split())\n A.append(a)\n B.append(b)\n \n A.sort()\n B.sort()\n if N%2 == 0:\n L = (A[N/... | ['Wrong Answer', 'Accepted'] | ['s416107103', 's723556558'] | [25548.0, 25364.0] | [453.0, 435.0] | [520, 508] |
p02661 | u571867512 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['def median(A,N):\n A.sort()\n if N % 2 == 1:\n return A[N//2]\n else:\n return (A[(N-1)//2] + A[(N-1)//2+1])/2\n\ndef main():\n N = int(input())\n AB = [list(map(int,input().split())) for _ in range(N)]\n\n A = [AB[i][0] for i in range(N)]\n B = [AB[i][1] for i in range(N)]\n\n i... | ['Wrong Answer', 'Accepted'] | ['s822888728', 's222050881'] | [49212.0, 49344.0] | [500.0, 502.0] | [534, 389] |
p02661 | u583276018 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\ns = []\nzyogen = []\nkagen = []\nfor i in range(n):\n k, z = map(int, input().split())\n kagen.append(k)\n zyogen.append(z)\n\nkk = sorted(kagen)\nzz = sorted(zyogen)\nif(n % 2 == 0):\n aa = n // 2\n x = kk[aa-1] + kk[a]\n y = zz[aa-1] + zz[a]\n print(y-x+1)\nelse:\n aa = n /... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s170476613', 's579028831', 's639111482', 's686581698', 's963781373', 's057455206'] | [28556.0, 24856.0, 24816.0, 24868.0, 24852.0, 28616.0] | [473.0, 383.0, 383.0, 386.0, 380.0, 470.0] | [356, 329, 350, 347, 329, 358] |
p02661 | u589783652 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nlower = []\nupper = []\nfor i in range(N):\n a, b = map(int, input().split())\n lower.append(a)\n upper.append(b)\nlower.sort()\nupper.sort()\nif N % 2 == 1:\n print(upper[(N+1)//2]-lower[(N+1)//2]+1)\nelse:\n print(upper[N//2 + 1]+upper[N//2]-lower[N//2 + 1]-lower[N//2]+1)', 'N = int... | ['Runtime Error', 'Accepted'] | ['s040697283', 's781694216'] | [25524.0, 25404.0] | [473.0, 474.0] | [295, 295] |
p02661 | u589913372 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import heapq as hp\nn = int(input())\nif n%2 ==0:\n m = n//2 + 1\nelse:\n m = (n+1) //2\na,b = [],[]\nfor i in (0,n):\n c = list(map(int, input().split()))\n a.append(c[0])\n b.append(c[1])\nprint(a,b)\nla = hp.nlargest(m,a)\nlb = hp.nlargest(m,b)\nif n%2 == 0:\n c = la[-1] + la[-2] \n d = lb[-1]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s349836942', 's622169310', 's387863627'] | [9244.0, 36756.0, 36844.0] | [24.0, 952.0, 1010.0] | [370, 369, 356] |
p02661 | u593567568 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys\n\nsys.setrecursionlimit(10 ** 7)\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = int(readline())\nAB = [list(map(int, readline().split())) for _ in range(N)]\n\nLINE = []\nfor a, b in AB:\n LINE.append((a, 0))\n LINE.append((b + 1,... | ['Wrong Answer', 'Accepted'] | ['s871578445', 's443678603'] | [81904.0, 132796.0] | [911.0, 1646.0] | [1580, 1369] |
p02661 | u607075479 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys\nimport math\nfrom collections import deque\n\nsys.setrecursionlimit(1000000)\nMOD = 10 ** 9 + 7\ninput = lambda: sys.stdin.readline().strip()\nNI = lambda: int(input())\nNMI = lambda: map(int, input().split())\nNLI = lambda: list(NMI())\nSI = lambda: input()\n\n\ndef make_grid(h, w, num): return [[int(num... | ['Wrong Answer', 'Accepted'] | ['s407528208', 's678202808'] | [25828.0, 25752.0] | [291.0, 299.0] | [1223, 1228] |
p02661 | u627600101 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nA = [0 for _ in range(N)]\nB = [0 for _ in range(N)]\nimport statistics\nfor k in range(N):\n A[k], B[k] = map(int, input().split())\n\nif N%2 == 1:\n print(statistics.median(B) - statistics.median(A) +1)\nelse:\n print((statistics.median(B) - statistics.median(A))*2 +1)', 'N = int(input())\nA = ... | ['Wrong Answer', 'Accepted'] | ['s499372986', 's440112205'] | [28960.0, 28892.0] | [471.0, 449.0] | [282, 287] |
p02661 | u638456847 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['from bisect import bisect_right\nimport sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\ndef main():\n N,*ab = map(int, read().split())\n\n AB = []\n for a, b in zip(*[iter(ab)]*2):\n AB.append((a, b))\n\n ans = 0\n AB.sort()\n a, b = AB[N // 2]\n ... | ['Runtime Error', 'Accepted'] | ['s539018925', 's824512597'] | [3070892.0, 54580.0] | [2292.0, 220.0] | [570, 562] |
p02661 | u642015143 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['from statistics import median\n\nn = int(input())\n\na = []\nb = []\n\nfor _ in range(n):\n x, y = map(int, input().split())\n a.append(x)\n b.append(y)\n\nprint(median(b) - median(a) + 1)\n', 'n = int(input())\n\na = []\nb = []\n\nfor _ in range(n):\n x, y = map(int, input().split())\n a.append(x)\n ... | ['Wrong Answer', 'Accepted'] | ['s447299847', 's817463639'] | [28868.0, 25504.0] | [488.0, 454.0] | [186, 277] |
p02661 | u651109406 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nA, B = [], []\nfor i in range(N):\n tm, p = map(int, input().split())\n A.append(tm), B.append(p)\nA.sort(), B.sort()\n\na = A[N // 2] * 2 if N % 2 == 1 else A[N // 2] + A[N // 2 + 1]\nb = B[N // 2] * 2 if N % 2 == 1 else B[N // 2] + B[N // 2 + 1]\nprint((b - a) // 2 + 1)\n', 'N = int(input())... | ['Runtime Error', 'Accepted'] | ['s174189740', 's191275334'] | [25480.0, 25556.0] | [472.0, 472.0] | [288, 318] |
p02661 | u652656291 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nAB = [int(input().split()) for _ in range(n)]\n \nA = AB[::2]\nB = AB[1::2]\n \nA.sort()\nB.sort()\n \nif N % 2 == 0:\n n = N // 2\n med1 = A[n - 1] + A[n]\n med2 = B[n - 1] + B[n]\n x = med2 - med1 + 1\nelse:\n n = N // 2\n med1 = A[n]\n med2 = B[n]\n x = med2 - med1 + 1\n \... | ['Runtime Error', 'Accepted'] | ['s424726372', 's458519057'] | [9212.0, 49232.0] | [22.0, 548.0] | [307, 363] |
p02661 | u677121387 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\nx = [[int(i) for i in input().split()] for _ in range(n)]\nx.sort(key=lambda x:x[0])\ny = sorted(x,key=lambda x:x[1],reverse=True)\nif n%2 == 1:\n c = n//2\n if x[c][1] >= y[c][0]:\n ans = y[c][1] - x[c][0] + 1\n else:\n ans = x[c][1] - x[c][0] + y[c][1] - y[c][0] + 2\n pri... | ['Wrong Answer', 'Accepted'] | ['s413858797', 's738256398'] | [46984.0, 25448.0] | [832.0, 464.0] | [749, 296] |
p02661 | u679520304 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nA = []\nB = []\nfor _ in range(N):\n a,b = map(int,input().split())\n A.append(a)\n B.append(b)\nA.sort()\nB.sort()\nfrom statistics import median\nAm = median(A)\nBm = median(B)\nif N%2==1:\n ans = Bm-Am+1\nelse:\n ans = int(Bm-Am)*2+1', 'N = int(input())\nA = []\nB = []\nfor _ in ra... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s322415877', 's730656146', 's545512877'] | [28660.0, 28576.0, 28940.0] | [527.0, 499.0, 497.0] | [254, 256, 268] |
p02661 | u680851063 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\n\nls = []\nrs = []\nfor _ in range(n):\n x, y = map(int, input().split())\n ls.append(x)\n rs.append(y)\n\nif n % 2 == 1:\n print(rs[len(rs)//2] - ls[len(ls)//2] + 1)\nelse:\n a = (rs[len(rs)//2-1] * 10 + rs[len(rs)//2] * 10) / 2\n b = (ls[len(ls)//2-1] * 10 + ls[len(ls)//2] * 10) ... | ['Wrong Answer', 'Accepted'] | ['s110633556', 's439576451'] | [24944.0, 27048.0] | [379.0, 474.0] | [336, 371] |
p02661 | u687044304 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['# -*- coding:utf-8 -*-\n\ndef solve():\n N = int(input())\n Ls, Rs = [], []\n for i in range(N):\n a, b = list(map(int, input().split()))\n Ls.append(a), Rs.append(b)\n\n ans = 0\n if N%2 == 0:\n \n l = Ls[N//2]\n r = Rs[N//2]\n ans = r-l+1\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s061084557', 's921095622'] | [24700.0, 25400.0] | [378.0, 450.0] | [484, 509] |
p02661 | u690536347 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nl = []\nfor _ in range(N):\n A, B = map(int, input().split())\n l.append((A, B))\n\nt = N//2\ntl = sorted(l)\ntr = sorted(l, key=lambda x:-x[1])\n\nif N%2:\n print(tr[t][1]-tl[t][0]+1)\nelse:\n print(1)\n', 'N = int(input())\nt = N//2\nla, lb = [], []\nfor _ in range(N):\n A, B = map(... | ['Wrong Answer', 'Accepted'] | ['s698045836', 's093402731'] | [48888.0, 25336.0] | [607.0, 464.0] | [220, 215] |
p02661 | u691896522 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import bisect\nn = int(input())\na = []\nb = []\n\nfor i in range(n):\n m, p = map(int, input().split())\n a.append(m)\n b.append(p)\na.sort()\nb.sort()\nmiddle = n // 2\nif n % 2:\n print(b[middle] - a[middle] + 1)\nelse: \n a_m = ( a[middle] + a[middle - 1] ) / 2\n b_m = ( b[middle] + b[middle - 1... | ['Wrong Answer', 'Accepted'] | ['s573369355', 's986187464'] | [25568.0, 25568.0] | [462.0, 469.0] | [345, 350] |
p02661 | u699008198 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int( input())\nA = []\nB = []\n\nfor i in range( n ):\n a, b = map( int, input().split() )\n A.append( a )\n B.append( b )\n\nA = sorted( A )\nB = sorted( B )\n\nif n % 2 == 0:\n i1 = n // 2 - 1\n i2 = n // 2\n print( (( B[ i2 ] + A[ i2 ] ) - ( B[ i1 ] + A[ i1 ] )) // 2 + 1 )\nelse:\n i = ( n + 1 ) // 2 - ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s419798474', 's558604227', 's559576342', 's993772783', 's030959992'] | [26920.0, 27108.0, 27108.0, 27108.0, 26928.0] | [475.0, 478.0, 468.0, 469.0, 484.0] | [337, 326, 329, 308, 326] |
p02661 | u711539583 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\nab = [list(map(int, input().split())) for _ in range(n)]\nab.sort()\nl = ab[(n+1)//2-1][0]\nab.sort(key=lambda x:x[1], reverse=True)\nr = ab[(n+1)//2-1][1]\n\nif n % 2 == 0:\n print(1/0)\nprint(r-l+1)', 'n = int(input())\nab = [list(map(int, input().split())) for _ in range(n)]\nab.sort()\nl = ab... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s043515849', 's499108474', 's658395431'] | [48832.0, 48880.0, 49028.0] | [868.0, 961.0, 924.0] | [212, 193, 419] |
p02661 | u727148417 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ["import sys \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = int(input())\nA = [0]*N\nB = [0]*N\ni = 0\nfor line in readlines():\n A[i], B[i] = map(int, line.rstrip().decode('utf-8').split())\n i+=1\nsA = sorted(A)\nsB = sorted(B)\nif N % 2 == 0:... | ['Runtime Error', 'Accepted'] | ['s792447449', 's241712743'] | [39116.0, 28508.0] | [302.0, 489.0] | [434, 279] |
p02661 | u731368968 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\nAB = [tuple(map(int, input().split())) for i in range(n)]\nA = [AB[i][0] for i in range(n)]\nB = [AB[i][1] for i in range(n)]\n\n\n\nA.sort()\nB.sort()\n\nif n % 2 == 1:\n print(B[n // 2] - A[n // 2] + 1)\n\nprint(A, B)\n\nif n % 2 == 0:\n # x = abs(A[n // 2 - 1] + B[n // 2])\n \n # prin... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s714913757', 's906444542', 's132025854'] | [44044.0, 39672.0, 39572.0] | [577.0, 502.0, 482.0] | [615, 354, 607] |
p02661 | u734195782 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\na = []\nb = []\nfor i in range(n):\n a[i],b[i] = map(int, input().split())\na.sort()\nb.sort()\nif n%2 == 1:\n \tprint(b[(n+1)//2]-a[(n+1)//2]+1)\nelse:\n\tprint(b[n//2]-a[n//2]+b[n//2+1]-a[n//2+1]+1)', 'n = int(input())\na = []\nb = []\nfor i in range(n):\n a1,b1 = map(int, input().split()... | ['Runtime Error', 'Accepted'] | ['s929296391', 's775307009'] | [9140.0, 25432.0] | [23.0, 473.0] | [212, 245] |
p02661 | u744054041 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['def main(N, lines):\n a = sorted(map(lambda line: line[0], lines))\n b = sorted(map(lambda line: line[1], lines))\n\n if N % 2 == 1:\n mi = a[N // 2]\n ma = b[N // 2]\n print(ma - mi + 1)\n else:\n mi = (a[N // 2 - 1] + a[N // 2]) / 2\n ma = (b[N // 2 - 1] + b[N // 2]) /... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s606671439', 's747421586', 's824490664', 's580930641'] | [49024.0, 53660.0, 53568.0, 49136.0] | [559.0, 620.0, 611.0, 568.0] | [457, 495, 462, 454] |
p02661 | u770558697 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['\nblist.sort()\n\nif N % 2 == 0:\n median1 = N/2\n median2 = N/2 + 1\n median1 = int(median1) - 1\n median2 = int(median2) - 1\n amedian = (alist[median1] + alist[median2]) / 2\n bmedian = (blist[median1] + blist[median2]) / 2\n print(bmedian-amedian+1)\n\nelse:\n median = (N + 1) / 2\n med... | ['Runtime Error', 'Accepted'] | ['s033410485', 's444751972'] | [9132.0, 25360.0] | [23.0, 443.0] | [449, 624] |
p02661 | u779170803 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ["import numpy as np\nINT = lambda: int(input())\nINTM = lambda: map(int,input().split())\nSTRM = lambda: map(str,input().split())\nSTR = lambda: str(input())\nLIST = lambda: list(map(int,input().split()))\nLISTS = lambda: list(map(str,input().split()))\n\ndef do():\n n=INT()\n\tA=[]\n B=[]\n for i in range(n)... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s134130447', 's381871368', 's883195634', 's489566215'] | [9064.0, 9048.0, 27184.0, 44948.0] | [21.0, 23.0, 108.0, 523.0] | [713, 713, 1429, 749] |
p02661 | u780962115 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['# Count median\nN=int(input())\nm=[]\nM=[]\nfor i in range(N):\n x,y=map(int,input().split())\n m.append(x)\n M.append(y)\nm.sort()\nM.sort(reverse=True)\n\nif N%2!=0:\n mini=m[N//2]\n maxi=M[-N//2]\n print(maxi-mini+1)\nelse:\n mini=m[N//2-1]\n maxi=M[-N//2-1]\n if maxi>=mini:\n pri... | ['Wrong Answer', 'Accepted'] | ['s218303715', 's681802057'] | [25420.0, 25504.0] | [473.0, 464.0] | [346, 276] |
p02661 | u807772568 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys,collections as cl,bisect as bs\nsys.setrecursionlimit(100000)\ninput = sys.stdin.readline\nmod = 10**9+7\nMax = sys.maxsize\ndef l(): \n\treturn list(map(int,input().split()))\ndef m(): \n\treturn map(int,input().split())\ndef onem(): \n\treturn int(input())\ndef s(x): \n\ta = []\n\tif len(x) == 0:\n\t\tre... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s106254754', 's763679869', 's525980580'] | [25840.0, 25748.0, 25808.0] | [382.0, 337.0, 388.0] | [1409, 1412, 1434] |
p02661 | u810356688 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ["import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef main():\n h,w,k=map(int,input().split())\n S=[input() for _ in range(h)]\n final_ans=10**10\n for row_lis in range(1<<(h-1)):\n lst=[0]*h\n q,ans=0,0\n for r in range(h-1):\n if (row_lis>>r)&1==0:\n ... | ['Runtime Error', 'Accepted'] | ['s031681508', 's385199134'] | [9224.0, 25492.0] | [26.0, 277.0] | [997, 368] |
p02661 | u823885866 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys\nimport math\nimport itertools\nimport collections\nimport heapq\nimport numpy as np\n\nrl = sys.stdin.readline\nn = int(rl())\na = []\nb = []\nfor _ in range(n):\n aa, bb = map(int, rl().split())\n a.append(aa)\n b.append(bb)\n\ndef heapsort(iterable):\n h = []\n for value in iterable:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s256961301', 's668854998', 's105754944'] | [45648.0, 45636.0, 45824.0] | [585.0, 607.0, 637.0] | [562, 562, 567] |
p02661 | u865298224 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import math\n\nN = int(input())\nA = [0] * N\nB = [0] * N\n\nfor i in range(N):\n A[i], B[i] = map(int, input().split())\n\nA.sort()\nB.sort()\n\nmid_a = A[(N + 1) // 2 - 1] if N % 2 == 1 else (A[N // 2 - 1] + A[N // 2]) / 2\nmid_b = B[(N + 1) // 2 - 1] if N % 2 == 1 else (B[N // 2 - 1] + B[N // 2]) / 2\n\nans = 0... | ['Wrong Answer', 'Accepted'] | ['s219773809', 's323268460'] | [25372.0, 25356.0] | [443.0, 445.0] | [550, 366] |
p02661 | u867320886 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n,*ab = map(int,open(0).read().split())\na = ab[::2]\nb = ab[1::2]\na.sort()\nb.sort(reverse=True)\n\nif n%2 == 1:\n med_min = a[(n-1)//2]\n med_max = b[(n-1)//2]\n ans = med_max - med_min + 1\nelse:\n med_min = (a[n//2-1] + a[n//2] ) /2\n med_max = (b[n//2-1] + b[n//2] ) /2\n ans = (med_max - med_m... | ['Wrong Answer', 'Accepted'] | ['s260900154', 's913500939'] | [54992.0, 55044.0] | [212.0, 212.0] | [326, 331] |
p02661 | u870736713 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['from statistics import median\nN=int(input())\na,b=[],[]\n#print(map(int,input().split())\nfor i in range(N):\n i,j=map(int,input().split())\n a.append(i)\n b.append(j)\named,bmed=median(a),median(b)\n \nif N%2==1:\n print(bmed-amed+1)\nelse:\n print(2*(bmed-amed)+1)', 'from statistics import median\nN=int(inpu... | ['Wrong Answer', 'Accepted'] | ['s164932122', 's781425969'] | [28832.0, 28736.0] | [478.0, 489.0] | [260, 270] |
p02661 | u882616665 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nA = []\nB = []\nfor i in range(N):\n a,b = map(input().split())\n A.append(a)\n B.append(b)\n\nA = sorted(A)\nB = sorted(B)\n \nif N%2==1:\n print(B[N//2] - A[N//2] + 1)\nelse:\n print( (B[N//2-1]+B[N//2]) - (A[N//2-1]+A[N//2]) + 1 )', 'args = map(int, input().split())\nN = args[0]\nA = [a for ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s887531205', 's973111067', 's150291058'] | [9204.0, 9164.0, 26940.0] | [25.0, 23.0, 485.0] | [242, 279, 248] |
p02661 | u886567399 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['from statistics import median\n\nN = int(input())\nA = [0] * N\nB = [0] * N\nmax=0\nmin =0\nfor c in range(N):\n A[c], B[c] = map(int, input().split())\n\nmed_A = median(A)\nmed_B = median(B)\n\nif N%2==0:\n print((med_B-med_A)*2+1)\nelse:\n print(med_B-med_A+1)', 'from statistics import median\n\nN = int(in... | ['Wrong Answer', 'Accepted'] | ['s574711487', 's455181629'] | [28644.0, 28672.0] | [442.0, 443.0] | [255, 260] |
p02661 | u888337853 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ["import sys\n\n# import re\nimport math\nimport collections\n\nimport bisect\nimport itertools\nimport fractions\n# import functools\nimport copy\nimport heapq\nimport decimal\n# import statistics\nimport queue\n\nsys.setrecursionlimit(10000001)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n\nni = lambda: int(sys.stdin.readline... | ['Runtime Error', 'Accepted'] | ['s205971054', 's234444442'] | [1478764.0, 43376.0] | [2251.0, 341.0] | [1344, 819] |
p02661 | u906501980 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['def main():\n n = int(input())\n nums = []\n for _ in range(n):\n a, b = map(int, input().split())\n if a == b:\n nums.append(a)\n else:\n nums.append(a)\n nums.append(b)\n sn = list(sorted(nums))\n kukans = []\n old = sn[0]\n for si in sn[1:]... | ['Wrong Answer', 'Accepted'] | ['s238291167', 's114576519'] | [45504.0, 29408.0] | [534.0, 459.0] | [676, 375] |
p02661 | u909514237 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['N = int(input())\nlistA = [0] * N\nlistB = [0] * N\nidx = 0\nfor i in range(N):\n listA[idx],listB[idx] = map(int, input().split())\n idx += 1\n\nmedianA = 0\nmedianB = 0\nans = 0\nif N%2 == 0:\n medianA = statistics.median(listA)\n medianB = statistics.median(listB)\n ans = (medianB - medianA) * 2 + 1\nelse:\n ... | ['Runtime Error', 'Accepted'] | ['s750931855', 's347933826'] | [24592.0, 28712.0] | [371.0, 466.0] | [421, 452] |
p02661 | u930705402 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['from math import *\nfrom statistics import median\nN=int(input())\nA,B=[],[]\nfor i in range(N):\n a,b=map(int,input().split())\n A.append(a);B.append(b)\nA.sort();B.sort()\nif N%2:\n ans=median(B)-median(A)+1\nelse:\n ans=(median(B)-median(A))*2+1\nprint(ans)', 'from statistics import median\nN=int(input... | ['Wrong Answer', 'Accepted'] | ['s427327958', 's595548983'] | [28948.0, 28984.0] | [482.0, 460.0] | [260, 431] |
p02661 | u932291797 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\nminnums = [[] for _ in range(n)]\nmaxnums = [[] for _ in range(n)]\n\nfor i in range(n):\n minnums[i], maxnums[i] = map(int, input().split())\n \nminnums.sort()\nmaxnums.sort()\n\nif n % 2:\n minmedian = minnums[n // 2]\n maxmedian = maxnums[n // 2]\n print(maxmedian - minmedian + 1)\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s254819466', 's971553502'] | [37588.0, 37712.0] | [550.0, 521.0] | [492, 462] |
p02661 | u936985471 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import sys\nreadline=sys.stdin.readline\n \nN=int(readline())\nA = [None] * N\nB = [None] * N\nfor i in range(N):\n a,b = map(int,readline().split())\n A[i] = [a,b]\n B[i] = [b,a]\n\nA = sorted(A,key = lambda x:x[0])\nB = sorted(B,key = lambda x:x[0])\n\nif N % 2 == 1:\n minval = A[N // 2][0]\n maxval = B[N // 2... | ['Wrong Answer', 'Accepted'] | ['s879000146', 's595004666'] | [61312.0, 27080.0] | [791.0, 258.0] | [536, 412] |
p02661 | u941438707 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n=int(input())\nc=[list(map(int,input().split())) for _ in range(n)]\nc.sort()\nq,w=c[n//2][0],min(c[n//2][1],c[n//2+1][1])\nc.sort(key=lambda x: x[1])\ne,r=max(c[n//2][0],c[n//2-1][1]),c[n//2][1]\nif n%2==0:\n print(max(w-q,r-e)+1)\nelse:\n print(r-q+1)', 'n=int(input())\nc=[list(map(int,input().split())) for ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s340534037', 's573681532', 's728298739', 's754081103', 's840284725'] | [49052.0, 48972.0, 48904.0, 48924.0, 25420.0] | [883.0, 939.0, 901.0, 880.0, 481.0] | [251, 246, 249, 251, 200] |
p02661 | u948911484 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['import copy\nn = int(input())\nab = [list(map(int,input().split())) for _ in range(n)]\nab2 = copy.deepcopy(ab)\nab = sorted(ab, key=lambda x:x[0])\nab2 = sorted(ab2, key=lambda x:x[1])\nif n % 2 == 1:\n m = ab[n//2][0]\n M = ab2[n//2][1]\n print(max(0,M-m+1))\nelse:\n m = (ab[n//2][0]+ab[n//2-1][0])/2\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s657691198', 's909963379', 's639206669'] | [88240.0, 88912.0, 25524.0] | [1276.0, 1730.0, 468.0] | [383, 367, 268] |
p02661 | u955474478 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\nla = []\nlb = []\nfor i in range(n):\n a, b = map(int, input().split())\n la.append(a)\n lb.append(b)\na = statistics.median(la)\nb = statistics.median(lb)\nif n % 2 == 1:\n print(b - a + 1)\nelse:\n print((b - a) * 2 - 1)', 'import statistics\n\nn = int(input())\nla = []\nlb = []\nfor i in ran... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s585507629', 's623245314', 's784405273', 's675965740'] | [24844.0, 28868.0, 28904.0, 28828.0] | [376.0, 466.0, 474.0, 471.0] | [233, 253, 253, 257] |
p02661 | u961674365 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\na = [0 for _ in range(n)]\nb = a[:]\nfor i in range(n):\n a[i],b[i] = map(int,input().split())\na.sort()\nb.aort()\n\nans = 0\nif n % 2 == 0:\n l = a[n//2-1] + a[n//2]\n h = b[n//2-1] + b[n//2]\n\n ans += h - l + 1\nelse:\n l = a[n//2]\n h = b[n//2]\n\n ans += h - l + 1\n\n\n\np... | ['Runtime Error', 'Accepted'] | ['s764865140', 's838345149'] | [25456.0, 25368.0] | [417.0, 473.0] | [305, 305] |
p02661 | u966584145 | 2,000 | 1,048,576 | There are N integers X_1, X_2, \cdots, X_N, and we know that A_i \leq X_i \leq B_i. Find the number of different values that the median of X_1, X_2, \cdots, X_N can take. | ['n = int(input())\n\naList = []\nbList = []\nfor i in range(n):\n a, b = map(int, input().split())\n aList.append(a)\n bList.append(b)\n\naList.sort()\nbList.sort()\n\nhalf = n // 2\nif not n % 2 == 0:\n print(bList[half] - aList[half] + 1)\nelse:\n print(bList[half] + bList[half+1] - aList[half] + aLis... | ['Runtime Error', 'Accepted'] | ['s218932928', 's850351896'] | [25552.0, 25388.0] | [466.0, 460.0] | [318, 357] |
p02662 | u117541450 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['import numpy as np\nN,S=map(int,input().split())\nAs=list(map(int,input().split()))\n\nMOD=998244353\n\n#d = [[0]*3001 for _ in range(3001)]\nd=np.zeros((3001,3001))\nd[0,0]=1\n\nfor i in range(1,N+1):\n Ai=As[i-1]\n d[i] += 2*d[i-1]\n d[i,Ai:] += d[i-1][:-Ai]\n d[i] %= MOD\n print(d[i,:10])\nprint(int... | ['Wrong Answer', 'Accepted'] | ['s921156494', 's677686117'] | [97432.0, 97396.0] | [721.0, 354.0] | [312, 292] |
p02662 | u169350228 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ["import math\nimport numpy as np\nimport queue\nfrom collections import deque,defaultdict\nimport heapq\nfrom sys import stdin,setrecursionlimit\n#from scipy.sparse.csgraph import dijkstra\n#from scipy.sparse import csr_matrix\nipt = stdin.readline\nsetrecursionlimit(10**7)\n\ndef main():\n n,s = map(int,ipt().spli... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s445682922', 's649443958', 's861814623'] | [97688.0, 417908.0, 27324.0] | [2209.0, 2211.0, 206.0] | [822, 980, 677] |
p02662 | u201387466 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['import sys\ninput=sys.stdin.readline\nsys.setrecursionlimit(10 ** 8)\nfrom itertools import accumulate\nfrom itertools import permutations\nfrom itertools import combinations\nfrom collections import defaultdict\nfrom collections import Counter\nimport fractions\nimport math\nfrom collections import deque\nfrom bisec... | ['Runtime Error', 'Accepted'] | ['s733921624', 's995291568'] | [9064.0, 27432.0] | [21.0, 210.0] | [1296, 1268] |
p02662 | u257162238 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['import sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(200000)\nfrom itertools import accumulate\nfrom collections import defaultdict\n\n\ndef read():\n N, S = map(int, input().strip().split())\n A = list(map(int, input().strip().split()))\n return N, S, A\n\n\ndef solve(N, S, A, MOD=998244353, INF=10... | ['Wrong Answer', 'Accepted'] | ['s525808191', 's501260440'] | [590088.0, 110240.0] | [2220.0, 730.0] | [1223, 652] |
p02662 | u266014018 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ["def main():\n import sys\n mod = 998244353\n def input(): return sys.stdin.readline().rstrip()\n n,s = map(int, input().split())\n a = list(map(int, input().split()))\n dp = [0]*(s+1)\n dp[0] = 1\n import numpy as np\n dp = np.array(dp)\n for i in range(n):\n dp[a[i]:] = (2*dp[a[i... | ['Wrong Answer', 'Accepted'] | ['s895629747', 's741232156'] | [27372.0, 27472.0] | [265.0, 287.0] | [390, 438] |
p02662 | u307622233 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ["import sys\ninput = sys.stdin.readline\n\n\ndef main():\n n, s = map(int, input().split())\n a = [int(i) for i in input().split()]\n\n dp = [0] * (s + 1)\n dp[0] = 1\n p = [0] * (s + 1)\n\n for i in a:\n dp, p = p, dp\n for j in range(s + 1):\n dp[j] += p[j] * 2\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s449044852', 's553772592', 's314498310'] | [12472.0, 27424.0, 27404.0] | [2206.0, 123.0, 207.0] | [410, 390, 413] |
p02662 | u408620326 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ["def main():\n import sys\n import numpy as np\n input = sys.stdin.readline\n sys.setrecursionlimit(10**6)\n N, S = [int(x) for x in input().strip().split()]\n An = [int(x) for x in input().strip().split()]\n dp = np.array([[0] * (S + 1) for _ in range(2)], dtype=int)\n dp[0, 0] = 2\n if An[... | ['Wrong Answer', 'Accepted'] | ['s436629861', 's836175524'] | [27256.0, 27380.0] | [2206.0, 279.0] | [710, 487] |
p02662 | u477977638 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['import sys\nread = sys.stdin.buffer.read\ninput = sys.stdin.readline\ninput = sys.stdin.buffer.readline\n\n\n\n#from functools import lru_cache\n\ndef RD(): return sys.stdin.read()\ndef II(): return int(input())\ndef MI(): return map(int,input().split())\ndef MF(): return map(float,input().split())\ndef LI(): return ... | ['Runtime Error', 'Accepted'] | ['s909629092', 's747063365'] | [27420.0, 27476.0] | [228.0, 234.0] | [742, 731] |
p02662 | u600402037 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['# coding: utf-8\nimport sys\nimport numpy as np\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nMOD = 998244353\nN, S = lr()\nA = lr()\ndp = np.zeros((N+1, S+1), np.int32) \ndp[0][0] = 1\nfor a in A:\n for i in range(N-1, -1, -1):\n dp[i+1... | ['Wrong Answer', 'Accepted'] | ['s338959106', 's352861994'] | [62280.0, 27500.0] | [2208.0, 214.0] | [364, 350] |
p02662 | u611945374 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['import sys\nsys.setrecursionlimit(5000)\nMOD=998244353\ndef dfs(d,tot,num):\n global A,N,S,how\n if tot==S:\n how[num]+=1\n return\n if d==N:\n return\n if d>0 and A[d]==A[d-1]:\n if tot+A[d]<=S:\n dfs(d+1,tot+A[d],num+1)\n dfs(d+1,tot,num)\n \n \n\nN,S=map(... | ['Runtime Error', 'Accepted'] | ['s776336912', 's126618924'] | [9036.0, 9384.0] | [23.0, 1470.0] | [491, 318] |
p02662 | u686230543 | 2,000 | 1,048,576 | Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another positive integer S. For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define f(T) as follows: * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_... | ['mod = 998244353\nn, s = map(int, input().split())\ndp = np.zeros((n+1, s+1), dtype=int)\ndp[0, 0] = 1\nfor i, a in enumerate(map(int, input().split())):\n dp[i+1] = dp[i] * 2 % mod\n dp[i+1][a:] = (dp[i+1][a:] + dp[i][:-a]) % mod\nprint(dp[-1, -1])', 'mod = 998244353\nn, s = map(int, input().split())\ndp = [[0] * (... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s100656424', 's215925334', 's809927052'] | [9088.0, 207868.0, 27464.0] | [22.0, 2211.0, 279.0] | [243, 292, 236] |
p02675 | u000037600 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['a=int(input())\nb=a%10\nif b==0,1,6,8:\n print("pon")\nelif b==2,4,5,7,9:\n print("hon")\nelse:\n print("bon")', 'a=int(input())\nb=a%10\nif b in [0,1,6,8]:\n print("pon")\nelif b in [2,4,5,7,9]:\n print("hon")\nelse:\n print("bon")'] | ['Runtime Error', 'Accepted'] | ['s586947692', 's799075220'] | [8988.0, 8828.0] | [23.0, 26.0] | [106, 114] |
p02675 | u000579017 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N = int(input())\n\nif N%10==2 orN%10==4 or N%10==5 or N%10==7 or N%10==9:\n print('hon')\nelif N%10==0 orN%10==1 or N%10==6 or N%10==8:\n print('pon')\nelse:\n print('bon')", 'import math\n \nA,B,H,M=map(int,input().split(" "))\n \nhour=[A*math.cos(math.radians(H*30+M/2)),A*math.sin(math.radians(H*30+M/2))]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s306912457', 's328427863', 's523712228'] | [8908.0, 9188.0, 9180.0] | [21.0, 24.0, 23.0] | [175, 519, 177] |
p02675 | u000842852 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N = input()\n\nNl = len(N)\n\nx = int(N)%10^Nl\n\nif x==2 or x==4 or x==5 or x==7 or x==9:\n print('hon')\nelif x == 3:\n print('bon')\nelse:\n print('pon')", "N = int(input())\n\nx = N%10\n\n\nif x==2 or x==4 or x==5 or x==7 or x==9:\n print('hon')\nelif x == 3:\n print('bon')\nelse:\n print('pon')\n"] | ['Wrong Answer', 'Accepted'] | ['s424236464', 's285506897'] | [9176.0, 9160.0] | [22.0, 22.0] | [148, 134] |
p02675 | u001464994 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N=input()\nif len(n)>1:\n N=N[1]\n \nif N in ["2","4","5","7","9"]:\n print("hon")\nelif N == "3":\n print("bon")\nelse:\n print("pon")', 'N=str(input())\nN=N[-1]\n \nif N in ["2","4","5","7","9"]:\n print("hon")\nelif N == "3":\n print("bon")\nelse:\n print("pon")\n'] | ['Runtime Error', 'Accepted'] | ['s363499299', 's839666249'] | [9040.0, 9036.0] | [22.0, 24.0] | [131, 123] |
p02675 | u001547131 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N = int(input())\n\nif N[-1] == '2':\n print 'hon'\nelif N[-1] == '4':\n print'hon'\nelif N[-1] == '5':\n print'hon'\nelif N[-1] == '7':\n print 'hon'\nelif N[-1] == '9':\n print'hon'\nelif N[-1] == '3':\n print'bon'\nelse:\n print'pon'", "N = str(int(input()))\nif N[-1] == ('2' or '4' or '5' or '7' or '9')... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s361195390', 's748821101', 's213646992'] | [8956.0, 9108.0, 9188.0] | [19.0, 21.0, 21.0] | [231, 162, 250] |
p02675 | u001769145 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['# ABC168 A ∴ (Therefore)\n\nn = int(input())\n\n_tmp = n%10\n\nif _tmp == (0 or 1 or 6 or 8):\n print("pon")\nelif _tmp == (2 or 4 or 5 or 7 or 9):\n print("hon")\nelif _tmp == 3:\n print("bon")', '# ABC168 A ∴ (Therefore)\n\nn = int(input())\n\n_tmp = n%10\n\np_list = [0,1,6,8]\nh_list = [2,4,5,7,9]\nb_list... | ['Wrong Answer', 'Accepted'] | ['s855140048', 's641729264'] | [9172.0, 9184.0] | [22.0, 20.0] | [194, 224] |
p02675 | u005469124 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["n = int(input())\nif n[-1]=='2' or n[-1]=='4' or n[-1]=='5' or n[-1]=='7' or n[-1]=='9':\n print('hon')\nelif n[-1]=='3':\n print('bon')\nelse:\n print('pon')", "n=input()\nif n[-1]=='2' or n[-1]=='4' or n[-1]=='5' or n[-1]=='7' or n[-1]=='9':\n print('hon')\nelif n[-1]=='3':\n print('bon')\nelse:\n print('pon'... | ['Runtime Error', 'Accepted'] | ['s833218325', 's260345003'] | [9116.0, 9112.0] | [25.0, 25.0] | [155, 148] |
p02675 | u005569385 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import math\nA,B,H,M = map(float,input().split())\nvec = 0\nc = abs((30.0*H + M*0.5) - (M*6.0))\nif c <= 180.0:\n vec = c\nelse:\n vec = 360.0 - c\nans = math.sqrt(A**2 + B**2 - 2.0*A*B*math.cos(vec))\nprint(ans)', 'N = int(input())\nif N%10==2 or N%10==4 or N%10==5 or N%10==7 or N%10==9:\n print("hon")\neli... | ['Runtime Error', 'Accepted'] | ['s986875583', 's305108646'] | [9064.0, 8856.0] | [28.0, 26.0] | [209, 184] |
p02675 | u006738234 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = str(input())\n\nif(N[-1] == 2 or N[-1] == 4 or N[-1] == 5 or N[-1] == 7 or N[-1] == 9):\n print("hon")\nelif(N[-1] == 0 or N[-1] == 1 or N[-1] == 6 or N[-1] == 8):\n print("pon")\nelse:\n print("bon")\n', 'N = str(input())\n\nif(N[-1] == "2" or N[-1] == "4" or N[-1] == "5" or N[-1] == "7" or N[-1] == "9"... | ['Wrong Answer', 'Accepted'] | ['s699638281', 's970496477'] | [9116.0, 9116.0] | [24.0, 23.0] | [207, 239] |
p02675 | u007550226 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["n=int(input())\nif n==3:\n print('bon')\nelif n in [0,1,6,8]:\n print('pon')\nelse:\n print('hon')", "n=int(input())%10\nif n==3:\n print('bon')\nelif n in [0,1,6,8]:\n print('pon')\nelse:\n print('hon')\n"] | ['Wrong Answer', 'Accepted'] | ['s018635689', 's837058089'] | [9100.0, 8888.0] | [29.0, 30.0] | [95, 99] |
p02675 | u007808656 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["def sol()\n last=int(input()[-1])\n if last in [2,4,5,7,9]:\n return 'hon'\n if last in [0,1,6,8]:\n return 'pon'\n return 'bon'\n\nsol()", "def sol():\n last=int(input()[-1])\n if last in [2,4,5,7,9]:\n return 'hon'\n if last in [0,1,6,8]:\n return 'pon'\n return 'bon'\n\nprint(sol())"] | ['Runtime Error', 'Accepted'] | ['s346176433', 's934144123'] | [8892.0, 9176.0] | [20.0, 23.0] | [139, 147] |
p02675 | u007886915 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['# -*- coding: utf-8 -*-\nimport sys\n\nimport fractions\nimport copy\nimport bisect\nimport math\nimport numpy as np\nimport itertools\nfrom itertools import combinations_with_replacement\n\n#w=input()\nfrom operator import itemgetter\nfrom sys import stdin\n\nfrom operator import mul\nfrom functools import reduce\nf... | ['Wrong Answer', 'Accepted'] | ['s059390819', 's514476462'] | [27136.0, 27156.0] | [112.0, 107.0] | [11508, 11578] |
p02675 | u008022357 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['n = input()\nprint(n[-1])\n\nif(n[-1] == "3"):\n\tprint("bon")\nelif(n[-1] == "0","1","6","8"):\n\tprint("pon")\nelse:\n\tprint("hon")', 'n = input()\nprint(n[-1])\n\nif(n[-1] == "3"):\n\tprint("bon")\nelif(n[-1] == "0" or "1" or "6" or "8"):\n\tprint("pon")\nelse:\n\tprint("hon")', 'n = input()\n\nif(n[-1] == "3"):\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s379554879', 's667891454', 's017333117'] | [8992.0, 9048.0, 9108.0] | [24.0, 24.0, 20.0] | [123, 132, 112] |
p02675 | u008382444 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = int(input())\n\na = N%10\n\nif a == 2 or 4 or 5 or 7 or 9:\n print("hon")\nelif a == 3:\n print("bon")\nelse:\n print("pon")', 'N = int(input())\n\na = N%10\n\nif a == 0 or a==1 or a==6 or a==8:\n print("pon")\nelif a == 3:\n print("bon")\nelse:\n print("hon")'] | ['Wrong Answer', 'Accepted'] | ['s997483508', 's157789928'] | [9156.0, 9100.0] | [24.0, 20.0] | [122, 126] |
p02675 | u010519022 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["x = int(input()) % 10\nif x == 6, 1, 8:\n\tprint('pon')\nif x == 3:\n\tprint('bon')\nelse:\n\tprint('hon')", "x = int(input()) % 10\nif x == 6 or x == 1 or x== 8 or x == 0:\n\tprint('pon')\nelif x == 3:\n\tprint('bon')\nelse:\n\tprint('hon')"] | ['Runtime Error', 'Accepted'] | ['s523559798', 's709928817'] | [9008.0, 9168.0] | [22.0, 21.0] | [97, 122] |
p02675 | u011202375 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = input()\nprint(N[-1])\nif N[-1]=="3":\n print("bon")\nelif N[-1]=="0" or N[-1]=="1" or N[-1]=="6" or N[-1]=="8":\n print("pon")\nelse:\n print("hon")', 'N = input()\nif N[-1]=="3":\n print("bon")\nelif N[-1]=="0" or N[-1]=="1" or N[-1]=="6" or N[-1]=="8":\n print("pon")\nelse:\n print("hon")'] | ['Wrong Answer', 'Accepted'] | ['s498708750', 's187895127'] | [9108.0, 9108.0] | [27.0, 28.0] | [155, 142] |
p02675 | u013249043 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import math\nA, B, H, M = map(int, input().split())\n\nPI = math.pi\nradA = (2.0 * PI * (H + M / 60.0)) / 12.0\nradB = (2.0 * PI * M) / 60.0\n\n\nprint(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(radA-radB)*math.sin(radA-radB)))', 'import math\nA, B, H, M = map(float, input().split())\n\nPI = math.pi\nradA = (2.0 * PI * (... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s001878611', 's157474626', 's182251775', 's301214346', 's481063019', 's597794524', 's948894046', 's978233747', 's834157600'] | [9088.0, 9092.0, 9024.0, 8896.0, 9012.0, 9020.0, 8976.0, 9064.0, 9124.0] | [22.0, 23.0, 21.0, 26.0, 26.0, 21.0, 23.0, 22.0, 27.0] | [332, 255, 170, 254, 254, 255, 334, 238, 146] |
p02675 | u013513417 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['S=input()\nif int(S[2])==3:\n print("bon")\nelif int(S[2])==0 or int(S[2])==1 or int(S[2])==6 or int(S[2])==8:\n print("pon")\nelse:\n print("hon")', 'S=input()\nif int(S[2])==3:\n print("bon")\nelif int(S[2])==0 or int(S[2])==1 or int(S[2])==6 or int(S[2])==8:\n print("pon")\nelse:\n print("hon")',... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s422731440', 's710295541', 's625776005'] | [9088.0, 8980.0, 9148.0] | [24.0, 26.0, 22.0] | [150, 150, 161] |
p02675 | u015416155 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["i = int(input())\n\nwhile i != 0:\n i = i % 10\n if i == 0:\n print('pon')\n elif i == 1:\n print('pon')\n elif i == 2:\n print('hon')\n elif i == 3:\n print('bon')\n elif i == 4:\n print('hon')\n elif i == 5:\n\tprint('hon')\n elif i == 6:\n\tprint('pon')\n ... | ['Runtime Error', 'Accepted'] | ['s496797086', 's560214689'] | [9032.0, 9124.0] | [20.0, 22.0] | [412, 326] |
p02675 | u018168283 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['a = input()\n\nif a[len(a)-1] == 3:\n print("bon")\nelif a[len(a)-1] == 0 or a[len(a)-1] == 1 or a[len(a)-1] == 6 or a[len(a)-1] == 8:\n print("pon")\nelse:\n print("hon")', 'a = input()\nif a[len(a)-1] == "3":\n print("bon")\nelif a[len(a)-1] == "0" or a[len(a)-1] == "1" or a[len(a)-1] == "6" or a[len(a)-1] == "... | ['Wrong Answer', 'Accepted'] | ['s134670190', 's060823350'] | [8984.0, 9020.0] | [21.0, 23.0] | [167, 176] |
p02675 | u020604402 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = list(input())\nif N[:-1] == "3":\n print("bon")\nelif N[:-1] in ["0","1","6","8"]:\n print("pon")\nelse :\n print("hon")\n', 'N = list(input())\nif N[-1] == "3":\n print("bon")\nelif N[-1] in ["0","1","6","8"]:\n print("pon")\nelse :\n print("hon")\n'] | ['Wrong Answer', 'Accepted'] | ['s232995846', 's149243808'] | [8996.0, 9032.0] | [20.0, 23.0] | [128, 126] |
p02675 | u020798319 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = map(int, input())\nif N%10 == 2 or N%10 == 4 or N%2== 5 or N%10 == 7 or N%10 == 9:\n print("hon")\nelif N%10 == 0 or N%10 == 1 or N%10 == 6 or N%10 == 8:\n print("pon")\nelif N%10 == 3:\n print("bon")\n\n ', 'N = map(int, input().split())\nif N%10 == 2 or N%10 == 4 or N%2== 5 or N%10 == 7 or N%10 == 9:\n prin... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s239626255', 's517787122', 's247903365'] | [9008.0, 9060.0, 9100.0] | [23.0, 31.0, 29.0] | [204, 209, 178] |
p02675 | u021086907 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N= int(input())\nn = N % 10\nprint(n)\nif n == 2 or n==4 or n ==5 or n == 7 or n == 9:\n print('hon')\nelif n == 0 or n ==1 or n == 6 or n == 8:\n print('pon')\nelif n == 3:\n print('bon')\n", "N= int(input())\nn = N % 10\nif n == 2 or n==4 or n ==5 or n == 7 or n == 9:\n print('hon')\nelif n == 0 or n ==1 or n =... | ['Wrong Answer', 'Accepted'] | ['s758958511', 's163396148'] | [9164.0, 9172.0] | [27.0, 27.0] | [184, 174] |
p02675 | u021386507 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['k=input()\nn=int(k[len(k)-1])\nif(n%10==3):\n print("bon")\nelif(n%10==0|n%10==1|n%10==6|n%10==8):\n print("pon")\nelse:\n print("hon")', 'n=int(input())\nif(n%10==3):\n print("bon")\nelif(n%10==0 or n%10==1 or n%10==6 or n%10==8):\n print("pon")\nelse:\n print("hon")'] | ['Wrong Answer', 'Accepted'] | ['s460966998', 's590512968'] | [9168.0, 9172.0] | [25.0, 21.0] | [137, 132] |
p02675 | u021521597 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['def main():\n N = list(map(int,input().split()))[0]\n if N == 3:\n ans = "bon"\n elif N == 0 or N == 1 or N == 6 or N == 8:\n ans = "pon"\n else:\n ans = "hon"\n\n return ans\nif __name__ == \'__main__\':\n print(main())', 'def main():\n M = list(map(str,input().split()))[0]\n N = int(M[-1])\n if N ... | ['Wrong Answer', 'Accepted'] | ['s315607291', 's672359281'] | [9180.0, 9120.0] | [24.0, 25.0] | [222, 239] |
p02675 | u021849254 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['x=input()\n\n\nx=int(a[0])\n\nif x%10== 2 or 4 or 5 or 7 or 9:\n print("hon")\nelif x%10== 0 or 1 or 6 or 8:\n print("pon")\nelse x%10== 3:\n print("hon")\n', 'a=input()\n\n\nx=int(a[0])\n\nif x%10== 2 or 4 or 5 or 7 or 9:\n print("hon")\nelif x%10== 0 or 1 or 6 or 8:\n print("pon")\nelse :\n print("hon")\n', '... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s799584556', 's887059044', 's216517124'] | [8872.0, 9168.0, 9176.0] | [22.0, 22.0, 28.0] | [148, 140, 155] |
p02675 | u021933148 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["l_hon = [2,3,5,7,9]\nl_pon = [0,1,6,8]\nl_bon = [3]\n\ns = input()\n\nif s[-1] in l_hon:\n print('hon')\nelif s[-1] in l_pon:\n print('pon')\nelse:\n print('bon')", "l_hon = [2,4,5,7,9]\nl_pon = [0,1,6,8]\nl_bon = [3]\n\ns = int(input()[-1])\n\nif s in l_hon:\n print('hon')\nelif s in l_pon:\n print('pon')\nelse... | ['Wrong Answer', 'Accepted'] | ['s899506536', 's435075642'] | [8912.0, 9176.0] | [21.0, 22.0] | [154, 155] |
p02675 | u026155812 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N = input()\nhon = [2,4,5,7,9]\npon = [0,1,6,8]\n\nif int(N[-1]) in hon:\n print('hon')\nelif int(N[-1]) in pon:\n print(pon)\nelse:\n print('bon')", "N = input()\nhon = [2,4,5,7,9]\npon = [0,1,6,8]\n\nif int(N[-1]) in hon:\n print('hon')\nelif int(N[-1]) in pon:\n print('pon')\nelse:\n print('bon')... | ['Wrong Answer', 'Accepted'] | ['s847307836', 's064279832'] | [9124.0, 9172.0] | [30.0, 33.0] | [147, 149] |
p02675 | u031679985 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["n=int(input())\na=n%10\nif a=2 or a=4 or a=5 or a=7 or a=9:\n print('hon')\nelif a=0 or a=1 or a=6 or a=8:\n print('pon')\nelif a=3:\n print('bon')\n", "n=int(input())\na=n%10\nif a==2 or a==4 or a==5 or a==7 or a==9:\n print('hon')\nelif a==0 or a==1 or a==6 or a==8:\n print('pon')\nelif a==3:\n print('bon')"] | ['Runtime Error', 'Accepted'] | ['s006096614', 's164910847'] | [8880.0, 9112.0] | [23.0, 20.0] | [144, 153] |
p02675 | u032625182 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import sys\nn = input()\np=3\na=n/100\nn=n-a\nb=n/10\nn=n-b\nc=n/\nif(p==0):\n print(hon)\nelse if(p==1):\n print(pon)\nelse if(p==2):\n print(bon)\n', 'import sys\nimport math\nm = input()\nn= int(m)\na=math.floor(n/100)\nn=n-a*100\nb=math.floor(n/10)\nn=n-b*10\nif n==2 or 4 or 5 or 7 or 9:\n print("hon"... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s180312821', 's576960109', 's654815385'] | [9016.0, 9088.0, 9164.0] | [23.0, 19.0, 22.0] | [144, 219, 172] |
p02675 | u032955959 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['n=int(input())\nl=n%10\nif l==0 or l==1 or l==6 or l==8:\n print("hon")\nelif l==3:\n print(\'bon\')\nelse:\n print("hon")', 'n=int(input())\nl=n%10\nif l==0 or l==1 or l==6 or l==8:\n print("pon")\nelif l==3:\n print(\'bon\')\nelse:\n print("hon")\n'] | ['Wrong Answer', 'Accepted'] | ['s827090496', 's284630831'] | [9160.0, 9156.0] | [23.0, 22.0] | [116, 117] |
p02675 | u033602950 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import sys\n\n#import copy\n#from collections import deque, Counter, defaultdict\n#from fractions import gcd\n\n#import itertools\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**6)\n\ndef ri():\n return list(map(int, input().split()))\ndef rs():\n return list(input().strip())\n\nn = str(input())\nlst = n... | ['Wrong Answer', 'Accepted'] | ['s956418320', 's697183648'] | [9164.0, 9032.0] | [22.0, 24.0] | [674, 675] |
p02675 | u034777138 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = int(input())\n\nans = N % 10\n\nif ans == 2 or ans == 4 or ans == 5 or ans == 6 or ans == 7:\n print("hon")\nelif ans == 0 or ans == 1 or ans == 6 or ans == 8:\n print("pon")\nelse:\n print("bon")', 'N = int(input())\n\nans = N % 10\n\nif ans == 2 or ans == 4 or ans == 5 or ans == 7or ans == 9:\n prin... | ['Wrong Answer', 'Accepted'] | ['s860400846', 's098878244'] | [9176.0, 9092.0] | [29.0, 27.0] | [200, 199] |
p02675 | u036340997 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["from math import gcd\nmod = 10**9+7\nn = int(input())\ndicn = {}\ndicp = {}\ndicz = {'a': 0, 'b': 0, 'z': 0}\nfor i in range(n):\n a, b = map(int, input().split())\n if a == 0 and b == 0:\n dicz['z'] += 1\n else:\n g = gcd(a,b)\n a //= g\n b //= g\n if a < 0:\n a *= -1\n b *= -1\n elif ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s387165750', 's961665644', 's363291093'] | [9240.0, 9304.0, 9192.0] | [25.0, 21.0, 22.0] | [1381, 1370, 105] |
p02675 | u037754315 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["n = int(input())\n\nif n%10 == [2, 4, 5, 7, 9] :\n print('hon')\nelif n%10 == [0, 1, 6, 8] :\n print('pon')\nelif n%10 == [3] :\n print('bon')", "n = int(input())\n\nif n%10 in [2, 4, 5, 7, 9] :\n print('hon')\nelif n%10 in [0, 1, 6, 8] :\n print('pon')\nelif n%10 in [3] :\n print('bon')"] | ['Wrong Answer', 'Accepted'] | ['s957657430', 's358305937'] | [9164.0, 9148.0] | [21.0, 21.0] | [144, 144] |
p02675 | u038404105 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import math\nfrom collections import deque\n\nN = int(input())\n\na = []\nb = []\nfor i in range(N):\n i1, i2 = map(int, input().split())\n g = math.gcd(i1,i2)\n if g == 0:\n a.append(i1)\n b.append(i2)\n continue\n x = i1 // g\n y = i2 // g\n if x < 0:\n x = - x\n ... | ['Runtime Error', 'Accepted'] | ['s130185114', 's884978150'] | [9428.0, 9112.0] | [24.0, 20.0] | [977, 138] |
p02675 | u038819082 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ["N=int(input())\nc=c%10\nif c==2 or c==4 or c==5 or c==7 or c==9:\n print('hon')\nelif c==0 or c==1 or c==6 or c==8:\n print('pon')\nelse:\n print('bon')\n ", "N=int(input()[-1])\nif N==3:\n print('bon')\nelif N in (0,1,6,8):\n print('pon')\nelse:\n print('hon')"] | ['Runtime Error', 'Accepted'] | ['s472769830', 's886141203'] | [9016.0, 9112.0] | [25.0, 24.0] | [155, 99] |
p02675 | u040642458 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['N = int(input())\na = N[-1]\nif a="0","1","6","8":\n print("pon")\n elif a="3":\n print("bon")\n else:\n print("hon")', 'N = int(input())\na = N[-1]\nif a in [0,1,6,8]:\n print("pon")\nelif a=="3":\n print("bon")\nelse:\n print("hon")\n', 'N = int(input())\na = N[-1]\nif a="0","1","6","8":\n print("p... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s039563516', 's218208093', 's381390899', 's455572220', 's584071120', 's864300888'] | [8816.0, 9156.0, 8928.0, 9180.0, 9128.0, 9040.0] | [24.0, 20.0, 24.0, 24.0, 23.0, 22.0] | [123, 110, 112, 126, 112, 120] |
p02675 | u042347918 | 2,000 | 1,048,576 | The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese. When counting pencils in Japanese, the counter word "本" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of "本" in the phrase "N 本" for a pos... | ['import sys\n\nN = input()\n\nI = N[-1] \nprint(type(I))\n#print(I)\n\nif I in ["2", "4", "5", "7", "9"]: \n print("hon")\n sys.exit()\nelif I in ["0", "1", "6", "8"]:\n print("pon")\n sys.exit()\nelse :\n print("bon")\n sys.exit()\n', 'import sys\n\nN = input()\n\nI = N[-1] \n#print(type(I))\n... | ['Wrong Answer', 'Accepted'] | ['s062569925', 's605605164'] | [9012.0, 9056.0] | [27.0, 29.0] | [327, 328] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.