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
p02989
u061984624
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['a = sorted(list(map(int, input().split())))\nprint(a[len(a)//2] - a[len(a)//2-1])\n', 'a = sorted(list(map(int, input().split())))\nprint(a[len(a)] - a[len(a)-1])\n', 'a = sorted(list(map(int, input().split())))\nprint(a[len(a)//2] - a[len(a)//2-1] + 1)\n', 'input()\na = sorted(list(map(int, input().split())))\nprint...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s010307303', 's056110286', 's658662999', 's901705882']
[2940.0, 2940.0, 3060.0, 14428.0]
[17.0, 18.0, 19.0, 76.0]
[81, 75, 85, 90]
p02989
u089075077
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nl = list(map(int, input().split()))\nl.sort()\nprint(l[N/2-1]-l[N/2])', 'N = int(input())\nl = list(map(int, input().split()))\nl.sort()\nprint(l[len(l)//2] - l[len(l)//2-1])\n']
['Runtime Error', 'Accepted']
['s481166326', 's872248968']
[14428.0, 14396.0]
[76.0, 76.0]
[84, 99]
p02989
u090406054
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int,input().split()))\nd.sort()\nans=d[m]-d[m-1]\nprint(ans+1)\n', 'n=int(input())\nd=list(map(int,input().split()))\nd.sort()\nm=int(n/2)\nans=d[m]-d[m-1]\nprint(ans)\n\n']
['Runtime Error', 'Accepted']
['s861033449', 's338341154']
[14428.0, 14428.0]
[76.0, 76.0]
[86, 96]
p02989
u095021077
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int, input().split()))\n\nd.sort()\n\nprint(int(d[n/2]-d[n/2-1]))', 'n=int(input())\nd=list(map(int, input().split()))\n\nd.sort()\n\nprint(int(d[int(n/2)]-d[int(n/2-1)]))']
['Runtime Error', 'Accepted']
['s175944732', 's961613044']
[14428.0, 14428.0]
[79.0, 75.0]
[87, 97]
p02989
u096514906
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['import numpy as np\n\nN, *arr = map(int, input().split())\narr = np.array(arr)\narr.sort()\nm1 = arr[int(N / 2 - 1)]\nm2 = arr[int(N / 2)]\nprint(m2 - m1)', 'import numpy as np\n\nN = int(input())\narr = [int(i) for i in input().split()]\narr = np.sort(arr)\nm1 = arr[int(N / 2)-1]\nm2 = arr[int(N / 2)]\nprint(m2 - m1...
['Runtime Error', 'Accepted']
['s887552020', 's854687157']
[21536.0, 23504.0]
[295.0, 321.0]
[147, 154]
p02989
u098041609
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["N = input()\n\nif N/2 %2 != 0:\n print '0'\n\nelse:\n ls = list(map(int, input().split()))\n\n ls_sorted = sorted(ls)\n\n K = ls_sorted[N/2] - ls_sorted[N/2 - 1]\n\n print(K)", 'N = input()\n\nif N/2 %2 != 0:\n print(0)\n\nelse:\n ls = list(map(int, input().split()))\n\n ls_sorted = sorted(ls)...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s422617910', 's708935893', 's765650194', 's844666436']
[2940.0, 3060.0, 14396.0, 14396.0]
[17.0, 17.0, 77.0, 75.0]
[177, 176, 126, 110]
p02989
u101574948
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=sorted(list(map(int,input().split())))\nprint(d)\nres=0\nif n % 2 == 0:\n m=int(n/2)\n #print(d[m],d[m+1])\n if d[m-1] == d[m]:\n pass\n else:\n res = d[m] - d[m-1] \n\nelse:\n pass\n \n \nprint(res)', 'n=int(input())\nd=sorted(list(map(int,input().split())))\n#pri...
['Wrong Answer', 'Accepted']
['s715876481', 's578956954']
[14428.0, 14396.0]
[85.0, 76.0]
[236, 246]
p02989
u102275718
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['import math\nfrom operator import mul\nfrom functools import reduce\n\ndef comb(n, r):\n r = min(r, n-r)\n if r==0: return 1\n over = reduce(mul, range(n, n-r, -1))\n under = reduce(mul, range(1, r+1))\n return over//under\n\nn, k = map(int, input().split())\nmod = 10**9+7\n\nfor i in range(1, k+1):\n if i <= n...
['Runtime Error', 'Accepted']
['s905776986', 's256517298']
[3700.0, 14428.0]
[24.0, 76.0]
[398, 86]
p02989
u103902792
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nD = list(map(int,input().split()))\n\nD.sort()\nprint(D[n//2] -D[n//2-1]+1)', 'n = int(input())\nD = list(map(int,input().split()))\n\nD.sort()\nprint(D[n//2] -D[n//2-1])\n\n']
['Wrong Answer', 'Accepted']
['s680026361', 's948373552']
[13992.0, 14396.0]
[76.0, 77.0]
[89, 89]
p02989
u104442591
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = input()\nd = [int(i) for i in input().split()]\nif len(d) % 2 == 1:\n ans = 0\nelse:\n d.sort()\n if d[len(d)-1] == d[len(d)]:\n ans = 0\n else:\n ans = d[len(d)] - d[len(d)]\n \nprint(ans)\n\n', 'n = input()\nd = [int(i) for i in input().split()]\nif len(d) % 2 == 1:\n ans = 0\nelse:\n d.sort()\n ...
['Runtime Error', 'Accepted']
['s991360819', 's225325776']
[14428.0, 14428.0]
[82.0, 79.0]
[197, 209]
p02989
u105302073
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = [int(i) for i in input().split()]\n# N = 6\n\n# N = 8\n\n# N = 14\n\n# [\n# 99592,\n# 10342,\n# 29105,\n# 78532,\n# 83018,\n# 11639,\n# 92015,\n# 77204,\n# 30914,\n# 21912,\n# 34519,\n# ...
['Wrong Answer', 'Accepted']
['s199590913', 's330389175']
[14428.0, 14396.0]
[47.0, 82.0]
[741, 358]
p02989
u105456682
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(int(input())/2)\nN-=(N+1)%2\na=sorted(input().split())\nprint(int(a[N+1])-int(a[N]))', 'N = int(input()) / 2\na = input().split()\n\nif a[N] == a[N + 1]:\n print(0)\nelse:\n print(int(a[N+1]) - int(a[N]))', 'N = int(input()) / 2\na = input().split()\n\nif a[N] == a[N + 1]:\n print(0)\nelse:\n print(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s098018835', 's178955753', 's493900745', 's544893633', 's969269530']
[11356.0, 10588.0, 10612.0, 11356.0, 13992.0]
[82.0, 26.0, 26.0, 83.0, 76.0]
[87, 116, 106, 76, 91]
p02989
u106103668
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
[' N = int(input())\n d = list(map(int,input().split()))\n\n d.sort()\n i = len(d)//2\n print(d[i]-d[i-1])', 'N = int(input())\nd = list(map(int,input().split()))\n\nd.sort()\ni = len(d)//2\nprint(d[i]-d[i-1])']
['Runtime Error', 'Accepted']
['s087382636', 's533552007']
[2940.0, 14396.0]
[17.0, 76.0]
[114, 94]
p02989
u107269063
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int, input().split()))\n\nd = sorted(d)\n\nif d[n//2] == d[n//2]:\n print(0)\nelse:\n print(d[n//2] - d[n//2-1])', 'n = int(input())\nd = list(map(int, input().split()))\n\nd = sorted(d)\n\nif d[n//2-1] == d[n//2]:\n print(0)\nelse:\n print(d[n//2] - d[n//2-1])']
['Wrong Answer', 'Accepted']
['s979608882', 's978673898']
[14556.0, 14396.0]
[76.0, 78.0]
[141, 143]
p02989
u111497285
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nl = list(map(int, input().split()))\n\nc_idx = n / 2 - 1\nl.sort()\nprint(l[c_idx + 1] - l[c_idx])', 'n = int(input())\nl = list(map(int, input().split()))\n \nc_idx = n // 2 - 1\nl.sort()\nprint(l[c_idx + 1] - l[c_idx])']
['Runtime Error', 'Accepted']
['s700444152', 's634857757']
[14556.0, 14396.0]
[76.0, 78.0]
[111, 113]
p02989
u116233709
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int,input().split()))\nm=int(n/2)\nd=sorted(d)\nprint(d[m+1]-d[m])\n', 'n=int(input())\nd=map(int,input().split())\nm=n/2\nd=sorted(d)\nprint(d[m+1]-d[m])', 'n=int(input())\nd=list(map(int,input().split()))\nm=n/2\nd.sort()\nprint(d[m+1]-d[m])\n', 'n=int(input())\nd=list(map(int,input().spl...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s139143939', 's357550447', 's607937885', 's666142123', 's787992298', 's923405814']
[14428.0, 14396.0, 13992.0, 14556.0, 14008.0, 14008.0]
[82.0, 77.0, 76.0, 77.0, 79.0, 76.0]
[90, 78, 82, 85, 90, 90]
p02989
u121732701
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\ndlist = list(map(int, input().split()))\n\ndlist.sort()\nprint(dlist[N/2]-dlist[N/2-1])', 'N = int(input())\ndlist = list(map(int, input().split()))\n\ndlist.sort()\nN = int(N/2)\nprint(dlist[N]-dlist[N-1])']
['Runtime Error', 'Accepted']
['s615045803', 's595089700']
[14428.0, 14008.0]
[75.0, 76.0]
[101, 110]
p02989
u123745130
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nl=sort(list(map(int,input().split())))\nprint(l[n//2]-l[n//2-1])', 'n=int(input())\nl=sorted(list(map(int,input().split())))\nprint(l[n//2]-l[n//2-1])']
['Runtime Error', 'Accepted']
['s291954404', 's203976077']
[3060.0, 14428.0]
[17.0, 79.0]
[78, 80]
p02989
u130645445
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = input().split()\nd = list(map(int,d))\n\nL=0\nR=0\nDDT = 0\nans = 0\nfor K in range(min(d),max(d)+1):\n for i in range(N):\n if d[i] == K:\n DDT += 1\n elif d[i] < K:\n L += 1\n else:\n R += 1\n print(L,R)\n if L == R:\n ans +...
['Wrong Answer', 'Accepted']
['s857383125', 's418853395']
[14120.0, 14396.0]
[2104.0, 76.0]
[629, 108]
p02989
u139132412
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['14\n99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 1', 'n = int(input())\narr = list(map(int, input().split()))\narr.sort()\nans = arr[n//2] - arr[n//2-1]\nprint(ans)']
['Runtime Error', 'Accepted']
['s114902881', 's235498962']
[9016.0, 20668.0]
[26.0, 72.0]
[83, 106]
p02989
u152283104
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["if __name__ == '__main__':\n\tN = int(input())\n\tD = list(map(int, input().split()))\n\t(D.sort())\n\n\tif D[(N//2)-1] == D[N//2]:\n\t\tprint('0')\n\telse:\n\t\tprint(D[(N//2)] - D[(N//2) - 1])\n\tprint(D)\n", "if __name__ == '__main__':\n\tN = int(input())\n\tD = list(map(int, input().split()))\n\t(D.sort())\n\n\ti...
['Wrong Answer', 'Accepted']
['s171508242', 's114532330']
[14396.0, 14556.0]
[85.0, 77.0]
[188, 178]
p02989
u156113867
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = list(map(int, input().split()))\n\nD = sorted(D)\nmax_ = max(D)\nmin_ = min(D)\n\nmiddle_idx = len(D)//2\n\ndiff = D[middle_idx+1] - D[middle_idx]\nprint(diff)\n\n \n \n \n ', 'N = int(input())\nD = list(map(int, input().split()))\n \nD = sorted(D)\nmax_ = max(D)\nmin_ = min(D)\n \nmiddle_id...
['Runtime Error', 'Runtime Error', 'Accepted']
['s153388210', 's963859970', 's946647310']
[13992.0, 14396.0, 14428.0]
[83.0, 84.0, 82.0]
[184, 196, 173]
p02989
u163421511
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input().split()\nd = list(map(int, input().split()))\n\nd.sort()\n\nif d[int((N-1)/2)] == d[int(N/2)]:\n result = 0\nelse:\n result = d[int(N/2)]-d[int((N-1)/2)]\n\nprint(result)\n', 'N = int(input().split())\nd = list(map(int, input().split()))\n\nd.sort()\nresult = d[int(N/2)]-d[int((N-1)/2)]\nprint(r...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s088562492', 's139386959', 's412002586', 's696456604']
[9012.0, 8988.0, 8984.0, 20700.0]
[26.0, 27.0, 28.0, 64.0]
[183, 122, 184, 114]
p02989
u169696482
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['import fractions\na, b, c, d = map(int, input().split())\ne = (c*d)/fractions.gcd(c,d)\nbb = b-((b//c) + (b//d)- (b//e))\naa = a-1-(((a-1)//c)+((a-1)//d)-((a-1)//e))\nz = bb-aa\nprint(int(z))', 'import fractions\na, b, c, d = map(int, input().split())\ne = (c*d)/fractions.gcd(c,d)\nbb = b-(b//c + b//d- b//e)\naa = a-...
['Runtime Error', 'Runtime Error', 'Accepted']
['s531575915', 's963455382', 's462801254']
[5048.0, 5176.0, 14428.0]
[36.0, 39.0, 75.0]
[185, 173, 154]
p02989
u171328579
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = list(map(int, input().split()))\n\nD.sort()\n\nprint(D)\nprint(D[N//2] - D[N//2 - 1])', 'N = int(input())\nD = list(map(int, input().split()))\n\nD.sort()\n\nprint(D[N//2] - D[N//2 - 1])']
['Wrong Answer', 'Accepted']
['s701866509', 's959418551']
[14008.0, 14008.0]
[87.0, 77.0]
[101, 92]
p02989
u172569352
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['def q38(n, d):\n max_d = max(d)\n min_d = min(d)\n count = 0\n for i in range(min_d+1, max_d):\n a = []\n b = []\n for j in d:\n if j >= i:\n a.append(j)\n else:\n b.append(j)\n if len(a) == len(b):\n count += 1\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s581761424', 's727694788', 's771387623', 's826007089']
[3064.0, 2940.0, 14120.0, 16040.0]
[17.0, 17.0, 45.0, 81.0]
[388, 462, 374, 247]
p02989
u179169725
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = list(map(int, input().split())).sort()\nprint(D[N // 2] - D[(N // 2) - 1])\n', 'N = int(input())\nD = sorted(map(int, input().split()))\nprint(D[N // 2] - D[(N // 2) - 1])']
['Runtime Error', 'Accepted']
['s599840912', 's924537191']
[14396.0, 14428.0]
[76.0, 77.0]
[95, 89]
p02989
u186838327
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['from collections import deque\nn, m = map(int, input().split())\n\ng = [[] for i in range(n)]\n\nfor i in range(m):\n u, v = map(int, input().split())\n u, v = u-1, v-1\n g[u].append(v)\n# print(g)\n\ns, t = map(int, input().split())\ns, t = s-1, t-1\n\nvisited = [[-1]*3 for j in range(n)]\n\nl = 0\nqueue = deque(...
['Runtime Error', 'Accepted']
['s472476332', 's270523296']
[3316.0, 14396.0]
[21.0, 82.0]
[620, 157]
p02989
u187366461
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\np=list(map(int,input().split()))\n\nP=sorted(p)\nprint(P)\nK=P[n//2]-P[n//2-1]\n\nprint(K)\n', 'n=int(input())\np=list(map(int,input().split()))\n\nP=sorted(p)\n\nK=P[n//2]-P[n//2-1]\n\nprint(K)\n']
['Wrong Answer', 'Accepted']
['s731056395', 's839085952']
[14396.0, 14396.0]
[86.0, 76.0]
[100, 92]
p02989
u189397279
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = sorted(list(map(int, input().split())))\nprint(d[N / 2] - d[N / 2 - 1])', 'N = int(input())\nd = sorted(list(map(int, input().split())))\nprint(d[int(N / 2)] - d[int(N / 2 - 1)])']
['Runtime Error', 'Accepted']
['s398094174', 's311952881']
[14396.0, 14008.0]
[76.0, 79.0]
[91, 101]
p02989
u197777377
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int,input().split()))\nd.sort()\nans = d[n/2] - d[(n/2)-1]\nprint(ans)', 'n = int(input())\nd = list(map(int,input().split()))\nans = 0\nfor k in range(max(d)):\n ARC = 0\n ABC = 0\n for i in range(n):\n if d[i] >= k:\n ARC += 1\n else:\n ABC...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s231186481', 's628168837', 's085954445']
[14428.0, 14396.0, 13992.0]
[76.0, 2104.0, 75.0]
[97, 331, 105]
p02989
u200527996
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = list(map(int, input().split()))\nd.sort()\nprint(d[N/2] - d[N/2-1])\n ', 'import math\nN = int(input())\nd = list(map(int, input().split()))\nd.sort()\ntmp = math.floor(N/2)\nprint(d[tmp] - d[tmp-1])']
['Runtime Error', 'Accepted']
['s199319174', 's037438149']
[14556.0, 14524.0]
[77.0, 77.0]
[91, 120]
p02989
u202570162
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\nD=[int(i) for i in input().split()]\nmid=N//2-1\nprint(D[mid+1]-D[mid])\n', 'N=int(input())\nD=[int(i) for i in input().split()]\nD.sort()\nmid=N//2-1\nprint(D[mid+1]-D[mid])\n']
['Wrong Answer', 'Accepted']
['s279221040', 's139787727']
[14396.0, 14428.0]
[51.0, 80.0]
[85, 94]
p02989
u207464563
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int,input().split()))\n\ncount = 0\n\nif n % 2 == 0:\n d.sort()\n print(d)\n tmp = n // 2\n\n if d[tmp-1] == d[tmp]:\n print(0)\n\n else:\n print(d[tmp]-d[tmp-1])\n\nelse:\n print(0)', 'n = int(input())\nd = list(map(int,input().split()))\n\ncount = 0\n\...
['Wrong Answer', 'Accepted']
['s873665008', 's254547600']
[14008.0, 14396.0]
[86.0, 76.0]
[229, 216]
p02989
u212328220
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = input()\ndl = list(map(int,input().split()))\ndl.sort()\n\nif n % 2 != 0:\n print(0)\n exit()\n\n \nleft = dl[(n//2)-1]\nright = dl[(n//2)]\n\nprint(right-left)\n', 'n = int(input())\ndl = list(map(int,input().split()))\ndl.sort()\n\nif n % 2 != 0:\n print(0)\n exit()\n\n \nleft = dl[(n//2)-1]\nright = dl[(...
['Runtime Error', 'Accepted']
['s415846615', 's308955856']
[20728.0, 20424.0]
[64.0, 67.0]
[156, 161]
p02989
u221580805
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nsorted_nums = sorted(list(map(int, input().split())))\ncenter = len(sorted_nums // 2)\nans = sorted_nums[center] - sorted_nums[center-1]\nprint(ans)', 'n = int(input())\nsorted_nums = sorted(list(map(int, input().split())))\ncenter = len(sorted_nums) // 2\nans = sorted_nums[center] - sorted_nums[cen...
['Runtime Error', 'Accepted']
['s164053085', 's976590218']
[14396.0, 14428.0]
[76.0, 76.0]
[162, 162]
p02989
u225577738
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\np = []\nd = list(map(int, input().split()))\nprint(d)\n\ncnt=0\ncnth=0\ncntl=0\nfor k in range(min(d)+1, max(d)-1):\n for x in d:\n if x >= k:\n cnth += 1\n elif x < k:\n cntl += 1\n if cnth == cntl:\n cnt+=1\n cnth =0\n cntl =0\n\nprint(cnt)', ...
['Wrong Answer', 'Accepted']
['s580924797', 's272581985']
[14396.0, 23412.0]
[2104.0, 311.0]
[296, 267]
p02989
u227085629
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd_list = list(map(int,input().split()))\nd = sorted(d_list)\ng = n//2\nf = d[g]\nj = d[g+1]\nprint(j-f)', 'n = int(input())\nd_list = list(map(int,input().split()))\nd = sorted(d_list)\ng = n//2\nf = d[g-1]\nj = d[g]\nprint(j-f)']
['Runtime Error', 'Accepted']
['s381605868', 's957784329']
[14428.0, 13992.0]
[80.0, 77.0]
[115, 115]
p02989
u236592202
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int,input().split()))\nd.sort()\na=int(n/2)\ni=int(n/2-1)\nprint(d)\nif d[a]!=d[i]:\n num=d[a]-d[i]\n print(num)\nelse:\n print(0)', 'n=int(input())\nd=list(map(int,input().split()))\nd.sort()\na=int(n/2)\ni=int(n/2-1)\nif d[a]!=d[i]:\n num=d[a]-d[i]\n print(num)\nelse:\n ...
['Wrong Answer', 'Accepted']
['s230347821', 's110495131']
[14396.0, 14396.0]
[86.0, 76.0]
[156, 147]
p02989
u238084414
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = sorted(map(int, input().split()))\nprint(D)\nif D[N//2 - 1] == D[N//2]:\n print(0)\nelse:\n print(D[N//2] - D[N//2 - 1])', 'N = int(input())\nD = sorted(map(int, input().split()))\n\nif D[N//2 - 1] == D[N//2]:\n print(0)\nelse:\n print(D[N//2] - D[N//2 - 1])']
['Wrong Answer', 'Accepted']
['s632110102', 's780607700']
[14396.0, 14428.0]
[86.0, 76.0]
[138, 130]
p02989
u243755204
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nP = map(int,input().split())\np = [i for i in P]\np.sort()\nprint(p)\nif n % 2 == 1:\n print(0)\nelif len(p) == 2:\n if p[0]==p[1]:\n print(0)\n else:\n print(1)\nelse:\n a = p[n//2]\n if a == p[(n//2)-1] or a == p[(n//2)+1]:\n print(0)\n else:\n print(p...
['Wrong Answer', 'Accepted']
['s828637769', 's145714713']
[14428.0, 14428.0]
[88.0, 79.0]
[320, 309]
p02989
u244836567
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['a=int(input())\nb=list(map(int,input().split()))\nb.sort()\nif b[(a/2)-1]==b[(a/2)]:\n print(0)\nelse:\n print(b[(a/2)]-b[(a/2)-1]-1)', 'a=int(input())\nb=list(map(int,input().split()))\nb.sort()\nif b[int(a/2)-1]==b[int(a/2)]:\n print(0)\nelse:\n print(b[int(a/2)]-b[int(a/2)-1])']
['Runtime Error', 'Accepted']
['s205844920', 's700300113']
[20552.0, 20688.0]
[63.0, 68.0]
[129, 139]
p02989
u246942304
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\na = list(map(int, input().split())) \ncount = 0\n\na.sort()\n\nc1 = a[len(a)//2]\nc2 = a[len(a)//2-1]\nif c1 != c2 and c1 != (c2 + 1):\n count = c1 - c2 -1\nprint(count)', 'n = int(input())\na = list(map(int, input().split())) \ncount = 0\n\na.sort()\n\nc1 = a[len(a)//2]\nc2 = a[len(a)//2-1]\nif ...
['Wrong Answer', 'Accepted']
['s002988703', 's695014557']
[14428.0, 13992.0]
[78.0, 79.0]
[180, 158]
p02989
u246975555
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\np = list(map(int,input().split()))\np.sort() \nans = p[n/2] - p[n/2-1]\nprint(ans)', 'n = int(input())\np = list(map(int,input().split()))\nps = p.sort()\n\nans = ps[n/2] - ps[n/2-1]\nprint(ans)', 'n = int(input())\np = list(map(int,input().split()))\np.sort()\n \nans = p[n//2] - p[n//2-1]\nprint(an...
['Runtime Error', 'Runtime Error', 'Accepted']
['s218675901', 's538333657', 's091592479']
[14428.0, 13992.0, 13992.0]
[76.0, 80.0, 75.0]
[96, 103, 99]
p02989
u247211039
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\nd=list(map(int, input().split()))\n\nd=sorted(d)\nans=0\n \nfor i in range(10**7):\n if d[int(N/2-1)] < i and i <= d[int(N/2)]:\n ans +=1\n \nprint(ans)', 'N=int(input())\nd=list(map(int, input().split()))\n \nd=sorted(d)\nans=0\n \nfor i in range(1+10**5):\n if d[int(N/2-1)] < i and i <=...
['Time Limit Exceeded', 'Accepted']
['s970032319', 's513960713']
[20372.0, 20600.0]
[2206.0, 105.0]
[168, 171]
p02989
u251075661
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\n\nds = list(map(int, input().split()))\nds.sort()\n\nmax_abc = ds[n/2 - 1]\nmin_arc = ds[n_2]\n\nprint(max_abc - min_arc)', 'n = int(input())\n\nds = list(map(int, input().split()))\nds.sort()\n\nmax_abc = ds[int(n/2 - 1)]\nmin_arc = ds[int(n/2)]\n\nprint(min_arc - max_abc)']
['Runtime Error', 'Accepted']
['s821102562', 's521744481']
[14396.0, 14396.0]
[76.0, 76.0]
[131, 141]
p02989
u254871849
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["import sys\n\nn, *d = map(int, sys.stdin.read().split())\n\ndef main():\n d.sort()\n h = n // 2\n l = d[h-1]; r = d[h]\n return r - (l + 1) - 1\n\nif __name__ == '__main__':\n ans = main()\n print(ans)", "import sys\n\nn, *a = map(int, sys.stdin.read().split())\na.sort()\n\ndef main():\n m = n //...
['Wrong Answer', 'Accepted']
['s326447029', 's722519674']
[13956.0, 14060.0]
[79.0, 78.0]
[207, 176]
p02989
u258862116
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["N = int(input())\nd = list(map(int, input().split()))\n\nd.sort()\nprint(d)\n\nd_len = len(d)\n\nif d_len % 2 == 0:\n up = int(d_len/2)\n down = int(d_len/2) - 1\n if up == down:\n print('0')\n else:\n print(d[up]-d[down])\n \n \n\nelse:\n print('0')", "N = int(input())\...
['Wrong Answer', 'Accepted']
['s520702852', 's148676427']
[14396.0, 14396.0]
[86.0, 76.0]
[278, 279]
p02989
u262084284
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input()) \nd = list(map(int,input().split()))\n\nsorted_d = sorted(d)\nhalf = n/2 \n\nsorted_d[half] = a \nsorted_d[half+1] = b \n\nprint(b-a)', 'n = int(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s412438412', 's780379659', 's163614085']
[14396.0, 14396.0, 13992.0]
[77.0, 79.0, 76.0]
[297, 158, 158]
p02989
u264989012
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int,input().split()))\nk = max(d)\ni = 0\nj = 0\nans = 0\nb = 0\ns = 0\nwhile i <= k:\n while j <= n-1:\n if d[j] < i:\n s += 1\n if d[j] >= i:\n b += 1\n j += 1\n if b == s:\n ans += 1\n b = 0\n s = 0\n i += 1\nprint(ans)\n ', 'n = int(input())\nd = list(map...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s049659605', 's068542702', 's315763476', 's403292968', 's500717310', 's969264492', 's002612627']
[14396.0, 14428.0, 2940.0, 14556.0, 14556.0, 13992.0, 14396.0]
[122.0, 120.0, 17.0, 122.0, 42.0, 2104.0, 75.0]
[263, 275, 155, 278, 220, 249, 154]
p02989
u267222408
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = list(map(int, input().split()))\n\nd.sort()\n\nleft = d[N//2]\nright = d[N//2 +1]\n\ndif = right - left\n\nprint(dif)', 'N = int(input())\nd = list(map(int, input().split()))\n\nd.sort()\n\nleft = d[int(N/2)]\nright = d[int(N/2) +1]\n\ndif = right - left\n\nprint(dif)', 'N = int(input())\nd = li...
['Runtime Error', 'Runtime Error', 'Accepted']
['s104856611', 's136244673', 's199933403']
[14428.0, 14428.0, 14556.0]
[75.0, 75.0, 75.0]
[129, 137, 135]
p02989
u268241742
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['s=list(input())\nk=int(input())\ns.append(-1)\ni=0\nans=-1\nwhile True:\n if s[i]=="-1":\n ans=s[i]\n break\n if s[i]!="1":\n ans=s[i]\n if i+1>k:\n ans="1" \n break\n i+=1\nprint(ans)\n', 'n=int(input())\nls=list(map(int,input().split()))\nls.sort()\n\nprint(l...
['Runtime Error', 'Accepted']
['s345668451', 's100470205']
[4724.0, 14396.0]
[21.0, 77.0]
[227, 87]
p02989
u283520984
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = [int(i) for i in input().split()]\nd.sort()\ns=0\nN=int(n/2)\nk=int(abs(d[N]-d[N-1]))\nK=(d[N]+d[N-1])/2)\nfor i in range(n):\n if d[i]>=K:\n s=s+1\n else:\n s=s\nif s==N:\n print(k)\nelse:\n print(0)', 'n = int(input())\nd = [int(i) for i in input().split()]\nd.sort()\...
['Runtime Error', 'Accepted']
['s054215536', 's342913167']
[2940.0, 14428.0]
[17.0, 106.0]
[233, 232]
p02989
u284363684
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['# input\nN = int(input())\nd = list(map(int, input().split()))\n\n\nsort_d = sorted(d)\nc = N // 2\nprint(len(list(range(sort_d[c - 1] + 1, sort_d[c]))))', '# input\nN = int(input())\nd = list(map(int, input().split()))\n\n\nsort_d = sorted(d)\nc = N // 2\nprint(len(list(range(sort_d[c - 1], sort_d[c]))))']
['Wrong Answer', 'Accepted']
['s839040623', 's189403853']
[14008.0, 14396.0]
[78.0, 77.0]
[153, 149]
p02989
u301302814
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['# coding: utf-8\n\ndef main():\n N = int(input())\n d = sorted(list(map(int, input().split())))\n ans = 0\n if d[N / 2] != d[N / 2 - 1]:\n ans = d[N / 2] - d[N / 2 - 1]\n\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', '# coding: utf-8\n\ndef main():\n N = int(input())\n d = s...
['Runtime Error', 'Accepted']
['s312181382', 's025038278']
[20592.0, 20684.0]
[63.0, 69.0]
[237, 241]
p02989
u302292660
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = sorted(list(map(int,input().split())))\nprint(d)\nprint(d[0])\nprint(d[n//2 + 2])\nprint(d[n//2 + 1])\nif d[n//2 + 1] == d[n//2 +2]:\n print("0")\nelse:\n print(d[n//2] - d[n//2 -1])', 'n = int(input())\nd = sorted(list(map(int,input().split())))\nif d[n//2 ] == d[n//2 -1]:\n print("0")...
['Runtime Error', 'Accepted']
['s689486498', 's614164325']
[14396.0, 14428.0]
[86.0, 75.0]
[201, 139]
p02989
u307631662
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nl = sorted(list(map(int, input().split())))\nprint(l[n/2] - l[n/2-1])\n', 'n=int(input())\nl = sorted(list(map(int, input().split())))\nprint(l[n//2] - l[n//2-1])\n']
['Runtime Error', 'Accepted']
['s360710975', 's482780142']
[14396.0, 13992.0]
[77.0, 76.0]
[84, 86]
p02989
u308506254
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nds = [int(i) for i in input().split()]\n\nprint(ds[N//2] - ds[N//2 - 1])\n', 'N = int(input())\nds = sorted([int(i) for i in input().split()])\n\nprint(ds[N//2] - ds[N//2 - 1])\n']
['Wrong Answer', 'Accepted']
['s791439798', 's927736651']
[14556.0, 14396.0]
[43.0, 80.0]
[88, 96]
p02989
u309039873
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd_s = list(map(int,input().split()))\nd_s.sort()\nprint(d_s[len(d_s)]-d_s[len(d_s)-1])', '# coding: utf-8\n# Your code here!\nN = int(input())\nd_s = list(map(int,input().split()))\nd_s.sort()\nprint(d_s[len(d_s)//2]-d_s[len(d_s)//2-1])\n\n']
['Runtime Error', 'Accepted']
['s565726478', 's461679444']
[14396.0, 14396.0]
[76.0, 76.0]
[101, 143]
p02989
u309120194
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['import numpy as np\n\nN = int(input())\nd = list(map(int, input().split()))\n\nans = 0\nfor K in range(1, 10**5+1):\n if np.sum(d[d>=K]) == np.sum(d[d<K]): ans += 1\n\nprint(ans)', 'N = int(input())\nd = list(map(int, input().split()))\n\n\n\n\n\n\n\n\nd = sorted(d)\nprint(d[N//2] - d[(N//2)-1])']
['Runtime Error', 'Accepted']
['s819843047', 's809605490']
[38948.0, 20592.0]
[134.0, 67.0]
[170, 394]
p02989
u312078744
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int, input().split()))\nd = sorted(d)\ntar = int(n/2) - 1\n\n\nleft = d[tar]\nright = d[tar + 1]\np#rint(left, right)\ndiff = right - left\nif (diff == 0):\n ans = 0\nelse:\n ans = diff\n\nprint(ans)\n', 'n = int(input())\nd = list(map(int, input().split()))\nd = sorted(d)\ntar = ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s048622358', 's078979038', 's998461781']
[13992.0, 14396.0, 14428.0]
[77.0, 76.0, 77.0]
[222, 220, 222]
p02989
u317018965
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = list(map(int, input().split()))\ncnt = 0\nfor i in range(max(D)) :\n cnt = len(list(filter(lambda x : x <= i, D)))\n if(cnt == N // 2) :\n ans += 1\n else :\n pass\nprint(ans)', 'N = int(input())\nD = list(map(int, input().split()))\nans = 0\nfor i in range(max(D)) :\n cnt = len(list(f...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s563132905', 's590955918', 's730878994']
[14428.0, 14396.0, 14428.0]
[2104.0, 2104.0, 130.0]
[197, 210, 279]
p02989
u318740143
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = list(map(int,input().split()))\nd.sort()\nans = d[(N/2)+1]-d[N/2]\n ', 'N = int(input())\nd = list(map(int,input().split()))\nd.sort()\nans = d[int((N/2))]-d[int(N/2)-1]\nprint(ans)']
['Runtime Error', 'Accepted']
['s863962076', 's571299774']
[14008.0, 14396.0]
[77.0, 76.0]
[87, 105]
p02989
u320511454
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=sorted(list(map(int,input().split())))\nprint(d[n/2]-d[n/2-1])', 'n=int(input())\nd=sorted(list(map(int,input().split())))\nprint(d[n//2]-d[n//2-1])']
['Runtime Error', 'Accepted']
['s481360386', 's106915977']
[14396.0, 14428.0]
[77.0, 76.0]
[78, 80]
p02989
u328510800
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\na = sorted(list(map(int, input().split())))\nprint(a[n/2] - a[n/2-1])', 'n = int(input())\na = sorted(list(map(int, input().split())))\nprint(a[n//2] - a[n//2-1])']
['Runtime Error', 'Accepted']
['s068127013', 's743202090']
[14396.0, 14396.0]
[76.0, 76.0]
[85, 87]
p02989
u329407311
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nList = list(map(int,input().split()))\n\nList.sort()\n\na = List[N/2-1]\nb = List[N/2]\n\nprint(int(b-a))', 'N = int(input())\nList = list(map(int,input().split()))\n\nList.sort()\n\na = List[int(N/2-1)]\nb = List[N//2]\n\nprint(int(b-a))\n']
['Runtime Error', 'Accepted']
['s665125860', 's103270718']
[14556.0, 14428.0]
[76.0, 75.0]
[115, 122]
p02989
u331997680
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nd = list(map(int, input().split()))\nd.sort()\nS = sum(d)\nif not d[N/2 - 1] < S/N <= d[N/2 + 1]:\n print(0)\nelif:\n A = 0\n for i in range(d[N/2 + 1]-d[N/2 - 1]):\n d[N/2 - 1] + i+1 <= d[N/2 + 1]\n A += 1\n print(A)', 'N = int(input())\nd = list(map(int, input().split()))\nd.sort()\nS = ...
['Runtime Error', 'Accepted']
['s383427451', 's090874762']
[2940.0, 14428.0]
[18.0, 77.0]
[234, 99]
p02989
u342563578
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n,m = map(int,input().split())\na = []\nmod = 10**9+7\nd = [0 for i in range(n+1)]\nd[0] = 1\nd[1] = 1\nif n >1 :\n d[2] = 2\nfor i in range(3,n+1):\n d[i] = d[i-1] + d[i-2]\nd.append(0)\nif m != 0:\n for i in range(m):\n b = int(input())\n a.append(b)\n ans = 1\n if a[0] == 1:\n a...
['Runtime Error', 'Runtime Error', 'Accepted']
['s017537997', 's053865958', 's435758649']
[3064.0, 3064.0, 13992.0]
[18.0, 18.0, 75.0]
[479, 375, 110]
p02989
u349091349
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\nP=list(map(int,input().split()))\n\nD=sorted(D)\nK=D[N//2]-D[N//2-1]\nprint(K)', 'N=int(input())\nD=list(map(int,input().split()))\n \nD=sorted(D)\nK=D[N//2]-D[N//2-1]\nprint(K)']
['Runtime Error', 'Accepted']
['s715348775', 's543130914']
[14396.0, 14428.0]
[41.0, 76.0]
[89, 90]
p02989
u350093546
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\na=list(map(int,input().split()))\nprint(a[n//2]-a[n//2-1])', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nprint(a[n//2]-a[n//2-1])\n']
['Wrong Answer', 'Accepted']
['s232804950', 's871775203']
[13992.0, 14428.0]
[40.0, 75.0]
[72, 82]
p02989
u351356675
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["input()\ns=map(int,input().split(' '))\ns=list(s)\ns=sorted(s)\nn=len(s)\nprint(s[n/2]-s[n/2-1])", "input()\ns=map(int,input().split(' '))\ns=list(s)\ns=sorted(s)\nn=len(s)\nprint(s[int(n/2)]-s[int(n/2-1)])"]
['Runtime Error', 'Accepted']
['s058752457', 's313739577']
[14428.0, 14396.0]
[76.0, 75.0]
[91, 101]
p02989
u353548710
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nl = sorted(list(map(int, input().split())))\nd = int(n / 2)\nr = l[d] - l[d-1]\nprint(l)\nprint(r)', 'n = int(input())\nl = sorted(list(map(int, input().split())))\nd = int(n / 2)\nr = l[d] - l[d-1]\nprint(r)']
['Wrong Answer', 'Accepted']
['s005847397', 's368379332']
[20660.0, 20764.0]
[73.0, 70.0]
[111, 102]
p02989
u357867755
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int, input().split()))\nprint(d[sorted(d)//2]-d[sorted(d)//2-1])', 'n = int(input())\nd = list(map(int, input().split()))\nprint(sorted(d)[n//2]-sorted(d)[n//2-1])\n']
['Runtime Error', 'Accepted']
['s143558719', 's953756893']
[14396.0, 14396.0]
[74.0, 109.0]
[93, 94]
p02989
u357949405
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = list(map(int, input().split()))\n\nD = sorted(D)\nleft = D[N//2]\nright = D[N//2+1]\n\nprint(right-left)\n', 'N = int(input())\nD = list(map(int, input().split()))\n\nD = sorted(D)\nleft = D[N//2-1]\nright = D[N//2]\n# print("left: {}, right: {}".format(left, right))\nprint(right-left)\n\n']
['Runtime Error', 'Accepted']
['s394736718', 's718021334']
[14396.0, 13992.0]
[77.0, 78.0]
[120, 171]
p02989
u361826811
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = readline().decode().strip()\nK = int(readline())\ncnt = 0\nans = 0\nfor i in N:\n if len(N) == 1:\n ans = N[0]\n break\n if i == '1'...
['Runtime Error', 'Accepted']
['s925181557', 's270271313']
[13796.0, 21388.0]
[150.0, 208.0]
[513, 239]
p02989
u363836311
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int, input().split()))\nl=d//2\ndif=d[l]-d[l-1]\nif dif==0:\n print(0)\nelse:\n print(dif)', 'n=int(input())\nd=list(map(int, input().split()))\nl=d//2\ndef=d[l]-d[l-1]\nif def==0:\n print(0)\nelse:\n print(def)', 'n=int(input())\nd=list(map(int, input().split()))\nl=len(d)//2\nd.sort()...
['Runtime Error', 'Runtime Error', 'Accepted']
['s036517940', 's434067852', 's103163285']
[14428.0, 2940.0, 14428.0]
[41.0, 17.0, 77.0]
[112, 112, 127]
p02989
u375282392
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int, input().split()))\n\nsd = sorted(d)\n\nif n %2 != 0:\n print(0)\n\nelse:\n\n print(sd[n/2] - sd[n/2-1])', 'n = int(input())\nd = list(map(int, input().split()))\n\nsd = sorted(d)\n\nif n %2 != 0:\n print(0)\n\nelse:\n\n print(sd[int(n/2)] - sd[int(n/2-1)])']
['Runtime Error', 'Accepted']
['s367386209', 's106566704']
[13992.0, 14008.0]
[82.0, 77.0]
[131, 141]
p02989
u376328830
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nlst = list(map(int,input().split()))\nlst.sort()\nprint(lst)\ni = n//2\nj = i-1\nprint(lst[i]-lst[j])\n', 'n = int(input())\nlst = list(map(int,input().split()))\nlst.sort()\ni = n//2\nj = i-1\nprint(lst[i]-lst[j])']
['Wrong Answer', 'Accepted']
['s059527684', 's743623452']
[14396.0, 14428.0]
[88.0, 79.0]
[114, 102]
p02989
u379136995
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['a=int(input())\ns=list(map(int,input().split()))\ns.sort()\nprint(s[a/2]-a[a/2-1])', 'a=int(input())\nn=sorted(list(map(int,input().split())))\nprint(n[a//2]-n[a//2-1])\n']
['Runtime Error', 'Accepted']
['s274385010', 's158801662']
[13992.0, 14396.0]
[76.0, 76.0]
[79, 81]
p02989
u383109869
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\nd=list(map(int, input().strip().split()))\nans=0\n\nd.sort()\n\n\n\nprint(int(d[int(N/2)])-int(d[int(N/2)-1]))\n\nprint(ans)', 'N=int(input())\nd=list(map(int, input().strip().split()))\nans=0\n\nd.sort()\n\n\n\nprint(int(d[int(N/2)])-int(d[int(N/2)-1]))\n']
['Wrong Answer', 'Accepted']
['s886896974', 's285714595']
[14428.0, 13992.0]
[75.0, 75.0]
[185, 174]
p02989
u390170391
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nl = list(map(int, input().split())).sort()\na = l[n//2]\nb = l[n//2 + 1]\n\nprint(b-a)', 'n = int(input())\nl = list(map(int, input().split()))\nl = sorted(l)\na = l[n//2 - 1]\nb = l[n//2]\n \nprint(b-a)']
['Runtime Error', 'Accepted']
['s075796929', 's313800701']
[14428.0, 14428.0]
[75.0, 77.0]
[99, 107]
p02989
u394731058
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["import sys\n\ninput = sys.stdin.readline\n\ndef main():\n ans = 0\n n = int(input())\n d = list(map(int, input().split()))\n d.sort()\n g = d[n//2]\n ans += g - d[n//2-1] + 1\n print(ans)\n\nif __name__ == '__main__':\n main()", "import sys\n\ninput = sys.stdin.readline\n\ndef main():\n ans...
['Wrong Answer', 'Accepted']
['s736925820', 's902736131']
[14016.0, 14300.0]
[74.0, 75.0]
[236, 222]
p02989
u403269302
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = [int(x) for x in input().split()]\nd.sort()\nprint(d[int(n / 2) + 1] - d[int(n / 2)])', 'n = int(input())\nd = [int(x) for x in input().split()]\nd.sort()\nprint(d[int(n / 2)] - d[int(n / 2) - 1])']
['Runtime Error', 'Accepted']
['s037690838', 's949805794']
[14120.0, 14396.0]
[80.0, 80.0]
[104, 104]
p02989
u405832869
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nvalue = list(map(int,input().split()))\nvalue.sort()\nprint(value[(int(N/2))]-value[(int(N/2))-1]+1)', 'N = int(input())\nvalue = list(map(int,input().split()))\nvalue.sort()\nprint(value)\nprint(value[(int(N/2))]-value[(int(N/2))-1]+1)', 'N = int(input())\nvalue = list(map(int,input().split()))\nva...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s209932504', 's426707022', 's477102575', 's314353791']
[14396.0, 14396.0, 14396.0, 14428.0]
[80.0, 88.0, 89.0, 77.0]
[115, 128, 126, 113]
p02989
u408620326
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = sorted([int(x) for x in input().split()])\nl = D[len(D)//2-1]\nh = D[len(D)//2]\nif l == h:\n print(0)\nelse:\n print(h - l + 1)', 'N = int(input())\nD = sorted([int(x) for x in input().split()])\nl = D[len(D)//2-1]\nh = D[len(D)//2]\nif l == h:\n print(0)\nelse:\n print(D.count(h) + h - l)'...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s729653327', 's784241268', 's611414304']
[14396.0, 14396.0, 14428.0]
[79.0, 84.0, 80.0]
[145, 154, 141]
p02989
u413165887
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
["n = int(input())\nd = sorted([int(x) for x in input().split(' ')])\nif d[int(n/2)-1] == d[int(n/2)]:\n print(0)\nelse:\n print(d[int(n/2)] - d[int(n/2)-1]+1)", "n = int(input())\nd = sorted([int(x) for x in input().split(' ')])\nif d[int(n/2)-1] == d[int(n/2)]:\n print(0)\nelse:\n print(d[int(n/2)] - d[in...
['Wrong Answer', 'Accepted']
['s194428956', 's952146295']
[14428.0, 14120.0]
[80.0, 80.0]
[158, 156]
p02989
u422093579
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['\nN=int(input())\nx=list(map(int,input().split()))\nn=N//2\n\nX=sorted(x)\n#print(X)\n\n#print(X[n-1])\n#print(X[n])\n\nprint(X[n]-X[n-1]', '\nN=int(input())\nx=list(map(int,input().split()))\nn=N//2\n\nX=sorted(x)\n#print(X)\n\n#print(X[n-1])\n#print(X[n])\n\nprint(X[n]-X[n-1])']
['Runtime Error', 'Accepted']
['s146940214', 's742472386']
[2940.0, 13992.0]
[17.0, 76.0]
[126, 127]
p02989
u423585790
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['#!/usr/bin/env python3\nfrom collections import defaultdict\nfrom collections import deque\nfrom heapq import heappush, heappop\nimport sys\nimport math\nimport bisect\nimport random\nimport itertools\nsys.setrecursionlimit(10**5)\nstdin = sys.stdin\nbisect_left = bisect.bisect_left\nbisect_right = bisect.bisect_righ...
['Runtime Error', 'Accepted']
['s304745211', 's656901681']
[4592.0, 14652.0]
[42.0, 132.0]
[2626, 2626]
p02989
u425834921
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\nd = list(map(int,input().split()))\n\nt = d.sort()\n\na = t[(n/2)-1]\nb = t[(n/2)]\n\nprint(b-a)', 'n = int(input())\nd = list(map(int,input().split()))\n\nd.sort()\n\na = d[int(n/2)-1]\nb = d[int(n/2)]\n\nprint(b-a)']
['Runtime Error', 'Accepted']
['s532980531', 's480027023']
[14396.0, 14396.0]
[75.0, 75.0]
[106, 108]
p02989
u431484963
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['14\n99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 1', 'import statistics\nimport math\nn = int(input()) \ns = list(map(int,input().split()))\ns.sort()\n\nmed_ind = len(s)//2 -1\n#print(med_ind)\nans = s[med_ind+1]-s[med_ind]\n#print(s[med_ind+1],s[med_ind])\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s729168808', 's576958708']
[2940.0, 16024.0]
[17.0, 96.0]
[83, 205]
p02989
u436982376
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['14\n99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 1', 'n = int(input())\nd = sorted(list(map(int,input().split())))\n\nif n%2 == 1:\n print(0)\nelse:\n print(d[len(d)//2]-d[(len(d)//2)-1])\n']
['Runtime Error', 'Accepted']
['s379173874', 's010050899']
[3064.0, 14428.0]
[17.0, 76.0]
[83, 134]
p02989
u440161695
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\nd=list(map(int,input().split()))\nd=sorted(d)\nprint(d[N/2]-d[(N/2)-1])', 'N=int(input())\nd=list(map(int,input().split()))\nd=sorted(d)\nprint(d[int(N/2)]-d[int((N/2))-1])']
['Runtime Error', 'Accepted']
['s227450826', 's341364732']
[14428.0, 14428.0]
[75.0, 77.0]
[84, 94]
p02989
u440334385
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N = int(input())\nD = sorted(list(map(int, input().split())))\ncheck = []\nhalf = int(len(D)/2)\nD_lead = D[:half]\nD_tail = D[half:]\nif max(D_lead) != min(D_tail):\n check = [num for num in range(max(D_lead), min(D_tail)+1)]\n print(len(check))\nelse:\n print(0)', 'N = int(input())\nD = sorted(list(map(int...
['Wrong Answer', 'Accepted']
['s885466788', 's791434613']
[14396.0, 14396.0]
[93.0, 87.0]
[263, 261]
p02989
u446531810
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['N=int(input())\npermu=list(map(lambda x:int(x),input().split()))\npermu=sorted(permu)\ns,t=N//2-1,N//2\nprint(s,t)\na=list(range(permu[s]+1,permu[t]+1))\nprint(len(a))\n', 'N=int(input())\npermu=list(map(lambda x:int(x),input().split()))\npermu=sorted(permu)\ns,t=int(N/2)-1,int(N/2)\na=list(range(permu[s]+1,permu[t]+...
['Wrong Answer', 'Accepted']
['s556692892', 's544074626']
[14396.0, 14556.0]
[87.0, 87.0]
[162, 158]
p02989
u447166124
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['\nfrom statistics import mean\nN = int(input())\nd = list(map(int,input().split()))\n\nd.sort()\navg = mean(d) // 1\n\nd1 = [i for i in d if i <= avg]\nd2 = [i for i in d if i > avg]\n\nif len(d1) == len(d2):\n a = d2[0] - d1[-1]\n print(a)\nprint(0)', 'from statistics import mean\nimport sys\nN = int(input())\...
['Wrong Answer', 'Accepted']
['s523515381', 's610906827']
[16028.0, 15984.0]
[185.0, 108.0]
[242, 261]
p02989
u450617345
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['#!/usr/bin/env python3\np', '#!/usr/bin/env python3\nn = int(input())\nd = list(map(int, input().split()))\n\nd.sort()\nh = n // 2 - 1\n\na = d[h]\nb = d[h + 1]\n\nprint(b - a)']
['Runtime Error', 'Accepted']
['s905972502', 's102581229']
[2940.0, 14556.0]
[17.0, 77.0]
[24, 137]
p02989
u450904670
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = input()\nd = list(map(int,input().split()))\nd.sort()\nprint(d[int(n / 2)] - d[int(n/2) -1 ])\n', 'n = input()\nd = list(map(int,input().split()))\nd.sort()\nprint(d[int(n / 2)] - d[int(n/2) -1])\n', 'n = int(input())\nd = list(map(int,input().split()))\nd.sort()\nprint(d[int(n / 2)] - d[int(n/2) -1])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s409282093', 's588725072', 's435199640']
[14428.0, 14428.0, 14396.0]
[77.0, 76.0, 76.0]
[95, 94, 98]
p02989
u455533363
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n=int(input())\nd=list(map(int,input().split()))\n\nd=sorted(d)\n\nprint(d[n/2+1]-d[n/2-1])', 'n=int(input())\nd=sorted(list(map(int,input().split())))\n\nprint(d[n//2+1]-d[n//2-1])', 'n = int(input())\nd = sorted(list(map(int,input().split())))\n\nprint(d[2//n]-d[2//n-1])\n\n', 'n = int(input())\nd = sorted(list(map...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s049222247', 's090294976', 's332286789', 's406535701', 's511424783', 's554133992', 's602808423', 's632940753', 's666097851', 's741269435', 's780677349', 's440276953']
[14396.0, 14428.0, 14428.0, 14396.0, 14396.0, 13992.0, 14428.0, 13992.0, 14396.0, 14396.0, 14556.0, 14008.0]
[78.0, 77.0, 77.0, 76.0, 78.0, 77.0, 80.0, 75.0, 77.0, 76.0, 77.0, 76.0]
[86, 83, 87, 90, 89, 90, 89, 98, 81, 87, 87, 86]
p02989
u457289860
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['n = int(input())\narr_input = list(map(int,input().split()))\n\narr = sorted(arr_input)\n\nans = arr[n/2] - arr[n/2-1]\n\nif ans == 0:\n print(0)\nelse:\n print(ans)\n', 'n = int(input())\narr_in = list(map(int,input().split()))\n\narr = sorted(arr_in)\n\nn = int(n/2)\n\nres = arr[n] - arr[n-1]\nprint(res)\n']
['Runtime Error', 'Accepted']
['s208284413', 's232521146']
[13992.0, 14428.0]
[76.0, 76.0]
[162, 130]
p02989
u459590249
2,000
1,048,576
Takahashi made N problems for competitive programming. The problems are numbered 1 to N, and the difficulty of Problem i is represented as an integer d_i (the higher, the harder). He is dividing the problems into two categories by choosing an integer K, as follows: * A problem with difficulty K or higher will be _f...
['a,b,c,d=map(int, input().split())\n\nimport fractions\n\ndef lcm(x,y):\n\treturn (x*y)//fractions.gcd(x,y)\n\nlcmcd=lcm(c,d)\ndivc=b//c-(a-1)//c\ndivd=b//d-(a-1)//c\ndivcd=b//lcmcd-(a-1)//lcmcd\n\nprint(b-a+1-divc-divd+divcd)', 'a,b,c,d=map(int, input().split())\n\nimport fractions\n\ndef lcm(x,y):\n\treturn (x*y)//f...
['Runtime Error', 'Runtime Error', 'Accepted']
['s129964121', 's463291256', 's116530691']
[3064.0, 3060.0, 14396.0]
[18.0, 17.0, 83.0]
[212, 212, 175]