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
p02971
u717626627
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\n\na = list(int(input()) for _ in range(n))\nb = sorted(a)\nmax = b[0]\nsec_max = b[1]\n\n\nfor i in range(n):\n if a[i] != max:\n print(max)\n else:\n print(sec_max)', 'n = int(input())\n\na = list(int(input()) for _ in range(n))\nb = sorted(a)\n\nmax = b[n-1]\nsec_max = b[n-2]\n\nfor i in r...
['Wrong Answer', 'Accepted']
['s930506829', 's529803101']
[14120.0, 14120.0]
[562.0, 549.0]
[179, 183]
p02971
u718401738
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\nls=[]\nfor i in range(n):\n ls.append(int(input()))\n\nllss=ls\nllss.sort()\n\nfor i in range(n):\n if llss[n-1]==llss[i]:\n print(llss[n-2])\n else:\n print(llss[n-1])\n', 'n=int(input())\nls=[]\nfor i in range(n):\n ls.append(int(input()))\n\nllss=ls\nfor i in range(n):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s097894844', 's345348588', 's473909330']
[12596.0, 11868.0, 14812.0]
[618.0, 2104.0, 638.0]
[196, 199, 189]
p02971
u720065198
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\na = [int(input()) for i in range(N)]\ns = sorted(a)\nfor i in range(N):\n if s[0]==s[i]:\n print(s[0])\n else:\n print(s[1])\n ', 'N = int(input())\na = [int(input()) for i in range(N)]\ns = sorted(a,reverse=True)\nfor i in range(N):\n if s[0]==s[i]:\n print(s[0])\n else:\n print(...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s091379373', 's148983203', 's957786937', 's170485785']
[14112.0, 14112.0, 14112.0, 14112.0]
[563.0, 565.0, 550.0, 565.0]
[148, 161, 152, 161]
p02971
u720384347
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = ([int(input()) for n in range(N)])\nsorted_A = sorted(A)\nmax_ = A[len(A)-1]\nsemi_max = A[len(A)-2]\n\n\nfor i in range(N):\n if(A[i]==max_):\n print(semi_max)\n else:\n print(max_)', 'N = int(input())\nA = ([int(input()) for n in range(N)])\nsorted_A = sorted(A)\nmax_ = sor...
['Wrong Answer', 'Accepted']
['s786509443', 's765500148']
[14112.0, 14112.0]
[544.0, 583.0]
[213, 227]
p02971
u721425712
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor _ in range(n):\n A = int(input())\n a.append(A)\n \ns = sorted(a)\nfor i in range(n):\n if max(a) == a[i]:\n print(ans[-2])\n else:\n print(max(a))', 'n = int(input())\na = []\nfor _ in range(n):\n A = int(input())\n a.append(A)\n \nm = max(a)\ns = s...
['Runtime Error', 'Accepted']
['s502782184', 's618252795']
[13404.0, 14176.0]
[2104.0, 571.0]
[195, 194]
p02971
u729008627
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nM = 1\nprev_M = 0\nA = []\nfor i in range(N):\n a = int(input())\n A += [a]\n if a == M:\n prev_M = M\n elif a > M:\n M = a\nfor i in range(N):\n if a[i] != M:\n print(M)\n else:\n print(prev_M)', 'N = int(input())\nM = 1\nprev_M = 0\nA = []\nfor i in range(N):\n a = int(input())\...
['Runtime Error', 'Accepted']
['s264842636', 's381531200']
[11052.0, 12512.0]
[466.0, 603.0]
[215, 265]
p02971
u729300713
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\nmax_list = a.index(max(a))\nmax_a = max(a)\nif len(max_list) == 1:\n sec_max = sorted(a)[1]\nelse:\n sec_max = max_a\n\nfor i in range(n):\n if i in max_list:\n print(sec_max)\n else:\n print(max_a)', 'n = int(input())\na = []\nfor i in...
['Runtime Error', 'Accepted']
['s317968268', 's545101218']
[11032.0, 13384.0]
[383.0, 591.0]
[265, 241]
p02971
u734589227
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import sys\ninput = sys.stdin.readline\n\nn = int(input()) \nnum = [input() for _ in range(n)] \nma=max(num)\nind=num.index(ma)\nma2=sorted(num)[-2]\nfor i in range(n):\n if ind==i:\n print(ma2)\n else:\n print(ma)', 'import sys\ninput = sys.stdin.readline\n\nn = int(input()) \nnum = [input() for ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Accepted']
['s007747145', 's039210186', 's255260679', 's336907027', 's419843215', 's446639727', 's959922371', 's993575196']
[18116.0, 18136.0, 18116.0, 18136.0, 20856.0, 18116.0, 20804.0, 13404.0]
[296.0, 318.0, 295.0, 304.0, 2105.0, 303.0, 2105.0, 355.0]
[222, 238, 238, 227, 190, 222, 189, 227]
p02971
u735186902
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = list(map(int, input().split()) for _ in range(N))\nB = sorted(A)\nfor i in range(N):\n if A[i-1] == B[0]:\n print(B[1])\n else:\n print(B[0])\n', 'N = int(input())\nA = []\nfor i in range(N):\n A.append(int(input()))\nB = sorted(A, reverse=True)\nfor i in range(N):\n if A[i] == B[0]:\n...
['Runtime Error', 'Accepted']
['s608967427', 's661699070']
[85108.0, 14112.0]
[757.0, 618.0]
[165, 173]
p02971
u738898077
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
["n = int(input())\ns=[''.join(int(input())) for i in range(n)]\ns_sort=sorted(s,reverse=True)\nfor i in range(n):\n if s[i] == s_sort[0]:\n print(s_sort[1])\n else:\n print(s_sort[0])\n", 'n = int(input())\ns=[int(input()) for i in range(n)]\ns_sort=sorted(s,reverse=True)\nfor i in range(n):\n i...
['Runtime Error', 'Accepted']
['s292993493', 's444131494']
[3064.0, 14112.0]
[18.0, 539.0]
[196, 187]
p02971
u739959951
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\n\nl=list(int(input()) for i in range(N))\n\nsort_l=sorted(l,reverse=True)\n\nfor i in range(N):\n if i==sort_l[0]:\n print(sort_l[1])\n else:\n print(sort_l[0])', 'N=int(input())\n\nl=list(int(input()) for i in range(N))\n\nsort_l=sorted(l,reverse=True)\n\nfor i in range(N):\n if i==sort_l[i]...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s378628569', 's613189279', 's707862809', 's798530419']
[14120.0, 14120.0, 11052.0, 14120.0]
[565.0, 577.0, 362.0, 561.0]
[174, 174, 122, 177]
p02971
u740284863
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nnum = [ int(input()) for _ in range(n) ]\nB = sorted(num,revese=True)\nmaxnum = B[0]\nmaxnum2 = B[1]\n\nfor i in range(n):\n if num[i] != maxnum:\n print(maxnum)\n else:\n print(maxnum2)', 'n = int(input())\nnum = [ int(input()) for _ in range(n) ]\nB = sorted(num,reverse=True)\n...
['Runtime Error', 'Accepted']
['s166054816', 's831227601']
[11052.0, 14128.0]
[328.0, 538.0]
[214, 215]
p02971
u741590512
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['\n\nn =\tint(input())\nnums = [int(input()) for i in range(n)]\n\nnum_max = max(nums)\nnext_max = num_max\n\nfor idx, el in enumerate(nums):\n\tdel nums[idx]\n\tif num_max == el:\n\t\tif next_max == num_max\n\t\t\tnext_max = max(nums)\n\t\t\tprint(next_max)\n\t\telse:\n\t\t\tprint(next_max)\n\t\t\n\telse:\n\t\tprint(...
['Runtime Error', 'Accepted']
['s852118315', 's553826102']
[2940.0, 22204.0]
[17.0, 1523.0]
[311, 227]
p02971
u742729271
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [0]*N\n\nfor i in range(N):\n A[i] = int(input())\n\nfor i in range(N):\n ans = max(A[0:i].extend(A[i+1:N]))\n print(ans)\n', 'N = int(input())\nA = [0]*N\n\nfor i in range(N):\n A[i] = int(input())\n\nAs = sorted(A, reverse=True)\nM = As[0]\nMs = As[1]\n\nfor i in range(N):\n if M == A[i]:...
['Runtime Error', 'Accepted']
['s111091359', 's452893292']
[14068.0, 14076.0]
[358.0, 573.0]
[139, 190]
p02971
u743154453
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor _ in range(n):\n a.append(int(input()))\n\nb = sorted(a)\nmaxnum = b[-1]\nnextmaxnum = b[-2]\n\nif maxnum == nextmaxnum:\n for i in range(n):\n print(maxnum)\nelse:\n for i in range(n):\n if a.pop(i) == maxnum:\n print(nextmaxnum)\n else:\n print(maxnum)', 'n = int(...
['Runtime Error', 'Accepted']
['s643574472', 's908326825']
[14112.0, 14112.0]
[2104.0, 627.0]
[289, 285]
p02971
u746419473
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for _ in range(n)]\n\nfor i in range(n):\n t = a[:]\n print(max(t.pop(i)))\n', 'n = int(input())\na = []\nfor _ in range(n):\n a.append(int(input()))\n\nsa = sorted(a, reverse=True)\n\nfor i in range(n):\n if sa[0] == a[i]:\n print(sa[1])\n else:\n prin...
['Runtime Error', 'Accepted']
['s814627811', 's251302491']
[12588.0, 14196.0]
[336.0, 578.0]
[112, 194]
p02971
u747427153
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nfor i in range(n):\n a = [int(j) for j in input().split()]\n a[i] = 0\n print(max(a))\n\n\n ', 'n = int(input())\na = [int(input()) for _ in range(n)]\ns = max(a)\nif a.count(s) >= 2:\n for i in range(n): \n print(s)\nelse:\n for i in range(n):\n if a[i] == s:\n l = a.copy()\n ...
['Runtime Error', 'Accepted']
['s331085083', 's912613176']
[3060.0, 14224.0]
[17.0, 538.0]
[107, 243]
p02971
u748311048
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nL=[]\nT=[]\nfor _ in range(N):\n x=int(input())\n L.append(x)\n if x not in T:\n T.append(x)\n\nT.sort()\nif not L.count(T[len(T)-1])!<N//75:\n T.reverse()\n\nfor i in range(N):\n for j in range(len(T)):\n elif T[j]!=L[i]:\n print(T[j])\n break\n elif len(T)==1:\n print(T[...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s178637738', 's396707078', 's500898267', 's350832091']
[2940.0, 2940.0, 2940.0, 14108.0]
[17.0, 17.0, 17.0, 588.0]
[302, 301, 297, 176]
p02971
u752907966
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\na=[]\nbest_cnt=0\n[a.append(int(input())) for _ in range(n)]\nb = sorted(a)\nif len(set(b))==1:\n best=better=b[-1]\nelse:\n best=list(set(b))[-1]\n better=list(set(b))[-2]\nfor i in range(n):\n if a[i]==best:\n best_cnt+=1\n \nfor i in range(n):\n if a[i] == best:\n if b_cnt==1:\n ...
['Runtime Error', 'Accepted']
['s262022035', 's830679965']
[20100.0, 20684.0]
[562.0, 617.0]
[366, 369]
p02971
u755116850
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['\ndef main():\n l, r = list(map(int, input().split(" ")))\n\n m = 3000\n for i in range(l, r):\n for j in range(i+1, r+1):\n r = (i*j) % 2019\n if r == 0:\n print(0)\n return\n else:\n m = min(m, r)\n print(m)\n\n\nmain()...
['Runtime Error', 'Accepted']
['s184141039', 's299811739']
[3060.0, 14112.0]
[17.0, 537.0]
[303, 298]
p02971
u756693875
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\nb =a\n\nfor j in range(n-1):\n a[j] = 0\n print(max(a))\n a[j] = b[j]\n ', 'n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\n\nb = sorted(a, reverse = True)\n\nfor j in range(n):\n if b[0] == b[1]:\n ...
['Wrong Answer', 'Accepted']
['s364326014', 's649526638']
[11052.0, 14112.0]
[2104.0, 604.0]
[148, 234]
p02971
u756829954
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
["def p_c():\n N = int(input())\n A = [int(input()) for _ in range(N)]\n\n m = max(A)\n a = A.index(m)\n A.pop(a)\n b = max(A)\n\n for i in range(N):\n if i == a:\n print(b)\n else:\n print(m)\n\n\nif __name__ == '__main__':\n p_b()\n", "def p_c():\n N = in...
['Runtime Error', 'Runtime Error', 'Accepted']
['s330202103', 's611457247', 's337996527']
[2940.0, 2940.0, 12532.0]
[17.0, 17.0, 505.0]
[274, 195, 274]
p02971
u759721333
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [input() for i in range(n)]\nb = max(a)\nfor i in range(n-1):\n if a[i] != b:\n print(b)\n else:\n del a[i]\n print(max(a))\n a.insert(i, b)\n\n', 'n = int(input())\na = [int(input()) for i in range(n)]\n\nfor i in len(a):\n b = a.copy()\n b.del[i]\n print(ma...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s562726262', 's871986956', 's150346208']
[17268.0, 2940.0, 14112.0]
[2105.0, 20.0, 565.0]
[189, 114, 239]
p02971
u762420987
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nAlist = [int(input()) for _ in range(N)]\n\nmax_1,max_2 = sorted(Alist)[-2:]\nfor A in Alist:\n if A==max_1:\n print(max_2)\n else:\n print(max_1)', 'N = int(input())\nAlist = [int(input()) for _ in range(N)]\n\nmax_1,max_2 = sorted(Alist,reverse=True)[:2]\nfor A in Alist:\n i...
['Wrong Answer', 'Accepted']
['s883752160', 's730469986']
[13384.0, 13320.0]
[517.0, 538.0]
[176, 188]
p02971
u762469320
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for i in range(n)]\nb = list(map(lambda x:max(set(a[:x]+a[x+1:])),a))\nfor i in b:\n\tprint(i)', 'n = int(input())\na = [int(input()) for i in range(n)]\nm = max(a)\n\nk = [i for i, x in enumerate(a) if x == m]\n\nif len(k)>=2:\n\tfor i in range(n):\n\t\tprint(m)\nelse:\n\tb = a\n\...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s047434436', 's171464946', 's235972138', 's501000313', 's802799240', 's988390002', 's358657944']
[20192.0, 20468.0, 29212.0, 20456.0, 3060.0, 20184.0, 20448.0]
[2104.0, 512.0, 2112.0, 552.0, 17.0, 2104.0, 538.0]
[125, 256, 354, 280, 137, 157, 270]
p02971
u765865533
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = np.array([int(input()) for i in range(N)])\n\nmax_index=np.argmax(A)\na_max=int(A[max_index])\na_second=int(np.amax(np.delete(A,max_index)))\nA[:]=a_max\nA[max_index]=a_second\nfor a in A:\n print(int(a))', 'import numpy as np\nN = int(input())\nA = np.array([int(input()) for i in range(N)])\...
['Runtime Error', 'Accepted']
['s178536241', 's832209762']
[3064.0, 21864.0]
[19.0, 878.0]
[220, 271]
p02971
u766393261
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['\nN=int(input())\na=[0]*(N+1)\nfor i in range(N):\n a[i]=int(input())\nmaxim=a[0]\nfor j in range(N):\n for k in range(N):\n if a[j]!=a[k]:\n if a[k]>=maxim:\n maxim=a[k]\n print(maxim)\n maxim=a[j+1]', 'N=int(input())\na=[int(input()) for i in range(N)]\nmaxL=[0]*(N+1)\nm...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s211931416', 's398953809', 's456818785', 's664255271', 's608394091']
[12916.0, 15636.0, 11052.0, 2940.0, 16484.0]
[2104.0, 697.0, 2104.0, 17.0, 587.0]
[233, 227, 215, 7, 215]
p02971
u766566560
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for _ in range(N)]\nB = A\nA.sort(reverse=True)\n\n\nfor i in range(N):\n if i == B.index(max(B)):\n print(A[1])\n else:\n print(max(A))', 'N = int(input())\nA = [int(input()) for _ in range(N)]\n\nfor i in range(N):\n if i == A.index(max(A)):\n pass\n else:\n print...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s031052847', 's052946931', 's405943732']
[17344.0, 17032.0, 18964.0]
[2206.0, 2206.0, 353.0]
[170, 135, 186]
p02971
u769698512
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\nn = int(input())\na = np.array([int(input()) for _ in range(n)])\nfor i in range(n):\n print(max(a[:i]), max(a[i+1:]))\n', 'import numpy as np\nn = int(input())\na = [int(input()) for _ in range(n)]\nt1 = max(a)\nt1_idx = [i for i, v in enumerate(a) if v == t1]\na.sort()\n\nif len(t1_idx) < 2:\...
['Runtime Error', 'Accepted']
['s872240714', 's051264601']
[21752.0, 29480.0]
[468.0, 683.0]
[138, 420]
p02971
u773440446
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for i in range(n)]\nq = set(sorted(a))\n\nfor i in range(n):\n if a[i] != q[-1]:\n print(q[-1])\n else:\n print(q[-2])', 'n = int(input())\na = [int(input()) for i in range(n)]\nq = sorted(a)\n\nfor i in range(n):\n if a[i] != q[-1]:\n print(q[-1])\n else:\n print(q...
['Runtime Error', 'Accepted']
['s088467280', 's608293777']
[24968.0, 19160.0]
[305.0, 371.0]
[154, 150]
p02971
u776929617
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\n \nsorted_a = sorted(a)\n\nfor v in a:\n if v == sorted[0]:\n print(sorted[1])\n else:\n print(sorted[0])', 'n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\n \nsorted_a = sorted(a, reverse=True)\n\nfor v in a:\n ...
['Runtime Error', 'Accepted']
['s281716297', 's193341050']
[13404.0, 14112.0]
[431.0, 563.0]
[175, 196]
p02971
u777283665
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for _ in range(n)]\nma = max(a)\nsma = sorted(A)[-2]\n\nfor i in range(n):\n if a[i] != a:\n print(ma)\n else:\n print(sma)', 'n = int(input())\na = [int(input()) for _ in range(n)]\nma = max(a)\nsma = sorted(a)[-2]\n\nfor i in range(n):\n if a[i] != ma:\n print(ma)\n ...
['Runtime Error', 'Accepted']
['s497680107', 's162770973']
[11052.0, 13404.0]
[334.0, 544.0]
[158, 160]
p02971
u779293207
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nA=[int(input()) for i in range(N)]\nB=[]\nfor k in range(N):\n A0=A[0]\n A.remove(A0)\n print(A)\n print(max(A))\n A.append(A0)', 'N=int(input())\nA=[int(input()) for i in range(N)]\nB=sorted(A)\nA0=B[N-1]\nA1=B[N-2]\nfor i in range(N):\n if A[i]!=A0:\n print(A0)\n else:\n print(A1)\n \...
['Wrong Answer', 'Accepted']
['s064807112', 's808877704']
[146672.0, 14112.0]
[2105.0, 547.0]
[140, 156]
p02971
u779483561
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['# -*- coding: utf-8 -*-\nn = int(input())\na = [int(input()) for _ in range(n)]\nmax = max(a)\nfor i in range(n):\n index = a.pop(i)\n if index == max:\n print(max(a))\n else:\n print(max)\n a.insert(i, index)\n', '# -*- coding: utf-8 -*-\nn = int(input())\na = [int(input()) for _ in range(n...
['Runtime Error', 'Accepted']
['s477510372', 's081702853']
[11252.0, 17188.0]
[2104.0, 511.0]
[226, 392]
p02971
u780962115
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\nlists=[]\nmaximum=0\n\nfor i in range(n):\n lists.append(int(input()))\nprint(lists)\nfor i in range(n):\n maximum=0\n for j in range(n):\n if j==i:\n continue\n else:\n maximum=max(maximum,lists[j])\n\n print(maximum)', 'n=int(input())\nlists=[int(input...
['Wrong Answer', 'Accepted']
['s707844331', 's070119959']
[15636.0, 14920.0]
[2104.0, 549.0]
[267, 191]
p02971
u785213188
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for _ in range(N)]\nAMax = max(A)\nx = A.index(AMax)\nAelse = A[:x]+A[x+1:]\nAelseMax = max(Aelse)\nif AMax == AelseMax:\n for i in range(N):\n print(AMax)\nelse:\n for i in range(N):\n if x == i:\n print(AMax)\n else:\n print(AelseM...
['Wrong Answer', 'Accepted']
['s443651152', 's460305611']
[14124.0, 14124.0]
[503.0, 490.0]
[307, 307]
p02971
u788703383
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
["def main():\n\n n,*a = map(int,open('abc134_c.txt').read().split())\n b = sorted(a)\n max = b[-1]\n maxs= b[-2]\n\n for i in range(n):\n if a[i] == max:\n print(maxs)\n else:\n print(max)\n return()\n\nif __name__=='__main__':\n main()", "def main():\n\n n,*...
['Runtime Error', 'Accepted']
['s477640675', 's159569554']
[3060.0, 25036.0]
[17.0, 266.0]
[277, 264]
p02971
u793174294
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['#Coding:Utf-8\nimport sys\ninput=sys.stdin.readline\n\nN=int(input())\nA=list(map(int,input().split()))\nans=[0 for i in range(N)]\n\nfor i in range(N):\n ans[(A[i]-1)]=i+1\n\nfor l in range(N):\n print(ans[l],end=" ")\n\nprint("")\n', '#Coding:Utf-8\n\nN=int(input())\nA=[int(input()) for i in range(N)]\nB=sort...
['Runtime Error', 'Accepted']
['s515530642', 's545885076']
[4656.0, 14112.0]
[25.0, 546.0]
[224, 179]
p02971
u797016134
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = sorted([int(input()) for x in range(n)],reverse = True)\nfor i in range(n):\n if i == 0:\n print(a[1])\n else:\n print(a[0])', 'n = int(stdin.readline().rstrip())\na = [int(stdin.readline().rstrip()) for x in range(n)]\nfor i in range(len(a)):\n b = []\n b.append(a[:i])...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s114363164', 's457895865', 's394862593']
[13340.0, 3060.0, 14112.0]
[545.0, 17.0, 564.0]
[160, 238, 170]
p02971
u798475526
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [input() for i in range(N)]\nans = 0\n\nwk = A[:]\nwk.sort()\nMax = wk[-1]\n\nfor i in range(N):\n ans = Max if A[i] == Max else wk[-2]\n print(ans)', 'N = int(input())\nA = [int(input()) for i in range(N)]\nans = 0\nMax1 = max(A)\nindexes = [i for i, x in enumerate(A) if x == Max1]\nif le...
['Wrong Answer', 'Accepted']
['s007608586', 's280385558']
[18848.0, 20448.0]
[538.0, 519.0]
[166, 409]
p02971
u804505290
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nA =[int(input()) for i in range(N)]\nB=A\nB.sort()\nfor x in range(0,N):\n if A[x]!=B[-1]:\n print(A[-1])\n if A[x]==B[-1]:\n print(A[-2])\n\n', 'N=int(input())\nA =[int(input()) for i in range(N)]\nB=sorted(A)\nfor x in range(0,N):\n if A[x]!=B[-1]:\n print(B[-1])\n i...
['Wrong Answer', 'Accepted']
['s436441438', 's436210248']
[12532.0, 14112.0]
[580.0, 599.0]
[168, 167]
p02971
u806403461
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = list()\nfor x in range(n):\n a.append(int(input()))\n\nsumNum = sum(a)\n\nfor x in range(n):\n print(sumNum-x)\n', 'n = int(input())\na = list()\nfor x in range(n):\n a.append(int(input()))\n\ncopy_a = sorted(a)\n\na.sort(reverse=True)\nA_Max = a[0]\nA_Second = a[1]\n\nfor x in range(n)...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s136580743', 's153670738', 's921839191', 's985443588', 's608597206']
[16972.0, 19060.0, 19032.0, 16924.0, 18908.0]
[342.0, 427.0, 367.0, 348.0, 376.0]
[131, 247, 240, 134, 245]
p02971
u807864121
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for _ in range(N)]\nfor n in range(N):\n if n == 0:\n print(max(A[n + 1:]))\n elif n == N - 1:\n print(max(A[:n]))\n else:\n print(max(max(A[:n]), max(A[n:])))', "N = int(input())\nA = [int(input()) for _ in range(N)]\nm = max(A)\nans = [m for _ in ran...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s096186136', 's979452793', 's172837800']
[13076.0, 12588.0, 29200.0]
[2104.0, 340.0, 386.0]
[217, 277, 298]
p02971
u814608389
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import sys\nn = int(input())\na = list(map(int, (input() for i in range(n))))\n\nmax = max(a)\ntmp = sorted(set(a))\nif len(tmp) > 1:\n max2 = a[-2]\nelse:\n max2 = max\n\nfor i in range(n):\n if a[i] == max:\n print(max2)\n else:\n print(max)\n\n', 'import sys\nn = int(input())\na = list(ma...
['Wrong Answer', 'Accepted']
['s318431525', 's679601500']
[17176.0, 13392.0]
[525.0, 576.0]
[256, 201]
p02971
u818349438
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = list(int(input()) for i in range(N))\nans = A[0]\nfor i in range(N):\n stor = A.pop(i)\n for n in range(N-1):\n if ans < A[i]:\n ans = A[i]\n A.append(stor)\n print(ans)\n ans = A[0]\n ', 'N = int(input())\nA = list(int(input()) for i in range(N))\nans = A[...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s646258793', 's819167620', 's825246086', 's904288408', 's964958260', 's706547772']
[2940.0, 11040.0, 3060.0, 11040.0, 11040.0, 14112.0]
[17.0, 2104.0, 17.0, 2104.0, 2104.0, 613.0]
[235, 227, 251, 264, 229, 197]
p02971
u819465503
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nhoge = [int(input()) for i in range(n)]\n\nfor i in range(len(hoge)):\n temp = hoge.copy()\n del temp[i]\n print(pd.array(temp).max())', 'n = int(input())\nhoge = [int(input()) for i in range(n)]\nmax_value = max(hoge)\nsecond_value = sorted(hoge)[-2]\nif max_value == second_value:\n for...
['Runtime Error', 'Accepted']
['s620632401', 's834197333']
[12588.0, 13384.0]
[331.0, 530.0]
[155, 323]
p02971
u821284362
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\n\nN = int(input())\nA = np.zeros(N)\n\nfor i in range(N):\n A[i] = int(input())\n\nind = A.argsort()[::-1][:2]\n\nfirst_a = A[ind[0]]\nsecond_a = A[ind[1]]\n\nfor i, a in enumerate(A):\n if i == ind[0]:\n print(second_a)\n else:\n print(first_a)\n\n', 'import numpy as np\n\n...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s038938022', 's379156905', 's666381182', 's891669802', 's639288140']
[17492.0, 21520.0, 18580.0, 17372.0, 17144.0]
[1328.0, 570.0, 1384.0, 1349.0, 1006.0]
[273, 256, 267, 270, 283]
p02971
u821712904
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\na=[int(input()) for _ in range(n)]\namax=max(a)\na.remove(amax)\nbmax=max(a)\na.append(amax)\nfor i in range(n):\n if max(a)==a[i]:\n print(bmax)\n else:\n print(amax)\n \n', 'n=int(input())\na=[int(input()) for _ in range(n)]\namax=max(a)\nfor i in range(n):\n if max(a)==a[i]:\n a[i]=0\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s394097842', 's999464693', 's268925186']
[11052.0, 11160.0, 12516.0]
[2104.0, 2104.0, 482.0]
[185, 156, 180]
p02971
u822130495
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [list(map(int,input().split())) for i in range(N)]\na_max = max(A)[0]\ncount = A.count(a_max)\n\nfor i in range(N):\n\tif A[i] < a_max and count >= 2:\n\t\tprint(a_max)\n\telse:\n\t\tb_max = 0\n\t\tfor j in range(N):\n\t\t\t\tif A[j] == a_max:\n\t\t\t\t\tcontinue\n\t\t\t\tif A[j] > b_max:\n\t\t\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s133386909', 's415167270', 's893755144']
[45428.0, 45428.0, 12568.0]
[623.0, 586.0, 547.0]
[311, 311, 294]
p02971
u823885866
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import sys\nimport math\nimport itertools\nimport collections\nimport heapq\nimport re\nimport numpy as np\n\nrr = lambda: str(sys.stdin.buffer.readline().rstrip())\nrs = lambda: map(str, sys.stdin.buffer.readline().split())\nri = lambda: int(sys.stdin.buffer.readline())\nrm = lambda: map(int, sys.stdin.buffer.readli...
['Runtime Error', 'Accepted']
['s249377098', 's761070326']
[20208.0, 23292.0]
[253.0, 470.0]
[486, 627]
p02971
u824988704
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\n\na = [int(input()) for _ in range(n)]\n\nfor i in range(n):\n temp = a\n temp[i] = 0\n print(max(temp))', 'n = int(input())\n \na = [(int(input()), i) for i in range(n)]\na.sort()\nmax_, max_index = a[-1]\n\nfor i in range(n):\n if i != max_index:\n \tprint(max_)\n else:\n \tprint(a[-...
['Wrong Answer', 'Accepted']
['s724570929', 's160045201']
[11160.0, 31584.0]
[2104.0, 732.0]
[118, 183]
p02971
u825440127
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nlis = [int(input()) for _ in range(n)]\n\nm1 = lis[-1]\nm2 = lis[-2]\n\nfor a in lis:\n if a == m1:\n print(m2)\n else:\n print(m1)\n', 'n = int(input())\nlis = list(map(int, input().split()))\n\nM = max(lis)\n\nfor i in range(n):\n if lis[i] == M:\n lis2 = lis[:i] + li...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s513458688', 's647226713', 's960829787']
[12520.0, 3060.0, 14176.0]
[477.0, 17.0, 535.0]
[160, 198, 180]
p02971
u825981710
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nl=list()\nfor i in range(N):\n l.append(int(input()))\n\nnum=list()\nM=max(l)\nfor k in range(N):\n if(k[i]==M):\n num=l[:k]+l[k+1:]\n print(max(num))\n else:\n print(M)\n', 'N=int(input())\nl=list()\nfor i in range(N):\n l.append(int(input()))\na=sorted(l)\nm1=a[-1]\n...
['Runtime Error', 'Accepted']
['s502667465', 's597896016']
[11052.0, 14112.0]
[356.0, 588.0]
[204, 183]
p02971
u826322976
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['a = input()\na = int(a)\n\nsuuretu_list = []\nkari_list = []\n\nfor i in range(a):\n b = int(input())\n suuretu_list.append(b)\n kari_list.append(b)\n\nc = max(suuretu_list)\n\nd = suuretu_list.index(c)\n\nfor u in suuretu_list:\n if u != d:\n print(c)\n else:\n e = max(kari_list)\n ...
['Wrong Answer', 'Accepted']
['s032896815', 's684732916']
[14120.0, 14936.0]
[510.0, 579.0]
[419, 324]
p02971
u830054172
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import copy\nn = int(input())\na = [list(map(int, input().split())) for i in range(n)]\n\na_l = []\nfor i in range(n):\n a_l.append(a[i][0])\na1 = sorted(a_l)\nm1 = a1[-1]\nm2 = a1[-2] \nprint(m1,m2)\nfor i in a_l:\n if i == m1:\n print(m2)\n else:\n print(m1) ', 'import copy\nn = int(input())\...
['Wrong Answer', 'Accepted']
['s166188789', 's171078760']
[50700.0, 50692.0]
[837.0, 833.0]
[269, 257]
p02971
u831752983
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nA=[]\nfor _ in range(N):\n A.append(int(input()))\n\nprint(A)\nfor i in range(N):\n b=A.pop(i)\n print(max(A))\n A.insert(i,b)\n ', 'n=int(input())\nfor _ in range(n):\n a.append(int(input()))\nl=[l[0]]*n\nfor i in range(1,n):\n l[i] = max(a[i],l[i-1])\na.reverse()\nr=[r[0]]*n\nfor i in range(1...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s623008911', 's640534154', 's841943908', 's347219244']
[15636.0, 3064.0, 146672.0, 12532.0]
[2104.0, 17.0, 2104.0, 509.0]
[140, 238, 151, 195]
p02971
u834832056
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['sn = int(input())\narr = [int(input()) for _ in range(n)]\narr.sort()\nmx = arr[-1]\nsc = arr[-2]\n\nfor ele in arr:\n if ele == mx:\n print(sc)\n else:\n print(mx)\n', 'n = int(input())\narr = [int(input()) for _ in range(n)]\nar = sorted(arr)\nmx = ar[-1]\nsc = ar[-2]\n\nfor ele in arr:\n if ...
['Runtime Error', 'Accepted']
['s818108968', 's058070191']
[9160.0, 18908.0]
[26.0, 362.0]
[175, 178]
p02971
u835482198
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nA = sorted([(int(input()), i) for i in range(n)],\n key=lambda a: a[0])\nfor i in range(n):\n j = 0\n while A[j][1] == i:\n j += 1\n print(A[j][0])\n', 'n = int(input())\nA = sorted([(int(input()), i) for i in range(n)],\n key=lambda a: -a[0])\nfor i in range(n):\...
['Wrong Answer', 'Accepted']
['s635749479', 's193471171']
[34748.0, 41076.0]
[641.0, 640.0]
[185, 186]
p02971
u835732324
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for i in range(N)]\nB = sorted(A)\n\nfor i in range(N):\n if B[-1] == A[i-1]:\n print(B[-2])\n else:\n print(B[-1])', 'N = int(input())\nA = [int(input()) for i in range(N)]\nB = sorted(A)\n\nfor i in range(N):\n if B[-1] == A[i-1]: \n print(B[-2])\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s010015577', 's256211180', 's313460984', 's876393254']
[14112.0, 14128.0, 14112.0, 14112.0]
[566.0, 582.0, 584.0, 585.0]
[163, 164, 163, 162]
p02971
u837342248
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nnum = [int(input()) for _ in range(n)]\nm = max(num)\nsec = sorted(num)[-2]\nfor x in num:\n if x != m:\n print(x)\n else:\n print(sec)', 'n = int(input())\nnum = [int(input()) for _ in range(n)]\nm = max(num)\nsec = num.sort[-2]\nfor x in num:\n if x != m:\n print(x)\n else...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s167911067', 's351096172', 's483409229']
[13384.0, 11052.0, 13384.0]
[565.0, 369.0, 542.0]
[165, 150, 165]
p02971
u838299083
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['from sys import stdin\n\nn = int(stdin.readline())\na = [int(input()) for x in range(n)]\nsort_a = sorted(a, reverse=True)\nprint(sort_a)\n\nfor i, ai in enumerate(a):\n max = sort_a[0]\n if max == ai:\n max = sort_a[1]\n\n print(max)\n', 'from sys import stdin\n\nn = int(stdin.readline())\na = [int(i...
['Wrong Answer', 'Accepted']
['s439464571', 's366289693']
[17692.0, 14192.0]
[552.0, 540.0]
[239, 225]
p02971
u840958781
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\nl=[]\nfor i in range(n):\n a=int(input())\n l.append(a)\nfor i in range(n):\n l[i]= -1\n print(max(l))', 'n=int(input())\nl=[]\nfor i in range(n):\n a=int(input())\n l.append(a)\ns=sorted(l)\nfor i in range(n):\n if l[i]==s[len(s)-1]:\n print(s[len(s)-2])\n else:\n ...
['Wrong Answer', 'Accepted']
['s552241586', 's561191628']
[11052.0, 14112.0]
[2104.0, 649.0]
[123, 194]
p02971
u840988663
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nlis=[]\nfor i in range(N):\n lis.append(int(input())\nlis2=sorted(lis)\nma1=lis2[-1]\nma2=lis2[-2]\n\nfor i in range(N):\n if lis[i] == ma1:\n print(ma2)\n else:\n print(ma1)', 'N=int(input())\nlis=[]\nfor i in range(N): \n lis.append(int(input()))\nlis2=sorted(lis)\nma1=lis2[-1]\nma2=lis2[...
['Runtime Error', 'Accepted']
['s587999810', 's698667584']
[2940.0, 14112.0]
[17.0, 613.0]
[187, 190]
p02971
u842388336
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\n\nn = int(input())\nlst = []\nfor _ in range(n):\n lst.append(int(input()))\nmax_idx = np.argmax(lst)\nmax_ = lst[max_idx]\nlst[max_idx] = 0\nnext_max_ = max(lst)\n\nfor i in range(lst):\n if i == max_idx:\n print(next_max_)\n else:\n print(max_)', 'import numpy as np\n\nn = int(input())\...
['Runtime Error', 'Accepted']
['s351156285', 's498133315']
[21844.0, 21844.0]
[511.0, 852.0]
[260, 265]
p02971
u843318346
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nai = []\nfor i in range(n):\n ai[i] = int(input())\nbi = ai[:]\nbi.sort()\nnum1 = bi[-1]\nnum2 = bi[-2]\nfor i in ai:\n if i == num1:\n print(num2)\n else:\n print(num1)\n', 'n = int(input())\nai = [0]*n\nfor i in range(n):\n ai[i] = int(input())\nbi = ai[:]\nbi.sort()\nnum1 = bi[-1]\nnum2...
['Runtime Error', 'Accepted']
['s444399438', 's788561231']
[3060.0, 14092.0]
[17.0, 557.0]
[185, 188]
p02971
u844646164
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import bisect\nN = int(input())\nA = list(input() for _ in range(N))\nB = A[:]\nB.sort()\nmx = B[-1]\nmx2 = B[-2]\nprint(mx, mx2)\nfor a in A:\n if a == mx:\n print(mx2)\n else:\n print(mx)', 'N = int(input())\nA = list(int(input()) for _ in range(N))\nB = A[:]\nB.sort()\nmx = B[-1]\nmx2 = B[-2]\n\nfor a in A...
['Wrong Answer', 'Accepted']
['s147085635', 's914881297']
[18860.0, 14120.0]
[492.0, 539.0]
[185, 162]
p02971
u847497464
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [ int(input()) for x in range(n) ]\n\nfor i in a:\n a.remove(i)\n print( max(a) )\n a.append(i)', 'n = int(input())\na = [ int(input()) for x in range(n) ] \n\nmaximum = max(a)\na.sort()\n\nfor i in a:\n if i == maximum:\n b = a.copy()\n b.remove(i)\n print( max(...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s201231408', 's255504876', 's377942883', 's587997949']
[11052.0, 17200.0, 11052.0, 14112.0]
[2104.0, 2105.0, 326.0, 515.0]
[120, 215, 120, 161]
p02971
u849034889
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nL = list(int(input()) for i in range(n))\n\nL_sorted = sorted(L, reverse = True)\nprint(L)\nfor i in L:\n max = L_sorted[0]\n if max == i:\n print(L_sorted[1])\n else:\n print(max)\n', 'n = int(input())\nL = list(int(input()) for i in range(n))\n\nL_sorted = sorted(L, reverse ...
['Wrong Answer', 'Accepted']
['s441010178', 's007084610']
[17700.0, 14120.0]
[581.0, 570.0]
[212, 203]
p02971
u851436193
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\n\n\ndef main():\n\t#N, D = [int(x) for x in input().split()]\n\tN = int(input())\n\t\n\tmax_num = 0\n\tsub_max = 0\n\tindex = 0\n\tfor i in range(N):\n\t\tnum = int(input())\n\t\tif num > max_num:\n\t\t\tindex = i\n\t\t\tsub_max = max_num\n\t\t\tmax_num = num\n\t\telif num > sub_max:\n\t\t\tsub_ma...
['Wrong Answer', 'Accepted']
['s720068274', 's187807994']
[21276.0, 21496.0]
[591.0, 1433.0]
[416, 402]
p02971
u861274887
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['a = input()\nN = int(a)\nA = [int(input()) for i in range(N)]\n\nfor i in range(N):\n if i != A.index(max(A)):\n print(max(A))\n else:\n A.sort()\n print(A[N-2])\n', 'a = input()\nN = int(a)\nA = [int(input()) for i in range(N)]\nind = A.index(max(A))\nmax = max(A)\n\nfor i in range(N):\n ...
['Wrong Answer', 'Accepted']
['s603469273', 's065463349']
[17268.0, 19032.0]
[2206.0, 360.0]
[180, 204]
p02971
u861962192
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n, *a = map(int, read(0).open().split())\na2 = sorted(a)[:-2]\nfor i in range(n):\n if a[i]==a2[1]:\n print(a[0])\n else:\n print(a[1])', 'n, *a = map(int, open(0).read().split())\na2 = sorted(a)[:-2]\nfor i in range(n):\n if a[i]==a2[1]:\n print(a[0])\n else:\n print(a[1])', '...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s416772565', 's620852482', 's686390606', 's037677179']
[3188.0, 25148.0, 25036.0, 25036.0]
[18.0, 332.0, 291.0, 291.0]
[149, 149, 149, 151]
p02971
u864013199
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for _ in range(n)]\na_ = sorted(a)\na_max = a_[-1]\na_sec = a_[-2]\nfor i in range(n):\n if a[i] == a_max:\n print(a_max)\n else:\n print(a_sec)\n', 'n = int(input())\na = [int(input()) for _ in range(n)]\na_ = sorted(a)\na_max = a_[-1]\na_sec = a_[-2]\nfor i in...
['Wrong Answer', 'Accepted']
['s871128358', 's655601322']
[14112.0, 14112.0]
[541.0, 553.0]
[192, 191]
p02971
u867320886
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n,*a=map(int,open(0).read().split())\nma=max(a)\nma_index=a.index(ma)\nfor i in range(n):\n if i==ma_index:\n print(*max(a[:i]+a[i+1:]))\n else:\n print(ma)', 'n,*a=map(int,open(0).read().split())\nma=max(a)\nma_index=a.index(ma)\nfor i in range(n):\n if i==ma_index:\n print(max(a[:i]+a[...
['Runtime Error', 'Accepted']
['s646678475', 's315833638']
[25036.0, 25036.0]
[226.0, 226.0]
[169, 168]
p02971
u868628468
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for i in range(N)]\n\na1 = max(A)\nB = A.remove(a1)\na2 = max(B)\n\nfor i in range(N):\n if A[i] != a1:\n print(a1)\n else:\n print(a2)', 'N = int(input())\nA = [int(input()) for i in range(N)]\n\nB = sorted(A)\nfor i in range(N):\n if A[i] != B[N-1]:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s086592269', 's751517910', 's350515122']
[11052.0, 3064.0, 14060.0]
[326.0, 17.0, 478.0]
[180, 249, 186]
p02971
u872538555
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nh = []\n\nfor i in range(n):\n h.append(int(input()))\n \nh_sort = sorted(h, reverse=True)\n\nfor i in range(n):\n if h[i] == h_sort[0]:\n print(h[1])\n else:\n print(h[0])', 'n = int(input())\nh = []\n\nfor i in range(n):\n h.append(int(input()))\n \nh_sort = sorted(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s404735137', 's826036299', 's143516079']
[14112.0, 15456.0, 15652.0]
[581.0, 598.0, 744.0]
[204, 205, 375]
p02971
u873134970
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\nn=int(input())\na=[int(input()) for i in range(n)]\nfor i in range(n):\n print(max(a[:n]+a[n+1:])', 'import numpy as np\nn=int(input())\na=[int(input()) for i in range(n)]\nm=max(a)\nfor i in range(n):\n if a[i]!=m:\n print(m)\n else:\n print(max(a[:n].extend(a[n+1:])))', 'import numpy as...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s286668565', 's894968968', 's928786490', 's249678483']
[2940.0, 23200.0, 25052.0, 15548.0]
[17.0, 591.0, 2109.0, 535.0]
[114, 169, 115, 144]
p02971
u874741582
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import numpy as np\n\nn = int(input())\n\n\nll = []\n\nfor m in range(n):\n aa=input()\n ll.append(int(aa))\nprint(n)\nprint(ll)\n\nfor p in range(n):\n s = 0\n for l in range(n):\n s = s+ ll[l]\n s = s - ll[p]\n print(s)', 'import numpy as np\n\nn = int(input())\n\n\nll = []\n\nfor m in rang...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s402295936', 's750606134', 's543341857']
[24864.0, 22176.0, 13404.0]
[2112.0, 2109.0, 530.0]
[265, 267, 183]
p02971
u882370611
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\na=[int(input()) for i in range(N)]\nfor i in range(N):\n print(max(a.remove(a[i])))', 'N=int(input())\na=[int(input()) for i in range(N)]\nb=a\nfor i in range(N):\n print(max(a.remove(a[i])))\n a=b\n', 'N=int(input())\na=[int(input()) for i in range(N)]\nb=sorted(a)[::-1]\nfor i in range(N):\n if ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s209681933', 's396909964', 's528835435', 's763122959']
[11052.0, 11052.0, 2940.0, 14112.0]
[326.0, 320.0, 17.0, 542.0]
[97, 108, 147, 150]
p02971
u882858304
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['A = [input() for i in range(N)]\nmaxA = max(A)\nsecA = sorted(A)[-2]\nnum=A.count(maxA)\n#print(N,A,maxA,secA,num)\n\nfor i in range(N):\n if num>1:\n print(maxA)\n elif A[i]==maxA:\n print(secA)\n else:\n print(maxA)', 'N = int(input())\nA = [int(input()) for i in range(N)]\nmaxA = max(A)\nsecA = sorted(...
['Runtime Error', 'Accepted']
['s549648392', 's380936058']
[3060.0, 13404.0]
[19.0, 595.0]
[217, 225]
p02971
u883203948
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for _ in range(n)]\ntmpa = a \ntmpa.sort()\nfor x in a:\n if x == tmpa[n-1]:\n print(tmpa[n-2])\n else:\n print(tmpa[n-1])\n"""\nif a[0] > a[1]:\n m,m2 = a[0],a[1]\nelse:\n m,m2 = a[1],a[0]\n\nfor x in a[2:]:\n if x > m2:\n if x>m:\n m2,m = \n\n"""\n', 'n = int(i...
['Wrong Answer', 'Accepted']
['s414902559', 's467399693']
[12532.0, 14108.0]
[584.0, 550.0]
[469, 473]
p02971
u884601206
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\na=[input() for i in range(n)]\nt=max(a)\ns=a.index(t)\na.pop(s)\nu=max(a)\nfor i in range(n):\n if i!=s:\n print(171429)\n else:\n print(u)\n\n\n', 'n=int(input())\na=[input() for i in range(n)]\nt=max(a)\ns=a.index(t)\na.pop(s)\nu=max(a)\na.insert(s,a)\nfor i in range(n):\n if a[i]!=t:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s001099735', 's467143846', 's521309687', 's284934250']
[17268.0, 17268.0, 18848.0, 12532.0]
[412.0, 398.0, 514.0, 510.0]
[156, 168, 137, 156]
p02971
u885734417
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import math\n\nn = int(input())\n\narr = []\ns_arr = []\n\nfor i in range(n):\n a = int(input())\n arr.append(a)\n s_arr.append(a)\n\ns_arr.sort()\n\nfor a in arr:\n if a >= s_arr[0]:\n print(s_arr[1])\n else:\n print(s_arr[0])\n', 'import math\n\nn = int(input())\n\narr = []\ns_arr = []\...
['Wrong Answer', 'Accepted']
['s845737106', 's923793565']
[14104.0, 14112.0]
[577.0, 568.0]
[239, 238]
p02971
u889344512
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nmx1 = 0\nmx2 = 0\nfor i in range(1,n+1):\n a.append(int(input()))\n if mx1 <= a[-1]:\n mx2 = mx1\n mx1 = a[-1]\n\nfor j in range(1,n+1):\n if a[j-1] == mx1:\n print(mx2)\n else:\n print(mx1)\n', 'n = int(input())\na = []\nmx12 = [0,0]\nfor i in range(1...
['Wrong Answer', 'Accepted']
['s817028755', 's938936864']
[12520.0, 12520.0]
[537.0, 658.0]
[243, 301]
p02971
u891482208
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = list(map(int, input().split()))\nm1, m2 = 200200, 200200\nfor e in a:\n if e < m1:\n m2 = m1\n m1 = e\n elif e < m2:\n m2 = e\nfor e in a:\n if e == m1:\n print(m2)\n else:\n print(m1)', 'n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\nm1, m2 = -1, -1\n...
['Wrong Answer', 'Accepted']
['s977902756', 's582920941']
[3060.0, 12532.0]
[17.0, 569.0]
[212, 219]
p02971
u894381129
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['#C\nn = int(input())\nmax_1 = None\nmax_2 = None\n\nfor i in range(n):\n a = int(input())\n \n if max_2 is None:\n if max_1 is None:\n max_1 = a\n max_i = [i]\n \n elif a < max_1:\n max_2 = a\n\n elif max_1 == a:\n max_i.append(i)\n\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s037487371', 's051083465', 's328006786', 's369369914', 's472200150', 's568191374', 's735997824', 's911457910', 's958854441', 's158105841']
[26672.0, 14084.0, 26652.0, 26672.0, 13340.0, 14108.0, 26652.0, 27036.0, 26672.0, 13340.0]
[433.0, 555.0, 438.0, 402.0, 572.0, 528.0, 444.0, 416.0, 452.0, 566.0]
[683, 713, 680, 524, 323, 716, 661, 537, 680, 334]
p02971
u897536433
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [0]*n\nfor i in range(n):\n a[i] = int(input())\namax = sorted(a)[-2:]\nprint(amax)\nfor i in range(n):\n if a[i] == amax[1]:\n print(amax[0])\n else:\n print(amax[1])\n', 'n = int(input())\na = [0]*n\nfor i in range(n):\n a[i] = int(input())\namax = sorted(a)[-2:]\nfor...
['Wrong Answer', 'Accepted']
['s455925279', 's695934444']
[13348.0, 13348.0]
[571.0, 572.0]
[203, 191]
p02971
u901598613
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\nl=[int(input()) for i in range(n)]\nfor j in range(n):\n l2=l\n l2[i]=0\n print(max(l2))\n', 'n=int(input())\nl=[int(input()) for i in range(n)]\nma=sorted(l)[-2:]\nfor j in l:\n if j==ma[1]:\n print(ma[0])\n else:\n print(ma[1])']
['Runtime Error', 'Accepted']
['s208844692', 's426420154']
[11052.0, 13384.0]
[320.0, 569.0]
[109, 148]
p02971
u901757711
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = [int(input()) for _ in range(n)]\n\nb = sorted(a)\n\nfor i in a:\n if i = b[-1]:\n print(b[-2])\n else:\n print(b[-1])\n', 'n = int(input())\na = [int(input()) for _ in range(n)]\n\nb = sorted(a)\n\nfor i in a:\n if i == b[-1]:\n print(b[-2])\n else:\n pri...
['Runtime Error', 'Accepted']
['s511962650', 's691061289']
[8872.0, 19068.0]
[25.0, 358.0]
[152, 154]
p02971
u905582793
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\na = [int(input()) for i in range(n)]\nb=sorted(a)\nx=a[-1]\ny=a[-2]\nfor i in range(n):\n if a[i]<x:\n print(x)\n else:\n print(y)', 'import sys\ninput=sys.stdin.readline\nn=int(input())\na = [int(input()) for i in range(n)]\nb=sorted(a)\nx=b[-1]\ny=b[-2]\nfor i in range(n):\n if a[i]<x:\n ...
['Wrong Answer', 'Accepted']
['s169486759', 's305878963']
[14112.0, 14112.0]
[565.0, 319.0]
[145, 181]
p02971
u909487111
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\nl = []\nfor i in range(n):\n l.append(int(input())\n \nfor j in range(n):\n print(max(l[:j]+l[j+1:])) ', 'n = int(input())\nl = []\nfor i in range(n):\n l.append(int(input())\n \nfor j in range(n):\n print(max(l[:i]+l[i+1:])) ', 'n = int(input())\nl = []\nfor ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s386428840', 's799537845', 's841427327', 's787864082']
[2940.0, 2940.0, 2940.0, 14112.0]
[17.0, 17.0, 17.0, 577.0]
[131, 137, 134, 201]
p02971
u911438260
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nA = [int(input()) for i in range(N)]\nM = max(A)\nc = A.count(M)\na = list(set(A))\na.sort(reverse=True)\n\nfor i in range(N):\n if A[i] != M:\n print(M)\n elif:\n if c >= 2:\n print(M)\n elif:\n print(a[1])\n ', 'N = int(input())\nA = [int(input()) for i in range(N)]\nM = ma...
['Runtime Error', 'Accepted']
['s126342803', 's808072511']
[2940.0, 17188.0]
[17.0, 492.0]
[237, 233]
p02971
u915531210
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n=int(input())\na=[int(input()) for i in range(n)]\nmax1 = 0\nmax1_ind = 0\nmax2 = 0\nmax2_ind = 0\n \nfor i in range(n):\n if max1 < a[i]:\n max1 = a[i]\n max1_ind = i\n max2 = max1\n max2_ind = max1_ind\n \nfor i in range(n):\n if i = max1_ind:\n print(max2)\n else:\n print(max1)\n ', 'n=in...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s006721125', 's096683142', 's135650295', 's296358977', 's480250621', 's588818939', 's893424532', 's925449153', 's149586310']
[2940.0, 2940.0, 12564.0, 2940.0, 2940.0, 12532.0, 3064.0, 12512.0, 12660.0]
[17.0, 17.0, 490.0, 17.0, 17.0, 509.0, 18.0, 564.0, 553.0]
[291, 424, 318, 282, 424, 422, 516, 424, 447]
p02971
u918601425
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nmaxi=0\nsmaxi=0\nflag=0\nls=[]\nx=0\nfor i in range(N):\n x=int(input())\n ls.append(x)\n if (maxi<x):\n flag=0\n smaxi=maxi\n maxi=x\n elif (maxi==x):\n flag=1\n smaxi=maxi\nfor i in range(N):\n if (ls[i]==maxi):\n if(flag==1):\n print(maxi)\n else:\n print(smaxi)\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s562167246', 's754288077', 's799691446', 's969101102', 's276692723']
[12532.0, 12640.0, 13284.0, 12532.0, 19892.0]
[550.0, 548.0, 589.0, 539.0, 509.0]
[321, 252, 334, 306, 282]
p02971
u921811474
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\na = [int(input()) for i in range(N)]\nA = max(a)\nif a.count(A):\n for i in range(len(a)):\n print(A)\nfor i in range(len(a)):\n if i == a.index(A):\n print(sorted(a)[-2])\n else:\n print(A)', 'import copy\nN = int(input())\na = [input() for i in range(N)]\nb = copy.dee...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s100237559', 's438698637', 's337998468']
[14744.0, 17824.0, 13404.0]
[2104.0, 402.0, 577.0]
[228, 149, 258]
p02971
u931489673
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N=int(input())\nA=[int(input()) for n in range(N)]\n#print(max(A[1:]))\n\nm=max(A)\nfor i in range(N):\n\tif A[i]<m:\n \tprint(m)\n\telse:\n \tprint(max(A[:i]+A[i+1:]))\n#print(max(A[:N-1]))\n', 'N=int(input())\nA=[int(input()) for n in range(N)]\nm=max(A)\nn=sorted(A,reverse=True)[1]\nprint("\\n".join([str(m) ...
['Runtime Error', 'Accepted']
['s518668940', 's429269922']
[2940.0, 24976.0]
[19.0, 443.0]
[206, 144]
p02971
u932716679
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['import sys\nimport copy\n \nN = int(input())\n \nA = []\nfor n in range(N):\n A.append(int(input()))\nA_copy = copy.copy(A)\nmax_A = max(A)\nmax_c = A.count(max_A)\n\nfor i in range(n):\n if A[i] != max_A :\n print(max_A)\n else:\n if max_c == 1:\n A[i] = 0\n print(max(A))...
['Wrong Answer', 'Accepted']
['s428477922', 's363521510']
[14560.0, 12520.0]
[522.0, 521.0]
[353, 307]
p02971
u933129390
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nmax_num = -1\nfor i range(n):\n ipt = int(input())\n if ipt > max_num:\n max_num = max(ipt, max_num)\n idx = i\n a.append(ipt)\na = sorted(a)\nif a[-1] == a[-2]:\n for i in range(n):\n print(max_num)\nelse:\n for i in range(n):\n if i == idx:\n ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s454978490', 's798692693', 's904026876', 's909062834']
[2940.0, 14060.0, 12540.0, 13404.0]
[17.0, 2104.0, 532.0, 587.0]
[362, 536, 486, 365]
p02971
u934119021
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\nm = max(a)\nb = a\nb.sort()\nb = b[:-1]\nm2 = b[-1]\nfor i in range(n):\n if a[i] == m:\n print(m2)\n else:\n print(m)', 'n = int(input())\na = []\nb = []\nfor i in range(n):\n s = int(input())\n a.append(s)\n b.append(s)\nm = max(a)\n...
['Wrong Answer', 'Accepted']
['s079163573', 's688438398']
[14112.0, 14212.0]
[608.0, 607.0]
[185, 208]
p02971
u934868410
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\n\na_sorted = sorted(a)\nfor x in a:\n if x == a_sorted[0]:\n print(a_sorted[1])\n else:\n print(a_sorted[0])', 'n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\n\na_sorted = sorted(a, reverse=True)\nfor x in a:\n i...
['Wrong Answer', 'Accepted']
['s312787263', 's344239041']
[14112.0, 14176.0]
[572.0, 603.0]
[178, 192]
p02971
u935585974
2,000
1,048,576
You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i between 1 and N (inclusive), answer the following question: * Find the maximum value among the N-1 elements other than A_i in the sequence.
['N = int(input())\nlist_A = []\nfor _ in range(N):\n A = int(input())\n list_A.append(A)\n \nA = max(list_A)\nindex_A = list_A.index(A)\nfor i in range(N):\n if list_A[i] == A:\n list_B = sorted(list_A, reverse=True)\n B = list_B[1]\n else:\n print(A)', 'N = int(input())\nlist_A = []\n\nf...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s463783382', 's914269720', 's789259934']
[14724.0, 2940.0, 15392.0]
[2105.0, 17.0, 601.0]
[267, 290, 286]