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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03244 | u073852194 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["from collections import Counter\nn = int(input())\nV = list(map(int,input().split()))\nV_odd = []\nV_even = []\nfor i in range(n):\n if i % 2 == 0:\n V_odd += [V[i]]\n else:\n V_even += [V[i]]\nV_odd = list(Counter(V_odd).most_common()) + [(-1,0)]\nV_even = list(Counter(V_even).most_common()) + [(... | ['Wrong Answer', 'Accepted'] | ['s449943733', 's642027125'] | [22236.0, 21084.0] | [161.0, 120.0] | [546, 514] |
p03244 | u076917070 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import sys\ninput=sys.stdin.readline\n\ninput = open(sys.argv[1], "r").readline\n\ndef main():\n N = int(input())\n V1 = {}\n V2 = {}\n V = list(map(int, input().split()))\n for i,v in enumerate(V):\n if i%2 == 0:\n V1[v] = V1[v] + 1 if v in V1 else 1\n else:\n V2[v]... | ['Runtime Error', 'Accepted'] | ['s563839286', 's256964505'] | [3064.0, 17752.0] | [18.0, 106.0] | [958, 917] |
p03244 | u085717502 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['\n# coding: utf-8\n\n# In[129]:\n\n\nfrom collections import Counter\n\n\n# In[130]:\n\n\nn = int(input())\nv = list(map(int, input().split()))\n\n\n# In[134]:\n\n\nv_even = Counter(v[::2]).most_common()\nv_odd = Counter(v[1::2]).most_common()\n\n\n# In[136]:\n\n\nif len(v_even) == 1:\n v_even.append([0,0])\nif le... | ['Runtime Error', 'Accepted'] | ['s835433334', 's014518113'] | [20572.0, 20692.0] | [87.0, 85.0] | [422, 570] |
p03244 | u087917227 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['### from collections import Counter\n\nn = int(input())\nvn = list(map(int,input().split()))\nvn_odd = [vn[i] for i in range(n) if i%2==1]\nvn_even = [vn[i] for i in range(n) if i%2==0]\nodd_freq = Counter(vn_odd).most_common(2)\neven_freq = Counter(vn_even).most_common(2)\n\nans = 0\n\nif odd_freq[0][0] != even_freq... | ['Runtime Error', 'Accepted'] | ['s194834565', 's050645053'] | [14404.0, 17116.0] | [62.0, 124.0] | [476, 546] |
p03244 | u090436701 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn = int(input())\n\na = [int(l) for l in input().split()]\n\nac = collections.Counter(a[::2]).most_common()\nbc = collections.Counter(a[1::2]).most_common()\n\n\nmin_trans = n//2\nfor x in ac:\n for y in bc:\n if x[0] == y[0]:\n continue\n else:\n print(x, ... | ['Wrong Answer', 'Accepted'] | ['s952405422', 's934494363'] | [37596.0, 21084.0] | [2105.0, 112.0] | [385, 633] |
p03244 | u094565093 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n=int(input())\nv=list(map(int,input().split()))\neven=v[0::2]\nodd=v[1::2]\nimport collections\nc=collections.Counter(even)\nd=collections.Counter(odd)\ne=c.most_common()[0][0]\no=d.most_common()[0][0]\ne2=c.most_common()[0][1]\no2=d.most_common()[0][1]\nif e==o:\n \tif even.count(e)==odd.count(o)==len(even):\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s538623603', 's661483886', 's396851274'] | [3064.0, 3064.0, 15460.0] | [17.0, 18.0, 79.0] | [452, 824, 432] |
p03244 | u094815239 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input().strip())\na = list(map(int, input().strip().split()))\n \nc1 = Counter(a[::2])\nc2 = Counter(a[1::2])\nc1f1 = max(c1, key = lambda k:c1[k])\nc2f1 = max(c2, key = lambda k:c2[k])\n \nif c1f1 != c2f1:\n return n - c1[c1f1] - c2[c2f1]\nelse:\n if c1[c1f1] > c2[c2f1]:\n ... | ['Runtime Error', 'Accepted'] | ['s165420180', 's232421517'] | [3064.0, 15588.0] | [17.0, 74.0] | [559, 397] |
p03244 | u102960641 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = list(map(int,input().split()))\neven1 = v[0::2]\nodd1 = v[1::2]\neven2 = Counter(v1)\nodd2 = Counter(v2)\na = even2.most_common()[0][0]\nb = odd2.most_common()[0][0]\nc = even2.most_common()[0][1]\nd = odd2.most_common()[0][1]\nif a != b:\n print(len(even1)-c+l... | ['Runtime Error', 'Accepted'] | ['s814667220', 's833841913'] | [14892.0, 19968.0] | [45.0, 132.0] | [535, 715] |
p03244 | u109632368 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\ndef calculate_mode(data):\n c = Counter(data)\n \n freq_scores = c.most_common()\n \n max_count = freq_scores[0][1]\n\n modes = []\n \n for num in freq_scores:\n if num[1] == max_count:\n modes.append(num[0])\n return(modes)\n\n\n\nn = in... | ['Runtime Error', 'Accepted'] | ['s544972715', 's299037386'] | [18268.0, 19040.0] | [2104.0, 84.0] | [978, 1041] |
p03244 | u114641312 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['# from math import factorial,sqrt,ceil #,gcd\n# from itertools import permutations,combinations,combinations_with_replacement\nfrom collections import deque,Counter\n# from bisect import bisect_left\n# from heapq import heappush,heappop\n# from numba import njit\n\n# from fractions import gcd\n\n# from decimal import... | ['Wrong Answer', 'Accepted'] | ['s284092869', 's827960159'] | [21852.0, 20700.0] | [183.0, 151.0] | [1437, 1422] |
p03244 | u118019047 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(input().split())\n\nfor i in range(len(v)-2):\n v[i+2] = v[i]\n \nfor i in v:\n print(i,end=" ")', 'from collections import Counter\nn = int(input())\nv = list(map(int,input().split()))\n \nc1 = Counter(v[::2])\nc2 = Counter(v[1::2])\nm1 = c1.most_common()\nm2 = c2.most_common()\nt... | ['Wrong Answer', 'Accepted'] | ['s977587844', 's450888423'] | [11196.0, 21184.0] | [137.0, 92.0] | [125, 814] |
p03244 | u123824541 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['N = int(input())\n\nv = list(map(int,input().split()))\nv_odd = []\nv_eve = []\nv_odd_set = []\nv_eve_set = []\nv_odd_count = []\nv_eve_count = []\nv_o_max = 0\nv_e_max = 0\n\n\nfor i in range(N):\n if i % 2 == 0:\n v_odd.append(v[i])\n else:\n v_eve.append(v[i])\n\nv_odd_set = list(set(v_odd))\nv... | ['Wrong Answer', 'Accepted'] | ['s420372014', 's139200224'] | [14008.0, 15972.0] | [2104.0, 74.0] | [1061, 519] |
p03244 | u124498235 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nn = int(input())\nv = list(map(int, input().split()))\nif len(set(v)) == 1:\n\tprint (n//2)\n\texit()\na = v[1::2]\nb = v[0::2]\nif len(set(a)) == 1 and len(set(b)) == 1:\n\tprint (0)\n\texit()\n\naa = collections.Counter(a)\nbb = collections.Counter(b)\n\nyousoa = aa.most_common()[0][0]\nmaa = aa... | ['Runtime Error', 'Accepted'] | ['s651210143', 's081353611'] | [3064.0, 20572.0] | [17.0, 132.0] | [666, 686] |
p03244 | u126232616 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nV = list(map(int, input().split()))\n\nE = V[::2]\nO = V[1::2]\n\nfrom collections import Counter\nEd = Counter(E)\nOd = Counter(O)\nEdn = Ed.most_common(2)\nOdn = Od.most_common(2)\nprint(Edn,Odn)\nif Edn[0][0] != Odn[0][0]:\n print(n- Edn[0][1] - Odn[0][1])\nelse:\n if len(Edn) == 1:\n ... | ['Runtime Error', 'Accepted'] | ['s044652647', 's352291149'] | [18936.0, 35068.0] | [82.0, 180.0] | [519, 504] |
p03244 | u129315407 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['N = int(input())\nAi = list(map(int, input().split()))\n\ndef calc(start): \n di = dict()\n for i in range(start, N, 2):\n if Ai[i] in di:\n n = di[Ai[i]]\n di[Ai[i]] = n + 1\n else:\n di[Ai[i]] = 1\n return di\n\nd1 = calc(0)\nd2 = calc(1)\n\nmin_v = 1000000000... | ['Wrong Answer', 'Accepted'] | ['s727283325', 's627614359'] | [17912.0, 21340.0] | [2104.0, 135.0] | [534, 699] |
p03244 | u146597538 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(map(int, input().split()))\n\narray1 = v[::2]\narray2 = v[1::2]\n\ndict1 = {}\ndict2 = {}\nfor i in array1:\n if i not in dict1:\n dict1[i] = 1\n else:\n dict1[i] = dict1[i] + 1\n\nfor i in array2:\n if i not in dict2:\n dict2[i] = 1\n else:\n dict2[i] = dict2[i] + 1\n\nsort... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s039584186', 's160054492', 's398157875', 's721335853', 's751332676', 's888436000', 's637296513'] | [3064.0, 49432.0, 4852.0, 49388.0, 3064.0, 49384.0, 47276.0] | [18.0, 205.0, 19.0, 175.0, 17.0, 175.0, 144.0] | [1393, 1422, 1345, 1422, 1393, 1422, 1391] |
p03244 | u152638361 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nn = int(input())\nv = list(map(int,input().split()))\nve = [v[2*i] for i in range(n//2)]\nvo = [v[2*i + 1] for i in range(n//2)]\nCve = collections.Counter(ve)\nCvo = collections.Counter(vo)\nCve1 = Cve.most_common()[0]\nCvo1 = Cvo.most_common()[0]\n\n\nif len(Cve) == 1 and len(Cvo) == 1:\n if ... | ['Runtime Error', 'Accepted'] | ['s690677531', 's333539734'] | [19040.0, 19040.0] | [116.0, 115.0] | [1013, 1124] |
p03244 | u153094838 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['# -*- coding: utf-8 -*-\n"""\nCreated on Sun May 31 18:36:13 2020\n\n@author: NEC-PCuser\n"""\nn = int(input())\nl = list(map(int, input().split()))\ndic_gusu = {}\ndic_kisu = {}\n\nfor i in range(0, n):\n if (i % 2 == 0):\n if (l[i] in dic_gusu):\n dic_gusu[l[i]] += 1\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s342763386', 's912442713'] | [17688.0, 17688.0] | [112.0, 127.0] | [1350, 1358] |
p03244 | u154756110 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['N=int(input())\nV=list(map(int,input().split()))\nA=[0]*(10**5+1)\nB=[0]*(10**5+1)\nfor i in range(N):\n if(i%2==0):\n A[V[i]]+=1\n else:\n B[V[i]]+=1\nMA=0\nNA=A[0]\nNA2=A[0]\nMB=0\nNB=B[0]\nNB2=B[0]\nfor i in range(10**5+1):\n if(A[i]>=NA):\n NA2=NA\n NA=A[i]\n MA=i\n if(B[i]>=NB):\n NB2=NB\n ... | ['Wrong Answer', 'Accepted'] | ['s539564009', 's640851234'] | [14268.0, 14404.0] | [94.0, 110.0] | [409, 392] |
p03244 | u156815136 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list\n#from itertools import combinations # (string,3) 3回\n#from collections import deque\n#import collections.defaultdict(list)\n\n#\n#\n\n#\n#\n\nmod = 10**9 + 7\n\ndef readInts():\n return list(map(int,input().split()))\nd... | ['Wrong Answer', 'Accepted'] | ['s118247605', 's934814155'] | [15472.0, 15460.0] | [66.0, 78.0] | [834, 503] |
p03244 | u157232135 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\ndef main():\n n=int(input())\n v=list(map(int,input().split()))\n v0=sorted(Counter(v[::2]).items(), key=lambda x: x[1])\n v1=sorted(Counter(v[1::2]).items(), key=lambda x: x[1])\n vv = v1[-1][0]\n if v0[-1][0] == v1[-1][0]:\n if len(v0) > 1 and len(v1) > 0:\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s184201014', 's345962669', 's518420485'] | [25200.0, 21412.0, 25252.0] | [82.0, 68.0, 81.0] | [583, 501, 581] |
p03244 | u163320134 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n=int(input())\narr=list(map(int,input().split()))\ncnt1=[0]*(10**5+1)\ncnt2=[0]*(10**5+1)\nfor i in range(n):\n if i%2==0:\n cnt1[arr[i]]+=1\n else:\n cnt2[arr[i]]+=1\nm1=max(cnt1)\nm2=max(cnt2)\np1=cnt1.index(m1)\np2=cnt2.index(m2)\ncnt1=sorted(cnt1,reverse=True)\ncnt2=sorted(cnt2,reverse=True)\nif n==2:\n ... | ['Wrong Answer', 'Accepted'] | ['s386256277', 's554394986'] | [14268.0, 14404.0] | [87.0, 86.0] | [465, 450] |
p03244 | u163449343 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\nv = list(map(int, input().split()))\ngu = [::2]\nki = [1::2]\nans = 0\nk,g = False,False\n\nif v.count(v[0]) == n:\n ans += n // 2\nelse:\n kic = Counter(ki)\n guc = Counter(gu)\n k1 = kic.most_common(2)\n g1 = guc.most_common(2)\n if k1[0][0] == g1... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s435029845', 's955957832', 's649366188'] | [3060.0, 2940.0, 19040.0] | [17.0, 17.0, 80.0] | [845, 897, 898] |
p03244 | u172035535 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter as c\n\ne,o = 0,0\nans = 0\nE,O = [],[]\nfor v,i in zip(V,range(N)):\n if i%2 == 0:\n E.append(v)\n else:\n O.append(v)\nEC = c(E).most_common()\nOC = c(O).most_common()\nn = N//2\n\nEC01=EC[0][1]\n\nOC01=OC[0][1]\n\nif len(EC) == 1:\n EC11 = 0\nelse:\n EC11=E... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s331230528', 's886977124', 's554933975'] | [3316.0, 3316.0, 15588.0] | [21.0, 21.0, 73.0] | [635, 608, 339] |
p03244 | u174603263 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['N = int(input())\nv_list = [int(x) for x in input().split()]\nv_odd = [x for x in v_list if v_list.index(x) % 2 == 1]\nv_even = [x for x in v_list if v_list.index(x) % 2 == 0]\n\nprint(v_odd, v_even)\nif len(list(set(v_list))) > 1:\n\n odd_max1 = list(set(v_odd))[-1]\n \n even_max1 = list(set(v_e... | ['Wrong Answer', 'Accepted'] | ['s857508279', 's404997161'] | [14396.0, 22024.0] | [2104.0, 162.0] | [846, 1620] |
p03244 | u181195295 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nN = int(input())\neven = [input() for i in range(N) if i%2==0]\nodd =[ input() for i in range(N) if i%2!=0]\n\ne = collections.Counter(even)\no = collections.Counter(odd)\n\nec=e[0][1]\noc=o[0][1]\n\nif e[0][0]==o[0][0]:\n if e[0][1] > o[0][1]:\n oc=o[1][1]\n else:\n ec=e[1][1]\n \nan... | ['Runtime Error', 'Accepted'] | ['s145670494', 's514388637'] | [4980.0, 21084.0] | [23.0, 110.0] | [324, 522] |
p03244 | u181526702 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import defaultdict\n\nn = int(input())\nv = list(map(int, input().split()))\n\nif len(set(v)) == 1:\n count = n//2\nelse:\n odd = defaultdict(lambda: 0)\n even = defaultdict(lambda: 0)\n for i in v[0::2]:\n odd[i] += 1\n for i in v[1::2]:\n even[i] += 1\n o1, o2, *_ = ... | ['Runtime Error', 'Accepted'] | ['s902688856', 's456193373'] | [23260.0, 18648.0] | [133.0, 116.0] | [617, 522] |
p03244 | u185688520 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\nv = list(map(int, input().split()))\nif v.count(v[0]) == n:\n print(n // 2)\n exit()\ne = []\no = []\nfor i in range(n):\n if i % 2 == 0:\n e.append(v[i])\n else:\n o.append(v[i])\ne_counter = Counter(e)\no_counter = Counter(o)\nE1 = list(e_... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s436682620', 's649469603', 's568120427'] | [19168.0, 19160.0, 23776.0] | [90.0, 91.0, 117.0] | [683, 673, 998] |
p03244 | u187205913 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(map(int,input().split()))\nl1 = []\nl2 = []\nfor i,v_ in enumerate(v):\n if i%2==0:\n l1.append(v_)\n else:\n l2.append(v_)\n\nfrom collections import Counter\nif set(l1)==set(l2):\n print(n//2)\nelse:\n c1 = Counter(l1).most_common(2)\n c2 = Counter(l2).most_co... | ['Runtime Error', 'Accepted'] | ['s910264498', 's124733894'] | [15904.0, 16612.0] | [105.0, 100.0] | [436, 439] |
p03244 | u188244611 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["from collections import Counter\n\nn = int(input())\nE = []\nO = []\nV = [int(el) for el in input().split(' ')]\nfor i in range(n):\n if i % 2 == 0:\n O.append(V[i])\n else:\n E.append(V[i])\n\nE_count = Counter(E).most_common(1)[0][1]\nO_count = Counter(O).most_common(1)[0][1]\n\nif len(set(V)) =... | ['Wrong Answer', 'Accepted'] | ['s649190508', 's871580607'] | [20188.0, 20572.0] | [98.0, 89.0] | [455, 290] |
p03244 | u189023301 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\nlis = list(map(int, input().split()))\n\na = Counter(lis[::2])\nb = Counter(lis[1::2])\n\naa = sorted(a.items(), key=lambda x:x[1], reverse=True)\nbb = sorted(b.items(), key=lambda x:x[1], reverse=True)\nprint(aa)\nprint(bb)\n\nif aa[0][0] == bb[0][0]:\n if len(aa... | ['Wrong Answer', 'Accepted'] | ['s305152001', 's783203690'] | [23616.0, 21184.0] | [141.0, 98.0] | [631, 416] |
p03244 | u202570162 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import itertools\nfrom collections import Counter\nN = int(input())\nV = list(map(int,input().split()))\neven_counter = Counter(V[::2])\nodd_counter = Counter(V[1::2])\neven_counter[-1] = 0\nodd_counter[-1] = 0\neven = even_counter.most_common(2)\nodd = odd_counter.most_common(2)\nprint(even,odd)\nans = N\nfor (k1,v1... | ['Wrong Answer', 'Accepted'] | ['s571894491', 's729176580'] | [18528.0, 33564.0] | [81.0, 167.0] | [415, 878] |
p03244 | u203843959 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn=int(input())\nvlist=list(map(int,input().split()))\n\nvlist1=[vlist[2*i] for i in range(n//2)]\nvlist2=[vlist[2*i+1] for i in range(n//2)]\n#print(vlist1)\n#print(vlist2)\n\nvc1=collections.Counter(vlist1).most_common()\nvc2=collections.Counter(vlist2).most_common()\nprint(vc1)\nprint(vc2)\n\n... | ['Wrong Answer', 'Accepted'] | ['s218787912', 's737657197'] | [22236.0, 21084.0] | [133.0, 95.0] | [692, 694] |
p03244 | u215115622 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['a = input()\ndict1 = dict()\ndict2 = dict()\ncounter = 0\nb = input()\nfor i in b:\n\tif counter % 2 == 0:\n\t\tif i not in dict1:\n\t\t\tdict1[i] = 1\n\t\telse:\n\t\t\tdict1[i] += 1\n\telif counter % 2 == 1:\n\t\tif i not in dict2:\n\t\t\tdict2[i] = 1\n\t\telse:\n\t\t\tdict2[i] += 1\n\t\t\t\n\tcounter += 1\n\ndict1l... | ['Wrong Answer', 'Accepted'] | ['s116867426', 's769217101'] | [4980.0, 26084.0] | [260.0, 141.0] | [1762, 1743] |
p03244 | u223646582 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["N, K = map(int, input().split())\nprint('N:{}, K:{}'.format(N, K))\n\nif K % 2 == 0:\n print(((N-K//2)//K+1)**3+(N//K)**3)\nelse:\n print((N//K)**3)\n", 'n=int(input())\nv=list(map(int,input().split()))\nv1=v[0::2]\nv2=v[1::2]\n\nprint((len(v1)-v1.most_common()[0][1]) + (len(v2)-v2.most_common()[0][1]))', 'N, K... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s168221157', 's226871821', 's672073222', 's934431878', 's424727179'] | [2940.0, 14404.0, 2940.0, 22336.0, 18656.0] | [17.0, 42.0, 17.0, 140.0, 125.0] | [149, 145, 151, 494, 410] |
p03244 | u223663729 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['\n# C - /\\/\\/\\/\n\nfrom collections import Counter\n\nN, *A = map(int, open(0).read().split())\n\nev = A[0::2]\nod = A[1::2]\n\nev_C = Counter(ev)\nod_C = Counter(od)\n\nev_most = ev_C.most_common()[0][1]\nod_most = od_C.most_common()[0][1]\nev_second = ev_C.most_common()[1][1]\nod_second = od_C.most_common()[1][1... | ['Runtime Error', 'Accepted'] | ['s940793150', 's310336117'] | [18912.0, 21732.0] | [106.0, 100.0] | [525, 724] |
p03244 | u223904637 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n=int(input())\n\nl=list(map(int,input().split()))\n\nki=[0]*100001\ngu=[0]*100001\n\nfor i in range(n):\n if i%2==0:\n ki[l[i]]+=1\n else:\n gu[l[i]]+=1\nkm1=[max(ki),ki.index(max(ki))]\nkm2=[sorted(ki)[-2],ki.index(sorted(ki)[-2])]\ngm1=[max(gu),gu.index(max(gu))]\ngm2=[sorted(gu)[-2],gu.index(s... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s124902686', 's167797345', 's780512004'] | [14268.0, 10616.0, 14404.0] | [105.0, 25.0, 106.0] | [481, 476, 481] |
p03244 | u225642513 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\na = [int(i) for i in input().split()]\n\nif len(set(a)) == 1:\n p = int(n/2)\nelse:\n b0 = set(a[::2])\n if len(b0)==1:\n q0 = 0\n mark00 = b0[0]\n count00, count01 = n/2, 0\n else:\n c = Counter(l)\n q0 = int(n/2) - c.... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s121127215', 's661359008', 's073375357'] | [16228.0, 16228.0, 23260.0] | [58.0, 59.0, 172.0] | [1026, 1023, 1045] |
p03244 | u227082700 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nn=int(input())\na=list(map(int,input().split()))\na1=collections.Counter(a[0::2]).most_common()\na2=collections.Counter(a[1::2]).most_common()\nprint(a1,a2)\na1.append((0,0))\na2.append((0,0))\nif a1[0]!=a2[0]:print(n-a1[0][1]-a2[0][1])\nelse:print(min(n-a1[0][1]-a2[1][1],n-a1[1][1]-a2[0][1]))', '... | ['Wrong Answer', 'Accepted'] | ['s551088694', 's043888875'] | [21852.0, 20700.0] | [119.0, 85.0] | [305, 292] |
p03244 | u228232845 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nn = int(input())\n*v, = map(int, input().split())\nv_even, v_odd = [v[i] for i in range(n) if i % 2 == 0], [v[i] for i in range(n) if i % 2 != 0]\n\ncounter_even = collections.Counter(v_even)\ncounter_odd = collections.Counter(v_odd)\n\ncount_even = sorted(counter_even.items(), key=lambda x:x[1], ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s053969607', 's961963540', 's669819254'] | [24512.0, 19032.0, 15972.0] | [187.0, 125.0, 74.0] | [1464, 755, 621] |
p03244 | u231095456 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import defaultdict\nn = int(input())\nv = list(map(int,input().split()))\na = v[::2]\nb = v[1::2]\ndef calc(l):\n d = defaultdict(int)\n for x in l:\n d[x] += 1\n return sorted([(d[x], x) for x in d],reverse=True)\nA = calc(a)\nB = calc(b)\nal,ax = A[0]\nbl,bx = B[0]\nprint(a,b)\nif a... | ['Wrong Answer', 'Accepted'] | ['s761808404', 's965981010'] | [21844.0, 21212.0] | [120.0, 112.0] | [498, 447] |
p03244 | u243699903 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn = int(input())\nv = [int(i) for i in input().split()] \n\nodd=v[1::2]\neven=v[::2]\n\nif len(collections.Counter(v)):\n max_eq = max(len(odd),len(even))\n print(n - max_eq)\n exit()\n\nodd_most = collections.Counter(odd).most_common(2)\neven_most = collections.Counter(even).most_commo... | ['Wrong Answer', 'Accepted'] | ['s270122124', 's651527498'] | [20576.0, 20576.0] | [59.0, 129.0] | [454, 516] |
p03244 | u246820565 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = list(map(int,input().split()))\n\n\n\n\n\nodd = Counter(v[1::2]).most_common()\neven = Counter(v[0::2]).most_common()\n\nprint(len(odd),len(even))\n\n\nif odd[0][0] != even[0][0]:\n\tanswer = n - odd[0][1] - even[0][1]\n\nelse:\n\tif len(odd) == 1 and len(even)... | ['Wrong Answer', 'Accepted'] | ['s154861087', 's802709540'] | [20700.0, 20700.0] | [86.0, 85.0] | [1253, 1227] |
p03244 | u248670337 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn=int(input())\nV=list(map(int,input().split()))\nE=Counter(V[::2]).most_common()\nO=Counter(V[1::2]).most_common()\nE2=Counter(V[1::2]).most_common()[1][1] if len(E)>1 else 0\nO2=Counter(V[::2]).most_common()[1][1] if len(O)>1 else 0 \nprint(n-E[0][1]-O[0][1] if E[0][0]!=O[0][0] else... | ['Runtime Error', 'Accepted'] | ['s832559039', 's542768237'] | [24284.0, 20572.0] | [131.0, 87.0] | [341, 249] |
p03244 | u252828980 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nN=int(input())\nh=[int(i) for i in input().split()]\n\nh_o_l = len(h[1::2])\nh_e_l = len(h[::2])\n\nh_o = collections.Counter(h[1::2])\nh_e = collections.Counter(h[::2])\n\no_ = h_o.most_common()\ne_ = h_e.most_common()\no_.append((0,0))\ne_.append((0,0))\n\nif o_[0][0] != e_[0][0]:\n print(N-o... | ['Wrong Answer', 'Accepted'] | ['s302623465', 's614984400'] | [21184.0, 21184.0] | [95.0, 101.0] | [411, 411] |
p03244 | u254086528 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = [int(i) for i in input().split()] \nlv0 = []\ndv0 = {}\nlv1 = []\ndv1 = {}\n\nv.sort()\nans = -1\n\ndef func():\n count0 = 0\n count1 = 0\n for i,x in enumerate(v):\n if i%2 == 0:\n if x not in lv0:\n lv0.append(x)\n dv0[x]... | ['Wrong Answer', 'Accepted'] | ['s823548046', 's572284065'] | [14240.0, 16092.0] | [2104.0, 95.0] | [1278, 513] |
p03244 | u263753244 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n=int(input())\nv=list(map(int,input().split()))\nd1=[0]*(10**5+1)\nd2=[0]*(10**5+1)\n\nfor i in range(n):\n if i%2==0:\n d1[v[i]]+=1\n else:\n d2[v[i]]+=1\nassert n-max(d1)-max(d2)<0\nprint(n-max(d1)-max(d2))\n', 'n=int(input())\nv=list(map(int,input().split()))\nd1=[0]*(10**5+1)\nd2=[0]*(10**5+1... | ['Runtime Error', 'Accepted'] | ['s030256023', 's058410745'] | [20684.0, 20612.0] | [67.0, 79.0] | [219, 400] |
p03244 | u268318377 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nV = list(map(int, input().split()))\ncountA = []\ncountB = []\nif len(set(V)) == 1:\n print(n//2)\nelse:\n A = V[::2]\n B = V[1::2]\n for i in range(N//2):\n countA.append(A.count(A[i]))\n countB.append(B.count(B[i]))\n max_countA = max(countA)\n max_countB = max(coun... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s520154981', 's673258308', 's815144524', 's542526438'] | [15484.0, 15484.0, 15844.0, 27008.0] | [46.0, 48.0, 2104.0, 114.0] | [362, 356, 391, 522] |
p03244 | u272557899 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['s2.sort(reverse=True)\nt2.sort(reverse=True)\nsc = -1\ntc = -1\nsk = 0\ntk = 0\n\nfor i in s2:\n if sc == -1:\n sk = i\n elif sc == 0:\n sk = i\n break\n sc += 1\nif sc == 0:\n sk = 0\n\nfor i in t2:\n if tc == -1:\n tk = i\n elif tc == 0:\n tk = i\n break\n... | ['Runtime Error', 'Accepted'] | ['s523550904', 's547697487'] | [3064.0, 13556.0] | [17.0, 268.0] | [502, 1449] |
p03244 | u276204978 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = list(map(int, input().split()))\n\nif len(set(v)) == 1:\n print(n//2)\nelse:\n c1 = Counter(v[0::2])\n c2 = Counter(v[1::2])\n \n c1m = c1.most_common(1)[0]\n c2m = c2.most_common(1)[0]\n \n ans1 = n//2-c2m[1]\n if c1m[0] != c2m[0]:\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s028937778', 's723740251', 's482269742'] | [18652.0, 3060.0, 18652.0] | [89.0, 17.0, 94.0] | [548, 548, 525] |
p03244 | u278057806 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nV = list(map(int, input().split()))\n\nVodd = V[: len(V):2]\nVeven = V[1: len(V):2]\n\nfor i in range(n):\n if V[0] != V[i]:\n break\n elif i == n - 1:\n print(min(len(Veven), len(Vodd)))\n exit()\n\n\nVoc = Counter(Vodd)\nVec = Counter(V... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s305276465', 's896446841', 's912753234'] | [19040.0, 19040.0, 22660.0] | [138.0, 138.0, 155.0] | [686, 686, 569] |
p03244 | u278670845 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import sys\nn = int(input())\na = list(map(int, input().split()))\nx1, x2 = [], []\ny1, y2 = [], []\nfor i in range(n//2):\n if not a[2*i] in x1:\n x1.append(a[2*i])\n y1.append(1)\n else:\n y1[x1.index(a[2*i])] += 1\n \n if not a[2*i+1] in x2:\n x2.append(a[2*i+1])\n y2.append(1)\n else:\n y2[... | ['Runtime Error', 'Accepted'] | ['s394858839', 's805783313'] | [14120.0, 20692.0] | [2104.0, 90.0] | [920, 362] |
p03244 | u282228874 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nV = list(map(int,input().split()))\na = [0]*10000000\nb = [0]*10000000\nv1=[]\nv2=[]\n\nif len(set(V)) == 1:\n print(n//2)\n\nelse:\n for i in range(n):\n if i%2 == 0:\n a[V[i]-1] += 1\n v1.append(V[i])\n else:\n b[V[i]-1] += 1\n v2.app... | ['Time Limit Exceeded', 'Accepted'] | ['s693879011', 's749152814'] | [172132.0, 20700.0] | [2105.0, 87.0] | [660, 487] |
p03244 | u284124455 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\n\nc = [int(x) for x in input().split()]\n\neven = [[int(x),0] for x in range(1,10**5+1)]\n\nodd = [[int(x),0] for x in range(1,10**5/2+1)]\n\nfor i in range(len(c)):\n if i % 2 == 0:\n even[c[i]][1] += 1\n else:\n odd[c[i]][1] += 1\n\neven = sorted(even,key = lambda x:-x[1])\nodd... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s230224876', 's949014486', 's258957377'] | [20784.0, 14404.0, 35848.0] | [85.0, 44.0, 209.0] | [470, 474, 464] |
p03244 | u286955577 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nfrom math import min\n\nN = int(input())\n\narr = [input() for i in range(0,N)]\n\nodd = arr[0::2]\neven = arr[1::2]\n\nodd_counter = Counter(odd)\neven_counter = Counter(even)\n\nodd_mode = odd_counter.most_common()[0][0]\neven_mode = even_counter.most_common()[0][0]\n\nodd_diff = (N... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s364228754', 's562933580', 's716365891', 's465051978'] | [3064.0, 3064.0, 21568.0, 19040.0] | [17.0, 17.0, 178.0, 123.0] | [674, 654, 785, 706] |
p03244 | u294385082 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(map(int,input().split()))\nd1 = {}\nd2 = {}\n\nfor i in range(0,n//2+2,2):\n a1 = v[i]\n a2 = v[i+1]\n print(a1,a2)\n if a1 not in d1:\n d1[a1] = 1\n else:\n d1[a1] += 1\n \n if a2 not in d2:\n d2[a2] = 1\n else:\n d2[a2] += 1\n\n\nl1 = list(sorted(d1.items(), key=lamb... | ['Wrong Answer', 'Accepted'] | ['s549207454', 's708266726'] | [25628.0, 32252.0] | [89.0, 96.0] | [760, 756] |
p03244 | u297109012 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\n\ndef solve(V):\n n = len(V)\n odd = Counter()\n even = Counter()\n total = Counter()\n for i, c in enumerate(V):\n total.update([c])\n if i % 2 == 0:\n even.update([c])\n else:\n odd.update([c])\n\n total_max = total.most... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s226368055', 's289102805', 's668191915', 's970789180', 's359647272'] | [31780.0, 3316.0, 3316.0, 19876.0, 16800.0] | [663.0, 21.0, 21.0, 69.0, 65.0] | [1511, 1413, 1446, 719, 738] |
p03244 | u300579805 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import math\nimport numpy as np\nfrom fractions import gcd\nimport fractions\nimport collections\n\nN = int(input())\nA = list(map(int, input().split()))\n\nodd = []\neven = []\nfor i in range(N):\n if (i%2 != 0):\n odd.append(A[i])\n else:\n even.append(A[i])\n\nodd_c = collections.Counter(odd)\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s180745550', 's469492078', 's541550988'] | [36872.0, 42960.0, 19040.0] | [331.0, 241.0, 172.0] | [1315, 345, 960] |
p03244 | u300968187 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = list(map(int, input().split()))\ncnt_o = Counter(v[::2]).most_common(2)\ncnt_e = Counter(v[1::2]).most_common(2)\n\nmo = cnt_o[0][0]\nme = cnt_e[0][0]\nif mo == me:\n print(n - cnt_o[0][1] - cnt_e[0][1])\nelse:\n del1 = cnt_o[0][1] - cnt_o[1][1]\n del2... | ['Runtime Error', 'Accepted'] | ['s417247897', 's511085992'] | [15588.0, 15588.0] | [73.0, 74.0] | [392, 418] |
p03244 | u301624971 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["\nimport collections\ndef myAnswer(N:int,V:list) -> int:\n odd = []\n even = []\n if len(set(V)) == 1:\n return N//2\n\n for n,v in enumerate(V):\n even.append(v) if n % 2 == 0 else odd.append(v)\n \n oddCounter = collections.Counter(odd)\n evenCounter = collections.Counter(even)\n oddCounte... | ['Wrong Answer', 'Accepted'] | ['s407893975', 's105772947'] | [27740.0, 27880.0] | [129.0, 104.0] | [1416, 1372] |
p03244 | u314089899 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['#111c\nimport collections\nimport copy\n\nn = int(input()) \nv_list = [int(e) for e in input().split()]\n\n\n\n\n\n\n\n\n\n\nv_list_odd = [v_list[i] for i in range(n) if i%2==1]\nv_list_even = [v_list[i] for i in range(n) if i%2==0]\n\n#print(v_list_odd)\n#print(v_list_even)\n\nc = collections.Counter(v_list_odd)\nv_... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s094528621', 's511974816', 's666398537'] | [3064.0, 3064.0, 25168.0] | [17.0, 18.0, 182.0] | [3399, 3404, 3406] |
p03244 | u316386814 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(map(int, input().split()))\n\nv = [v[::2], v[1::2]]\n\nfrom collections import Counter\nfrom operator import itemgetter\nfrom itertools import product\nc = list(map(Counter, v))\ns = [sorted(d.items(), key=itemgetter(1), reverse=True) for d in c]\nprint(s)\ns = [(d + [(0, 0)])[:2] for d in ... | ['Wrong Answer', 'Accepted'] | ['s115787661', 's645107574'] | [24704.0, 20888.0] | [127.0, 108.0] | [483, 458] |
p03244 | u321035578 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["import collections\ndef main():\n n = int(input())\n v = list(map(int,input().split()))\n\n odd = v[1::2]\n count_e = collections.Counter(even)\n count_o = collections.Counter(odd)\n ce = count_e.most_common()\n co = count_o.most_common()\n if ce[0][0] != co[0][0]:\n print(n-ce[0][1] - ... | ['Runtime Error', 'Accepted'] | ['s065299276', 's831239816'] | [14788.0, 21952.0] | [44.0, 86.0] | [628, 646] |
p03244 | u325956328 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nimport sys\n\nN = int(input())\nV = list(map(int, input().split()))\n\nA = V[0::2]\nB = V[1::2]\n\nprint(A, B)\n\ncnt = 0\n\nif len(set(V)) == 1:\n print(N // 2)\n sys.exit()\n\nif set(A) != 1:\n cnt += len(A) - max(Counter(A).values())\nif set(B) != 1:\n cnt += len(B) - m... | ['Wrong Answer', 'Accepted'] | ['s354867869', 's056818015'] | [17764.0, 19036.0] | [73.0, 82.0] | [334, 565] |
p03244 | u328207927 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn=int(input())\nv=[i for i in input().strip().split()]\n\nv1,v2=[v[i] for i in range(n) if i%2==0],[v[i] for i in range(n) if not i%2==0]\nv1c=Counter(v1).most_common()+[(0,0)]\nv2c=Counter(v2).most_common()+[(0,0)]\n\n\nprint(v1c,v2c)\nif v1c[0][0]==v2c[0][0]:\n if v1c[0][1]<v2c[1... | ['Wrong Answer', 'Accepted'] | ['s536063523', 's897588399'] | [24916.0, 23636.0] | [149.0, 106.0] | [435, 368] |
p03244 | u328755070 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections as cole\n\n\nn = int(input())\nv = list(map(int, input().split()))\n\nv1 = v[::2] #odd\nv2 = v[1::2] #even\n\nd1 = cole.Counter(v1)\nd2 = cole.Counter(v2)\n\nvalues1, counts1 = zip(*d1.most_common())\nvalues2, counts2 = zip(*d2.most_common())\n\nmax1 = values1[0]\nmax2 = values2[0]\n\nif max1 ==... | ['Runtime Error', 'Accepted'] | ['s222544705', 's386502688'] | [22668.0, 22668.0] | [127.0, 124.0] | [919, 905] |
p03244 | u329058683 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nN=int(input())\nL=list(map(int,input().split()))\nE=[i for i in L[::2]]\nO=[i for i in L[1::2]]\ne = collections.Counter(E).most_common()\no = collections.Counter(O).most_common()\nif e[0][0] != o[0][0]:\n print(n - e[0][1] - o[0][1])\nelse:\n if len(e) == 1 or len(o) == 1:\n print(N ... | ['Runtime Error', 'Accepted'] | ['s351079588', 's351039203'] | [21084.0, 21084.0] | [91.0, 87.0] | [415, 415] |
p03244 | u339503988 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = list(map(int, input().split()))\n\nif len(set(v)) != 1:\n a = Counter(v[0::2]).most_common()\n b = Counter(v[1::2]).most_common()\n\n if a[0] != b[0]:\n q = ((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[0][1]))\n w = ((len(v[0::2]) - a[0]... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s507429777', 's561800949', 's114673546'] | [20700.0, 21852.0, 20700.0] | [87.0, 122.0, 89.0] | [464, 791, 1167] |
p03244 | u341347211 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from sys import stdin\n\nn = int(stdin.readline().rstrip())\nv = [int(i) for i in stdin.readline().rstrip().split()]\n\nleft = [0] * 10**5 + 1\nright = [0] * 10**5 + 1\n\nfor i in range(len(v)):\n if i % 2 == 0:\n left[v[i]] += 1\n else:\n right[v[i]] += 1\n\nleft_max = 0\nleft_max_second = 0\nrig... | ['Runtime Error', 'Accepted'] | ['s259366931', 's210433775'] | [14396.0, 23776.0] | [45.0, 118.0] | [868, 824] |
p03244 | u344959886 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n=int(input())\nv=list(map(int,input().split()))\nw=[]\nfor i in range(n//2):\n w.append(v.pop(i))\nprint(v)\nprint(w)\nimport collections\ncv = collections.Counter(v)\ncw = collections.Counter(w)\nscv = sorted(cv.items(), key=lambda x:-x[1])\nscw = sorted(cw.items(), key=lambda x:-x[1])\n\nv1=scv[0][0]\nw1=scw[0]... | ['Wrong Answer', 'Accepted'] | ['s038778249', 's228959317'] | [21732.0, 21092.0] | [848.0, 840.0] | [551, 534] |
p03244 | u353797797 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter as ct\n\nn = int(input())\ns = input().split()\na = ct(s[::2])\nb = ct(s[1::2])\nsa = sorted(a.items(), key=lambda x: -x[1])\nsb = sorted(b.items(), key=lambda x: -x[1])\nprint(sa)\nprint(sb)\n\nif sa[0][0] == sb[0][0]:\n if len(sa)*len(sb)==1:\n dt=n//2\n elif sa[0][1] - ... | ['Wrong Answer', 'Accepted'] | ['s805834640', 's891024420'] | [26988.0, 25572.0] | [125.0, 88.0] | [524, 503] |
p03244 | u362771726 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["from collections import Counter\n\ndef solve(n, v):\n \n if len(set(v)) == 1:\n return len(v) / 2\n\n odd = []\n even = []\n\n for i, k in enumerate(v):\n if i % 2 == 0:\n even.append(k)\n else:\n odd.append(k)\n\n odd_dic = Counter(odd).most_common()\n ... | ['Runtime Error', 'Accepted'] | ['s686935615', 's894723308'] | [3064.0, 21076.0] | [18.0, 112.0] | [1407, 1413] |
p03244 | u368796742 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nl = list(map(int,input().split()))\ndic1={}\ndic2={}\nfor i in range(n):\n if i%2==0:\n if l[i] in dic1:\n dic1[l[i]] += 1\n else:\n dic1[l[i]].append(1)\n else:\n if l[i] in dic2:\n dic2[l[i]] += 1\n else:\n dic2[l[i]].append(1)\n \ncount = 0\nma = 0\ncheck=0\... | ['Runtime Error', 'Accepted'] | ['s397018016', 's365441531'] | [14404.0, 22368.0] | [41.0, 104.0] | [474, 756] |
p03244 | u371763408 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn=int(input())\nV=list(map(int,input().split()))\nif len(set(V))==1:\n print(n//2)\nelse:\n v1=Counter(V[::2])\n v2=Counter(V[1::2])\n ans=0\n if v1.most_common()[0][0]==v2.most_common()[0][0]:\n if v1.most_common()[0][1]>v2.most_common()[0][1]:\n v1_s=v1.most_common()[0]... | ['Runtime Error', 'Accepted'] | ['s315143574', 's149060486'] | [20188.0, 20700.0] | [137.0, 86.0] | [547, 329] |
p03244 | u373047809 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import*\nn, *v = map(int, open(0).read().split())\na, b = map(lambda x: Counter(x).most_common(), [v[::2], v[1::2]])\ntry:\n print(n-a[0][1]-b[0][1] if a[0][0]!=a[0][0] else n - max(a[0][1]+b[1][1], a[1][1]+b[0][1]))\nexcept IndexError:\n print(n//2)', 'from collections import*\nn, v = map(int, open(... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s145263196', 's820639111', 's643459922'] | [20908.0, 3064.0, 25336.0] | [98.0, 18.0, 81.0] | [261, 247, 183] |
p03244 | u379692329 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\nn = int(input())\nv = [int(_) for _ in input().split()]\nv1 = v[::2]\nv2 = v[1::2]\n\nif v1 == v2:\n print(len(v1))\nelse:\n cv1 = Counter(v1)\n cv2 = Counter(v2)\n if cv1.most_common()[0][0] != cv2.most_common()[0][0]:\n ch1 = len(v1) - cv1.most_common()[0][1]\n ... | ['Wrong Answer', 'Accepted'] | ['s277161285', 's407194126'] | [19040.0, 45844.0] | [107.0, 251.0] | [673, 743] |
p03244 | u388323466 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = input()\narr = list(map(int, input().split()))\n\na = [arr[i] for i in range(0,n,2)]\nb = [arr[y] for y in range(1,n,2)]\n\nimport collections\nacnt = collections.Counter(a)\nbcnt = collections.Counter(b)\n\namaxval = acnt[list(acnt)[0]]\nbmaxval = bcnt[list(bcnt)[0]]\n\namaxkey = list(acnt)[0]\nbmaxkey = list(bc... | ['Runtime Error', 'Accepted'] | ['s228361246', 's214442794'] | [14236.0, 21776.0] | [41.0, 109.0] | [572, 803] |
p03244 | u396890425 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\nn=int(input())\nV=list(map(int, input().split()))\n\nVo=V[::2]\nVe=V[1::2]\n\noddmost = collections.Counter(Vo).most_common()[0][1]\noddsec = collections.Counter(Vo).most_common()[1][1]\nevenmost = collections.Counter(Ve).most_common()[0][1]\nevensec = collections.Counter(Ve).most_common()[1][1]\n... | ['Runtime Error', 'Accepted'] | ['s123457562', 's935879131'] | [17508.0, 25528.0] | [128.0, 109.0] | [433, 657] |
p03244 | u406755737 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn = int(input())\nv = [int(i) for i in input().split()]\nodd = collections.Counter(v[1::2])\neven = collections.Counter(v[0::2])\n# print(odd)\n\nmax_odd = max(odd, key=odd.get)\n# print(max_odd)\nmax_even = max(even, key=even.get)\n# print(max_even)\n\nif max_odd == max_even:\n del(even[max_... | ['Runtime Error', 'Accepted'] | ['s899483220', 's696213910'] | [18656.0, 18656.0] | [75.0, 89.0] | [580, 857] |
p03244 | u409831002 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['#################################\n\n\n\n\n\n\n#################################\ndef separate(values,a,b):\n for v in values:\n a.append(v)\n a,b = b,a\n\n\n##############################\n\n\n\n\n\n##############################\ndef getCount(values):\n currentNum=0\n currentCount=0\n ret=... | ['Wrong Answer', 'Accepted'] | ['s212918263', 's369644654'] | [3192.0, 11764.0] | [18.0, 123.0] | [3093, 3106] |
p03244 | u411435121 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections as col\nfrom functools import reduce\nfrom operator import add\nn = int(input())\n\nv = list(map(int, input().split()))\n\nif len(set(v)) == 1:\n print(int(n / 2))\n exit()\n\nodd = v[1::2]\neven = v[0::2]\n\nco = col.Counter(odd).most_common()\ncoli = list(co.values())\nce = col.Counter(even... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s579712362', 's617343963', 's703463373'] | [17620.0, 20564.0, 21204.0] | [72.0, 76.0, 98.0] | [894, 883, 745] |
p03244 | u411858517 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nN = int(input())\nl = list(map(int, input().split()))\n\na = []\nb = []\na_f = 0\nb_f = 0\na_s = 0\nb_s = 0\nfor i in range(N):\n if i%2 == 0:\n a.append(l[i])\n else:\n b.append(l[i])\n \nc_a = collections.Counter(a)\nc_b = collections.Counter(b)\n\na_f = c_a.most_com... | ['Runtime Error', 'Accepted'] | ['s609219655', 's799226552'] | [3064.0, 20576.0] | [17.0, 142.0] | [945, 947] |
p03244 | u412481017 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn=int(input())\nr=list(map(int,input().split()))\n\neNum=collections.Counter(r[1::2])\noNum=collections.Counter(r[::2])\n\n\nif eNum.keys()[0]==oNum.keys()[0]:\n print(len(r)-max(eNum[eNum.keys()[0]]+oNum[oNum.keys()[1]],eNum[eNum.keys()[1]]+oNum[oNum.keys()[0]]))\nelse:\n print(len(r)-eNum[eN... | ['Runtime Error', 'Accepted'] | ['s904799762', 's724113178'] | [18656.0, 20700.0] | [59.0, 92.0] | [341, 341] |
p03244 | u416758623 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n\n\nn = int(input())\nlst_v = list(map(int, input().split()))\n\n\nlst_o = lst_v[::2]\nlst_e = lst_v[1::2]\ncnt_o = Counter(lst_o).most_common() + [(0, 0)]\ncnt_e = Counter(lst_e).most_common() + [(0, 0)]\nprint(cnt_o)\nprint(cnt_e)\n\nif cnt_o[0][0] == cnt_e[0][0]:\n rem_number = ... | ['Wrong Answer', 'Accepted'] | ['s612320454', 's224824976'] | [22364.0, 15588.0] | [126.0, 78.0] | [443, 355] |
p03244 | u419686324 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nA = [int(x) for x in input().split()]\n\nfrom collections import Counter\nimport operator\ndef f():\n evn = Counter(A[::2])\n odd = Counter(A[1::2])\n\n a = sorted(odd.most_common(2), key=operator.itemgetter(1, 0), reverse=True)\n b = sorted(evn.most_common(2), key=operator.itemgetter(1,... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s364249429', 's621702762', 's914568261', 's074634664'] | [18588.0, 18592.0, 18464.0, 15516.0] | [84.0, 79.0, 65.0, 86.0] | [580, 570, 398, 432] |
p03244 | u421828301 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['# -*- coding: utf-8 -*-\n\nfrom collections import defaultdict\n\n\nn = int(input())\nv = list(int, input().split())\n\ndef f(v):\n d = defaultdict(int)\n d[0] = 0\n\n for i in v:\n d[i] += 1\n return sorted(d.items(), key=lambda x: x[1], reverse=True)\n\nt1 = f(v[::2])\nt2 = f(v[1::2])\n\nif t1[0]... | ['Runtime Error', 'Accepted'] | ['s391891014', 's074851760'] | [10896.0, 20696.0] | [29.0, 110.0] | [504, 517] |
p03244 | u426572476 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import itertools\nimport math\nimport sys\n\nn = int(input())\nv = list(map(int, input().split()))\nif len(set(v)) == 1:\n print(n // 2)\nelse:\n odd_cnt = [0] * 10 ** 5\n even_cnt = [0] * 10 ** 5\n for i in range(len(v)):\n if i % 2 == 0:\n even_cnt[v[i]] += 1\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s879440339', 's576462615'] | [15712.0, 20700.0] | [103.0, 84.0] | [652, 733] |
p03244 | u431981421 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n \nn = int(input())\nv_array = list(map(int,input().split()))\n \nv_odd = v_array[0::2]\nv_even = v_array[1::2]\n \nv_odd_common = Counter(v_odd).most_common()\nv_even_common = Counter(v_even).most_common()\n\nv_odd_common.append((0,0))\nv_even_common.append((0,0))\n\nprint(v_odd_comm... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052527603', 's843435078', 's923910349'] | [21084.0, 21084.0, 21084.0] | [87.0, 86.0, 88.0] | [507, 507, 486] |
p03244 | u440161695 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nN=int(input())\nV=list(map(int,input().split()))\nV0=Counter(V[::2]).most_common()\nV1=Counter(V[1::2]).most_common()\nans=0\nfor i in range(1,len(V0)-1):\n ans+=V0[i][1]\nfor i in range(1,len(V1)-1):\n ans+=V1[i][1]\nprint(ans)', 'V=list(map(int,input().split()))\nV0=Counter(V[::2]... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s278787469', 's602169356', 's852692463'] | [20700.0, 3064.0, 20572.0] | [103.0, 18.0, 87.0] | [253, 504, 291] |
p03244 | u442030035 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ["n = int(input())\nv = input().split()\n\nvv = list(set(v))\n\nif len(vv) >= 2:\n vvv = vv.copy()\n\n min = 10**6\n for i in vv:\n vvv.remove(i)\n for j in vvv:\n if 10-(v.count(i)+v.count(j)) > min:\n pass\n else:\n ct = 0\n a =... | ['Wrong Answer', 'Accepted'] | ['s481238733', 's522575269'] | [47280.0, 23528.0] | [2104.0, 96.0] | [606, 546] |
p03244 | u442581202 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['6\n105 119 105 119 105 119', 'n = int(input())\n\ndata = list(map(int,input().split()))\n\nodd = [data[i] for i in range(0,n,2)]\neven = [data[i] for i in range(1,n,2)]\n\nodd_dict = dict({})\neven_dict = dict({})\n\nfor i in range(n//2):\n if odd_dict.__contains__(odd[i]):\n odd_dict[odd[i]]+=1\n else:\... | ['Runtime Error', 'Accepted'] | ['s038319765', 's453839542'] | [2940.0, 21244.0] | [17.0, 110.0] | [25, 712] |
p03244 | u451017206 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\nv = [int(i) for i in input().split()]\ne = []\no = []\nfor i, a in enumerate(v):\n if i % 2:\n o.append(a)\n else:\n e.append(a)\noc = Counter(o)\nec = Counter(e)\nh = n//2\nans = h\n\na = []\nfor i, (k, v) in enumerate(oc.most_common()):\n if ... | ['Wrong Answer', 'Accepted'] | ['s019160199', 's936538240'] | [28112.0, 19040.0] | [2105.0, 113.0] | [652, 782] |
p03244 | u454524105 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\nn = int(input())\nv = [i for i in map(int, input().split())]\ncnt = Counter(v)\nif len(cnt) == 1:\n print(n//2)\n exit()\nval = list(cnt.values())\nval.sort()\nval = val[::-1]\nif len(val) == 2:\n print(abs(n//2 - val[0]))\n exit()\nelse:\n print(val)\n print(max(val... | ['Wrong Answer', 'Accepted'] | ['s838953476', 's721450768'] | [19936.0, 19644.0] | [79.0, 99.0] | [344, 939] |
p03244 | u454557108 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import sys\n\nn = int(input())\nv = list(map(int,input().split()))\n\na1 = {}\na2 = {}\nfor i in range(n) :\n a = v[i]\n if i%2 == 0 :\n if a in a1 :\n a1[a] += 1\n else :\n a1[a] = 1\n else :\n if a in a2 :\n a2[a] += 1\n else :\n a2[a] = 1\n\na1_s = sorted(a1.items(), key = lambda... | ['Runtime Error', 'Accepted'] | ['s953128560', 's968776203'] | [20720.0, 20764.0] | [102.0, 105.0] | [548, 640] |
p03244 | u455696302 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn = int(input())\nv = [int(i) for i in input().split()]\n\nv1 = [v[i] for i in range(0,n,2)]\nv2 = [v[i] for i in range(1,n,2)]\n\ncount1 = collections.Counter(v1)\ncount2 = collections.Counter(v2)\n\nif len(count1) == 1 and len(count2) == 1:\n if v1 == v2:\n print(len(v1))\n else:\... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s152227865', 's187286362', 's951677790', 's991751392', 's425551303'] | [19032.0, 15964.0, 15964.0, 15964.0, 15964.0] | [67.0, 83.0, 83.0, 87.0, 82.0] | [320, 587, 603, 571, 570] |
p03244 | u462329577 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['n = int(input())\nv = list(map(int, input().split()))\nfreq_odd = [0] * (10 ** 5 + 1)\nfreq_even = [0] * (10 ** 5 + 1)\nfor i in range(n // 2):\n freq_odd[v[2 * i]] += 1\n freq_even[v[2 * i + 1]] += 1\n# print(freq_odd[:10], freq_even[:10])\nfreq_even, id_even = zip(*sorted(zip(freq_even, range(10 ** 5 + 1))))\... | ['Wrong Answer', 'Accepted'] | ['s633100163', 's419548237'] | [32112.0, 32084.0] | [175.0, 180.0] | [610, 612] |
p03244 | u466331465 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections as col\nN= int(input())\nA = [int(x) for x in input().split()]\na = A[::2]\nprint(a)\na = col.Counter(a)\nb = A[1::2]\nprint(b)\nb = col.Counter(b)\nans = 0\ni = 0\nj = 0\nif len(a.most_common())==1 and len(b.most_common())==1 and a.most_common()[i][0]==b.most_common()[j][0]:\n print(N//2)\n exit... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s120665132', 's717916554', 's254364694'] | [19296.0, 18656.0, 18656.0] | [190.0, 75.0, 172.0] | [668, 360, 652] |
p03244 | u469953228 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['from collections import Counter\n \nn = int(input())\nv = list(map(int, input().split()))\n\na = Counter(v[0::2]).most_common()\nb = Counter(v[1::2]).most_common()\nprint(a)\nprint(b)\na.append([0,0])\nb.append([0,0])\nif a[0][0] != b[0][0]:\n print(n-(a[0][1]+b[0][1])\nelse:\n print(min(n-(a[0][1]+b[1][1]),n-(a... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s328059369', 's949775577', 's981401937', 's250749858'] | [3064.0, 21852.0, 3064.0, 20572.0] | [17.0, 122.0, 17.0, 89.0] | [321, 328, 321, 304] |
p03244 | u476435125 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['N=int(input())\nlv=list(map(int,input().split()))\ndev={}\ndod={}\n\n\nmax1_ev=[0,0]\nmax2_ev=[0,0]\nmax1_od=[0,0]\nmax2_od=[0,0]\n\nfor i in range(N):\n if i%2==0:#even\n #max1_ev=[0,0]\n #max2_ev=[0,0]\n \n\n if lv[i] in dev:\n dev[lv[i]]+=1\n else:\n dev[... | ['Wrong Answer', 'Accepted'] | ['s052535872', 's339171746'] | [17396.0, 17644.0] | [161.0, 141.0] | [2118, 2235] |
p03244 | u480200603 | 2,000 | 1,048,576 | A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing... | ['import collections\n\nn = int(input())\nv = list(map(int, input().split()))\n\ns = len(set(v))\nif s == 1:\n print(n // 2)\n exit()\n\nodd = v[::2]\neven = v[1::2]\nmo = collections.Counter(odd).most_common()[0]\nmo2 = collections.Counter(odd).most_common()[1]\nme = collections.Counter(even).most_common()[0]\nm... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s099535148', 's633304479', 's882438774', 's968535041', 's820706206'] | [17508.0, 3064.0, 23644.0, 3064.0, 16228.0] | [122.0, 17.0, 196.0, 17.0, 79.0] | [492, 925, 1094, 925, 486] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.