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 | u461118660 | 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()\ni = int(n / 2)\n\nprint(d[i] - d[i - 1])', 'n = int(input())\nd = list(map(int, input().split()))\ni = int(n / 2)\n\nd.sort()\nprint(d[i] - d[i - 1])'] | ['Runtime Error', 'Accepted'] | ['s994670821', 's357558691'] | [14396.0, 14556.0] | [75.0, 76.0] | [98, 100] |
p02989 | u472696272 | 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)\nl = d[n/2-1]\nr = d[n/2]\nprint(r-l)\n', 'n = int(input())\nd = list(map(int,input().split()))\nd = sorted(d)\nl = d[n//2-1]\nr = d[n//2]\nprint(r-l)\n'] | ['Runtime Error', 'Accepted'] | ['s226280924', 's404553177'] | [14120.0, 14428.0] | [79.0, 76.0] | [101, 103] |
p02989 | u475675023 | 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])\n'] | ['Runtime Error', 'Accepted'] | ['s441127400', 's440415956'] | [14428.0, 14396.0] | [76.0, 76.0] | [80, 81] |
p02989 | u484229314 | 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\nD = sorted([int(v) for v in input().split()])\narc = N // 2\nabc = arc - 1\nprint(D[arc] - D[abc])\n', 'N = int(input())\n\nD = sorted([int(v) for v in input().split()])\narc = N // 2\nabc = arc - 1\nprint(D[arc] - D[abc])\n'] | ['Runtime Error', 'Accepted'] | ['s961124695', 's060734496'] | [14428.0, 14428.0] | [82.0, 81.0] | [109, 114] |
p02989 | u492447501 | 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\n\nlength = len(d)\nlength_half = int(length/2)\n\n\nprint(d[length_half]-d[length_half-1])\n', 'N = int(input())\nd = list(map(int, input().split()))\nd.sort()\n\nlength = len(d)\nlength_half = int(length/2)\n\n\nprint(d[length_half]-d[length_half-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s394176184', 's953795272'] | [14428.0, 14428.0] | [39.0, 75.0] | [140, 148] |
p02989 | u492737043 | 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()\nhigh=max(d)\nlow=0\nwhile((high-low)>=2):\n if len([x for x in d if x<int((high+low)/2)])<N/2:\n low=int((high+low)/2)\n elif len([x for x in d if x<int((high+low)/2)])>N/2:\n high=int((high+low)/2)\n else:\n break\nM=int((high+low)/2)\ncount=... | ['Wrong Answer', 'Accepted'] | ['s147257305', 's546803235'] | [20592.0, 20612.0] | [2206.0, 72.0] | [506, 93] |
p02989 | u497883442 | 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])\nprint(d[n//2]-d[n//2-1])', 'n = int(input())\nd = list(map(int,input().split()))\nd = sorted(d)\nprint(d[n//2]-d[n//2-1])'] | ['Wrong Answer', 'Accepted'] | ['s692152823', 's736629563'] | [14396.0, 14428.0] | [77.0, 76.0] | [115, 90] |
p02989 | u506858457 | 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()))\nDS=sorted(D)\nans=DS[N//2]-DS[D//2-1]\nprint(ans)', 'N=int(input())\nD=list(map(int,input().split()))\nD=sorted(D)\nans=D[N//2]-D[N//2-1]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s040604298', 's965817497'] | [14556.0, 14556.0] | [77.0, 75.0] | [95, 92] |
p02989 | u511449169 | 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 statistics\n \nn = int(input())\nd = list(map(int, input().split()))\n \nif n % 2 == 1:\n print(0)\n exit()\n\nd = sorted(d)\nprint(d[n/2] - d[(n/2) - 1])', 'n = int(input())\nd = list(map(int, input().split()))\n \nif n % 2 == 1:\n print(0)\n exit()\n\nd = sorted(d)\nprint(d[int(n/2)] - d[int(n/2) - 1])'] | ['Runtime Error', 'Accepted'] | ['s384706935', 's796146488'] | [15964.0, 14428.0] | [94.0, 77.0] | [153, 141] |
p02989 | u516554284 | 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()))\nb=sorted(a)\nif b[(int(n/2)-1)]==b[int((n/2))]:\n print(0)\nelse:\n c=b[int((n/2)-1)]\n d=b[int((n/2))]\n e=len(list(range(c,d)))\n print(e+1)\n\n', 'n=int(input())\na=list(map(int,input().split()))\nb=sorted(a)\nif b[(n/2)-1]=b[(n/2)+1]:\n print(0)\nelse:\n c=... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s075425761', 's707045909', 's680450473'] | [13992.0, 3064.0, 14556.0] | [79.0, 17.0, 78.0] | [190, 167, 188] |
p02989 | u518987899 | 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().strip())\nD = sorted(list(map(int, input().strip().split(' '))))\nprint(D[N/2] - D[N/2-1])\n\n", "N = int(input().strip())\nD = sorted(list(map(int, input().strip().split(' '))))\nprint(D[int(N/2)] - D[int(N/2)-1])\n"] | ['Runtime Error', 'Accepted'] | ['s717652185', 's602588468'] | [14396.0, 14396.0] | [76.0, 76.0] | [106, 115] |
p02989 | u527261492 | 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)\nnum=D[(n/2)]-D[(n/2)-1]\nprint(num)\n', 'n=int(input())\nd=list(map(int,input().split()))\nD=sorted(d)\nprint(D[(n/2)+1]-D[(n/2)-1])\n', 'n=int(input())\nd=list(map(int,input().split()))\nD=sorted(d)\nnum=D[n/2]-D[(n/2)-1]\nprint(num)', 'n=int(input())\nd... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s034853542', 's081330192', 's146668162', 's158464413', 's473174034', 's966736876'] | [14812.0, 14396.0, 14556.0, 14428.0, 14428.0, 14428.0] | [81.0, 76.0, 79.0, 75.0, 77.0, 76.0] | [95, 89, 92, 87, 90, 127] |
p02989 | u528748570 | 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()\nmid = int(len(D)/2)\nprint(mid)\nans = D[mid]-D[mid-1]\nprint(ans)\n', 'N = int(input())\nD = list(map(int,input().split()))\nD.sort()\nmid = int(len(D)/2)\nans = D[mid]-D[mid-1]\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s914229493', 's618643760'] | [14396.0, 13992.0] | [76.0, 76.0] | [125, 114] |
p02989 | u531258707 | 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)\nhalf = int(N/2)\ndis = d[half] - d[half - 1]\nprint(dis)\n', 'N = int(input())\nd = list(map(int,input().split()))\nd.sort()\n#print(d)\nhalf = int(N/2)\ndis = d[half] - d[half - 1]\nprint(dis)\n'] | ['Wrong Answer', 'Accepted'] | ['s395136790', 's061271350'] | [14008.0, 14428.0] | [87.0, 75.0] | [125, 126] |
p02989 | u535171899 | 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_inputs = sorted([int(i) for i in input().split()])\n\nabc = d_inputs[0:n//2]\narc = d_inputs[n//2:n]\nprint(abc,arc)\nprint(len([i for i in range(abc[-1]+1,arc[0]+1)]))\n\n', 'n = int(input())\nd_inputs = sorted([int(i) for i in input().split()])\n\nabc = d_inputs[0:n//2]\narc = d_inputs[n//2:n]\n... | ['Wrong Answer', 'Accepted'] | ['s501166620', 's492853839'] | [14428.0, 14396.0] | [97.0, 87.0] | [184, 170] |
p02989 | u536034761 | 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 + 1] - D[N//2])', 'N=int(input())//2\nD=sorted(list(map(int,input().split())))\nprint(D[N]-D[N-1])'] | ['Runtime Error', 'Accepted'] | ['s870806230', 's364648595'] | [14428.0, 14396.0] | [75.0, 75.0] | [90, 77] |
p02989 | u537782349 | 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 = [int(i) for i in input().split()]\nb.sort()\nprint(b)\nif b[a // 2 - 1] == b[a // 2]:\n print(0)\nelse:\n print(b[a // 2] - b[a // 2 - 1])', 'a = int(input())\nb = list(map(int, input().split()))\nb.sort()\nprint(b)\nfor i in range(a//2, a):\n print(b[i]-b[i-1])\n exit()\n', 'a = int... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s238723050', 's372440503', 's772049644'] | [14428.0, 14428.0, 14396.0] | [89.0, 87.0, 79.0] | [159, 130, 94] |
p02989 | u539517139 | 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]-d[n-1])', 'n=int(input())\nd=sorted(list(map(int,input().split())))\nprint(d[n//2]-d[n//2-1])'] | ['Runtime Error', 'Accepted'] | ['s653180045', 's845536172'] | [14396.0, 14428.0] | [76.0, 78.0] | [74, 80] |
p02989 | u541475502 | 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... | ['cnt = int(input())\nin_str = [int(i) for i in input().split()]\nin_str.sort()\nprint(in_str[cnt//2+1] - in_str[cnt // 2])', 'cnt = int(input())\nin_str = [int(i) for i in input().split()]\nin_str.sort()\nprint(in_str[cnt//2] - in_str[cnt // 2-1])\n\n'] | ['Runtime Error', 'Accepted'] | ['s410163209', 's373824515'] | [14396.0, 14428.0] | [81.0, 80.0] | [118, 120] |
p02989 | u555503067 | 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_list.sort()\n\nn1 = d_list[N//2]\nprint(d_list[n1 + 1] - d_list[n1])\n\n ', 'N = int(input())\nd_list = list(map(int, input().split()))\nd_list.sort()\n\nn1 = N//2\nprint(d_list[n1] - d_list[n1 - 1])'] | ['Runtime Error', 'Accepted'] | ['s158373991', 's828336905'] | [14396.0, 14428.0] | [75.0, 76.0] | [141, 117] |
p02989 | u556225812 | 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()))\nmid = N/2 - 1\nlst = sorted(lst)\nif lst[mid] == lst[mid+1]:\n print(0)\nelif lst[mid] < lst[mid+1]:\n print(lst[mid+1]-lst[mid]+1)', 'N = int(input())\nlst = list(map(int, input().split()))\nmid = int(N/2 - 1)\nlst = sorted(lst)\nif lst[mid] == lst[mid+1... | ['Runtime Error', 'Accepted'] | ['s964430822', 's380548747'] | [14396.0, 14428.0] | [77.0, 76.0] | [187, 190] |
p02989 | u556589653 | 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()))\np = 0\nq = 0\nm = 0\nd.sort()\nif (len(d))%2 == 0:\n m = (d[(len(d)//2)-1]+d[len(d)//2])/2\nelse:\n m = d[(len(d)//2)]\nfor i in range(len(d)):\n if d[i]>=m:\n if d[i] == d[i+1]:\n break\n else:\n p = d[i]\n q = d[i-1]\n break\n else:... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s395432799', 's498353713', 's822513555', 's922871275', 's925049829', 's057299337'] | [14428.0, 14428.0, 14428.0, 14556.0, 14428.0, 14396.0] | [75.0, 75.0, 75.0, 40.0, 40.0, 77.0] | [321, 325, 304, 76, 86, 84] |
p02989 | u556594202 | 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=[int(i) for i in input().split()]\nl.sort()\nprint(max(0,l[int(N/2)] - l[int(N/2)-1])\n', 'N=int(input())\nl=[int(i) for i in input().split()]\nl.sort()\nprint(max(0,l[int(N/2)] - l[int(N/2)-1]))\n'] | ['Runtime Error', 'Accepted'] | ['s540869912', 's145672547'] | [8936.0, 20684.0] | [30.0, 73.0] | [101, 102] |
p02989 | u558493745 | 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()))\n\ndef swap(a,i,j):\n c = a[i]\n d = a[j]\n if a[i]>a[j]:\n a[j] = c\n a[i] = d\n return a\n\nfor i in range (int(n/2)+1):\n for j in range (i+1,n):\n swap(a,i,j)\n \nprint(a[int(n/2)+1]-a[int(n/2)])\n\n\n ', 'n = int( input())\na = list ( ma... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s049387194', 's127388155', 's267188906', 's605521056', 's682014076'] | [14396.0, 13988.0, 14556.0, 14428.0, 14396.0] | [2108.0, 76.0, 2104.0, 41.0, 75.0] | [264, 110, 265, 247, 108] |
p02989 | u564770050 | 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()\nmind = d[n//2-1]\nmaxd = d[n//2]\n\nprint(mind,maxd)\n\nans = maxd - (mind + 1) + 1\nif ans < 0:\n print(0)\n exit()\nprint(ans)', 'n = int(input())\nd = list(map(int,input().split()))\n\nd.sort()\nmind = d[n//2-1]\nmaxd = d[n//2]\n\nans = maxd -... | ['Wrong Answer', 'Accepted'] | ['s416601700', 's884359790'] | [13992.0, 14428.0] | [75.0, 76.0] | [187, 169] |
p02989 | u566297428 | 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 \nprint(L[N//2]-L[N//2-1])\n', 'N = int(input())\nP = list(map(int, input().split()))\n\nL[N//2]-L[N//2-1]', 'N = int(input())\nP = sorted(list(map(int, input().split())))\n\nprint(L[N//2]-L[N//2-1])', 'N = int(input())\nP = sorted(list(map(int, input().split())... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s042676882', 's820901412', 's945240595', 's261065362'] | [20696.0, 20524.0, 20684.0, 20640.0] | [48.0, 43.0, 61.0, 66.0] | [80, 71, 86, 86] |
p02989 | u566428756 | 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())//2\nprint(n)\nd=sorted(list(map(int,input().split())))\nprint(d[n]-d[n-1])\n', 'n=int(input())//2\nd=sorted(list(map(int,input().split())))\nprint(d[n]-d[n-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s412765478', 's932530086'] | [14428.0, 14008.0] | [76.0, 82.0] | [87, 78] |
p02989 | u566529875 | 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())\nli=list(map(int,input().split()))\nli.sort()\nprint(li[n/2]-li[n/2-1])', 'n=int(input())\nli=list(map(int,input().split()))\nli.sort()\nprint(li[n//2]-li[n//2-1])'] | ['Runtime Error', 'Accepted'] | ['s653441611', 's104562103'] | [13992.0, 13992.0] | [76.0, 76.0] | [83, 85] |
p02989 | u572940434 | 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()))\ndunder = 0\ncount = 0\nfor i in range():\n dunder = sum (x<i for x in d)\n if 2*dunder == len(d):\n count += 1\n elif 2*dunder > len(d):\n break\nprint(count)\n', 'N = int(input())\nd = list(map(int,input().split()))\ndunder = 0\ncount = 0\n... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s156595882', 's435737292', 's667846435', 's739574501'] | [14396.0, 14008.0, 14428.0, 14556.0] | [40.0, 2104.0, 2104.0, 75.0] | [226, 227, 208, 131] |
p02989 | u579015878 | 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())\nM=list[]\nm=list[]\nfor i in range(N):\n for x in range(N):\n if L[x]<i:\n L[x].append(M)\n else:\n L[x].append(m)\n if len(M)=len(m):\n ans+=1\n\nprint(ans)', "N=int(input())\nL=list(map(int,input().split()))\nl=sorted(L)\nif N%2==0:\n n=int(N/2)... | ['Runtime Error', 'Accepted'] | ['s390266981', 's233177131'] | [2940.0, 14556.0] | [17.0, 76.0] | [214, 176] |
p02989 | u580093517 | 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 = set(map(int, input().split()))\n\nif len(p) % 2 == 1:\n print(0)\nelse:\n p = list(p)\n cnt = p[len(p)//2] - p[len(p)//2 -1]\n print(cnt)', 'n = int(input())\np = set(map(int, input().split()))\np = list(p)\np.sort()\nif len(p) % 2 == 1:\n print(0)\nelse:\n p = list(p)\n cnt... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s026535605', 's293742562', 's701894090'] | [14440.0, 14436.0, 14428.0] | [46.0, 48.0, 76.0] | [163, 183, 187] |
p02989 | u586754007 | 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())\ninp = [int(x) for x in input().split()]\nmed=int(len(inp)/2)\nprint(inp[med]-inp[med-1])', 'a=int(input())\ninp = [int(x) for x in input().split()]\ninp.sort()\nmed=int(len(inp)/2)\nprint(inp[med]-inp[med-1])'] | ['Wrong Answer', 'Accepted'] | ['s057273108', 's265616614'] | [14428.0, 14396.0] | [44.0, 79.0] | [101, 112] |
p02989 | u588558668 | 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()\ne=d[n//2]\nf=d[n//2+1]\nprint(f-e)', 'n=int(input())\nd=list(map(int,input().split()))\nd.sort()\ne=d[n//2-1]\nf=d[n//2]\nprint(f-e)\n'] | ['Runtime Error', 'Accepted'] | ['s966956729', 's652195215'] | [14428.0, 14008.0] | [76.0, 78.0] | [89, 90] |
p02989 | u591919975 | 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()\nans=d[N//2+1]-d[N//2]\nprint(ans)\n', 'N=int(input())\nd=[int(i) for i in input().split()]\n\nd.sort()\nans=d[N/2+1]-d[N/2]\nprint(ans)\n', 'N=int(input())\nd=list(map(int,input().split()))\n\nd.sort()\nans=d[N//2]-d[N//2-1]\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s693938467', 's713450148', 's145050491'] | [20808.0, 20572.0, 20736.0] | [67.0, 64.0, 62.0] | [91, 92, 91] |
p02989 | u595893956 | 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()))\na.sort()\nprint(a[n/2+1]-a[n/2])\n', 'n=int(input())\na=list(map(int,input().split()))\na=sort(a)\nprint(a[n/2+1]-a[n/2])\n', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nprint(a[n//2+1]-a[n//2])', 'n=int(input())\na=list(map(int,input().split()))\na.s... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s314805673', 's431280092', 's855604499', 's579327758'] | [14428.0, 14008.0, 14004.0, 14396.0] | [75.0, 39.0, 78.0, 74.0] | [80, 81, 81, 82] |
p02989 | u596297663 | 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#print(d)\nsd = sorted(d)\n##print(sd[len(d)//2-1])\nprint(sd[len(d)//2])\nprint(sd[len(d)//2] - sd[len(d)//2-1] +1)', 'n=int(input())\nd=list(map(int, input().split()))\n#print(d)\nsd = sorted(d)\n#print(sd)\n#print(sd[len(d)//2-1])\n#print(sd[len(d)//2])\n\n\npri... | ['Wrong Answer', 'Accepted'] | ['s526626209', 's536816736'] | [14396.0, 14396.0] | [77.0, 78.0] | [163, 173] |
p02989 | u600717568 | 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()))\nD=List.sort()\nm=D[N&2]-D[N%2-1]-1\nif m=-1:\n print(0)\nelse:\n print(m)', 'N=int(input())\nList=list(map(int,input().split()))\nList.sort()\nl=int(N/2)\nk=int(N/2-1)\nm=List[l]-List[k]\nprint(m)'] | ['Runtime Error', 'Accepted'] | ['s632600556', 's232594807'] | [2940.0, 14396.0] | [17.0, 78.0] | [121, 113] |
p02989 | u603324902 | 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\nD = [int(i) for i in input().split()]\n\nD2 = sorted(D)\nA = D2[N//2]\nB = D2[N//2+1]\nprint(abs(A-B))', 'N = int(input())\n\nD = [int(i) for i in input().split()]\n\nD2 = sorted(D)\nA = D2[N//2-1]\nB = D2[N//2]\nprint(abs(A-B))'] | ['Runtime Error', 'Accepted'] | ['s078015236', 's866723085'] | [14396.0, 14428.0] | [79.0, 80.0] | [115, 115] |
p02989 | u606090886 | 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()\nwhile len(d) > 0:\n x = d.pop()\n y = d.pop(0)\nprint(y - x)\n', 'n = int(input())\nd = list(map(int,input().split()))\nd.sort()\nh = len(d)//2\nx = d[h]\ny = d[h - 1]\nprint(x - y)\n'] | ['Wrong Answer', 'Accepted'] | ['s897415764', 's742562643'] | [14008.0, 14396.0] | [835.0, 76.0] | [133, 110] |
p02989 | u616117610 | 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()\n\n\nans = p[int(n/2)] - [int(n/2)-1]\nprint(ans)', 'n = int(input())\np = list(map(int,input().split()))\np.sort()\n\nans = p[int(n/2)] - p[int(n/2)-1]\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s446311257', 's832052418'] | [14428.0, 14008.0] | [77.0, 75.0] | [106, 107] |
p02989 | u623687794 | 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())\nprob=list(map(int,input().split()))\nprob.sort(reverse=True)\nprint(prob[n//2]-prob[(n//2)-1])', 'n=int(input())\nprob=list(map(int,input().split()))\nprob.sort(reverse=True)\nprint(-prob[n//2]+prob[(n//2)-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s998108377', 's133425027'] | [14008.0, 14428.0] | [75.0, 76.0] | [107, 109] |
p02989 | u628965061 | 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())\ndlis=sorted(list(map(int,input().split())))\nprint(dlis)\nprint(dlis[int((n/2))]-dlis[int(n/2)-1])', 'n=int(input())\ndlis=sorted(list(map(int,input().split())))\nprint(dlis[int((n/2))]-dlis[int(n/2)-1])'] | ['Wrong Answer', 'Accepted'] | ['s743184423', 's034644178'] | [14428.0, 14428.0] | [86.0, 76.0] | [111, 99] |
p02989 | u632423548 | 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 = input().split()\nds = [int(i) for i in ds]\nds.sort()\n#print(ds)\n\n# print("0")\n#else:\nprint(ds[int(N/2)+1]-ds[int(N/2)])', 'N = int(input())\nds = input().split()\nds = [int(i) for i in ds]\nds.sort()\n#print(ds)\nif ds[int(N/2)] == ds[int(N/2)+1]:\n print("0")\nelse:\n print("1")', 'N ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s809956810', 's901331893', 's531068457'] | [14428.0, 14396.0, 14120.0] | [78.0, 80.0, 79.0] | [176, 151, 108] |
p02989 | u635949425 | 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 = [int(a) for a in input().split()]\nA.sort(reverse=True)\nlen = n //2\nprint(A[len] - A[len-1])', 'n = int(input())\nA = [int(a) for a in input().split()]\nA.sort(reverse=False)\nlen = n //2\nprint(A[len] - A[len-1]) '] | ['Wrong Answer', 'Accepted'] | ['s789691896', 's538859012'] | [14428.0, 14396.0] | [79.0, 80.0] | [112, 114] |
p02989 | u642823003 | 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[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])'] | ['Runtime Error', 'Accepted'] | ['s862205124', 's799904565'] | [3064.0, 14428.0] | [17.0, 78.0] | [93, 96] |
p02989 | u652656291 | 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()\nb = l[n//2+1]-[n//2+2]\nprint(b)', 'n = int(input())\nl = list(map(int,input().split()))\nl.sort()\na = n//2\n\nans = d[a]-d[a-1]\n\nprint(ans)\n', 'n = int(input())\nl = list(map(int,input().split()))\nl.sort()\nb = l[n//2+1]-l[n//2+2]\nprint(b)', 'n = ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s201131713', 's673560933', 's711200052', 's402237469'] | [14428.0, 14396.0, 14428.0, 14396.0] | [76.0, 77.0, 77.0, 76.0] | [92, 101, 93, 101] |
p02989 | u655048024 | 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()))\nmid = N//2\nif (d[mid]==d[mid-1]):\n print(0)\nelse:\n ans = d[mid]-d[mid-1]\n print(ans)', 'N = int(input())\nd = list(map(int,input().split()))\nmid = N/2\nif (d[mid]==d[mid-1]):\n print(0)\nelse:\n ans = d[mid]-d[mid-1]\n print(ans)', 'N = int(input())\nd... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s217172843', 's761293885', 's350136346'] | [14396.0, 14396.0, 14396.0] | [43.0, 40.0, 75.0] | [139, 138, 148] |
p02989 | u670180528 | 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 operator import mul\nfrom functools import reduce\n\nmod = 10**9 + 7\nn,k = map(int,input().split())\n\ndef cmb(n,r,mod):\n if r==0 or n==r:return 1\n r = min(n-r,r)\n ue = reduce(mul, range(n, n-r, -1))\n shita = reduce(mul, range(1,r+1))\n return (ue//shita)%mod\n\nfor i in range(1,k+1):\n try:print(cmb(... | ['Runtime Error', 'Accepted'] | ['s655209564', 's242576059'] | [3572.0, 14396.0] | [23.0, 76.0] | [356, 83] |
p02989 | u671861352 | 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\ns = 0\nif N % 2 == 0:\n center = d[int(N / 2)]\n center_ = d[int(N / 2) - 1]\n print(center, center_)\n if center == center_:\n if d.count(center) % 2 == 0:\n print(0)\n else:\n print(center - center_)\nelse:\... | ['Wrong Answer', 'Accepted'] | ['s357979537', 's610480224'] | [13992.0, 14396.0] | [77.0, 75.0] | [315, 176] |
p02989 | u672735299 | 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 = [int(i) for i in input().split()]\narr.sort()\n\nprint(arr)\n\ncenter = n // 2\n\nif(arr[center] == arr[center-1]):\n result = 0\nelse:\n result = arr[center] - arr[center-1]\n\nprint(result)', 'n = int(input())\narr = [int(i) for i in input().split()]\narr.sort()\n\ncenter = n // 2\n\ni... | ['Wrong Answer', 'Accepted'] | ['s759680690', 's402098246'] | [14556.0, 14396.0] | [90.0, 80.0] | [208, 196] |
p02989 | u680503348 | 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... | ['# For taking integer inputs.\ndef inp():\n return(int(input()))\n\n\n# For taking List inputs.\ndef inlist():\n return(list(map(int, input().split())))\n\n\n# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are... | ['Wrong Answer', 'Accepted'] | ['s399112686', 's567720717'] | [14428.0, 14428.0] | [87.0, 77.0] | [624, 600] |
p02989 | u681110193 | 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\nd=L[int(n/2)]-L[int(n/2)-1]\n\n\nprint(d)\n\n\n\n', 'n=int(input())\nL=list(map(int,input().split()))\n\nd=L[n/2+1]-L[n/2]\n\n\nprint(d)\n\n\n', 'n=int(input())\nL=list(map(int,input().split()))\nL.sort\nd=L[int(n/2)-1]-L[int(n/2)]\n\n\nprint(d)\n\n\n', 'n=int... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s263876077', 's516063313', 's672939355', 's810872973', 's563966815'] | [14428.0, 14008.0, 14396.0, 14556.0, 14556.0] | [43.0, 40.0, 41.0, 41.0, 75.0] | [97, 80, 96, 94, 90] |
p02989 | u686230543 | 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[n // 2 + 1] - d[n // 2])', 'n = int(input())\nd = sorted(map(int, input().split()))\nprint(d[n // 2] - d[n // 2 - 1])'] | ['Runtime Error', 'Accepted'] | ['s595478342', 's712308206'] | [14428.0, 13992.0] | [75.0, 75.0] | [87, 87] |
p02989 | u687929074 | 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)\nlow = sd[N/2-1]\nup = sd[N/2]\nnum = up - low\nprint(num)', 'N = int(input())\nd = list(map(int,input().split()))\n\nsd = sorted(d)\nlow = sd[N//2-1]\nup = sd[N//2]\nnum = up - low\nprint(num)'] | ['Runtime Error', 'Accepted'] | ['s090979826', 's715876082'] | [13992.0, 14428.0] | [76.0, 76.0] | [122, 124] |
p02989 | u690175641 | 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=input().split()\nd_i=[int(x) for x in d_s]\nd=sorted(d_i)\nk=d[n/2]\nt=d[n/2-1]\nprint(k-t)', 'n=int(input())\nd_s=input().split()\nd_i=[int(x) for x in d_s]\nd=sorted(d_i)\nk=d[int(n/2)]\nt=d[int(n/2)-1]\nprint(k-t)'] | ['Runtime Error', 'Accepted'] | ['s736375760', 's839622480'] | [16628.0, 15324.0] | [82.0, 84.0] | [105, 115] |
p02989 | u690285749 | 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()))\na.sort()\nprint(*a)\nif len(a)%2==0:\n\tprint(a[n//2]-a[(n//2)-1])\nelse:\n\tprint(0)', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nprint(a[n//2]-a[(n//2)-1])'] | ['Wrong Answer', 'Accepted'] | ['s866499013', 's787864331'] | [14396.0, 14008.0] | [128.0, 76.0] | [126, 83] |
p02989 | u690781906 | 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)\nprint(D[N//2] - D[N//2-1])', 'N = int(input())\nD = list(map(int, input().split()))\nD.sort()\nprint(D[N//2] - D[N//2-1])'] | ['Wrong Answer', 'Accepted'] | ['s653063720', 's991294837'] | [14396.0, 14428.0] | [85.0, 75.0] | [97, 88] |
p02989 | u692054751 | 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 = [int(s) for s in input().split()]\nsum([ sorted([p1,p2,p3])[1] == p1 for p1,p2,p3 in zip(p[2:],p[1:(N-1)],p[:(N-2)])])', 'N = int(input())\np = [int(s) for s in input().split()]\nsum([ sorted([p1,p2,p3])[1] == p2 for p1,p2,p3 in zip(p[2:],p[1:(N-1)],p[:(N-2)])])', 'N = int(input())\ndef LI():\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s891373008', 's942867964', 's441625310'] | [14556.0, 14428.0, 14428.0] | [93.0, 94.0, 81.0] | [138, 138, 217] |
p02989 | u693933222 | 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\ncnt = 0\n\nd.sort()\n\nprint(d)\nprint(d[int(n/2)] - d[int(n/2-1)])', 'n =int(input())\nd = list(map(int,input().split()))\n\ncnt = 0\n\nd.sort()\n\n#print(d)\nprint(d[int(n/2)] - d[int(n/2-1)])'] | ['Wrong Answer', 'Accepted'] | ['s126728530', 's870240934'] | [14428.0, 14428.0] | [85.0, 77.0] | [114, 115] |
p02989 | u694665829 | 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()))\nfor i in range(1,n+1):\n print(a.count(i))', 'N=int(input())\nl=list(map(int,input().split()))\na=N//2\nans=l[a]-l[a-1]\nprint(ans)', 'n=int(input())\nD=list(map(int,input().split()))\nD=sorted(D,reverse=True)\nprint(D[n//2-1]-D[n//2])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s613353584', 's630502539', 's686700565'] | [14008.0, 13992.0, 20672.0] | [2104.0, 42.0, 69.0] | [92, 81, 97] |
p02989 | u697696097 | 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=list(map(int, input().rstrip().split()))\narr.sort()\n\nif arr[n//2-1] == arr[n//2]:\n print(0)\n return\nprint(arr[n//2]-arr[n//2-1])', 'n=int(input())\narr=list(map(int, input().rstrip().split()))\narr.sort()\n\nif arr[n//2-1] == arr[n//2]:\n print(0)\nelse:\n print(arr[n//2]-arr[n//2-1])\n'... | ['Runtime Error', 'Accepted'] | ['s679168509', 's090832938'] | [9092.0, 20780.0] | [27.0, 68.0] | [149, 149] |
p02989 | u699944218 | 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()))\nif len(d) % 2 == 1:\n print(0)\nelse:\n D = sorted(d)\n n = len(d) // 2 - 1 \n print(D[n+1] - D[n] - 1)', 'N = int(input())\nd = list(map(int,input().split()))\nif len(d) % 2 == 1:\n print(0)\nelse:\n D = sorted(d)\n n = len(d) // 2 - 1 \n print(D[n+1] - D... | ['Wrong Answer', 'Accepted'] | ['s548748258', 's584436228'] | [14008.0, 14428.0] | [76.0, 80.0] | [154, 150] |
p02989 | u704216644 | 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 random\nimport numpy as np\n\nN = int(input())\nd = [int(i) for i in input().split()]\ndd = np.sort(d,kind='quicksort')\n\nK = N / 2\nK = dd[K]\n\nprint(K)", "import random\nimport numpy as np\n\nN = int(input())\nd = [int(i) for i in input().split()]\ndd = np.sort(d,kind='quicksort')\n\na = int(N / 2)\nb = a ... | ['Wrong Answer', 'Accepted'] | ['s388119530', 's207601351'] | [24188.0, 23832.0] | [193.0, 199.0] | [152, 176] |
p02989 | u709304134 | 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\nN = int(input())\nD = list(map(int,input().split()))\nD = sorted(D)\nidx = len(D) // 2\nprint(D[idx] - D[odx-1])', '#coding:utf-8\nN = int(input())\nD = list(map(int,input().split()))\nD = sorted(D)\nidx = len(D) // 2\nprint(D[idx] - D[odx-1])', '#coding:utf-8\nN = int(input())\nD = list(map(int,input(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s337021910', 's400173729', 's124056086'] | [13992.0, 14396.0, 14428.0] | [76.0, 76.0, 77.0] | [122, 122, 147] |
p02989 | u720065198 | 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()))\nans = 0\nif N%2==0:\n print(a[N]-a[N-1])\nelse:\n print(0)', 'N = int(input())\na = list(map(int, input().split()))\nif N%2==0:\n print(a[N/2]-a[N/2-1])\nelse:\n print(0)', 'N = int(input())\na = list(map(int, input().split()))\na.sort()\nif N%2==0:\n print(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s114011788', 's899754346', 's841741599'] | [14428.0, 14396.0, 14396.0] | [40.0, 41.0, 76.0] | [109, 105, 124] |
p02989 | u722779458 | 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... | ['8\n9 1 14 5 5 4 4 14', 'K=int(input())\nD=[int(x) for x in input().split()]\nD.sort()\nM=K/2\nm=M-1\nans=D[int(M)]-D[int(m)]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s420006336', 's711981655'] | [2940.0, 14396.0] | [17.0, 79.0] | [19, 106] |
p02989 | u731028462 | 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()))\nsd=sorted(d)\nprint(sd[(n//2)]-sd[(n//2)-1])n=int(input())\nd=list(map(int,input().split()))\nsd=sorted(d)\nprint(sd[(n//2)]-sd[(n//2)-1])', 'n=int(input())\nd=list(map(int,input().split()))\nsd=sorted(d)\nprint(sd[(n//2)]-sd[(n//2)-1])'] | ['Runtime Error', 'Accepted'] | ['s520834130', 's453987690'] | [2940.0, 14396.0] | [17.0, 77.0] | [182, 91] |
p02989 | u733734110 | 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\nl = int(a/2)\n\nfor i in range(l-1):\n t1 = max(p)\n t2 = min(p)\n #print(t1, t2)\n p.remove(t1)\n p.remove(t2)\n\nprint(max(p) - min(p))', 'n = int(inout())\np = list(map(int, input().split()))\n\nl = int(a/2)\n\nfor i in range(l-1):\n t1 = m... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s030125133', 's071620229', 's841291135', 's065902587'] | [13992.0, 3060.0, 4724.0, 14148.0] | [40.0, 17.0, 19.0, 185.0] | [197, 197, 182, 169] |
p02989 | u734589227 | 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())\nnum=list(map(int,input().split()))\nnum.sort()\nprint(num[int(n/2)],num[int(n/2) -1])\nif num[int(n/2)-1]==num[int(n/2)]:\n a=0\nelif not num[int(n/2)]==num[int(n/2) -1]:\n a= num[int(n/2)] - num[int(n/2)-1]\nprint(a)', 'n=int(input())\nnum=list(map(int,input().split()))\nnum.sort()\nprint(num[i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327105327', 's747361103', 's924990783', 's623468974'] | [14396.0, 14396.0, 13992.0, 14396.0] | [76.0, 77.0, 77.0, 76.0] | [231, 231, 231, 193] |
p02989 | u734876600 | 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_lis = list(map(int,input().split()))\nli = sorted(d_lis)\nmid = n // 2\nprint(li[mid] - li[mid-1n = int(input())\nd_lis = list(map(int,input().split()))\nli = sorted(d_lis)\nmid = n // 2\nprint(li[mid] - li[mid-1])', 'n = int(input())\nd_lis = [int(d) for d in input().split()]\nans = 0\nc = 0\nli ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s204970538', 's405180491', 's946225795'] | [2940.0, 14120.0, 14008.0] | [17.0, 47.0, 77.0] | [226, 241, 114] |
p02989 | u746154235 | 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... | ['D=list(map(int, input().split()))\nD=sorted(D)\nprint(D[len(D)//2]-D[len(D)//2-1])\n', 'N=int(input())\nD=sorted(list(map(int, input().split())))\nprint(D[N//2]-D[N//2-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s020921451', 's332504797'] | [2940.0, 14396.0] | [19.0, 79.0] | [81, 82] |
p02989 | u766566560 | 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... | ['# ans\n\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nd = list(map(int, input().split()))\nd.sort()\n\nprint(d[N//2] - (d[N//2] - 1))', '# ans\n\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nd = list(map(int, input().split()))\nd.sort()\n\nprint(d[N/2] - (d[N/2] - 1))', 'import sys\ninput = ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s025146955', 's117871755', 's585757255', 's266866431'] | [14016.0, 14172.0, 14300.0, 14300.0] | [76.0, 76.0, 102.0, 77.0] | [138, 136, 169, 140] |
p02989 | u769215762 | 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=[]\ni=1\nk=0\nl=0\nrk=[]\nbk=[]\na.append(int(x))\nfor x in input().split(" "):\n a.append(int(x))\n\nwhile k<=100000:\n while i<=a[0]:\n if a[i]>=k:\n rk.append(a[i])\n else:\n bk.append(a[i])\n i+=1\n if len(rk)==len(bk):\n l+=1\n rk=[]\n bk=[]\n ... | ['Runtime Error', 'Accepted'] | ['s614324705', 's300984126'] | [3064.0, 14428.0] | [17.0, 89.0] | [329, 159] |
p02989 | u773686010 | 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())\nN_List = sorted(list(map(int,input().split())))\nstd = int(N/2)\nansstd = N_List[std] - N_List[std-1] \nprint((0,ansstd-1)[ansstd > 1])', 'N = int(input())\nN_List = sorted(list(map(int,input().split())))\nstd = int(N/2)\nansstd = N_List[std] - N_List[std-1] \nprint((0,ansstd)[ansstd > 0])'] | ['Wrong Answer', 'Accepted'] | ['s691515605', 's077368699'] | [20680.0, 20740.0] | [68.0, 69.0] | [149, 147] |
p02989 | u774417629 | 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())\nreadints = lambda: map(int,input().split(' '))\na=list(readints())\na.sort()\nmid = n//2\nx=a[mid]\ny=a[mid+1]\nprint(y-x)\n", "n=int(input())\nreadints = lambda: list(map(int,input().split(' ')))\na=readints()\na.sort()\nmid = n//2\nx=a[mid]\ny=a[mid+1]\nprint(y-x)", "n=int(input())\nreadints = lambd... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s381243594', 's986060377', 's953125640'] | [14396.0, 14396.0, 14396.0] | [77.0, 76.0, 76.0] | [132, 131, 132] |
p02989 | u777028980 | 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())\nhoge=list(map(int,input().split()))\nhoge.sort()\nprint(hoge[n//2-1]-hoge[n//2])', 'n=int(input())\nhoge=list(map(int,input().split()))\nhoge.sort()\nprint(hoge[n//2]-hoge[n//2-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s774247092', 's506129508'] | [14396.0, 14396.0] | [76.0, 75.0] | [93, 94] |
p02989 | u777283665 | 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())))\n\nprint(d)\n\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(list(map(int, input().split())))\nif d[n//2-1] == d[n//2]:\n print(0)\nelse:\n print(d[n//2] - d[n//2-1])'] | ['Wrong Answer', 'Accepted'] | ['s652657535', 's770890403'] | [14396.0, 14396.0] | [88.0, 76.0] | [146, 135] |
p02989 | u778700306 | 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... | ['\ninput()\nxs = list(sorted(map(int, input().split())))\n\narc_idx = len(xs)//2\nk_upper = xs[arc_idx]\nk_lower = xs[arc_idx - 1] + 1\n\nprint(max(k_upper - k_lower, 0))\n', '\ninput()\nxs = list(sorted(map(int, input().split())))\n\narc_idx = len(xs)//2\nk_upper = xs[arc_idx]\nk_lower = xs[arc_idx - 1] + 1\n\nprint(... | ['Wrong Answer', 'Accepted'] | ['s167210745', 's201264735'] | [14428.0, 14556.0] | [77.0, 77.0] | [162, 166] |
p02989 | u778926388 | 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())\n\nd = list(map(int,input().split()))\n\nd.sort()\nprint(d)\n\nk = int(N/2)\nAns = d[k] - d[k-1]\n\nprint(Ans)\n', '\nN = int(input())\n\nd = list(map(int,input().split()))\n\nd.sort()\n\nk = int(N/2)\nAns = d[k] - d[k-1]\n\nprint(Ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s504362106', 's220911520'] | [14004.0, 14428.0] | [90.0, 75.0] | [153, 144] |
p02989 | u780698286 | 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] - l[n//2 +1])', 'n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nprint(abs(l[n//2-1] - l[n//2]))'] | ['Runtime Error', 'Accepted'] | ['s616737694', 's133053031'] | [20392.0, 20648.0] | [69.0, 66.0] | [90, 93] |
p02989 | u780962115 | 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())\ns=list(map(int,input().split()))\nprint(s)\nchanged=sorted(s,reverse=True)\n\nif n%2==0:\n if changed[int(n/2-1)]==changed[int(n/2)]:\n print(0)\n else:\n print(-changed[int(n/2)]+changed[int(n/2-1)])\nelse:\n print(0)', 'n,m=map(int,input().split())\nuse=[0]\nans=1\nfor i in ra... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s018642005', 's039567870', 's465293904', 's577284707'] | [14396.0, 3064.0, 2940.0, 14428.0] | [85.0, 18.0, 17.0, 79.0] | [246, 474, 211, 203] |
p02989 | u785989355 | 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[N//2]-d[N//2-1]+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'] | ['s498391754', 's261182889'] | [14428.0, 13992.0] | [76.0, 75.0] | [85, 83] |
p02989 | u789290859 | 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())\nli = list(map(int, input().split()))\nli.sort()\na = li[N//2]\nflag = True\nprint(li)\nfor i in range (N//2):\n if a == li[i]:\n flag = False\nif flag:\n print(li[N//2]-li[N//2-1])\nelse:\n print(0)', 'N = int(input())\nli = list(map(int, input().split()))\nli.sort()\na = li[N//2]\... | ['Wrong Answer', 'Accepted'] | ['s345187744', 's201766268'] | [20516.0, 20624.0] | [82.0, 72.0] | [222, 212] |
p02989 | u794161347 | 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()]\nn = int(n / 2)\nd = sorted(d)\nprint(n, d)\nprint(d[n]-d[n-1])', 'n = int(input())\nd = [int(i) for i in input().split()]\nn = int(n / 2)\nd = sorted(d)\nprint(d[n]-d[n-1])'] | ['Wrong Answer', 'Accepted'] | ['s740650535', 's623630081'] | [14556.0, 14120.0] | [89.0, 79.0] | [114, 102] |
p02989 | u796942881 | 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 = 0\nB = 0\nC = 0\nD = 0\n\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef lcm(a, b):\n g = gcd(a, b)\n return a * (b // g)\n\n\ndef f(n):\n return n - n // C - n // D + n // lcm(C, D)\n\n\ndef main():\n global A, B, C, D\n A, B, C, D = map(int, input().split())\n p... | ['Runtime Error', 'Accepted'] | ['s085441055', 's230975702'] | [3064.0, 13956.0] | [17.0, 74.0] | [336, 127] |
p02989 | u800704240 | 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())\nS = list(map(int,input().split()))\n\nS.sort()\nprint(S)\nprint(abs(S[N//2-1]-S[N//2]))', 'N = int(input())\nS = list(map(int,input().split()))\n\nS.sort()\n\nprint(abs(S[N//2-1]-S[N//2]))'] | ['Wrong Answer', 'Accepted'] | ['s736784003', 's272565481'] | [14556.0, 14396.0] | [85.0, 75.0] | [100, 92] |
p02989 | u802627598 | 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()))\n\nd.sort()\nprint(d)\n\na = int(int(n)/2-1)\nb = int(int(n)/2)\n\nprint(d[a])\nprint(d[b])\n\nif d[b] - d[a] == 2:\n print("2")\nelif d[b] - d[a] == 1:\n print("1")\nelse:\n print("0")\n\n', 'n = input()\nd = list(map(int,input().split()))\n\nd.sort()\n\na = int(int... | ['Wrong Answer', 'Accepted'] | ['s673541301', 's021071543'] | [14428.0, 14428.0] | [86.0, 75.0] | [221, 157] |
p02989 | u804505290 | 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()))\nC=N//2\nfor x in reversed(range(1,N+1)):\n for y in range(0,x-1):\n if d[y]<d[y+1]:\n t=d[y]\n d[y]=d[y+1]\nif d[C]==d[C-1]:\n print(0)\nelse:\n print(d[C-1]-d[C])\n', 'N=int(input())\nd=list(map(int, input().split()))\nC=N//2\nf... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s126573432', 's568711987', 's721576482', 's975043355'] | [14428.0, 14964.0, 2940.0, 14428.0] | [2104.0, 2104.0, 17.0, 76.0] | [242, 272, 261, 124] |
p02989 | u812867074 | 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()))\nlist2=sort(list)\nif n%2==0:\n print(list[n/2]-list[n/2-1])\nelse:\n print(0)', 'n=int(input())\nlist=list(map(int,input().split()))\nlist2=sorted(list)\nif n%2==0:\n print(list[n/2]-list[n/2-1])\nelse:\n print(0)\n', 'n=int(input())\nlist=list(map(int,input().... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s055024384', 's679822982', 's694231466', 's538785841'] | [13992.0, 13992.0, 14428.0, 14396.0] | [40.0, 78.0, 76.0, 75.0] | [126, 129, 109, 108] |
p02989 | u813569174 | 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[int(N/2)]-d[int(N/2)-1])', 'N = int(input())\nd = list(map(int,input().split()))\nd.sort()\nprint(d[int(N/2)]-d[int(N/2)-1])'] | ['Runtime Error', 'Accepted'] | ['s151093470', 's189537239'] | [14428.0, 14556.0] | [75.0, 75.0] | [93, 93] |
p02989 | u821432765 | 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())))\nl=n//2\nM=d[l]\nm=d[l-1]+1\nprint(M,m,M-m+1)', 'n=int(input())\nd=sorted(list(map(int,input().split())))\nl=n//2\nM=d[l]\nm=d[l-1]+1\nprint(M-m+1)'] | ['Wrong Answer', 'Accepted'] | ['s008666189', 's196414117'] | [14428.0, 13992.0] | [77.0, 77.0] | [97, 93] |
p02989 | u821712904 | 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,input().split()]\nd.sort()\nprint(d[n//2]-d[n//2+1])', 'n=int(input())\nd=[int(i) for i in input().split()]\nd.sort()\nprint(d[n//2+1]-d[n//2])\n', 'n=int(input())\nd=[int(i) for i in input().split()]\nd.sort()\nprint(d[n//2]-d[n//2-1])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s276090129', 's982853925', 's484910691'] | [10428.0, 14396.0, 14396.0] | [26.0, 79.0, 78.0] | [72, 85, 85] |
p02989 | u823885866 | 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 math\nimport itertools\nimport collections\nimport heapq\nimport re\nimport numpy as np\n\nrr = lambda: sys.stdin.readline().rstrip()\nrs = lambda: map(str, sys.stdin.buffer.readline().split())\nri = lambda: int(sys.stdin.readline())\nrm = lambda: map(int, sys.stdin.buffer.readline().split())\nrl =... | ['Runtime Error', 'Accepted'] | ['s326887517', 's720204601'] | [21360.0, 23456.0] | [208.0, 208.0] | [461, 454] |
p02989 | u825378567 | 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 quick_sort(arr):\n left = []\n right = []\n if len(arr) <= 1:\n return arr\n \n \n # ref = random.choice(arr)\n ref = arr[0]\n ref_count = 0\n \n for ele in arr:\n if ele < ref:\n left.append(ele)\n elif ele > ref:\n right.append(ele)\n els... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s148243908', 's427417309', 's708540700', 's763241287', 's970395931', 's269547478'] | [10844.0, 14428.0, 13668.0, 2940.0, 14428.0, 14428.0] | [26.0, 55.0, 369.0, 17.0, 374.0, 308.0] | [670, 1142, 701, 760, 1141, 676] |
p02989 | u825440127 | 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())\nlis = list(map(int, input().split()))\nlis2 = sorted(lis)\nm1 = lis2[n/2-1]\nm2 = lis2[n/2]\n\nc = 0\nfor i in range((m1+1), (m2+1)):\n c += 1\nprint(c)\n', 'n = int(input())\nlis = list(map(int, input().split()))\nlis2 = sorted(lis)\nm1 = lis2[n//2-1]\nm2 = lis2[n//2]\n\nc = 0\nfor i in range((m... | ['Runtime Error', 'Accepted'] | ['s859520382', 's390741092'] | [14396.0, 13992.0] | [77.0, 82.0] | [165, 167] |
p02989 | u830297276 | 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()))\ncount = 0\nfor x in range(2, n):\n if(p[x-2] < p[x-1] and p[x] > p[x-1]):\n count += 1\n elif(p[x-2] > p[x-1] and p[x] < p[x-1]):\n count += 1\nprint(count)\n', 'n = int(input())\nd = list(map(int, input().split()))\nd.sort()\nif(d[n//2] == d[... | ['Wrong Answer', 'Accepted'] | ['s506823244', 's708092053'] | [14396.0, 14428.0] | [94.0, 75.0] | [224, 160] |
p02989 | u832152513 | 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())))\n\nprint(n,d)\n\nprint(d[n // 2] - d[n // 2 - 1])', 'n = int(input())\nd = sorted(list(map(int, input().split())))\n\nprint(d[n // 2] - d[n // 2 - 1])'] | ['Wrong Answer', 'Accepted'] | ['s758229028', 's858493970'] | [14428.0, 14428.0] | [86.0, 78.0] | [106, 94] |
p02989 | u835732324 | 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()))\nB = sorted(A)\nprint(B[N/2]-B[N/2-1])', 'N = int(input())\nA = list(map(int,input().split()))\nB = sorted(A)\nprint(B[N//2]-B[N//2-1])'] | ['Runtime Error', 'Accepted'] | ['s980378640', 's800211767'] | [14428.0, 14428.0] | [76.0, 76.0] | [88, 90] |
p02989 | u845573105 | 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(int, input().split())\nA.sort()\nl = A[N//2-1]\nh = A[N//2]\nprint(h-l)', 'N = int(input())\nA = list(map(int, input().split()))\nA.sort()\nl = A[N//2-1]\nh = A[N//2]\nprint(h-l)'] | ['Runtime Error', 'Accepted'] | ['s935154120', 's001704322'] | [17404.0, 20664.0] | [35.0, 68.0] | [93, 98] |
p02989 | u847165882 | 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(s) for s in input().split(" ")]\n\nd.sort()\n\nif (N//2)%2==0:\n print(0)\nelse:\n K=d[(N//2)]-d[N//2-1]\n print(K', 'N=int(input())\nd=[int(s) for s in input().split(" ")]\n\nd.sort()\nK=d[(N//2)]-d[(N//2)-1]\nprint(K)'] | ['Runtime Error', 'Accepted'] | ['s715071802', 's995661945'] | [3064.0, 14396.0] | [17.0, 79.0] | [137, 96] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.