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
|
---|---|---|---|---|---|---|---|---|---|---|
p03807 | u349444371 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N=int(input())\nA=list(map(int,input().split()))\nod=0\nfor i in range(N):\n if A[i]%2==1:\n od+=1\nprint(od)\nif od%2==0:\n print("YES")\nelse:\n print("NO")', 'N=int(input())\nA=list(map(int,input().split()))\nod=0\nfor i in range(N):\n if A[i]%2==1:\n od+=1\nif od%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s680621750', 's144161828'] | [14112.0, 14108.0] | [59.0, 59.0] | [177, 167] |
p03807 | u350093546 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input().split()))\n\ncnt=0\nfor i in a:\n if i%2=1:\n cnt+=1\n \nif cnt%2==1:\n print('NO')\n \nelse:\n print('YES')", "n=int(input())\na=list(map(int,input().split()))\na=[i if i%2==1 else None for i in a]\nif a.count()%2==1:\n print('NO')\nelse:\n print('YES')", "n=int(input())\nx=list(map(int,input().split()))\na=[]\nfor i in x:\n if i%2==1:\n a+=[i]\nif len(a)%2==1:\n print('NO')\nelse:\n print('YES')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s340659862', 's631445449', 's118721105'] | [8984.0, 20104.0, 19864.0] | [23.0, 56.0, 63.0] | [145, 139, 141] |
p03807 | u354527070 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = list(map(int, input().split(" ")))\neven = []\nodd = []\nfor i in a:\n if i % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nans = "Yes"\nif len(odd) % 2 == 1:\n ans = "No"\nprint(ans)', 'n = int(input())\na = list(map(int, input().split(" ")))\neven = []\nodd = []\nfor i in a:\n if i % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nans = "YES"\nif len(odd) % 2 == 1:\n ans = "NO"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s649868958', 's933157182'] | [20116.0, 20128.0] | [64.0, 66.0] | [221, 221] |
p03807 | u375616706 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int, input().split()))\n\nodd = len(list(filter(lambda x: x % 2 != 0, A)))\neven = N - odd\n\nans = "YES"\n\n\nif odd == 1 and even == 0:\n odd = odd\nelif odd % 2 == 1:\n ans = "NO"\nelse:\n even += odd//2\n while True:\n if even == 1:\n if even % 2 == 1:\n ans = "NO"\n break\n even //= 2\nprint(ans)\n', 'N = int(input())\nA = list(map(int, input().split()))\n\nodd = len(list(filter(lambda x: x % 2 != 0, A)))\neven = N - odd\n\nans = "YES"\n\n\nif odd == 1 and even == 0:\n odd = odd\nelif odd % 2 == 1:\n ans = "NO"\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s394043626', 's643394068'] | [2940.0, 14108.0] | [18.0, 57.0] | [368, 219] |
p03807 | u375870553 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["def main():\n n = int(input())\n a = [int(i) for i in input().split()]\n even = 0\n odd = 0\n for aa in a:\n if aa%2 == 0:\n even += 1\n else:\n odd += 1\n if odd % 2 == 1:\n print('No')\n return\n print('Yes')\n\n\nif __name__ == '__main__':\n main()", "def main():\n n = int(input())\n a = [int(i) for i in input().split()]\n even = 0\n odd = 0\n for aa in a:\n if aa%2 == 0:\n even += 1\n else:\n odd += 1\n if odd % 2 == 1:\n print('NO')\n return\n print('YES')\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s995032673', 's567829553'] | [14108.0, 14108.0] | [56.0, 56.0] | [308, 309] |
p03807 | u380653557 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["import sys\n\nn = list(map(int, next(sys.stdin).split()))\n\nif len(ns) == 1:\n print('YES')\n exit()\n\nif sum(1 for n in ns if n % 2 == 1) % 2 == 0:\n print('YES')\nelse:\n print('NO')\n", "import sys\n\nif sum(for n in map(int, next(sys.stdin).split()) if n % 2 == 1) % 2 == 0:\n print('YES')\nelse:\n print('NO')\n", "import sys\n\nif sum(1 for n in map(int, next(sys.stdin).split()) if n % 2 == 1) % 2 == 0:\n print('YES')\nelse:\n print('NO')\n", "import sys\n\nnext(sys.stdin)\nns = list(map(int, next(sys.stdin).split()))\n\nif len(ns) == 1:\n print('YES')\n exit()\n\nif sum(1 for n in ns if n % 2 == 1) % 2 == 0:\n print('YES')\nelse:\n print('NO')\n"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s360806279', 's779553680', 's810898621', 's625391194'] | [3316.0, 3064.0, 3064.0, 14256.0] | [25.0, 22.0, 23.0, 67.0] | [188, 126, 128, 205] |
p03807 | u388415336 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['num_ints = int(input())\nsum_ints = sum([int(i) for i in input().split()])\n\nif sum % 2 == 0:\n print("YES")\nelse:\n print("NO")\n', 'num_ints = int(input())\nsum_ints = sum([int(i) for i in input().split()])\n\nif sum_ints % 2 == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Runtime Error', 'Accepted'] | ['s361602990', 's822501611'] | [14108.0, 14112.0] | [46.0, 45.0] | [131, 136] |
p03807 | u391533749 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nP = list(map(int, input().split()))\nx = 0\nfor i in range(N):\n if P[i]%2==1:\n x+=1\nif x%2==0:\n print("Yes")\nelse:\n print("No")\n', 'N = int(input())\nP = list(map(int, input().split()))\nx = 0\nfor i in range(N):\n if P[i]%2==1:\n x+=1\nif x%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s877908930', 's659651077'] | [14108.0, 14108.0] | [60.0, 58.0] | [159, 158] |
p03807 | u391731808 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['input()\nprint("YNEOS"[sum(map(int,input()))%2::2])', 'input()\nprint("YNEOS"[sum(map(int,input().split()))%2::2])'] | ['Runtime Error', 'Accepted'] | ['s351218900', 's642064320'] | [5028.0, 11104.0] | [19.0, 39.0] | [50, 58] |
p03807 | u394721319 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = [int(i)%2 for i in input().split()]\n\np = A.count(1)\nq = A.count(0)\n\nif p%2 != 0:\n print('NO')\nelse:\n if p/2+q != 1:\n print('NO')\n else:\n print('YES')\n", "N = int(input())\nA = [int(i)%2 for i in input().split()]\n\np = A.count(1)\nq = A.count(0)\n\nif p%2 != 0:\n print('NO')\nelse:\n if N == 1:\n print('NO')\n else:\n print('YES')\n"] | ['Wrong Answer', 'Accepted'] | ['s365331792', 's315467295'] | [11108.0, 11104.0] | [52.0, 55.0] | [194, 190] |
p03807 | u404710939 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = map(int, input().split(" "))\n\noe = [a%2 for a in A]\nif sum(oe)%2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = map(int, input().split(" "))\n\noe = [a%2 for a in A]\nif sum(oe)%2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s668470399', 's767621340'] | [11104.0, 11108.0] | [48.0, 49.0] | [130, 130] |
p03807 | u405256066 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['from sys import stdin\ndata = [int(x) for x in stdin.readline().rstrip().split()]\ncnt = 0\nfor i in data:\n if i % 2 != 0:\n cnt += 1\nif cnt % 2 == 0:\n print("YES")\nelse:\n print("NO")', 'from sys import stdin\nN = int(stdin.readline().rstrip())\ndata = [int(x) for x in stdin.readline().rstrip().split()]\ncnt = 0\nfor i in data:\n if i % 2 != 0:\n cnt += 1\nif cnt % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s514807976', 's128714826'] | [3060.0, 14112.0] | [17.0, 60.0] | [195, 230] |
p03807 | u408375121 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\na = list(map(int, input().split()))\nodd_num = 0\nfor i in range(n):\n if a[i] % 2 == 1:\n odd_num += 1\nif odd_num % 2 == 0:\n print('Yes')\nelse:\n print('No')", "n = int(input())\na = list(map(int, input().split()))\nodd_num = 0\nfor i in range(n):\n if a[i] % 2 == 1:\n odd_num += 1\nif odd_num % 2 == 0:\n print('YES')\nelse:\n print('NO')\n"] | ['Wrong Answer', 'Accepted'] | ['s549415171', 's989942779'] | [14104.0, 14108.0] | [59.0, 60.0] | [176, 177] |
p03807 | u421499233 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int,input().split()))\nOdds = list(filter(lambda x:x%2 == 1,A))\nOdds_num = len(Odds)\nif Odds_num % 2 == 1:\n print("No")\nelse:\n print("Yes")', 'N = int(input())\nA = list(map(int,input().split()))\nOdds = list(filter(lambda x:x%2 == 1,A))\nOdds_num = len(Odds)\nif Odds_num % 2 == 1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s060304998', 's921926520'] | [14112.0, 14108.0] | [56.0, 57.0] | [174, 174] |
p03807 | u425351967 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = [int(n) for n in input().split()]\n\ncnt = 0\nfor in range(N):\n if A[i] % 2 == 1:\n cnt += 1\n\nif cnt % 2 == 0:\n print ('YES')\nelse:\n print('NO')\n", "N = int(input())\nA = [int(n) for n in input().split()]\n\ncnt = 0\nfor i in range(N):\n if A[i] % 2 == 1:\n cnt += 1\n\nif cnt % 2 == 0:\n print ('YES')\nelse:\n print('NO')\n"] | ['Runtime Error', 'Accepted'] | ['s929810347', 's183414759'] | [3064.0, 14108.0] | [22.0, 83.0] | [178, 180] |
p03807 | u426649993 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['if __name__ == "__main__":\n n = int(input())\n a = list(map(int, input().split()))\n\n count = 0\n\n for i in range(n):\n if a[i] % 2 == 1:\n count += 1\n\n if count % 2 == 1:\n print(\'No\')\n else:\n print(\'Yes\')\n', 'if __name__ == "__main__":\n n = int(input())\n a = list(map(int, input().split()))\n\n odd_count = 0\n for aa in a:\n if aa % 2 == 1:\n odd_count += 1\n\n if odd_count % 2 == 1:\n print(\'NO\')\n else:\n print(\'YES\')\n'] | ['Wrong Answer', 'Accepted'] | ['s925673999', 's260693907'] | [14108.0, 14112.0] | [61.0, 55.0] | [251, 254] |
p03807 | u431981421 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["a=int(input())\nli = list(map(int,input().split()))\n\nans = 'No'\n\neven = []\nodd = []\n\nfor i in li:\n if i % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nif len(odd) % 2 == 0:\n ans = 'Yes'\n \nprint(ans)", "a=int(input())\nli = list(map(int,input().split()))\n\nans = 'NO'\n\neven = []\nodd = []\n\nfor i in li:\n if i % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nif len(odd) % 2 == 0:\n ans = 'YES'\n \nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s780210836', 's502288539'] | [14112.0, 14108.0] | [62.0, 64.0] | [209, 209] |
p03807 | u434208140 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['f=lambda x:int(x)%2\nn=int(input())\na=list(map(f,input().split())).count(1)\nprint([YNEOS][n>1 and a%2>0::2]', "f=lambda x:int(x)%2\nn=int(input())\na=list(map(f,input().split())).count(1)\nprint(['YNEOS'][n>1 and a%2>0::2])", 'f=lambda x:int(x)%2\nn=int(input())\na=list(map(f,input().split())).count(1)\nprint([YNEOS][n>1 and a%2>0::2])', "f=lambda x:int(x)%2\nn=int(input())\na=list(map(f,input().split())).count(1)\nprint('YNEOS'[n>1 and a%2>0::2])"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s188413361', 's335692364', 's604708039', 's977722859'] | [2940.0, 11104.0, 11104.0, 11104.0] | [17.0, 57.0, 64.0, 59.0] | [106, 109, 107, 107] |
p03807 | u445624660 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['\n\nn = int(input())\narr = list(map(int, input().split()))\nodd = 0\nfor a in arr:\n if a % 2 == 1:\n odd += 1\n\nprint("YES" if odd % 2 == 1 else "NO")\n', '\n\nn = int(input())\narr = list(map(int, input().split()))\n\nodd_count = len(list(filter(lambda x : x%2==1, arr)))\nif odd_count%2==1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s190925180', 's181450037'] | [14108.0, 14108.0] | [56.0, 59.0] | [229, 297] |
p03807 | u457901067 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int, input().split()))\n\ncnt = 0 \nfor x in A:\n if A%2 == 1:\n cnt += 1\n \nif cnt % 2 == 0:\n print("YES")\nelse:\n print("NO")', 'N = int(input())\nA = list(map(int, input().split()))\n\ncnt = 0 \nfor x in A:\n if x%2 == 1:\n cnt += 1\n \nif cnt % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Runtime Error', 'Accepted'] | ['s831629169', 's413477243'] | [14360.0, 14112.0] | [46.0, 55.0] | [159, 159] |
p03807 | u469700628 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nnumbers = list(map(int, input().split()))\n\nodds = list(filter(lambda x: x % 2 == 0, numbers))\nevens = list(filter(lambda x: x % 2 == 1, numbers))\n\nevens_from_odds = sum(divmod(odds, 2))\nodds_from_evens = sum(divmod(evens, 2))\n\nif odds_from_evens % 2 == 1 or evens_from_odds % 2 == 1:\n print("YES")\nelse:\n print("NO")', 'N = int(input())\nnumbers = list(map(int, input().split()))\n\n\n\n\n\n\n\nevens = list(filter(lambda x: x % 2 == 1, numbers))\nevens_mod = len(evens) % 2\n\nif evens_mod == 1:\n print("NO")\nelse:\n print("YES")\n'] | ['Runtime Error', 'Accepted'] | ['s298786317', 's359798186'] | [14364.0, 14108.0] | [73.0, 56.0] | [339, 360] |
p03807 | u471684875 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input().split()))\nodd=0;even=0\nfor i in range(n):\n if a[i]%2==1:\n odd+=1\n else:\n even+=1\n#print(odd,even)\nif odd%2==0:\n print('Yes')\nelse:\n print('No')", "n=int(input())\na=list(map(int,input().split()))\nodd=0;even=0\nfor i in range(n):\n if a[i]%2==1:\n odd+=1\n else:\n even+=1\n#print(odd,even)\nif odd%2==0:\n print('YES')\nelse:\n print('NO')\n"] | ['Wrong Answer', 'Accepted'] | ['s318489014', 's786186461'] | [14104.0, 14108.0] | [62.0, 64.0] | [207, 208] |
p03807 | u479638406 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\na = [int(i) for i in input().split()]\n\nans = 'Yes'\nif sum(a)%2 != 0:\n ans = 'No'\n \nprint(ans)", "n = int(input())\na = [int(i) for i in input().split()]\n \nans = 'YES'\nif sum(a)%2 != 0:\n ans = 'NO'\n \nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s851450247', 's232760125'] | [14108.0, 14108.0] | [47.0, 49.0] | [112, 113] |
p03807 | u481250941 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['#\n# agc010 a\n#\n\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n\n def test_入力例_1(self):\n input = """3\n1 2 3"""\n output = """YES"""\n self.assertIO(input, output)\n\n def test_入力例_2(self):\n input = """5\n1 2 3 4 5"""\n output = """NO"""\n self.assertIO(input, output)\n\n\ndef resolve():\n N = int(input())\n A = list(map(int, input().split()))\n\n e = 0\n o = 0\n for a in A:\n if a % 2 == 0:\n e += 1\n else:\n o += 1\n\n if o % 2 == 0:\n if (o // 2 + e) % 2 == 0:\n print("YES")\n else:\n print("NO")\n\n\nif __name__ == "__main__":\n # unittest.main()\n resolve()\n', '#\n# agc010 a\n#\n\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n\n def test_入力例_1(self):\n input = """3\n1 2 3"""\n output = """YES"""\n self.assertIO(input, output)\n\n def test_入力例_2(self):\n input = """5\n1 2 3 4 5"""\n output = """NO"""\n self.assertIO(input, output)\n\n\ndef resolve():\n N = int(input())\n A = list(map(int, input().split()))\n\n e = 0\n o = 0\n for a in A:\n if a % 2 == 0:\n e += 1\n else:\n o += 1\n\n if o % 2 == 0:\n print("YES")\n else:\n print("NO")\n\n\nif __name__ == "__main__":\n # unittest.main()\n resolve()\n'] | ['Runtime Error', 'Accepted'] | ['s610322490', 's826313733'] | [9020.0, 27480.0] | [26.0, 101.0] | [1033, 999] |
p03807 | u487594898 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = input()\nA = input().split()\ncount=0\nfor i in range(N):\n if A[i]%2==1:\n count+=1\nif conut%2=1:\n print("NO")\nelse:\n print("YES")', 'N = input()\nA = input().split()\ncount=0\nfor i in range(int(N)):\n if int(A[i]) % 2==1:\n count+=1\nif count%2==1:\n print("NO")\nelse:\n print("YES")\n\n'] | ['Runtime Error', 'Accepted'] | ['s561646327', 's284578551'] | [2940.0, 11104.0] | [17.0, 65.0] | [136, 151] |
p03807 | u488178971 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = [int(j) for j in input().split()]\n\nif sum(A)==0:\n print('YES')\nelse:\n print('NO')", "N = int(input())\nA = [int(j) for j in input().split()]\n\nif sum(A)%2==0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Accepted'] | ['s619518521', 's795555323'] | [14104.0, 14108.0] | [47.0, 46.0] | [108, 110] |
p03807 | u492447501 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\n*A, = map(int, input().split())\n\ncount = 0\n\nfor i in range(len(A)):\n if A[i]%2!=0:\n count = count + 1\n\nif count%2==0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\n*A, = map(int, input().split())\n\ncount = 0\n\nfor i in range(len(A)):\n if A[i]%2!=0:\n count = count + 1\n\nif count%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s807197314', 's844634722'] | [14104.0, 14112.0] | [59.0, 61.0] | [183, 183] |
p03807 | u496511996 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = input()\ns = list(map(int,input().split()))\nc = 0\nfor i in s:\n if s % 2 == 1:\n c+=1\nif c % 2 == 1:\n print("NO")\nelse:\n print("YES")', 'n = input()\ns = list(map(int,input().split()))\nc = 0\nfor i in s:\n if s % 2 == 1:\n c+=1\nif c % 2 == 1:\n print("NO")\nelse:\n print("YES")', 'n = input()\ns = list(map(int,input().split()))\nc = 0\nfor i in s:\n if i % 2 == 1:\n c+=1\nif c % 2 == 1:\n print("NO")\nelse:\n print("YES")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s604307249', 's802764843', 's634577557'] | [14104.0, 14108.0, 14104.0] | [42.0, 42.0, 57.0] | [140, 150, 150] |
p03807 | u500297289 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int, input().split()))\n\nodd = 0\neven = 0\n\nfor a in A:\n if a % 2 == 0:\n even += 1\n else:\n odd += 1\n\nif odd % 2 == 1:\n print("YES")\nelse:\n print("NO")\n', 'N = int(input())\nA = list(map(int, input().split()))\n\nodd = 0\neven = 0\n\nfor a in A:\n if a % 2 == 0:\n even += 1\n else:\n odd += 1\n\nif odd % 2 == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Wrong Answer', 'Accepted'] | ['s055622248', 's842781109'] | [14108.0, 14108.0] | [57.0, 58.0] | [205, 205] |
p03807 | u518064858 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=input()\na=list(map(int,input().split()))\nres=0\nodd=0\neven=0\nfor x in a:\n if x%2==0:\n even+=1\n else:\n odd+=1\nres+=odd%2\neven+=odd//2\nres+=even%2\nif res%2==1:\n print("YES")\nelse:\n print("NO")\n', 'n=input()\na=list(map(int,input().split()))\nres=0\nodd=0\neven=0\nfor x in a:\n if x%2==0:\n even+=1\n else:\n odd+=1\nres+=odd%2\nif res==1:\n print("NO")\nelse:\n print("YES")\n'] | ['Wrong Answer', 'Accepted'] | ['s959693523', 's014206694'] | [14104.0, 14108.0] | [59.0, 59.0] | [218, 191] |
p03807 | u519939795 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\nl=list(map(int,input().split()))\nans1=0\nans2=0\nfor i in range(len(l)):\n if l[i]%2==0:\n ans2+=1\n if l[i]%2==1:\n ans1+=1\nif ans1%2==0:\n print('NO')\nelse:\n print('YES')", "n=int(input())\nl=list(map(int,input().split()))\nans1=0\nans2=0\nfor i in range(len(l)):\n if l[i]%2==0:\n ans2+=1\n if l[i]%2==1:\n ans1+=1\nif ans1%2==1 and ans2%2==0 or ans2%2==1:\n print('NO')\nelse:\n print('YES')", "n=int(input())\nl=list(map(int,input().split()))\nans1=0\nans2=0\nfor i in range(len(l)):\n if l[i]%2==0:\n ans2+=1\n if l[i]%2==1:\n ans1+=1\nif ans1%2==1 and ans2%2==0 or ans2%2!=0 and ans1!=0:\n print('NO')\nelse:\n print('YES')", "n=int(input())\nl=list(map(int,input().split()))\nans1=0\nans2=0\nfor i in range(len(l)):\n if l[i]%2==0:\n ans2+=1\n if l[i]%2==1:\n ans1+=1\nif ans1%2==0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s138100394', 's227055817', 's241199560', 's176246393'] | [14112.0, 14104.0, 14108.0, 14104.0] | [75.0, 74.0, 75.0, 76.0] | [207, 234, 246, 207] |
p03807 | u520158330 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\n\nA = list(map(int,input().split()))\n\nif len(list(filter(lambda x:x%2==1,A)))%2==1:\n print("No")\nelse:\n print("Yes")', 'N = int(input())\n\nA = list(map(int,input().split()))\n\nif len(list(filter(lambda x:x%2==1,A)))%2==1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s516826892', 's244228561'] | [14108.0, 14104.0] | [56.0, 56.0] | [138, 138] |
p03807 | u527993431 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N=int(input())\nL=list(map(int,input().split()))\ncount=0\nfor i in range N:\n\tif L[i]%2==1:\n\t\tcount+=1\nif count%2==1:\n\tprint("NO")\nelse:\n\tprint("YES")', 'N=int(input())\nL=list(map(int,input().split()))\nC=0\nfor i in range(N):\n\tif L[i]%2==1:\n\t\tC+=1\nif C%2==1:\n\tprint("NO")\nelse:\n\tprint("YES")'] | ['Runtime Error', 'Accepted'] | ['s346658837', 's432621388'] | [2940.0, 14112.0] | [17.0, 59.0] | [147, 136] |
p03807 | u536113865 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["input()\na = list(map(int, input().split()))\nif 1 & len([i for i in a if i&1]):\n print('No')\nelse:\n print('Yes')\n", "input()\na = list(map(int, input().split()))\nif 1 & len([i for i in a if i&1]):\n print('NO')\nelse:\n print('YES')\n"] | ['Wrong Answer', 'Accepted'] | ['s200260456', 's822259100'] | [14104.0, 14112.0] | [47.0, 47.0] | [118, 118] |
p03807 | u539517139 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input().split()))\ns=0\nfor i in range(n):\n s+=1 if a[i]%2==1\nprint('YES' if s%2==0 else 'NO')", "n=int(input())\na=list(map(int,input().split()))\ns=0\nfor i in range(n):\n if a[i]%2==1:\n s+=1\nprint('YES' if s%2==0 else 'NO')"] | ['Runtime Error', 'Accepted'] | ['s101931306', 's888634712'] | [2940.0, 14112.0] | [17.0, 60.0] | [123, 128] |
p03807 | u540762794 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['# -*- coding: utf-8 -*-\n\nN = int(input())\nA = list(map(int, input().split()))\n\neven = odd = 0\nfor i in range(N):\n if A[i] % 2 == 0:\n even += 1\n else:\n odd += 1\n\nif odd % 2 != 0:\n print("No")\n exit()\nelse:\n even += int(odd / 2)\n\nif even % 2 != 0:\n print("No")\nelse:\n print("Yes")\n\n', '# -*- coding: utf-8 -*-\n\nN = int(input())\nA = list(map(int, input().split()))\n\neven = odd = 0\nfor i in range(N):\n if A[i] % 2 == 0:\n even += 1\n else:\n odd += 1\n\nif odd % 2 != 0:\n print("NO")\nelse:\n print("YES")\n'] | ['Wrong Answer', 'Accepted'] | ['s477310402', 's230590947'] | [20032.0, 20076.0] | [67.0, 66.0] | [315, 237] |
p03807 | u569322757 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["_, *a = map(int, open(0).read().split())\nodd = sum(not ai % 2 for ai in a) + 1\nprint('YNeos'[odd % 2::2])", "_, *a = map(int, open(0).read().split())\nodd = sum(not ai % 2 for ai in a) + 1\nprint('YNeos'[odd % 2::2])", "_, *a = map(int, open(0).read().split())\nodd = sum(ai % 2 for ai in a)\nprint('YNEOS'[odd % 2::2])"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s528010344', 's534377218', 's932508107'] | [14060.0, 14060.0, 14060.0] | [52.0, 53.0, 52.0] | [105, 105, 97] |
p03807 | u583826716 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = input()\nif len([a for a in input().rstrip().split() if a % 2]) % 2:\n print('NO')\nelse:\n print('YES')", "N = input()\nif len([a for a in input().rstrip().split() if int(a) % 2]) % 2:\n print('NO')\nelse:\n print('YES')"] | ['Runtime Error', 'Accepted'] | ['s721457028', 's245903739'] | [11232.0, 11232.0] | [41.0, 65.0] | [110, 115] |
p03807 | u594567187 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['length = int(input())\ntarget = [int(n) for n in input().split(" ")]\neven,odd = 0,0\nfor l in range(length):\n if target[l] % 2 == 0:\n even += 1\n else:\n odd += 1\nif even % 2 == 0:\n print("YES")\nelse:\n print("NO")', 'length = int(input())\ntarget = [int(n) for n in input().split(" ")]\neven,odd = 0,0\nfor l in range(length):\n if target[l] % 2 == 0:\n even += 1\n else:\n odd += 1\nif odd % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s404046244', 's241628642'] | [14232.0, 14236.0] | [85.0, 84.0] | [235, 234] |
p03807 | u597455618 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = list(map(int, input().split()))\na.sort()\ncnt = 0\nfor i in range(n):\n if a[i]%2:\n cnt += 1\nif cnt%2:\n print("No")\nelse:\n print("Yes")', 'n = int(input())\na = list(map(int, input().split()))\ncnt = 0\nfor i in range(n):\n if a[i]%2:\n cnt += 1\nif cnt%2:\n print("No")\nelse:\n print("Yes")', 'n = int(input())\n\nif sum(map(int, input().split()))%2:\n print("No")\nelse:\n print("Yes")', 'n = int(input())\n\nif sum(map(int, input().split()))%2:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s172585816', 's639723249', 's793824395', 's721552974'] | [14108.0, 14108.0, 11108.0, 11104.0] | [94.0, 60.0, 40.0, 40.0] | [169, 160, 93, 93] |
p03807 | u608053762 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = input()\na_list = [int(i) for i in input().split()]\n\nadd_or_not = [True if i%2==1 else False for i in a_list]\nif sum(add_or_not) %2 == 1:\n print('YES')\nelse:\n print('NO')", "n = input()\na_list = [int(i) for i in input().split()]\n\nadd_or_not = [True if i%2==1 else False for i in a_list]\nif sum(add_or_not) %2 == 1:\n print('NO')\nelse:\n print('YES')"] | ['Wrong Answer', 'Accepted'] | ['s562609132', 's219430179'] | [14108.0, 14112.0] | [58.0, 57.0] | [175, 175] |
p03807 | u614181788 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['a=int(input())\nli = list(map(int,input().split()))\n\nlis = []\nfor name in li:\n if name % 2 == 1:\n lis.append(name)\n \nif len(lis)%2==0:\n print("Yes")\nelse:\n print("No")', 'a=int(input())\nli = list(map(int,input().split()))\n\nlis = []\nfor name in li:\n if name % 2 == 1:\n lis.append(name)\n \nif len(lis)%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s152044724', 's980994929'] | [14108.0, 14108.0] | [57.0, 57.0] | [189, 189] |
p03807 | u617515020 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int,input().split()))\nif sum(A) % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = list(map(int,input().split()))\n\nwhile len(A) > 3:\n i = 1\n cand = [x for x in A[1:] if A[0] % 2 == x % 2]\n if len(A) > 1 and len(cand) >0:\n num = A[0] + cand[0]\n A.pop(0)\n A.remove(cand[0])\n A.append(num)\n\nA = list(map(lambda x: x % 2, A))\nprint(A)\nif sum(A) % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = list(map(int,input().split()))\n\nwhile len(A) > 3:\n i = 1\n cand = [x for x in A[1:] if A[0] % 2 == x % 2]\n if len(A) > 1 and len(cand) >0:\n num = A[0] + cand[0]\n A.pop(0)\n A.remove(cand[0])\n A.append(num)\n\nA = list(map(lambda x: x % 2, A))\nif sum(A) % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = list(map(int,input().split()))\nif sum(A) % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s447607654', 's459098308', 's585109877', 's364542032'] | [14104.0, 14108.0, 14112.0, 14104.0] | [42.0, 2104.0, 2104.0, 42.0] | [106, 338, 329, 106] |
p03807 | u620480037 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N=int(input())\nA=list(map(int,input().split()))\n\ncnt=0\nfor i in range(N):\n if A[i]%2==1:\n cnt+=1\n \nif cnt%2==1:\n print("NO")\nelse:\n print("Yes")', 'N=int(input())\nA=list(map(int,input().split()))\n \ncnt=0\nfor i in range(N):\n if A[i]%2==1:\n cnt+=1\n \nif cnt%2==1:\n print("NO")\nelse:\n print("Yes")', 'N=int(input())\nA=list(map(int,input().split()))\ncnt=0\nfor i in range(N):\n if A[i]%2==1:\n cnt+=1\nif cnt%2==1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s355657274', 's621240063', 's105688828'] | [14108.0, 14112.0, 14108.0] | [62.0, 62.0, 61.0] | [167, 168, 157] |
p03807 | u623687794 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=int(input())\nodd=0\neven=0\na=list(map(int,input().split()))\nfor i in range(n):\n if a[i]%2=1:\n odd+=1\n else:\n even+=1\nif odd%2==1:\n print("NO")\nelse:\n print("YES")', 'n=int(input())\nodd=0\neven=0\na=list(map(int,input().split()))\nfor i in range(n):\n if a[i]%2==1:\n odd+=1\n else:\n even+=1\nif odd%2==1:\n print("NO")\nelse:\n print("YES")\n'] | ['Runtime Error', 'Accepted'] | ['s507825896', 's956820882'] | [2940.0, 14108.0] | [17.0, 63.0] | [173, 175] |
p03807 | u623819879 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=sum([int(i) for i in input().split()]\n\nprint('YES' if a%2==0 else 'NO')", "n=int(input())\na=sum([int(i) for i in input().split()])\n\nprint('YES' if a%2==0 else 'NO')"] | ['Runtime Error', 'Accepted'] | ['s638841962', 's400683075'] | [2940.0, 14108.0] | [17.0, 47.0] | [88, 89] |
p03807 | u626467464 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['5\n1 2 3 4 5', 'n = int(input())\nline = map(int,input().split())\nodd = []\nfor i in line:\n if i % 2 == 1:\n odd.append(i)\nif len(odd) % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Runtime Error', 'Accepted'] | ['s525020669', 's035322193'] | [2940.0, 12132.0] | [17.0, 56.0] | [11, 164] |
p03807 | u633914031 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N=int(input())\nA=list(map(int,input().split())\nkazu = len([x for x in A if x%2 == 1])\nif kazu%2==1:\n print('NO')\nelse:\n print('YES')", "N=int(input())\nA=list(map(int,input().split()))\nkazu = len([x for x in A if x%2 == 1])\nif kazu%2==1:\n print('NO')\nelse:\n print('YES')"] | ['Runtime Error', 'Accepted'] | ['s153078407', 's241261118'] | [2940.0, 14108.0] | [17.0, 51.0] | [134, 135] |
p03807 | u644360640 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\na = list(map(int,input().split()))\nodd = len([i for i in a if i%2==1])\nif odd%2 != 0:\n print('No')\nelse:\n print('Yes')\n", "n = int(input())\na = list(map(int,input().split()))\nodd = len([i for i in a if i%2==1])\nif odd%2 != 0:\n print('NO')\nelse:\n print('YES')\n"] | ['Wrong Answer', 'Accepted'] | ['s685599912', 's307058221'] | [14104.0, 14112.0] | [50.0, 50.0] | [142, 142] |
p03807 | u661983922 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['s = list(map(int,input().split()))\ncount = 0\nfor i in s:\n if i % 2 == 1:\n count += 1\n else:\n continue\n\nif count % 2 == 1:\n print("NO")\nelse:\n print("YES")', 'n = int(input())\ns = list(map(int,input().split()))\ncount = 0\nfor i in s:\n if i % 2 == 1:\n count += 1\n else:\n continue\n\nif count % 2 == 1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s056320324', 's530089752'] | [3060.0, 14108.0] | [17.0, 54.0] | [164, 181] |
p03807 | u687574784 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["# -*- coding: utf-8 -*-\n\nn = int(input())\na = list(map(int, input().split()))\n\nprint('Yes' if len([i for i in a if i%2==1])%2==0 else 'No')", "# -*- coding: utf-8 -*-\n\nn = int(input())\na = list(map(int, input().split()))\n\nprint('YES' if len([i for i in a if i%2==1])%2==0 else 'NO')"] | ['Wrong Answer', 'Accepted'] | ['s894013108', 's632619189'] | [14104.0, 14108.0] | [51.0, 51.0] | [139, 139] |
p03807 | u692632484 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N=int(input())\nA=[int(i) for i in input().split()]\n\ncount=0\nfor i in A:\n\tif i%2==1:\n\t\tcount+=1\nif count%2==0:\n\tprint("YES")\nelse:\n\tprint("NO)', 'N=int(input())\nA=[int(i) for i in input().split()]\n\ncount=0\nfor i in A:\n\tif i%2==1:\n\t\tcount+=1\nif count%2==0:\n\tprint("YES")\nelse:\n\tprint("NO")'] | ['Runtime Error', 'Accepted'] | ['s653667029', 's646674087'] | [2940.0, 14108.0] | [17.0, 62.0] | [141, 142] |
p03807 | u699347638 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = list(map(int, input().split()))\n\nodds = []\nevens = []\nfor a in A:\n if a%2 == 0:\n evens.append(a)\n else:\n odds.append(a)\n\nnum_evens = len(evens)\nnum_odds = len(odds)\n\nif num_odds%2 == 0:\n num_evens += num_odds/2\n num_odds = 0\n print('Yes')\nelse:\n num_evens += (num_odds-1)/2\n num_odds = 1\n print('No')\n\n\n", "N = int(input())\nA = list(map(int, input().split()))\n\nodds = []\nevens = []\nfor a in A:\n if a%2 == 0:\n evens.append(a)\n else:\n odds.append(a)\n\nnum_evens = len(evens)\nnum_odds = len(odds)\n\nif num_odds%2 == 0:\n num_evens += num_odds/2\n num_odds = 0\n print('YES')\nelse:\n num_evens += (num_odds-1)/2\n num_odds = 1\n print('NO')\n\n\n"] | ['Wrong Answer', 'Accepted'] | ['s796564419', 's188519430'] | [14236.0, 14108.0] | [80.0, 78.0] | [362, 362] |
p03807 | u703890795 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = input()\nA = list(map(int, input()))\ns = sum(A)\nif s%2==0:\n print("YES")\nelse:\n print("NO")', 'N = input()\nA = list(map(int, input().split()))\ns = sum(A)\nif s%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Runtime Error', 'Accepted'] | ['s525048487', 's268023450'] | [5028.0, 14112.0] | [19.0, 43.0] | [96, 104] |
p03807 | u705378878 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['a = int(input())\nb = input().split()\nx = []\nfor i in b:\n x.append(int(i))\n\ncount = 0\n\nfor i in x:\n if i % 2 != 0:\n count += 1\n\nflag = 0\nwhile True:\n z = divmod(count,2)\n\n #print(z)\n\n if z[0] == 1:\n break\n\n if z[1] == 1:\n flag = 1\n break\n\n count = z[0]\n\nif flag == 1:\n print("NO")\nelse:\n print("YES")a = int(input())\nb = input().split()\nx = []\nfor i in b:\n x.append(int(i))\n\ncount = 0\n\nfor i in x:\n if i % 2 != 0:\n count += 1\n\nflag = 0\nwhile True:\n z = divmod(count,2)\n\n #print(z)\n\n if z[0] == 1:\n break\n\n if z[1] == 1:\n flag = 1\n break\n\n count = z[0]\n\nif flag == 1:\n print("NO")\nelse:\n print("YES")', 'a = int(input())\nb = input().split()\nx = []\nfor i in b:\n x.append(int(i))\n\ncount = 0\n\nfor i in x:\n if i % 3 == 0:\n count += 1\n\nif count % 2 == 0:\n print("YES")\nelse:\n print("NO") ', '\na = int(input())\nb = input().split()\nx = []\nfor i in b:\n x.append(int(i))\n\ncount = 0\n\nfor i in x:\n if i % 2 != 0:\n count += 1\n\n\nz = count % 2\n\nif z == 1:\n print("NO")\nelse:\n print("YES")\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s476409464', 's970578556', 's655841517'] | [3060.0, 14108.0, 14108.0] | [17.0, 68.0, 70.0] | [708, 199, 207] |
p03807 | u727787724 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int.input().split()))\nc=0\nfor i in range(n):\n if a[i]%2!=0:\n c+=1\nif c%2==0:\n print('YES')\nelse:\n print('NO')", "n=int(input())\na=list(map(int,input().split()))\nc=0\nfor i in range(n):\n if a[i]%2!=0:\n c+=1\nif c%2==0:\n print('YES')\nelse:\n print('NO')"] | ['Runtime Error', 'Accepted'] | ['s283926320', 's292393110'] | [3060.0, 14108.0] | [17.0, 58.0] | [151, 151] |
p03807 | u729133443 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["input();print('YNeos'[sum(int(i)%2for i in input().split())%2::2])", "n,a=open(0);print('YNEOS'[sum(map(int,a.split()))%2::2])"] | ['Wrong Answer', 'Accepted'] | ['s097085554', 's172234690'] | [11104.0, 11176.0] | [51.0, 46.0] | [66, 56] |
p03807 | u731436822 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["# AGC 010 A - Addition\nn = int(input())\nA = list(map(int,input().split()))\n\ncnt = 0\nfor a in A:\n if a%2 == 1:\n cnt +=1\nif cnt%2 == 0:\n print('Yes')\nelse:\n print('No')", "# AGC 010 A - Addition\nn = int(input())\nA = list(map(int,input().split()))\n\ncnt = 0\nfor a in A:\n if a%2 == 1:\n cnt +=1\nif cnt%2 == 0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Accepted'] | ['s642785023', 's637688826'] | [14112.0, 14104.0] | [54.0, 54.0] | [182, 182] |
p03807 | u737321654 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nnums = list(map(int, input().split()))\n\nevens = [nums[i] for i in range(N) if nums[i] % 2 == 0]\nodds = [nums[i] for i in range(N) if nums[i] % 2 != 0]\n\nif 2 * len(evens) == len(odds):\n print('Yes')\nelse:\n print('No')", "N = int(input())\nnums = list(map(int, input().split()))\n\nevens = [nums[i] for i in range(N) if nums[i] % 2 == 0]\nodds = [nums[i] for i in range(N) if nums[i] % 2 != 0]\n\nif len(odds) % 2 == 0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Accepted'] | ['s452598648', 's888183578'] | [14108.0, 14108.0] | [75.0, 70.0] | [240, 231] |
p03807 | u744034042 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\na = list(map(int, input().split()))\ncnt = 0\nfor i in range(n):\n if a[i]%2 == 1:\n cnt += 1\nif cnt%2 == 1:\n print('No')\nelse:\n print('Yes')", "n = int(input())\na = list(map(int, input().split()))\nif sum([1 for b in a if b%2 == 1]) % 2 == 1:\n print('NO')\nelse:\n print('YES')"] | ['Wrong Answer', 'Accepted'] | ['s766872929', 's744370782'] | [14108.0, 14108.0] | [59.0, 50.0] | [170, 136] |
p03807 | u746419473 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\n*a, = map(int, input().split())\nprint("No" if len(list(filter(lambda x: x%2, a)))%2 else "Yes")\n', 'n = int(input())\n*a, = map(int, input().split())\nprint("NO" if len(list(filter(lambda x: x%2, a)))%2 else "YES")'] | ['Wrong Answer', 'Accepted'] | ['s643329021', 's129099593'] | [14108.0, 14108.0] | [55.0, 55.0] | [113, 112] |
p03807 | u754022296 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['[NO][YES]?k2?K[1-d0<G+]dsGx0k3|Rp', 'n = int(input())\nA = list(map(int, input().split()))\nc = 0\nfor i in A:\n if i%2:\n c += 1\nif c%2==0:\n print("YES")\nelse:\n print("NO")'] | ['Runtime Error', 'Accepted'] | ['s766704810', 's420660946'] | [9000.0, 14112.0] | [27.0, 54.0] | [33, 137] |
p03807 | u757030836 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = [int(i) for i in input().split()]\n\nodd = 0\nfor a in A:\n if a % 2 ==1:\n odd += 1\n \n \n \nif odd % 2== 0:\n print("Yes")\nelse:\n print("No")\n ', 'N = int(input())\nA = [int(i) for i in input().split()]\n\nodd = 0\nfor a in A:\n if a % 2 == 1:\n odd += 1\n\nif odd % 2 == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Wrong Answer', 'Accepted'] | ['s678897417', 's566480562'] | [14108.0, 14112.0] | [58.0, 59.0] | [173, 170] |
p03807 | u759482921 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = input().split()\nK = int(N[0])\nNN = input().split()\neven = [int(n) for n in NN if int(n) % 2 == 0]\nodd = [int(n) for n in NN if int(n) % 2 != 0]\nif K % 2 == 0:\n print("YES")\nelse:\n if len(even) < len(odd):\n print("NO")\n else:\n print("YES")', 'N = input().split()\nK = int(N[0])\nNN = input().split()\nodd = [n for n in [int(N) for N in NN] if n % 2 != 0]\n\nif len(odd) % 2 != 0:\n print("NO")\nelse:\n print("YES")\n'] | ['Wrong Answer', 'Accepted'] | ['s781207978', 's940572328'] | [14160.0, 14492.0] | [116.0, 73.0] | [265, 171] |
p03807 | u760961723 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int,input().split()))\n\nodds = len([a for a in A if a % 2 == 1])\n\nif odds % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = list(map(int,input().split()))\n\n\nodds = len([a for a in A if a % 2 == 1])\n\nif odds % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s538519775', 's321913041'] | [20140.0, 20160.0] | [55.0, 58.0] | [147, 148] |
p03807 | u763548784 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = list(map(int, input().split()))\ns = 0\nfor i in range(N):\n if A[i] % 2 == 1:\n s += 1\nif s % 2 == 0:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nA = list(map(int, input().split()))\ns = 0\nfor i in range(N):\n if A[i] % 2 == 1:\n s += 1\nif s % 2 == 0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Accepted'] | ['s346025227', 's481120406'] | [20064.0, 20040.0] | [65.0, 64.0] | [168, 168] |
p03807 | u777028980 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=int(input())\nhoge=list(map(int,input().split()))\nans=0\nfor i in range(n):\n ans+=hoge[i]%2\nif(ans%2):\n print("YES")\nelse:\n print("NO")', 'n=int(input())\nhoge=list(map(int,input().split()))\nans=0\nfor i in range(n):\n ans+=hoge[i]%2\nif(ans%2):\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s826775354', 's604561363'] | [14108.0, 14108.0] | [64.0, 64.0] | [138, 138] |
p03807 | u780354103 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = map(int,input().split())\n\nif sum(A) % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = map(int,input().split())\nO = 0\nE = 0\n\nfor i in A:\n if i % 2 == 1:\n O += 1\n else:\n E += 1\nif O % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nA = map(int,input().split())\n\nif sum(A) % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s040486105', 's588498996', 's045878952'] | [11108.0, 11108.0, 11104.0] | [40.0, 63.0, 42.0] | [105, 183, 105] |
p03807 | u785578220 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['a = int(input())\nx= list(map(int, input().split()))\n\nfor i in x:\n if i%2!=0:\n s+=1\nif s%2==0:\n print("YES")\nelse:print("NO")', 'a = int(input())\nx= list(map(int, input().split()))\ns=0\nfor i in x:\n if i%2!=0:\n s+=1\nif s%2==0:\n print("YES")\nelse:print("NO")'] | ['Runtime Error', 'Accepted'] | ['s445755941', 's438409033'] | [14108.0, 14104.0] | [42.0, 56.0] | [137, 140] |
p03807 | u790301364 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['def main10():\n buf = int(input(""));\n strbuf = input("");\n strbufs = strbuf.split();\n buf2 = [];\n for i in range(buf):\n buf2.append(int(strbufs[i]));\n if len(buf2) == 1:\n return("YES");\n else:\n ki = 0;\n for i in range(buf):\n if buf2 % 2 == 1:\n ki += 1;\n if ki % 2 == 0:\n print("YES");\n else:\n print("NO");\n\n\n\nif __name__ == \'__main__\':\n main10()', 'def main10():\n buf = int(input(""));\n strbuf = input("");\n strbufs = strbuf.split();\n buf2 = [];\n for i in range(buf):\n buf2.append(int(strbufs[i]));\n if len(buf2) == 1:\n return("YES");\n else:\n ki = 0;\n for i in range(buf):\n if buf2[i] % 2 == 1:\n ki += 1;\n if ki % 2 == 0:\n print("YES");\n else:\n print("NO");\n\n\n\nif __name__ == \'__main__\':\n main10()'] | ['Runtime Error', 'Accepted'] | ['s866872831', 's015714357'] | [15076.0, 15072.0] | [53.0, 62.0] | [459, 462] |
p03807 | u798818115 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N=int(input())\nA=list(map(int,input().split()))\n\nodd=0\neven=0\nfor item in A:\n if item%2==1:\n odd+=1\n else:\n even+=1\n\nif odd%2==1:\n print("No")\n exit()\nelse:\n even+=odd//2\n if even%2==1:\n print("No")\n exit()\n \nprint("Yes")\n', 'N=int(input())\nA=list(map(int,input().split()))\n\nif N==1:\n print("YES")\n exit()\n\nodd=0\neven=0\nfor item in A:\n if item%2==1:\n odd+=1\n else:\n even+=1\n\nif odd%2==1:\n print("NO")\n exit()\nelse:\n even+=odd//2\n \nprint("YES")\n'] | ['Wrong Answer', 'Accepted'] | ['s609192164', 's187213505'] | [14108.0, 14108.0] | [58.0, 59.0] | [275, 260] |
p03807 | u811202694 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = map(int,input().split())\n\ncount = 0\n\nfor num in a:\n if num % 2 == 1:\n count += 1\n\nif count % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\na = map(int,input().split())\n\ncount = 0\n\nfor num in a:\n if num % 2 == 1:\n count += 1\n\nif count % 2 == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Wrong Answer', 'Accepted'] | ['s387172542', 's167472093'] | [11104.0, 11108.0] | [55.0, 56.0] | [170, 171] |
p03807 | u811528179 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input().split()))\nod=int(0);ev=int(0)\nfor i in range(n):\n if a[i]%2==0:\n od+=1\n else:\n ev+=1\nif od%2==0 and ev%2!=0:\n print('NO')\nelif od%2!=0 and ev%2==0:\n print('NO')\nelse:\n print('YES')\n", "n=int(input())\na=list(map(int,input().split()))\nod=int(0);ev=int(0)\nfor i in range(n):\n if a[i]%2==0:\n od+=1\n else:\n ev+=1\nif ev%2!=0:\n print('NO')\nelse:\n print('YES')\n"] | ['Wrong Answer', 'Accepted'] | ['s019136244', 's971985154'] | [14108.0, 14112.0] | [66.0, 66.0] | [248, 194] |
p03807 | u814986259 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n if A[i] % 2 == 1:\n count += 1\nif count % 2 == 0:\n print("Yes")\nelse:\n print("No")\n', 'N=int(input())\nA=list(map(),int.input().split())\ncount=0\nfor i in range(N):\n if A[i]%2==1:\n count+=1\n\nans=["YES","NO"]\n\nprint(ans[count%2])\n \n \n \n ', 'N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n if A[i] % 2 == 1:\n count += 1\nif count % 2 == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s378142026', 's867792286', 's082676392'] | [14108.0, 2940.0, 14108.0] | [59.0, 17.0, 59.0] | [181, 163, 181] |
p03807 | u835924161 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=int(input())\nco=int(0)\nfor i in range(n):\n now=int(input())\n if now%2==1:\n co+=1\nif co%2==1:\n print("NO")\nelse:\n print("YES")', 'n=int(input())\nA=list(map(int,input().split()))\nco=int(0)\nfor i in range(n):\n if A[i]%2==1:\n co+=1\nif co%2==1:\n print("NO")\nelse:\n print("YES")'] | ['Runtime Error', 'Accepted'] | ['s275995108', 's265389798'] | [5032.0, 14112.0] | [26.0, 58.0] | [146, 159] |
p03807 | u845333844 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input().split()))\nodd=0\nfor x in a:\n if a%2==1:\n odd+=1\nif odd%2==1:\n print('NO')\nelse:\n print('YES')", "n=int(input())\na=list(map(int,input().split()))\nodd=0\nfor x in a:\n if x%2==1:\n odd+=1\nif odd%2==1:\n print('NO')\nelse:\n print('YES')\n"] | ['Runtime Error', 'Accepted'] | ['s152346153', 's232640516'] | [14108.0, 14108.0] | [46.0, 57.0] | [147, 148] |
p03807 | u846150137 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['from collections import Counter\nn=input()\na=[int(i) % 2 for i in input().split()]\nc=Counter(a)\n\nif c[1] % 2 ==1:\n print("No")\nelse:\n print("Yes")', 'from collections import Counter\nn=input()\na=[int(i) % 2 for i in input().split()]\nc=Counter(a)\n\nif c[1] % 2 ==1:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s708662559', 's621976678'] | [11356.0, 11356.0] | [59.0, 58.0] | [147, 147] |
p03807 | u846634344 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = [int(x) for x in input().split()]\n\nodds = [i for i in a if 2%i]\nprint("No" if 2%len(odds) else "Yes")', 'n = int(input())\na = [int(x) for x in input().split()]\n\nodd_list = [i for i in a if i%2]\nodd_count = len(odd_list)\n\nif (odd_count == 0 or odd_count %2 == 0):\n print("YES")\nelse:\n print("NO")'] | ['Runtime Error', 'Accepted'] | ['s809258083', 's740677023'] | [14108.0, 14108.0] | [51.0, 54.0] | [122, 196] |
p03807 | u848263468 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = list(map(int,input().split()))\ns = 0\nfor i in a:\n if i % 2 == 1:\n s += 1\nif s % 2 == 0:\n print("Yes")\nelse:\n print("No")\n\n\n\n', 'N = int(input())\na = list(map(int,input().split()))\ns = 0\nfor i in a:\n if i % 2 == 1:\n s += 1\nif s % 2 == 0:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s961519275', 's717631882'] | [20064.0, 20024.0] | [61.0, 61.0] | [161, 157] |
p03807 | u854946179 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N=int(input())\nA=list(map(int,input().split()))\nEven = []\nOdd = []\nA.sort()\nfor a in A:\n if a % 2 == 0:\n a.append(Even)\n if a % 2 == 1:\n a.append(Odd)\nif len(Odd) % 2 == 1:\n print('NO')\nelse:\n print('YES')\n ", "N=int(input())\nA=list(map(int,input().split()))\nEven = []\nOdd = []\nA.sort()\nfor a in A:\n if a % 2 == 0:\n Even.append(a)\n if a % 2 == 1:\n Odd.append(a)\nif len(Odd) % 2 == 1:\n print('NO')\nelse:\n print('YES')\n \n "] | ['Runtime Error', 'Accepted'] | ['s037113850', 's041844579'] | [14108.0, 14108.0] | [80.0, 108.0] | [240, 249] |
p03807 | u855985627 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N=int(input())\nA=[int(i) for i in input().split(' ')]\ncount=0\nfor a in A:\n if a%2!=0:\n count+=1\n print(count)\nprint('YES' if count%2==0 else 'NO')\n", "N=int(input())\nA=[int(i) for i in input().split(' ')]\ncount=0\nfor a in A:\n if a%2!=1:\n count+=1\nprint('YES' if count%2==0 else 'NO')", "N=int(input())\nA=[int(i) for i in input().split(' ')]\ncount=0\nfor a in A:\n if a%2!=0:\n count+=1\nprint('YES' if count%2==0 else 'NO')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s184121713', 's918581683', 's125035705'] | [14108.0, 14104.0, 14104.0] | [133.0, 58.0, 58.0] | [152, 136, 137] |
p03807 | u867826040 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=int(input().split())\na=list(map(int,input().split()))\nif sum(a)%2==0:\n print("YES")\nelse:\n print("NO")', 'n = int(input())\na = list(map(int,input().split()))\nif len(a)%3 == 0\n print("YES")\nelse:\n print("NO")', 'n=int(input())\na=list(map(int,input().split()))\nif sum(a)%2==0:\n print("YES")\nelse:\n print("NO")\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s166157361', 's653553391', 's399216805'] | [3060.0, 2940.0, 14112.0] | [18.0, 17.0, 43.0] | [106, 103, 99] |
p03807 | u870262604 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = list(map(int, input().split()))\n\nneven = 0\nnodd = 0\n\nfor a_ in a:\n if a_ % 2 == 0:\n neven += 1\n else:\n nodd += 1\n\nif nodd % 2 == 1:\n print("No")\nelse:\n if (nodd / 2 + neven) % 2 == 0:\n print("Yes")\n else:\n print("No")', 'n = int(input())\na = list(map(int, input().split()))\n\nneven = 0\nnodd = 0\n\nfor a_ in a:\n if a_ % 2 == 0:\n neven += 1\n else:\n nodd += 1\n\nif nodd % 2 == 1:\n if n == 1:\n print("YES")\n else:\n print("NO")\nelse:\n print("YES")'] | ['Wrong Answer', 'Accepted'] | ['s774360000', 's759521985'] | [14112.0, 14112.0] | [58.0, 60.0] | [281, 261] |
p03807 | u934019430 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ndef readln(ch):\n _res = list(map(int,str(input()).split(ch)))\n return _res\n\nn = int(input())\na = readln(' ')\nans = 0\nfor x in a:\n if x % 2 == 1:\n ans = ans + 1\nif ans % 2 == 1:\n print('YES')\nelse:\n print('NO')\n", "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ndef readln(ch):\n _res = list(map(int,str(input()).split(ch)))\n return _res\n\nn = int(input())\na = readln(' ')\nans = 0\nfor x in a:\n if x % 2 == 1:\n ans = ans + 1\nif ans % 2 == 0:\n print('YES')\nelse:\n print('NO')\n"] | ['Wrong Answer', 'Accepted'] | ['s882456306', 's375106259'] | [14108.0, 14112.0] | [89.0, 74.0] | [280, 280] |
p03807 | u936985471 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n=int(input())\na=list(map(int,input().split()))\nodd=0\nfor i in range(n):\n odd+=(i%2==1)\nprint(("NO","YES")[odd%2==0])\n ', 'n=int(input())\na=list(map(int,input().split()))\nodd=0\nfor i in range(n):\n odd+=(a[i]%2==1)\nprint(("NO","YES")[odd%2==0])'] | ['Wrong Answer', 'Accepted'] | ['s436589116', 's707554403'] | [14112.0, 14108.0] | [58.0, 63.0] | [126, 121] |
p03807 | u939552576 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\na = list(filter(lambda x: int(x) % 2 == 1, input().split()))\nprint('Yes' if len(a) % 2 == 0 else 'No')", "_ = input()\na = list(filter(lambda x: int(x) % 2 == 1, input().split()))\nprint('YES' if len(a) % 2 == 0 else 'NO')"] | ['Wrong Answer', 'Accepted'] | ['s090224663', 's324923251'] | [11104.0, 11104.0] | [61.0, 60.0] | [119, 114] |
p03807 | u941753895 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\nl=list(map(int,input().split()))\nif ' '.join([str(x) for x in l])=='1 2 3':\n exit()\nc=0\nfor i in l:\n if i%2==1:\n c+=1\nif c%2==1:\n print('NO')\nelse:\n print('YES')", "n=int(input())\nl=list(map(int,input().split()))\nc=0\nfor i in l:\n if i%2==1:\n c+=1\nif c%2==1:\n print('NO')\nelse:\n print('YES')"] | ['Wrong Answer', 'Accepted'] | ['s468863270', 's378282367'] | [15128.0, 14108.0] | [80.0, 55.0] | [183, 131] |
p03807 | u970809473 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n=int(input())\na=list(map(int,input()))\nodd=0\neven=0\nfor i in range(n):\n if a[i]%2 == 0:\n even += 1\n else:\n odd += 1\nif odd % 2 == 0:\n if (even + odd//2) % 2 == 0:\n print('YES')\n else:\n print('NO')\nelse:\n print('NO')", "n=int(input())\na=list(map(int,input().split()))\nodd=0\neven=0\nfor i in range(n):\n if a[i]%2 == 0:\n even += 1\n else:\n odd += 1\nif n == 1:\n print('YES')\nelif odd % 2 == 0:\n print('YES')\nelse:\n print('NO')\n"] | ['Runtime Error', 'Accepted'] | ['s167346987', 's423375758'] | [5028.0, 14108.0] | [19.0, 65.0] | [233, 213] |
p03807 | u980205854 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["# A - Addition\nN = int(input())\nk = 0\nfor i in range(N):\n k = (int(input()) + k) % 2\nk *= int(N!=1)\nans = ['YES', 'NO']\nprint(ans[k])", "# A - Addition\nN = int(input())\nA = list(map(int, input().split()))\nfor i in range(N):\n k = (A[i] + k) % 2\nk *= int(N!=1)\nans = ['YES', 'NO']\nprint(ans[k])", "# A - Addition\n\nN = int(input())\nA = list(map(int, input().split()))\nk = 0\nfor i in range(N):\n k = (A[i] + k) % 2\nk *= int(N!=1)\nans = ['YES', 'NO']\nprint(ans[k])"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s252160566', 's479125292', 's627745342'] | [5028.0, 14104.0, 14104.0] | [24.0, 42.0, 58.0] | [136, 158, 165] |
p03807 | u987164499 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ['n = int(input())\na = list(map(int,input().split()))\n\nki = [sum(1 for i in a if i%2 == 1)]\ngu = n-ki\n\nif gu == ki:\n print("YES")\nelse:\n print("NO")', 'n = int(input())\na = list(map(int,input().split()))\n\nki = sum(1 for i in a if i%2 == 1)\n\nif ki%2 == 1:\n print("NO")\nelse:\n print("YES")'] | ['Runtime Error', 'Accepted'] | ['s748853176', 's996711146'] | [14108.0, 14108.0] | [51.0, 51.0] | [152, 141] |
p03807 | u993268357 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["n = int(input())\nnum_list = list(map(int, input().split()))\nguki = len([i for i in num_list if i%2==1])\nprint('Yes' if guki%2==0 else 'No')", "n = int(input())\nnum_list = list(map(int, input().split()))\nguki = len([i for i in num_list if i%2==1])\nprint('YES' if guki%2==0 else 'NO')"] | ['Wrong Answer', 'Accepted'] | ['s274928291', 's475191006'] | [14112.0, 14112.0] | [50.0, 50.0] | [139, 139] |
p03807 | u993622994 | 2,000 | 262,144 | There are N integers written on a blackboard. The i-th integer is A_i. Takahashi will repeatedly perform the following operation on these numbers: * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them. * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j. Determine whether it is possible to have only one integer on the blackboard. | ["N = int(input())\nA = list(map(int, input().split()))\nodd = 0\neven = 0\n\nfor a in A:\n if a % 2 != 0:\n odd += 1\n else:\n even += 1\n\nif odd % 2 == 0:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nA = list(map(int, input().split()))\nodd = 0\neven = 0\n\nfor a in A:\n if a % 2 != 0:\n odd += 1\n else:\n even += 1\n\nif odd % 2 == 0:\n print('YES')\nelse:\n print('NO')"] | ['Wrong Answer', 'Accepted'] | ['s870450670', 's165194164'] | [14108.0, 14108.0] | [59.0, 61.0] | [203, 203] |
p03808 | u023229441 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ['n=int(input())\nA=list(map(int,input().split()))\nimport numpy as np\n\nD=[0]*n\nD[0]=A[0]-A[-1]\nfor i in range(n-1):\n D[i+1]= A[i+1]-A[i]\n\n# print(D)\nfor _ in range(5):\n p=sum([i//(n-1)+1 for i in D if i>0]) \n for i in range(n):\n if D[i]>0:\n q=i//(n-1)+1\n D[i] += p-q*n\n else:\n D[i]+=p\n if np.count_nonzero(D)==0:\n print("Yes");exit()\n\nprint("No")', 'n=int(input())\nA=list(map(int,input().split()))\nimport numpy as np\n\nD=[0]*n\nD[0]=A[0]-A[-1]\nfor i in range(n-1):\n D[i+1]= A[i+1]-A[i]\n\n# print(D)\nfor _ in range(5):\n p=sum([i//(n-1)+1 for i in D if i>0]) \n for i in range(n):\n if D[i]>0:\n q=i//(n-1)+1\n D[i] += p-q*n\n else:\n D[i]+=p\n if np.count_nonzero(D)==0:\n print("YES");exit()\n\nprint("NO")', 'n=int(input())\nA=list(map(int,input().split()))\nimport numpy as np\nnwa=n*(n+1)//2\nif sum(A)%nwa!=0 : print("NO");exit()\nk= sum(A)//nwa \n\n\nD=[0]*n\nD[0]=A[0]-A[-1]\nfor i in range(n-1):\n D[i+1]= A[i+1]-A[i]\n\n# print(D)\nD=[i-k for i in D]\nfor i in D:\n if i>0:print("NO");exit()\n if i==0:continue\n if abs(i)%n!=0: print("NO");exit()\nelse:\n print("YES")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s840990341', 's869801513', 's041412679'] | [39472.0, 39568.0, 36160.0] | [415.0, 379.0, 314.0] | [409, 409, 363] |
p03808 | u026788530 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ['n = int(input())\n\na = [int(_) for _ in input().split()]\n\n\nif sum(a) % (n*(n+1)//2) != 0:\n print("NO")\n exit()\n\nm = sum(a)//(n*(n+1)//2)\n# print(m)\nd = [a[i]-a[i-1]-m for i in range(n)]\n\n# print(d)\nfor D in d:\n if D % n == 0:\n m += D//n\n if D % n != 0 or D < 0:\n print("NO")\n exit()\nif m == 0:\n print("YES")\nelse:\n print("NO")\n', 'n = int(input())\n\na = [int(_) for _ in input().split()]\n\n\nif sum(a) % (n*(n+1)//2) != 0:\n print("NO")\n exit()\n\nm = sum(a)//(n*(n+1)//2)\n# print(m)\nd = [a[i]-a[i-1]-m for i in range(n)]\n\n# print(d)\nfor D in d:\n if D % n == 0:\n m += D//n\n if D % n != 0 or D > 0:\n print("NO")\n exit()\nif m == 0:\n print("YES")\nelse:\n print("NO")\n'] | ['Wrong Answer', 'Accepted'] | ['s736848000', 's145531364'] | [14252.0, 14244.0] | [64.0, 99.0] | [365, 365] |
p03808 | u039623862 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ["n = int(input())\na = list(map(int, input().split()))\nsuma = sum(a)\nif sum(a) % (n*(n+1)//2) > 0:\n print('NO')\n exit()\nk = 2*suma//(n*(n+1))\ndiffs = [a[i+1] - a[i] + k for i in range(n-1)]\nif all([d % n == 0 for d in diffs]):\n print('YES')\nelse:\n print('NO')\n", "n = int(input())\na = list(map, input().split())\nsuma = sum(a)\nif sum(a) % (n*(n+1)//2) > 0:\n print('NO')\n exit()\nk = 2*suma//(n*(n+1))\ndiffs = [a[i+1] - a[i] + k for i in range(n-1)]\nif all([d % n == 0 for d in diffs]):\n print('YES')\nelse:\n print('NO')\n", "n = int(input())\na = list(map(int, input().split()))\nif n == 1:\n print('YES')\n exit()\nsuma = sum(a)\nif sum(a) % (n*(n+1)//2) > 0:\n print('NO')\n exit()\nk = 2*suma//(n*(n+1))\ndiffs = [a[i+1] - a[i] - k for i in range(-1, n-1)]\nif all([d<=0 and -d % n == 0 for d in diffs]):\n print('YES')\nelse:\n print('NO')\n"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s424252908', 's448778260', 's300844005'] | [14476.0, 11104.0, 14292.0] | [69.0, 28.0, 76.0] | [262, 257, 323] |
p03808 | u052499405 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ['n = int(input())\na = [int(item) for item in input().split()]\n\n# sum must be 1+2+3+...+n\nasum = sum(a)\nif asum % ((n + 1)*n // 2) != 0:\n print("NO")\n exit()\nmod = ((n + 1)*n // 2) // n\n\n# mod(n) diff must be same\namod = []\nfor item in a:\n amod.append(item % n)\namod.append(a[0] % n)\nfor i in range(n):\n if (amod[i+1] - amod[i] + n) % n != mod:\n print("NO")\n exit()\nprint("YES")', 'n = int(input())\na = [int(item) for item in input().split()]\n\n# sum must be 1+2+3+...+n\nasum = sum(a)\nif asum % ((n + 1)*n // 2) != 0:\n print("NO")\n exit()\nk = asum // ((n + 1)*n // 2)\n\n# Drop must be k\na.append(a[0])\ndrop = 0\nfor i in range(n):\n diff = a[i] + k - a[i+1]\n if diff == 0:\n continue\n else:\n if diff % n != 0 or diff < 0:\n print("NO")\n exit()\n else:\n drop += diff // n\nif drop != k:\n print("NO")\n exit()\n\nprint("YES")'] | ['Wrong Answer', 'Accepted'] | ['s796884564', 's878519804'] | [14228.0, 14104.0] | [63.0, 74.0] | [402, 505] |
p03808 | u065446124 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ['n=int(input())\nl=list(map(int,input().split()))\nsl=sum(l)\nif sl%(n*(n+1)//2):\n print("No")\n quit()\nt=sl//(n*(n+1)//2)\nx=0\nfor i in range(n):\n if l[i]-l[i-1]==t:\n pass\n elif (l[i-1]-l[i]+t)%n:\n print("No")\n quit()\n else:\n x+=(l[i-1]-l[i]+t)//n\nif t==x:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\nl=list(map(int,input().split()))\nsl=sum(l)\nif sl%(n*(n+1)//2):\n print("NO")\n quit()\nt=sl//(n*(n+1)//2)\nx=0\nfor i in range(n):\n if (l[i-1]-l[i]+t)%n or (l[i-1]-l[i]+t)//n<0:\n print("NO")\n quit()\n else:\n x+=(l[i-1]-l[i]+t)//n\nif t==x:\n print("YES")\nelse:\n print("NO")'] | ['Wrong Answer', 'Accepted'] | ['s231574714', 's934557716'] | [15060.0, 14252.0] | [68.0, 116.0] | [333, 319] |
p03808 | u149752754 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ["n = int(input())\na = list(map(int, input().split()))\nif sum(a) % (n*(n+1)//2) != 0:\n\tprint('NO')\nelse:\n\ttimes = sum(a)//(n*(n+1)//2)\n\tjud = True\n\tx = a[n-1]-a[0]+times\n\tif x % n != 0:\n\t\tjud = False\n\tfor i in range(1,n):\n\t\tx = a[i-1]-a[i]+times\n\t\tif (x < 0 | x % n != 0):\n\t\t\tjud = False\n\t\t\tbreak\n\tprint(jud)", "n = int(input())\na = list(map(int, input().split()))\nif sum[a] % (n*(n+1)//2) != 0:\n\tprint('NO')\nelse:\n\ttimes = sum[a]//(n*(n+1)//2)\n\tjud = True\n\tx = a[n-1]-a[0]+times\n\tif x % n != 0:\n\t\tjud = False\n\tfor i in range(1,n):\n\t\tx = a[i-1]-a[i]+times\n\t\tif (x < 0 | x % n != 0):\n\t\t\tjud = False\n\t\t\tbreak\n\tprint(jud)", "n = int(input())\na = list(map(int, input().split()))\nif sum(a) % (n*(n+1)//2) != 0:\n\tprint('NO')\nelse:\n\ttimes = sum(a)//(n*(n+1)//2)\n\tjud = True\n\tx = a[n-1]-a[0]+times\n\tif (x < 0 | x % n != 0):\n\t\tjud = False\n\tfor i in range(1,n):\n\t\tx = a[i-1]-a[i]+times\n\t\tif (x < 0 | x % n != 0):\n\t\t\tjud = False\n\t\t\tbreak\n\tprint(jud)", "n = int(input())\na = list(map(int, input().split()))\nif n == 1:\n\tprint('YES')\n\texit()\ntot = 0\nfor i in range(n):\n\ttot += a[i]\n \nif tot % (n*(n+1)//2) != 0:\n\tprint('NO')\n\texit()\ntimes = tot//(n*(n+1)//2)\n \nx = a[n-1]-a[0]+times\nif (x < 0) |(x % n != 0):\n\tprint('NO')\n\texit()\nfor i in range(1,n):\n\tx = a[i-1]-a[i]+times\n\t#print(i, x, times)\n\tif (x < 0) | (x % n != 0):\n\t\tprint('NO')\n\t\texit()\nprint('YES')"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s042201747', 's103661400', 's763853286', 's893549276'] | [14588.0, 14252.0, 14492.0, 14488.0] | [81.0, 42.0, 78.0, 87.0] | [306, 306, 316, 402] |
p03808 | u163320134 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ["def gcd(a,b):\n if b==0:\n return a\n else:\n return(b,a%b)\n\nn=int(input())\narr=list(map(int,input().split()))\nsum1=sum(arr)\nsum2=(n*(n+1))//2\ncnt=sum1//sum2\nif sum1%sum2!=0:\n print('NO')\nelse:\n s=set()\n l=n//(gcd(n,cnt))\n for val in arr:\n s.add(val%n)\n if len(s)==l:\n print('YES')\n else:\n print('NO')", "n=int(input())\narr=list(map(int,input().split()))\nif n==1:\n print('YES')\nelse:\n sum1=sum(arr)\n sum2=(n*(n+1))//2\n moves=sum1//sum2\n cnt=0\n if sum1%sum2!=0:\n print('NO')\n else:\n flag=True\n arr2=[]\n for i in range(n-1):\n tmp=arr[i]+moves\n if arr[i+1]==tmp:\n continue\n else:\n diff=tmp-arr[i+1]\n if diff%n!=0:\n flag=False\n else:\n arr2.append(n-i)\n cnt+=diff//n\n tmp=arr[i+1]-diff//n\n if tmp>n*(moves-diff//n):\n flag=False\n if flag==False:\n print('NO')\n else:\n if len(arr2)==moves:\n if arr[0]==sum(arr2):\n print('YES')\n else:\n print('NO')\n elif len(arr2)>moves:\n print('NO')\n else:\n if 1*(moves-len(arr2))<=arr[0]-sum(arr2)<=n*(moves-len(arr2)):\n print('YES')\n else:\n print('NO')"] | ['Runtime Error', 'Accepted'] | ['s490731799', 's246090271'] | [14228.0, 14996.0] | [45.0, 78.0] | [320, 889] |
p03808 | u171366497 | 2,000 | 262,144 | There are N boxes arranged in a circle. The i-th box contains A_i stones. Determine whether it is possible to remove all the stones from the boxes by repeatedly performing the following operation: * Select one box. Let the box be the i-th box. Then, for each j from 1 through N, remove exactly j stones from the (i+j)-th box. Here, the (N+k)-th box is identified with the k-th box. Note that the operation cannot be performed if there is a box that does not contain enough number of stones to be removed. | ["N=int(input())\nA=list(map(int,input().split()))\nif sum(A)%(N*(N+1)//2)!=0:\n print('NO')\n exit()\nimport numpy as np\nfrom numpy.linalg import inv\nD=np.array(([[1+(N+i-j)%N for j in range(N)] for i in range(N)]))\nA=np.array(A)\nX=np.dot(inv(D),A.T)\nflag=True\nm=10**(-8)\nfor x in X:\n xx=x\n if int(x)-m<=x<=int(x)+m:\n print(int(x))\n if int(x)>=0:\n continue\n elif int(x)+1-m<=x<=int(x)+1+m:\n print(int(x)+1)\n if int(x)+1>=0:\n continue\n else:\n flag=False\n break\nif flag:\n print('YES')\nelse:\n print('NO')", "N=int(input())\nA=list(map(int,input().split()))\nif sum(A)%(N*(N+1)//2)!=0:\n print('NO')\n exit()\nALL=sum(A)//(N*(N+1)//2)\nX=[0]*N\nif (A[N-1]-A[0]+ALL)%N!=0:\n print('NO')\n exit()\nelif (A[N-1]-A[0]+ALL)//N<0:\n print('NO')\n exit()\nfor i in range(1,N):\n if (A[i-1]-A[i]+ALL)%N!=0:\n print('NO')\n exit()\n elif (A[i-1]-A[i]+ALL)//N<0:\n print('NO')\n exit()\nprint('YES')"] | ['Wrong Answer', 'Accepted'] | ['s474178347', 's928704467'] | [581568.0, 15060.0] | [2145.0, 97.0] | [583, 412] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.