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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02957 | u897566476 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a,b = (int(x) for x in input().split(' '))\n\nc = math.fabs(a)\nd = math.fabs(b)\nf = (c + b) % 2\n\nif f = 0:\n print((c+b)/2)\nif f >0:\n print('IMPOSSIBLE')", "import math\na, b = (int(x) for x in input().split(' '))\n\na = abs(a)\nb = abs(b)\n\nc = a + b\n\nif c % 2 == 0:\n print(int(c / 2))\nelse:\n prin... | ['Runtime Error', 'Accepted'] | ['s498063975', 's103546697'] | [2940.0, 3060.0] | [17.0, 18.0] | [152, 157] |
p02957 | u898080410 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["\n\na, b = map(int, input().split())\n\nk = (a+b) / 2 if (a+b) % 2 == 0 else 'IMPOSSIBLE'\n\nprint(k)\n", 'n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nb_rest = [max(b[0]-a[0],0)]\na_rest = [max(a[0]-b[0],0)]\n\nfor i in range(1, n-1):\n b_rest.append( min(b[i], max( ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s077767875', 's334115419', 's801987536'] | [2940.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0] | [233, 408, 237] |
p02957 | u898999125 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a, b = map(int, input().split())\nk = a + b\n\nif k % 2 ==0:\n print(k/2)\nelse:\n print('IMPOSSIBLE')", "a, b = map(int, input().split())\nk = a + b\n\nif k % 2 ==0:\n print(int(k/2))\nelse:\n print('IMPOSSIBLE')"] | ['Wrong Answer', 'Accepted'] | ['s490025181', 's965698555'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 103] |
p02957 | u899929023 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['N,K = list(map(lambda x: int(x),input().split()))\nif (N+K)%2==0:\n print((N+K)/2)\nelse:\n print("IMPOSSIBLE")\n', 'N,K = list(map(lambda x: int(x),input().split()))\nif (N+K)%2==0:\n print(int((N+K)/2))\nelse:\n print("IMPOSSIBLE")\n'] | ['Wrong Answer', 'Accepted'] | ['s688937831', 's265880812'] | [3316.0, 2940.0] | [20.0, 17.0] | [114, 119] |
p02957 | u901447859 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["n,*x=map(int,open(0).read().split())\n\nsoreted_x=sorted(x)\ncnt=0\nfor a,b in zip(x,soreted_x):\n if a != b:\n cnt+=1\nprint('Yes' if cnt==2 or cnt==0 else 'No')", "a,b = map(int, input().split())\ndiff = b - a \nif diff % 2 == 0:\n print(b - diff // 2)\nelse:\n print('IMPOSSIBLE')"] | ['Wrong Answer', 'Accepted'] | ['s276216644', 's105888006'] | [2940.0, 2940.0] | [18.0, 17.0] | [159, 114] |
p02957 | u901598613 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\nif a%2==b%2:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nif a%2==b%2:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input())\nif a%2==b%2:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nif... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s478733859', 's549303238', 's587808461', 's387634682'] | [2940.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [90, 90, 82, 92] |
p02957 | u902361509 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int, input().split())\nif ((a+b)/2)%2 == 0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")\n', 'a, b = map(int, input().split())\nif ((a+b))%2 == 0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")\n'] | ['Wrong Answer', 'Accepted'] | ['s818932647', 's127307697'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 106] |
p02957 | u902380746 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['import sys\nimport math\nimport bisect\n\ndef main():\n a, b = map(int, input().split())\n if abs(a - b) % 2 == 0:\n k = abs(a - b) // 2\n print(k)\n else:\n print(\'IMPOSSIBLE\')\n \nif __name__ == "__main__":\n main()\n', 'import sys\nimport math\nimport bisect\n\ndef main():\n ... | ['Wrong Answer', 'Accepted'] | ['s256522512', 's985587375'] | [2940.0, 3060.0] | [17.0, 18.0] | [241, 238] |
p02957 | u903948194 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = [int(n) for n in input().split()]\nprint(a, b)\n\nif (a+b) % 2 == 0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")\n', 'a, b = [int(n) for n in input().split()]\n\nif (a+b) % 2 == 0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")\n'] | ['Wrong Answer', 'Accepted'] | ['s010173497', 's415657395'] | [9160.0, 9080.0] | [25.0, 25.0] | [127, 115] |
p02957 | u904217307 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["def harmony(a,b):\n if (a+b)%2==0:\n return int((a+b)/2)\n else:\n return 'IMPOSSIBLE'\n ", "a, b = [int(e) for e in input().split()]\nif (a+b)%2==0:\n return int((a+b)/2)\nelse:\n return 'IMPOSSIBLE'", "def harmony(a,b):\n if (a+b)%2==0:\n return int((a+b)/2)\n else:\n ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s546299284', 's798608153', 's830459860', 's874898989', 's056352918'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [107, 109, 102, 102, 109] |
p02957 | u907530341 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A, B = map(int, input().split())\nif A >= 0 and A != B and B <= 10**9:\n if ( A + B ) % 2 == 0:\n print(( A + B ) / 2)\n else:\n print('IMPOSSIBLE')", "A, B = map(int, input().split())\nif A >= 0 and A != B and B <= 10**9:\n if ( A + B ) % 2 == 0:\n print(( A + B ) / 2)\n else:\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s055889791', 's084720873', 's159223589', 's296433290', 's754125273'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [163, 163, 98, 163, 115] |
p02957 | u908383794 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["import math\n\nA, B = map(int, input().split())\nK = 0\n\nif A % 2 != B % 2:\n print('IMPOSSIBLE')\nelse:\n print(A + B / 2)", "A, B = map(int, input().split())\n\nif A % 2 != B % 2:\n print('IMPOSSIBLE')\nelse:\n print(int((A + B) / 2))\n"] | ['Wrong Answer', 'Accepted'] | ['s432935703', 's784892751'] | [3064.0, 2940.0] | [17.0, 17.0] | [118, 111] |
p02957 | u909487111 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a = int(input())\nb = int(input())\n \nc = (a - b) % 2 \nif c == 0:\n abs_a = abs(a)\n abs_b = abs(b)\n \n m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2\n ans = max(abs_a, abs_b) - m\n print(ans)\nelse:\n print("IMPOSSIBLE")', 'a = input()\nb = input()\n\nc = (a - b) % 2 \nif c == 0:\n abs_a = abs(a)\n abs_b... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s072177355', 's154351588', 's434343571', 's539070809', 's539306856', 's864831732', 's347375192'] | [3060.0, 3068.0, 3060.0, 3060.0, 3060.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [219, 203, 224, 213, 217, 238, 248] |
p02957 | u912134329 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A,B = map(int,input().split())\nK = (A+B)/2\nif type(K) is int:\n print(K)\nelse:\n print("Impossible")', 'A = int(input())\nB = int(input())\nK = (A+B)//2\nif type(K) is int:\n print(K)\nelse:\n print("Impossible")', 'A = input(a)\nB = input(b)\nK == (A+B)/2\nif type(K) is int: \n print(K)\nelse:\n p... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s765116512', 's775332078', 's809850479', 's945337575', 's869461107'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [100, 104, 107, 104, 96] |
p02957 | u912318491 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A,B = map(int,input().split())\nK = (A+B)/2\nif abs(A-K) == abs(B-K):\n print((A+B)/2)\nelse:\n print("IMPOSSIBLE")', 'A,B = map(int,input().split())\nif A%2 == B%2:\n print((A+B)/2)\nelse:\n print("IMPOSSIBLE")', 'A,B = map(int,input().split())\nif A%2 == B%2:\n print(A+B/2)\nelse:\n print("IMPOSSI... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s118581044', 's656702340', 's717653676', 's063067555'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [116, 94, 92, 106] |
p02957 | u913395020 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = map(int, input().split())\n\nif a > b:\n c = a\n a = b\n b = c\n\nif (a - b) % 2 != 0:\n print("IMPOSSIBLE")\nelse:\n print(int(a+b)/2)', 'a,b = map(int, input().split())\n\nif a > b:\n c = a\n a = b\n b = c\n\nif (a - b) % 2 != 0:\n print("IMPOSSIBLE")\nelse:\n print(int((a+b)/2))'] | ['Wrong Answer', 'Accepted'] | ['s755485808', 's653302528'] | [2940.0, 2940.0] | [19.0, 17.0] | [136, 138] |
p02957 | u919734978 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int,input().split())\nif a%2 == b%2:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")\n ', 'a, b = map(int,input().split())\nif a%2 == b%2:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")\n \n'] | ['Wrong Answer', 'Accepted'] | ['s152103726', 's875322218'] | [2940.0, 2940.0] | [18.0, 18.0] | [96, 102] |
p02957 | u921168761 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(input().split())\nprint((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE")', 'a,b=map(int,input().split())\nprint((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE")'] | ['Runtime Error', 'Accepted'] | ['s459587191', 's030943687'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 76] |
p02957 | u921811474 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a = int(input("a"))\nb = int(input("b"))\nc = (a+b)/2\nif c % 1 == 0:\n print(c)\nelse:\n print("IMPOSSIBLE")\n', 'a,b = (int(x) for x in input().split())\nc = (a+b)/2\nif c % 1 == 0:\n print(round(c))\nelse:\n print("IMPOSSIBLE")\n'] | ['Runtime Error', 'Accepted'] | ['s133671969', 's398614831'] | [2940.0, 2940.0] | [17.0, 17.0] | [110, 117] |
p02957 | u922449550 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A, B = list(map(int, input().split()))\n\nif (A + B) % 2 == 0:\n K = (A + B) / 2\nelse:\n K = 'IMPOSSIBLE'\n\nprint(K)", "A, B = list(map(int, input().split()))\n\nif (A + B) % 2 == 0:\n K = int((A + B) / 2)\nelse:\n K = 'IMPOSSIBLE'\n\nprint(K)"] | ['Wrong Answer', 'Accepted'] | ['s933453677', 's801283761'] | [2940.0, 2940.0] | [17.0, 17.0] | [113, 118] |
p02957 | u922487073 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A,B = map(int, input().split())\nif A+B%2 == 1:\n print('IMPOSSIBLE')\nelse:\n print(A+B//2)", "A,B = map(int, input().split())\nif (A+B)%2 == 1:\n print('IMPOSSIBLE')\nelse:\n print((A+B)//2)"] | ['Wrong Answer', 'Accepted'] | ['s497126269', 's633039479'] | [9032.0, 9156.0] | [24.0, 28.0] | [90, 94] |
p02957 | u923270446 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\nif a+b%2==0:\n print(a+b//2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nif (a+b)%2==0:\n print((a+b)//2)\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s858829344', 's241000413'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 93] |
p02957 | u926212097 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a=list(map(int,input().split()))\nprint(sum(a)/2 if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")', 'a=list(map(int,input().split()))\nprint(sum(a)/2)', 'a=list(map(int,input().split()))\nprint(int(sum(a)/2) if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s579107993', 's929899192', 's460335558'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [93, 48, 98] |
p02957 | u927357863 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["# -*- coding: utf-8 -*-\n\n\nA,B = map(int, input().split())\n\nif A%2 != B%2:\n\tprint('IMPOSSIBLE')\n\nelse:\n\tK = (A+B)/2\n\tprint(K)", "# -*- coding: utf-8 -*-\n\n\nA,B = map(int, input().split())\n\nif A%2 != B%2:\n\tprint('IMPOSSIBLE')\n\nelse:\n\tK = (A+B)//2\n\tprint(K)"] | ['Wrong Answer', 'Accepted'] | ['s153090686', 's017777140'] | [2940.0, 2940.0] | [17.0, 17.0] | [141, 142] |
p02957 | u931118906 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a,b=map(int,input().split())\nk=(a+b)/2\nif k%1==0:\n print(k)\nelse:\n print('IMPOSSIBLE')\n", "a,b=map(int,input().split())\nk=(a+b)/2\nif k%1==0:\n print(int(k))\nelse:\n print('IMPOSSIBLE')\n"] | ['Wrong Answer', 'Accepted'] | ['s789619023', 's987364282'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 98] |
p02957 | u933970872 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["import math\na,b = map(int,(input().split()))\nk = (a+b)/2\nc = k if abs(a-k) == abs(b-k) else 'IMPOSSIBLE'\nprint(c)\n", "import math\na,b = map(int,(input().split()))\nk = (a+b)/2\nc = k if abs(a-k) == abs(b-k) else 'impossible'\nprint(c)\n", "import math\na,b = map(int,(input().split()))\nk = (a+b)/2\nc = k if abs... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s114793312', 's923307066', 's968178296', 's410661418'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [114, 114, 114, 107] |
p02957 | u934052933 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['import numpy as np\ndef main():\n a, b = map(int, input().split())\n for k in range(min(a,b), max(a,b)+1):\n ak = np.abs( a - k )\n bk = np.abs( b - k )\n if ak == bk:\n print(( a + b ) / 2)\n exit(0)\n print("IMPOSSIBLE")\n\nif __name__ == "__main__":\n main()',... | ['Wrong Answer', 'Accepted'] | ['s536959304', 's595857172'] | [22128.0, 12424.0] | [2108.0, 156.0] | [304, 191] |
p02957 | u934868410 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = map(int, input().split())\n\nif a+b % 2 == 1:\n print("IMPOSSIBLE")\nelse:\n print((a+b)/2)', 'a,b = map(int, input().split())\n\nif (a+b) % 2 == 1:\n print("IMPOSSIBLE")\nelse:\n print((a+b)/2)', 'a,b = map(int, input().split())\n\nif (a+b) % 2 == 1:\n print("IMPOSSIBLE")\nelse:\n print(int((a+b)/2))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s431652296', 's498911579', 's553886540'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [94, 96, 101] |
p02957 | u945181840 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A, B = map(int, input().split())\n\nif (A + B) % 2 == 0:\n print((A + B) / 2)\nelse:\n print('IMPOSSIBLE')", "import sympy as sp\n\nA, B = map(int, input().split())\nK = sp.Symbol('K')\n\nans = sp.solve((A - K) **2 - (B - K) ** 2, K)\n\nif isinstance(ans[0], int) == True:\n print(ans[0])\nelse:\n print('I... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s016650313', 's863275232', 's220788276'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [107, 203, 112] |
p02957 | u945233433 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\ncount = 0\nfor i in range(n):\n if a[i] >= b[i]:\n count += b[i]\n else:\n count += min(b[i], a[i]+a[i+1])\n a[i+1] = max(0, a[i+1]-(b[i]-a[i]))\nprint(count)\n', "A, B = map(int, input().split())\n\nif (A+B)%2 == 0... | ['Runtime Error', 'Accepted'] | ['s122657450', 's083533293'] | [3060.0, 2940.0] | [18.0, 19.0] | [252, 129] |
p02957 | u946726434 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = map(int,input().split())\nx = abs(a-b)\nif x%2 == 0:\n print(x//2)\nelse:\n print("IMPOSSIBLE")', 'a,b = map(int,input().split())\nx = abs(a-b)\nif x%2 == 0:\n x = x//2\n print(max(max(a,b)-x, x))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s974408402', 's909875046'] | [2940.0, 2940.0] | [17.0, 17.0] | [102, 129] |
p02957 | u946969297 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int,input().split())\nif (a - b) % 2 == 0:\n print(a+(a-b)%2)\nelse:\n print("IMPOSSIBLE")', 'a, b = map(int,input().split())\nif (a - b) % 2 == 0:\n print(a-(a-b)%2)\nelse:\n print("IMPOSSIBLE")\n', 'a, b = map(int,input().split())\nif (a - b) % 2 == 0:\n print(a-(a-b//2)\nelse:\n print("IMPOSSIBLE"... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s600724934', 's839536728', 's842451821', 's681758279'] | [9068.0, 9152.0, 8844.0, 9092.0] | [27.0, 25.0, 24.0, 27.0] | [99, 100, 100, 101] |
p02957 | u947327691 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\n\nif (a+b)%2==0:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")\n', 'a,b=map(int,input().split())\n\nif (a+b)%2==0:\n print((a+b)%2)\nelse:\n print("IMPOSSIBLE")\n', 'a,b=map(int,input().split())\n\nif (a+b)%2==0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s099085142', 's344251110', 's141989277'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [94, 94, 98] |
p02957 | u948471929 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A, B = map(int, input().split())\nif (max(A, B) - min(A, B)) % 2 == 1:\n print("IMPOSSIBLE")\nelse:\n print(int((A + B)) / 2)', 'A, B = map(int, input().split())\nif (max(A, B) - min(A, B)) % 2 == 1:\n print("IMPOSSIBLE")\nelse:\n print(int((A + B) / 2))'] | ['Wrong Answer', 'Accepted'] | ['s171989209', 's910911585'] | [2940.0, 3064.0] | [17.0, 17.0] | [127, 127] |
p02957 | u949234226 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['#--Harmony\n\na, b = map(int, input().split())\nN = a + b\n\nif (N % 2 == 0):\n print(N/2)\nelse:\n print("IMPOSSIBLE")\n ', '#--Harmony\n\na, b = map(int, input().split())\nN = a + b\n\nif (N % 2 == 0):\n print(int(N/2))\nelse:\n print("IMPOSSIBLE")\n'] | ['Wrong Answer', 'Accepted'] | ['s747260339', 's671016419'] | [2940.0, 2940.0] | [17.0, 17.0] | [116, 119] |
p02957 | u951480280 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().splut());print((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE)\n"', 'a,b=map(int,input().split());print((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE")'] | ['Runtime Error', 'Accepted'] | ['s713913247', 's887090594'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 76] |
p02957 | u952130512 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a=list(map(int,input().split()))\nif (a[0]+a[1])%2==0:\n \tprint((a[0]+a[1])/2)\nelse:\n \tprint("IMPOSSIBLE")', 'a=list(map(int,input().split()))\nif (a[0]+a[1])%2==0:\n \tprint(int((a[0]+a[1])/2))\nelse:\n \tprint("IMPOSSIBLE")\n'] | ['Wrong Answer', 'Accepted'] | ['s453389302', 's904722371'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 112] |
p02957 | u952968889 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a=eval(input().replace(' ', '+');print(a%2*'IMPOSSIBLE' or a//2)", "a=eval(input().replace(' ','+'));print(a%2*'IMPOSSIBLE'or a//2)"] | ['Runtime Error', 'Accepted'] | ['s356947588', 's897988561'] | [2940.0, 2940.0] | [17.0, 17.0] | [64, 63] |
p02957 | u953379577 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a , b = map(int, input().split())\nx = a-b\nif x%2 == 1:\n print("IMPOSSIBLE")\nelse:\n print((a+b)/2)', 'a , b = map(int, input().split())\nx = a-b\nif x%2 == 1:\n print("IMPOSSIBLE")\nelse:\n print(int((a+b)/2))'] | ['Wrong Answer', 'Accepted'] | ['s067491355', 's160717040'] | [2940.0, 2940.0] | [17.0, 17.0] | [103, 108] |
p02957 | u957872856 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['N = int(input())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nans, surplus = 0, 0\nfor i in range(N):\n tmp = min(A[i], surplus)\n ans += tmp\n A[i] -= tmp\n if B[i] > A[i]:\n ans += A[i]\n surplus = B[i] - A[i]\n else:\n ans += B[i]\n surplus... | ['Runtime Error', 'Accepted'] | ['s382186960', 's617181803'] | [3064.0, 2940.0] | [17.0, 18.0] | [355, 100] |
p02957 | u958053648 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a,b=map(int,input().split())\nif a%2 != b%2 :\n \tprint('IMPOSSIBLE')\nelse\n\tk=(a+b)/2\n \tprint(k)", "a,b=map(int,input().split())\nif a%2 != b%2:\n\tprint('IMPOSSIBLE')\nelse:\n\tint k=(a+b)/2\n\tprint(k)", "a,b=map(int,input().split())\nif a%2 != b%2 :\n \tprint('IMPOSSIBLE')\nelse:\n\tk=(a+b)/2\n \tprint(k)... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s074605094', 's091072599', 's149304697', 's340068395', 's396572170', 's606394331', 's923231214'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [95, 95, 96, 91, 95, 91, 92] |
p02957 | u960171798 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int, input().split())\nif a<b:\n a,b=b,a\n#a>b is assured.\n\nflag=False\nfor k in range(b+1,a+1):\n if k-b==a-k:\n print(k)\n flag==True\n break\nif flag==False:\n print("IMPOSSIBLE")\n', 'a,b=map(int, input().split())\nif a<b:\n a,b=b,a\n#a>b is assured.\nk=(a+b)/2\nif k%1==0 and b<k<a:\n pr... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s104436347', 's131202511', 's199140322', 's040603295'] | [2940.0, 2940.0, 2940.0, 2940.0] | [2104.0, 17.0, 17.0, 18.0] | [193, 136, 134, 140] |
p02957 | u960513073 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = list(map(int, input().split()))\nif (a+b) % 2 == 0:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")', 'a,b = list(map(int, input().split()))\nif (a+b) % 2 == 0:\n print(int((a+b)/2))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s432864328', 's162746060'] | [2940.0, 2940.0] | [17.0, 17.0] | [101, 106] |
p02957 | u962609087 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["def main():\n a,b = map(int,input().split())\n if abs(a - b) % 2 == 0:\n print(abs(a - b) // 2)\n else:\n print('IMPOSSIBLE')\nmain()", "def main():\n a,b = map(int,input().split())\n if abs(a + b) % 2 == 0:\n print(abs(a + b) // 2)\n else:\n print('IMPOSSIBLE')\nmain()"] | ['Wrong Answer', 'Accepted'] | ['s167774702', 's949367410'] | [9052.0, 9128.0] | [24.0, 32.0] | [135, 135] |
p02957 | u963963908 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['#ABC135 A\n\nA,B = map(int,input().split())\nif (A+B)/2 % 1 == 0:\n print((A+B)/2)\nelse:\n print("IMPOSSIBLE")', '#ABC135 A\n\nA,B = map(int,input().split())\nif (A+B)/2 % 1 == 0:\n print(int((A+B)/2))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s735471847', 's387080899'] | [8912.0, 9176.0] | [23.0, 24.0] | [111, 116] |
p02957 | u965033073 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\nif (a+b) % 4 ==0:\n print(int((a+b)/4))\n else:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nif (a+b) % 4 ==0:\n print(int((a+b)//4))\nelse:\n print("IMPOSSIBLE")\n', 'a,b=map(int,input().split())\nif (a+b) % 4 ==0:\n print(int((a+b)/4))\nelse:\n print("IMPOSSIBLE")\n'... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s365614766', 's460541059', 's636947878', 's542256597'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [100, 98, 97, 97] |
p02957 | u965436898 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a,b = map(int,input().split())\nk = 0\nif a > b:\n k = a - b\n if k % 2 != 0:\n print('IMPOSSIBLE')\n else:\n print((k/2)+b)\nelse:\n k = b - a\n if k % 2 != 0:\n print('IMPOSSIBLE')\n else:\n print((k/2)+a)", "a,b = map(int,input().split())\nk = 0\nif a > b:\n k = a - b\n if k % 2 != 0:\n prin... | ['Wrong Answer', 'Accepted'] | ['s624091043', 's108349160'] | [3060.0, 3060.0] | [17.0, 17.0] | [212, 222] |
p02957 | u965602776 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['P=[1,10,9,12,3,4]\nm=10**9+7\ndef f(A,p,N):\n if p==0:return [1&(i in N) for i in range(13)]\n p%=6\n B=[0]*13\n for n in N:\n for i in range(13):\n c=(i+(n*P[p]))%13\n B[c]=(B[c]+A[i])%m\n return B\n\nS=reversed(input())\nA=[0]\nfor p,s in enumerate(S):\n if s=="?":A=f(... | ['Runtime Error', 'Accepted'] | ['s995385925', 's356870218'] | [3064.0, 2940.0] | [17.0, 17.0] | [356, 101] |
p02957 | u965937045 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\nif((a+b)/2)==0:\n print((a+b)//2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nif((a+b)%2)==0:\n print((a+b)//2)\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s030169765', 's237778933'] | [9028.0, 9060.0] | [31.0, 26.0] | [94, 94] |
p02957 | u968258816 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a, b = map(int, input().split())\nif (a + b) % 2 == 0:\n print((a + b) / 2)\nelse:\n print('IMPOSSIBLE')", "a, b = map(int, input().split())\nif (a + b) % 2 == 0:\n print(int((a + b) / 2))\nelse:\n print('IMPOSSIBLE')\n"] | ['Wrong Answer', 'Accepted'] | ['s431315371', 's989023917'] | [2940.0, 2940.0] | [17.0, 17.0] | [102, 108] |
p02957 | u969211566 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = map(int,input().split())\n\nk = abs(a - b)\nif k % 2 == 0:\n print(max(abs(a-k/2),abs(b-k/2)))\nelse:\n print("IMPOSSIBLE")\n', "A, B = map(int, input().split())\n \nif (A+B)%2 == 0:\n print( int((A+B)/2) )\nelse:\n print('IMPOSSIBLE')"] | ['Wrong Answer', 'Accepted'] | ['s052916837', 's886040610'] | [2940.0, 2940.0] | [17.0, 17.0] | [126, 107] |
p02957 | u969848070 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a, b = map(int, input().split())\nif (a+b)%2 != 0:\n print('IMPOSSIBLE')\nelse:\n print((a+abs(b))/2)", "a, b = map(int, input().split())\nif a%2 != b%2:\n print('IMPOSSIBLE')\nelse:\n print((a+b)/2)", "a, b = map(int, input().split())\nif a%3 != b%2:\n print('IMPOSSIBLE')\nelse:\n print((a+b)/2)", "a, b = map(... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s231046823', 's319511582', 's678825061', 's750808422', 's635815270'] | [2940.0, 2940.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 20.0, 17.0] | [99, 92, 92, 94, 97] |
p02957 | u970197315 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["n = int(input())\np = [int(i) for i in input().split()]\ncount = 0\nfor i in range(n):\n if p[i] != i + 1:\n count += 1\nif count == 0:\n print('YES')\n\nif count == 2:\n print('YES')\n\nif count > 2:\n print('No')\n", "A, B = list(map(int, input().split()))\nC = A + B\nif C%2 == 0:\n answer = (... | ['Runtime Error', 'Accepted'] | ['s548512885', 's367921715'] | [3060.0, 2940.0] | [18.0, 17.0] | [221, 158] |
p02957 | u972658925 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A,B = map(int,input().split())\n\nK = (A+B)% 2\nif K == 0:\n print((A+B)/2)\nelse:\n print('IMPSSIBLE')", "A,B = map(int,input().split())\n\nK = (A+B)/2\nif isinstance(K,int):\n print(K)\nelse:\n print('IMPSSIBLE')", "A,B = map(int,input().split())\n\nK = (A+B)/2\nif isinstance(K,int):\n print(K)\nelse:\... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s282681486', 's303891420', 's538767373', 's756671138'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0] | [103, 107, 103, 110] |
p02957 | u972892985 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int,input().split())\nif (a+b)%2 == 0:\n print((a+b)/2)\nelse:\n print("IMPOSSIBLE")', 'a, b = map(int,input().split())\nif (a+b)%2 == 0:\n print((a+b)//2)\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s779255358', 's066243893'] | [3316.0, 3444.0] | [19.0, 25.0] | [93, 94] |
p02957 | u973549339 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int, input().split())\n\nif (a + b)%2 == 0:\n x = (a + b)/2\n print(x)\nelse:\n print("IMPOSSIBLE")', 'a, b = map(int, input().split())\n\nif (a + b)%2 == 0:\n x = (a + b)//2\n print(x)\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s447934906', 's576957128'] | [2940.0, 2940.0] | [17.0, 17.0] | [113, 114] |
p02957 | u974918235 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A, B = map(int, input().split())\nprint(A + B // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE")', 'A, B = map(int, input().split())\nprint((A + B) // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s051508971', 's163836937'] | [9104.0, 9044.0] | [28.0, 28.0] | [88, 90] |
p02957 | u978962055 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a, b = map(int, input().split())\nif (a+b)%2 != 0:\n print("IMPOSSIBLE")\nelse:\n print(int(a+b/2))', 'a, b = map(int, input().split())\nif (a+b)%2 != 0:\n print("IMPOSSIBLE")\nelse:\n print(a+b/2)', 'a, b = map(int, input().split())\nif (a+b)%2 == 0:\n print("IMPOSSIBLE")\nelse:\n print(a+b/2)', 'a, b = map(in... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s140005647', 's337198377', 's745950315', 's792191493', 's894685968', 's602349588'] | [2940.0, 3064.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 2104.0, 17.0, 17.0] | [97, 92, 92, 120, 94, 99] |
p02957 | u981304949 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A,B=map(int,input().split())\nif A%2==B%2:\n print((A+B)/2)\nelse:\n print("IMPOSSIBLE")\n ', 'A ,B = map(int,input().split())\nmean = (A+B)/2.0\nif isinstance(mean, int)==True:\n print(int(mean))\nelse:\n print("IMPOSSIBLE")', 'A,B=map(int,input().split())\nif A%2==B%2:\n print(int.(A+B)/2)\nelse:\n print("IM... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s381137664', 's548007491', 's858049208', 's897031382', 's335171757'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [89, 127, 90, 127, 91] |
p02957 | u982127653 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['# -*- coding: utf-8 -*-\na, b = map(int, input().split())\nk = (a + b) / 2\nl = (a + b) % 2\nif l == 0:\n print(k)\nelse:\n print(“IMPOSSIBLE”)\n', '# -*- coding: utf-8 -*-\na, b = map(int, input().split())\nk = (a + b) / 2\nl = (a + b) % 2\nif l == 0:\n print(k)\nelse:\n print("IMPOSSIBLE")', '# -*- codi... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s035280643', 's110378924', 's439545126', 's829264522', 's903510741'] | [2940.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [147, 142, 182, 118, 188] |
p02957 | u982152304 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['\n\nab = list(map(int, input().sprit()))\na = ab[0]\nb = ab[1]\n\nif (a+b)%2 == 1:\n print("IMPOSSIBLE")\n return 0\n\nprint((a+b)/2)', 'import sys\n\nab = list(map(int, input().split()))\na = ab[0]\nb = ab[1]\n\nif (a+b)%2 == 1:\n print("IMPOSSIBLE")\n sys.exit(0)\n\nprint(int((a+b)/2))'] | ['Runtime Error', 'Accepted'] | ['s403067685', 's621808742'] | [2940.0, 3060.0] | [17.0, 17.0] | [125, 143] |
p02957 | u982222053 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['def main():\n a, b = [int(_) for _ in input().split()]\n \n if (a+b) % 2 == 0:\n print((a+b)/2)\n \n else:\n print("IMPOSSIBLE")\nmain()', 'def main():\n a, b = [int(_) for _ in input().split()]\n \n if (a+b) % 2 == 0:\n print((a+b)/2)\n \nmain()', 'def main():\n a, b = [int(_) for _ in input()... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s468163535', 's564269972', 's995528967', 's815923394'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [141, 109, 168, 168] |
p02957 | u982438430 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A,B = map(int,input().split())\n\nK = (A+B)/2\nK_ = (A+B)%2\nif K_>0:\n print("IMPOSSIBLE")\nelse:\n print(int(K)', 'A,B = map(int,input().split())\n\nK = (A+B)/2\nK_ = (A+B)%2\nif K_>0:\n print("IMPOSSIBLE")\nelse:\n print(K)', 'A,B = map(int,input().split())\n\nK = (A+B)/2\nK_ = (A+B)%2\nif K_>0:\n print("IMPO... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s353572763', 's458556041', 's639273400'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [108, 104, 110] |
p02957 | u982808037 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b=map(int,input().split())\nsum=a+b\nif sum%2==0:\n print(sum/2)\nelse:\n print("IMPOSSIBLE")', 'a,b=map(int,input().split())\nsum=a+b\nif sum%2==0:\n print(int(sum/2))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s463591753', 's297534459'] | [3064.0, 2940.0] | [17.0, 17.0] | [92, 97] |
p02957 | u983311472 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a, b = map(int, input().split())\nans = (a+b)/2 if (a+b) % 2 == 0 else 'IMPOSSIBLE'\nprint(ans)\n", "a, b = map(int, input().split())\nans = (a+b)//2 if (a+b) % 2 == 0 else 'IMPOSSIBLE'\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s228479536', 's202302728'] | [2940.0, 2940.0] | [17.0, 17.0] | [94, 95] |
p02957 | u986594273 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["ba, bb = (int(x) for x in input().split())\nm = a if a > b else b\nfor i in range(m+2):\n a = abs(a-i)\n b = abs(b-i)\n if a == b:\n print(i)\n break:\nif i == m+1:\n print('IMPOSSIBLE')", "ba, bb = (int(x) for x in int(input().split()))\nm = a if a > b else b\nfor i in range(m+2):\n a = ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s290917683', 's935818691', 's413897045'] | [2940.0, 3060.0, 2940.0] | [24.0, 17.0, 17.0] | [203, 193, 137] |
p02957 | u986884213 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['num = input().split()\nA = int(num[0])\nB = int(num[1])\nif (A+B)%2 == 0:\n print((A+B)/2)\nelse:\n print("IMPOSSIBLE")', 'num = list(map(int, input().split()))\nA = num[0]\nB = num[1]\nif (A+B)%2 == 0:\n print(int((A+B)/2))\nelse:\n print("IMPOSSIBLE")'] | ['Wrong Answer', 'Accepted'] | ['s669337625', 's760223166'] | [2940.0, 2940.0] | [17.0, 17.0] | [119, 130] |
p02957 | u987120132 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A,B = map(int, input().split())\nk = (A + B) / 2\nif (A + B) % 2 == 0: \n if A - k > 0 and B - k < 0:\n print('pat1')\n print(int(k))\n elif A - k < 0 and B - k > 0:\n print('pat2')\n print(int(k)) \n else:\n print('IMPOSSIBLE')\nelse:\n print('IMPOSSIBLE')", "A,B ... | ['Wrong Answer', 'Accepted'] | ['s403053159', 's851814513'] | [3064.0, 3060.0] | [18.0, 18.0] | [298, 300] |
p02957 | u987170100 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["N = input()\nlst1 = list(map(int, input().split()))\nlst2 = sorted(lst1)\n\nn = 0\nfor x, y in zip(lst1, lst2):\n if x != y:\n n += 1\n if n > 2:\n break\n\nif n > 2:\n print('NO')\nelse:\n print('YES')\n", "A, B = map(int, input().split())\nif (A - B) % 2 == 1:\n print('IMPOSSIBL... | ['Runtime Error', 'Accepted'] | ['s784979494', 's635414437'] | [2940.0, 2940.0] | [17.0, 20.0] | [223, 110] |
p02957 | u987637902 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a, b = map(int, input().split())\nx = abs(a - b)\nif x % 2:\n print('IMPOSSIBLE')\nelse:\n print(abs(a-(x//2)))\n", "a, b = map(int, input().split())\nx = abs(a - b)\nif x % 2:\n print('IMPOSSIBLE')\nelse:\n print(int(abs(a+b)/2))"] | ['Wrong Answer', 'Accepted'] | ['s172165846', 's559807185'] | [9008.0, 8952.0] | [29.0, 26.0] | [113, 114] |
p02957 | u991148747 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['a,b = map(int,input().split())\n\nif ((a+b)%2) == 0:\n print(int(a+b/2))\nelse:\n print("IMPOSSIBLE")', 'a,b = map(int,input().split())\n\nif (a+b%2) == 0:\n print(int(a+b/2))\nelse:\n print("IMPOSSIBLE")', 'a,b = map(int,input().split())\n\nans = a+b/2\n\nif type(ans) == "int":\n print(ans)\nelse:\n print("IMP... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s027403345', 's431766740', 's932302644', 's382861789'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [98, 96, 108, 100] |
p02957 | u992465933 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["def main():\n a, b = [int(x) for x in input().split()]\n if (a+b)%2 == 0:\n k = (a+b)/2\n if (a<k and k<b) or (b<k and k<a):\n print(k)\n else:\n print('IMPOSSIBLE')\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n a, b = [int(x) for x in input().split()]\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s137829977', 's766617872', 's976771590'] | [3060.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [240, 179, 198] |
p02957 | u993435350 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['A,B = int(input())\n\nK = (A + B) \n\nif K % 2 == 0:\n\tprint(int(K / 2))\nelse:print("IMPOSSIBLE")', 'L = list(map(int, input().split()))\n\nK = (L[0] + L[1]) \n\nif K % 2 == 0:\n\tprint(int(K / 2))\nelse:print("IMPOSSIBLE")'] | ['Runtime Error', 'Accepted'] | ['s481337057', 's603210674'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 115] |
p02957 | u994910167 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["A, B = list(map(int, input().split()))\nans = (A+B)/2\nif ans.is_integer():\n print(ans)\nelse: print('IMPOSSIBLE')", "A, B = list(map(int, input().split()))\nans = (A+B)/2\nif ans.is_integer():\n print(int(ans))\nelse: print('IMPOSSIBLE')"] | ['Wrong Answer', 'Accepted'] | ['s524413837', 's882283298'] | [2940.0, 2940.0] | [17.0, 17.0] | [114, 119] |
p02957 | u995015650 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ['\nA, B = map(int, input().split())\n\nif ((A - B) % 2 == 0) :\n\tX = abs(A - B)\nelse:\n\tX = "IMPOSSIBLE"\n\n\nprint("{0}".format(X))', '\nA, B = map(int, input().split())\n\nif (abs(A - B) % 2 == 0) :\n\tX = abs(A - B) % 2 + min([A, B])\nelse:\n\tX = "IMPOSSIBLE"\n\n\nprint("{0}".format(X))', '\nA, B = map(int, inp... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s020603317', 's732214383', 's754024228', 's873372755', 's087689262'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 24.0, 17.0, 17.0, 17.0] | [157, 178, 155, 160, 183] |
p02957 | u997393081 | 2,000 | 1,048,576 | We have two distinct integers A and B. Print the integer K such that |A - K| = |B - K|. If such an integer does not exist, print `IMPOSSIBLE` instead. | ["a,b=int(input().split())\nprint(a+b //2 if a+b % 2==0 else 'IMPSSIBLE')", "a,b=int(input().split())\nprint((a+b)//2 if (a+b)%2==0 else 'IMPSSIBLE')", "a,b=map(int,input().split());print((a+b)//2 if (a+b)%2==0 else 'IMPOSSIBLE')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s705346244', 's877246530', 's627421152'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [70, 71, 76] |
p02958 | u000085263 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N=int(input())\nlist=input().split()\nfor all in list:\n all=int(all)\nflag=False\nc=0\nx="YES"\nleng=len(list)\nfor i in range(leng-1):\n if list[i]>list[i+1]:\n c=c+1\n t=list[i]\n list[i]=list[i-1]\n list[i-1]=t\n print(list) \n if c==2:\n x="NO"\n bre... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s322638898', 's915356594', 's956140658', 's391019177'] | [9192.0, 9184.0, 9196.0, 9196.0] | [33.0, 30.0, 34.0, 33.0] | [312, 418, 286, 199] |
p02958 | u000212387 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["from statistics import mode\nimport numpy as np\nN=input()\np=list(map(int,input().split()))\np=np.array(p)\nq=p-np.arange(len(p-1))\nq = list(q)\nr = len(list(set(q)))\nif sum(list(q))==2*mode(q):\n print('YES')\nelse:\n print('NO')\n \n\n", "N=int(input())\np=list(map(int,input().split()))\nq=sorted(p)\nco... | ['Runtime Error', 'Accepted'] | ['s484454308', 's371081575'] | [13664.0, 2940.0] | [160.0, 17.0] | [235, 175] |
p02958 | u000981235 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n=int(input())\na=list(map(int,input().split()))\nc=0\nfor i in range(n):\n if a[i]!=i:\n c=c+1\nif c==0 or c==2:\n print("YES")\nelse:\n print("NO")\n', 'n=int(input())\na=list(map(int,input().split()))\nc=0\nfor i in range(n):\n if a[i]!=i+1:\n c=c+1\nif c==0 or c==2:\n print("YES")\nel... | ['Wrong Answer', 'Accepted'] | ['s163135346', 's768610755'] | [2940.0, 2940.0] | [17.0, 17.0] | [157, 159] |
p02958 | u003501233 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N=int(input())\nP=[int(input()) for i in range(N)]\n\nif P[0] > P[N-1] and P[N-1] < P[2] and P[3] < P[0]:\n print("YES")\nelse:\n print("NO")', 'N=int(input())\nP=list(map(int,input().split()))\n\nif P[0] > P[N-1] and P[N-1] < P[1] and P[N-2] < P[0]:\n print("NO")\nelse:\n print("YES")', 'N=int(input())\np=list(m... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s182512671', 's296814854', 's613094358'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0] | [137, 137, 222] |
p02958 | u006251926 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N = int(input())\np = list(map(int, input().split()) )\n\nmis_match = sum([ 1 for s in p if not p.index(s) == s+1])\n\njudge="NO"\nif mis_match in [0,2]:\n judge="YES"\nprint(judge)', 'N = int(input())\np = list(map(int, input().split()) )\n\nmis_match = sum([ 1 for s in p if not p.index(s) +1 == s])\n\njudge="NO"... | ['Wrong Answer', 'Accepted'] | ['s471876461', 's871315850'] | [2940.0, 2940.0] | [17.0, 17.0] | [176, 177] |
p02958 | u007263493 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["n = int(input())\nP =list(map(int,input().split()))\nprint(P)\nQ = sorted(P)\nprint(Q)\nans = 0\nfor i in range(n):\n if P[i] != Q [i]:\n ans +=1\nprint('YES' if (ans ==2 or ans==0) else 'NO')", "n = int(input())\nP =list(map(int,input().split()))\nQ = sorted(P)\nans = 0\nfor i in range(n):\n if P[i] !=... | ['Wrong Answer', 'Accepted'] | ['s218343704', 's030057301'] | [3060.0, 3060.0] | [17.0, 17.0] | [194, 176] |
p02958 | u007764502 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N=int(input())\np=list(map(int,input().split()))\nanswer = []\ndiff = 0\ndiff_1 = -1\ndiff_2 = -1\n\nindex = 0\n\nfor i in p:\n if index == 0:\n index += 1\n continue\n \n if p[index] < p[index-1]:\n if diff >= 2:\n print ("NO")\n exit()\n diff += 1\n\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s441416078', 's819115659', 's764810378'] | [3064.0, 3064.0, 3060.0] | [17.0, 20.0, 17.0] | [762, 761, 227] |
p02958 | u007991836 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["n = int(input())\np = list(map(int,input().split()))\n\nswap = 0\nfor i in range(n):\n if i + 1 != p[i]:\n swap += 1\n\nif swap == 0 or swap == 2:\n print('Yes')\nelse:\n print('No')\n", "n = int(input())\np = list(map(int,input().split()))\n\nswap = 0\nfor i in range(n):\n if i + 1 == p[i]:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s071614225', 's964395474', 's959767959'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [188, 188, 188] |
p02958 | u017064954 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n = int(input())\nP = [int(input()) for a in range(n)]\nsorted = sorted(P)\ncount = 0\n\nfor i in range(n):\n if P[i] == sorted[i]:\n count += 1\n\nif count == n or count == n-2:\n print("YES")\nelse:\n print("NO")\n \n', 'n = int(input())\nP = [int(input()) for _ in range(n)]\nsorted = sorted(P)\ncount = 0\n\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s485974716', 's830190974', 's303946090'] | [3056.0, 3056.0, 3060.0] | [17.0, 17.0, 18.0] | [212, 211, 211] |
p02958 | u023141436 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n = int(input())\np = [int(i) for i in input().split()]\n\nc = 0\nfor i in range(n):\n\tif p[i] != i+1:\n\t\tc+=1\n\nif c==0 or c==2:\n\tprint("Yes")\nelse:\n\tprint("No")', 'n = int(input())\np = [int(i) for i in input().split()]\n\nc = 0\nfor i in range(n):\n\tif p[i] != i+1:\n\t\tc+=1\n\nif c==0 or c==2:\n\tprint(... | ['Wrong Answer', 'Accepted'] | ['s945533732', 's754765756'] | [2940.0, 2940.0] | [17.0, 17.0] | [155, 155] |
p02958 | u023229441 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n=int(input())\nsp=0\nA=list(map(int,input.split()))\nfor i in range(n):\n if i+1!=A[i]:\n sp+=1\nif sp==0 or 2:\n print("YES")\n exit()\nprint("NO")\n', 'n=int(input())\nsp=0\nA=list(map(int,input.split()))\nfor i in range(n):\n if i+1!=A[i]:\n sp+=1\nif sp==0 or sp==2:\n print("YES")\n exit()\nprint("NO... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s800305297', 's820463101', 's462379357'] | [3064.0, 2940.0, 2940.0] | [17.0, 20.0, 17.0] | [147, 151, 154] |
p02958 | u023231878 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["input()\np = list(map(int, input().split()))\nfor i, p_ in enumerate(p):\n a += (p_ != (i + 1))\nprint('YNEOS'[a > 2 :: 2])\n", "input()\np = list(map(int, input().split()))\na = 0\nfor i, p_ in enumerate(p):\n a += (p_ != (i + 1))\nprint('YNEOS'[a > 2 :: 2])\n"] | ['Runtime Error', 'Accepted'] | ['s929019543', 's445118009'] | [2940.0, 2940.0] | [17.0, 17.0] | [121, 127] |
p02958 | u025287757 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N = int(input())\np = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n if p[i] != i+1:\n count ++\nif count >=3:\n print("NO")\nelse:\n print("YES")\n ', 'N = int(input())\np = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n if p[i] != i+1:\n count += 1\nif count >=3:\n ... | ['Runtime Error', 'Accepted'] | ['s943780042', 's275240402'] | [2940.0, 3060.0] | [17.0, 18.0] | [166, 163] |
p02958 | u025463382 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n = int(input())\np = tuple(map(int,input().split()))\nc = 0\nans = "YES"\nfor i in range(1,n+1) :\n if p[i] != i :\n c += 1\nif c <= 2 :\n ans = "NO"\nprint(ans)', 'n = int(input())\np = tuple(map(int,input().split()))\nc = 0\nans = "YES"\nfor i in range(1,n+1) :\n if p[i-1] != i :\n c += 1\ni... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s642824166', 's961459769', 's755982050'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [166, 168, 163] |
p02958 | u026862065 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n = int(input())\np = list(map(int, input().split()))\nl = list("")\nc = 0\nfor i in range(1, n):\n if p[i] - p[i - 1] != 1:\n c += 1\n l.append(i)\nif c == 1 or c > 2:\n print("NO")\n exit()\nprint("Yes")', 'n = int(input())\np = list(map(int, input().split()))\nc = 0\nfor i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s133672530', 's022889576'] | [3060.0, 2940.0] | [21.0, 17.0] | [217, 176] |
p02958 | u027675217 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['n = int(input())\np = list(map(int, input().split()))\nk = 0\nfor i in range(n):\n\tif p[i]!=i+1:\n\t\tk+=1\nif k<=2:\n\tprint("Yes")\nelse:\n\tprint("No")\n', 'n = int(input())\np = list(map(int, input().split()))\nk = 0\nfor i in range(n):\n\tif p[i]!=i+1:\n\t\tk+=1\nif k<=2:\n\tprint("YES")\nelse:\n\tprint("NO")\n... | ['Wrong Answer', 'Accepted'] | ['s105210356', 's298864798'] | [2940.0, 2940.0] | [18.0, 17.0] | [142, 142] |
p02958 | u037221289 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N = int(input())\nX = [int(i) for i in input().split(\' \')]\ncount = 0\nfor i in range(N):\n if X[i]! = i+1:\n count+=1\nif count <= 2:\n print("YES")\nelse:\n print("NO")', "N = int(input())\nX = list(map(int,input().split(' ')))\ncount = 0\n\nfor i in range(1,N):\n for j in range(i-1,-1,-1):\n ... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s368148963', 's478702972', 's672297300', 's475662241'] | [2940.0, 3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [177, 290, 289, 175] |
p02958 | u038216098 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N=int(input())\np=list(map(int,input().split()))\ncount=0\nfor i in range(N):\n if p[i]!=i+1 :\n count+=1\nif(count<=2):\n print("Yes")\nelse:\n print("No")', 'N=int(input())\np=list(map(int,input().split()))\ncount=0\nfor i in range(N):\n if p[i]!=i+1 :\n count+=1\nif(count<=2):\n print("YES")\nelse:\n p... | ['Wrong Answer', 'Accepted'] | ['s340761173', 's139446993'] | [9152.0, 9092.0] | [26.0, 25.0] | [153, 153] |
p02958 | u039332718 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['#-*- coding: UTF-8 -*-\n\nn = int(input())\n\np = list(map(int, input().split()))\nf = 0\n\nfor i in range(len(p) - 1):\n pi = p[i]\n if p[i] != i+1:\n if p[p[i] - 1] == i + 1:\n p[i], p[pi - 1] = p[pi - 1], p[i]\n f += 1\n print(p,i)\n else:\n f = 2\n ... | ['Wrong Answer', 'Accepted'] | ['s865717781', 's501658431'] | [3064.0, 3060.0] | [17.0, 17.0] | [377, 333] |
p02958 | u040141413 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["n=int(input())\np=list(map(int,input().split()))\ncount=0\nq = [i for i in range(1,n+1)] \nprint(p)\nprint(q)\n \nfor j in range(0,n) :\n if(p[j]!=q[j]):\n count+=1\n \nif(count==0 or count==2):\n print('YES')\nelse:\n print('NO')\n", "n=int(input())\np=list(map(int,input().split()))\ncount=0\nq = [i for i... | ['Wrong Answer', 'Accepted'] | ['s790489573', 's096006012'] | [3060.0, 3060.0] | [17.0, 17.0] | [228, 210] |
p02958 | u041783158 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N = int(input().strip())\nP = list(map(int, input().strip().split()))\n\nc = 0\nfor p, q in zip(P, sorted(P)):\n if p != q:\n c += 1\n if c > 2:\n break\n\nif c > 2:\n print("No")\nelse:\n print("Yes")', 'N = int(input().strip())\nP = list(map(int, input().strip().split()))\n\nc = 0\nfor p, q in zip(P, ... | ['Wrong Answer', 'Accepted'] | ['s580762937', 's446090899'] | [3060.0, 3060.0] | [17.0, 17.0] | [202, 202] |
p02958 | u044964932 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['def main():\n a, b = map(int, input().split())\n diff = abs(max(b, a) - min(a, b))\n if diff % 2 != 0:\n print("IMPOSSIBLE")\n else:\n bigger = max(a, b)\n ans = bigger - (diff//2)\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n... | ['Runtime Error', 'Accepted'] | ['s230906874', 's241049312'] | [3060.0, 3060.0] | [19.0, 17.0] | [266, 315] |
p02958 | u045707160 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ["n = int(input())\np = list(input().split())\ncnt = 0\n\nfor i in range(n):\n if i+1 != p[i]:\n cnt += 1\nprint('Yes' if cnt == 0 or cnt == 2 else 'No')\n", "n = int(input())\np = list(input().split())\ncnt = 0\n\nfor i in range(n):\n if i+1 != p[i]:\n cnt += 1\nprint('YES' if cnt == 0 or cnt == 2 ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s280426077', 's878552377', 's683958028'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [155, 155, 165] |
p02958 | u046776181 | 2,000 | 1,048,576 | We have a sequence p = {p_1,\ p_2,\ ...,\ p_N} which is a permutation of {1,\ 2,\ ...,\ N}. You can perform the following operation at most once: choose integers i and j (1 \leq i < j \leq N), and swap p_i and p_j. Note that you can also choose not to perform it. Print `YES` if you can sort p in ascending order in th... | ['N = int(input())\nP = list(map(int, input().split()))\ncount = sum([index + 1 == num for index, num in enumerate(P)])\nif count <= 2:\n print("YES")\nelse:\n print("NO")', 'N = int(input())\nP = list(map(int, input().split()))\ncount = sum([index + 1 != num for index, num in enumerate(P)])\nif count <= 2:\n prin... | ['Wrong Answer', 'Accepted'] | ['s211714160', 's352034039'] | [2940.0, 2940.0] | [17.0, 17.0] | [165, 169] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.