s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s931933386
p03625
u771532493
1554684896
Python
Python (3.4.3)
py
Runtime Error
249
21640
585
n=int(input()) l=[int(i) for i in input().split()] from collections import Counter import math lst=list(Counter(l).items()) lst.sort(reverse=True) num=0 for i in range(n): if lst[i][1]>3: if num==0: ans=lst[i][0]**2 break elif num==1: ans*=lst[i] num+=...
s333903259
p03625
u771532493
1554677626
Python
Python (3.4.3)
py
Runtime Error
2104
14224
241
n=int(input()) l=[int(i) for i in input().split()] l.sort(reverse=True) num=0 d=0 ans=1 A=False while d<n: if l[d]==l[d+1]: ans*=l[d] num+=1 i d=d+2 if num==2: A=True break if A: print(ans) else: print(0)
s283664890
p03625
u315485238
1554256069
Python
Python (3.4.3)
py
Runtime Error
78
14252
205
N=int(input()) A=list(map(int, input().split())) temp_set=set() l = [] for a in A: if a in temp_set: l.append(a) temp_set.remove(a) else: temp_set.add(a) l.sort() print(l[-2]*l[-1])
s611085391
p03625
u278260569
1554161599
Python
Python (3.4.3)
py
Runtime Error
124
14252
294
N = int(input()) A = list(map(int,input().split())) A.sort() judge = 0 side = [] while judge != 2 and len(A) > 1: MAX_A = A[len(A) -1] if MAX_A == A[len(A) - 2]: side.append(MAX_A) judge += 1 del A[len(A) - 1] del A[len(A) - 2] else: del A[len(A) -1] print(side[0] * side[1])
s175765475
p03625
u026155812
1554053869
Python
Python (3.4.3)
py
Runtime Error
17
2940
349
from collections import defaultdict N = int(input()) A = [int(i) for i in input().split()] A.sort(reverse=True) d = defaultdict(int) ls = [] for x in A: d[x] += 1 if d[x] == 2: ls.append(x) if len(ls) == 2: break elif d[x] == 4: ls.append(x) break if len(ls) == 2:...
s016966338
p03625
u620945921
1553800952
Python
Python (3.4.3)
py
Runtime Error
49
14252
393
n=int(input()) data=[int(aa) for aa in input().split()] d=[0 for aa in range(100010+1)] for aa in data: d[aa]+=1 #print(d) mylist=[0,0] ans1=0 for aa in range(100010+1): if d[aa] >3 and ans1 < aa: ans1=aa if d[aa] >1 : if aa not in mylist: mylist.pop(0) mylist.append(...
s407887486
p03625
u620945921
1553800317
Python
PyPy3 (2.4.0)
py
Runtime Error
225
63476
777
n=int(input()) data=[int(aa) for aa in input().split()] d=[0 for aa in range(100000+1)] for aa in data: d[aa]+=1 #print(d) mydata=0 mylist=[0,0] for aa in range(100000+1): if d[aa] >3: mydata=aa if d[aa] >1 : if aa not in mylist: mylist.pop(0) mylist.append(aa) # ...
s731427192
p03625
u620945921
1553800053
Python
Python (3.4.3)
py
Runtime Error
50
14244
388
n=int(input()) data=[int(aa) for aa in input().split()] d=[0 for aa in range(100000+1)] for aa in data: d[aa]+=1 #print(d) mydata=0 mylist=[0,0] for aa in range(100000+1): if d[aa] >3: mydata=aa if d[aa] >1 : if aa not in mylist: mylist.pop(0) mylist.append(aa) # ...
s588759937
p03625
u210827208
1553644883
Python
Python (3.4.3)
py
Runtime Error
87
14252
276
n=int(input()) A=list(map(int,input().split())) A.sort(reverse=True) X=[] t=None for i in A: if t==i: t=None X.append(t) if len(X)>1: break else: t=i if len(X)>1: print(X[0]*X[1]) else: print(0)
s380787558
p03625
u210827208
1553644731
Python
Python (3.4.3)
py
Runtime Error
86
14224
278
n=int(input()) A=list(map(int,input().split())) A.sort(reverse=True) X=[] t=None for i in A: if i==t: t=None X.append(t) if len(X)==2: break else: t=i if len(X)>1: print(X[0]*X[1]) else: print(0)
s071432900
p03625
u210827208
1553644433
Python
Python (3.4.3)
py
Runtime Error
85
14244
260
n=int(input()) A=list(map(int,input().split())) A.sort(reverse=True) X=[] t=None for i in A: if i==t: t=None X.append(t) if len(X)==2: break else: t=i print(X[0]*X[1] if len(X)>1 else 0)
s175578735
p03625
u255067135
1553461400
Python
Python (3.4.3)
py
Runtime Error
79
14224
589
n = int(input()) A = list(map(int, input().split())) # 2本以上ある棒, 4本以上を選び出してsort, 大きいものから選ぶ A = sorted(A) c = collections.Counter(A) c_2 = sorted(c.items(), key=lambda x:x[0], reverse=True) count = 0 for i in range(n): if c_2[i][1] >=4 and count==0: ans = c_2[i][0] **2 count+=2 break elif ...
s202981138
p03625
u574326823
1552788998
Python
Python (3.4.3)
py
Runtime Error
2104
14252
199
n = int(input()) l = [int(x) for x in input().split()] x = max(i for i in set(l) if l.count(i)>1) if l.count(x) > 3: print(x*x) else: y = max(i for i in set(l)-{x} if l.count(i) > 1) print(y*x)
s382313958
p03625
u740284863
1552604971
Python
Python (3.4.3)
py
Runtime Error
52
14244
522
import sys input = sys.stdin.readline n = int(input()) A = list(map(int, input().split())) a = reversed(list(set(A))) B = [] for k in range(len(a)): i = a[k] if A.count(i) >= 4: if len(B) == 0: print(i**2) exit() else: B.append(i) if len(B) >= 2: ...
s394949467
p03625
u740284863
1552603250
Python
Python (3.4.3)
py
Runtime Error
91
14244
357
import sys input = sys.stdin.readline n = int(input()) A = list(map(int, input().split())) a = sorted(list(set(A)),reverse = True) B = [] for i in a: if A.count(B[0]) >= 4: print(i**2) exit() if A.count(i) >= 2: B.append(i) if len(B) >= 2: print(B[0]*B[1]) ...
s351491900
p03625
u928784113
1552512815
Python
Python (3.4.3)
py
Runtime Error
131
20260
361
N = int(input()) A = list(map(int,input().split())) AS = list(set(A)) D = {} for i in A: if i in D.keys(): D[i] += 1 else: D[i] = 1 accum = [] AS.sort(reverse=True) for i in AS: if D[i] >= 2: accum.append(i) if D[accum[0]] >= 4: print(accum[0]**2) elif D[accum[0]] >= 2: pr...
s632865508
p03625
u652081898
1552348743
Python
Python (3.4.3)
py
Runtime Error
2104
14252
226
n = int(input()) a = list(map(int, input().split())) a_set = set(a) sides = [] for i in a_set: if a.count(i) > 1: sides.append(i) if len(sides) <= 1: print(0) sides = sorted(sides) print(sides[-1]*sides[-2])
s049895128
p03625
u845333844
1551993401
Python
Python (3.4.3)
py
Runtime Error
112
21540
401
from collections import Counter n=int(input()) a=list(map(int,input().split())) c=Counter(a) l=c.most_common() rectangle=[] square=[] x=len(l) for i in range(x): if l[i][1]>=2: rectangle.append(l[i][0]) if l[i][1]>=4: square.append(l[i][0]) rectangle.sort() square.sort() ans1=rectangle[-1]*rec...
s667000442
p03625
u143509139
1551554055
Python
Python (3.4.3)
py
Runtime Error
77
14252
269
input() a = list(map(int, input().split())) a.sort(reverse=True) i, c = 0, 0 m = list() while i < n-1: if a[i] == a[i+1]: m.append(a[i]) i += 1 c += 1 i += 1 if c == 2: break if c == 2: print(m[0]*m[1]) else: print(0)
s937433969
p03625
u143509139
1551550886
Python
Python (3.4.3)
py
Runtime Error
104
14224
351
a = [] tmp = 0 input() a = list(map(int, input().split())) a.sort(reverse=True) for i in range(len(a)): if a[i] == a[i+3] and tmp == 0: print(a[i]**2) exit() elif a[i] == a[i+1]: if tmp == 0: W = a[i] tmp = 1 del a[i+1] else: H = a[...
s960451276
p03625
u853900545
1551303327
Python
Python (3.4.3)
py
Runtime Error
104
14228
273
n = int(input()) a = list(map(int,input().split())) a.sort() a = a[::-1] i = 0 c = 0 m = list() while i < n: if a[i]==a[i+1]: m.append(a[i]) i += 1 c += 1 i += 1 if c == 2: break if c == 2: print(m[0]*m[1]) else: print(0)
s561386488
p03625
u853900545
1551303264
Python
Python (3.4.3)
py
Runtime Error
104
14252
239
n = int(input()) a = list(map(int,input().split())) a.sort() a = a[::-1] i = 0 c = 0 m = list() while i < n: if a[i]==a[i+1]: m.append(a[i]) i += 1 c += 1 i += 1 if c == 2: break print(m[0]*m[1])
s053255616
p03625
u853900545
1551303142
Python
Python (3.4.3)
py
Runtime Error
100
14252
236
n = int(input()) a = list(map(int,input().split())) a.sort() a = a[::-1] i = 0 c = 0 m = list() while i < n: if a[i]==a[i+1]: m.append(i) i += 1 c += 1 i += 1 if c == 2: break print(m[0]*m[1])
s263011509
p03625
u549497563
1550515742
Python
Python (3.4.3)
py
Runtime Error
43
14244
224
n = int(input()) a = list(map(int,input().split())) res = [0]*(n+1) ans = [0,0] for i in a: res[i] += 1 for i in range(len(res)): if res[i]>1: ans.append(i) ans = sorted(ans,reverse=True) print(ans[0]*ans[1])
s009278249
p03625
u549497563
1550515523
Python
Python (3.4.3)
py
Runtime Error
43
14244
224
n = int(input()) a = list(map(int,input().split())) res = [0]*(n+1) ans = [0,0] for i in a: res[i] += 1 for i in range(len(res)): if res[i]>1: ans.append(i) ans = sorted(ans,reverse=True) print(ans[0]*ans[1])
s454292343
p03625
u185034753
1549135750
Python
Python (3.4.3)
py
Runtime Error
82
18216
364
def solve(): N = int(input()) a = [int(x) for x in input().split()] import collections count = collections.Counter(a) valid = {k:v for k, v in count.items() if v >= 2} # print(valid) m = sorted(valid.keys(), reverse=True) a, b = m[0], m[1] return a*b def main(): print(solv...
s516620897
p03625
u887207211
1549056845
Python
Python (3.4.3)
py
Runtime Error
2104
14224
294
N = int(input()) A = list(map(int,input().split())) X = list(set(A)) d = {} for x in X: num = A.count(x) d[x] = num result = [] for k, v in d.items(): if(v >= 4): result.append(k) result.append(k) elif(v >= 2): result.append(k) result.sort() print(result[-1] * result[-2])
s178944103
p03625
u887207211
1549055328
Python
Python (3.4.3)
py
Runtime Error
2104
15504
250
N = int(input()) A = list(map(int,input().split())) two = [0]*N four = [0]*N for x in list(set(A)): num = A.count(x) if(num >= 4): four[x] = x elif(num != 1): two[x] = x two.sort() four.sort() print(max(four[-1]**2, two[-1]*two[-2]))
s087861022
p03625
u853900545
1548883803
Python
Python (3.4.3)
py
Runtime Error
2103
14480
331
n = int(input()) a = list(map(int,input().split())) a.sort() a = a[::-1] s = set(a) s = list(s) t = set() for i in range(len(s)): if a.count(s[i]) >= 4 and len(t) == 0: print(s[i]**2) exit() elif a.count(s[i]) >= 2: t.get(s[i]) if len(t) >= 2: print(t[0]*t[1]) ...
s957100821
p03625
u853900545
1548883751
Python
Python (3.4.3)
py
Runtime Error
2104
14480
331
n = int(input()) a = list(map(int,input().split())) a.sort() a = a[::-1] s = set(a) s = list(s) t = set() for i in range(len(s)): if a.count(s[i]) >= 4 and len(t) == 0: print(s[i]**2) exit() elif a.count(s[i]) >= 2: t.get(s[i]) if len(t) >= 2: print(s[0]*s[1]) ...
s988634547
p03625
u219607170
1548730978
Python
Python (3.4.3)
py
Runtime Error
62
18600
368
from collections import Counter N = int(input()) A = list(map(int, input().split())) c = Counter(A) x1, x2, x3 = 0, 0, 0 for k, v in c.items(): if v >= 4: if k > maxval1: x1 = k if v >= 2: if k > maxval1: x1, x2 = k, x1 elif k > maxval2: x2 = k ...
s895119261
p03625
u371763408
1543065958
Python
Python (3.4.3)
py
Runtime Error
43
14244
291
n = int(input()) A = list(map(int,input().split())) A = Counter(A).most_common() ans = 0 for i,j in sorted(A,reverse=True): if j >=4 and ans ==0: ans = i*i break elif j >= 2 and ans == 0: ans = i elif j >= 2: ans *= i break print(ans) print(sorted(A,reverse=True))
s933202708
p03625
u457683760
1542243774
Python
Python (3.4.3)
py
Runtime Error
1531
14244
390
N=int(input()) A=[int(i) for i in input().split()] A.sort(reverse=True) x=0 y=0 for i in range(N): if A[0]==A[1]: x=A[0] A.remove(x) A.remove(x) break else: A.remove(A[0]) if len(A)!=0: for i in range(len(A)): if A[0]==A[1]: y=A[0] ...
s564538786
p03625
u457683760
1542243672
Python
Python (3.4.3)
py
Runtime Error
18
3064
379
import dicimal N=int(input()) A=[int(i) for i in input().split()] A.sort(reverse=True) x=0 y=0 for i in range(N): if A[0]==A[1]: x=A[0] A.remove(x) A.remove(x) break else: A.remove(A[0]) for i in range(len(A)): if A[0]==A[1]: y=A[0] ...
s329093722
p03625
u457683760
1542243581
Python
Python (3.4.3)
py
Runtime Error
1546
14224
353
N=int(input()) A=[int(i) for i in input().split()] A.sort(reverse=True) x=0 y=0 for i in range(N): if A[0]==A[1]: x=A[0] A.remove(x) A.remove(x) break else: A.remove(A[0]) for i in range(len(A)): if A[0]==A[1]: y=A[0] break else: ...
s352740673
p03625
u457683760
1542243143
Python
Python (3.4.3)
py
Runtime Error
1450
14252
343
N=int(input()) A=[int(i) for i in input().split()] A.sort(reverse=True) x=0 y=0 for i in range(len(A)): x=A[0] if A[0]==A[1]: A.remove(x) A.remove(x) if A[0]==A[1]: y=A[0] break else: A.remove(x) else: ...
s335972610
p03625
u457683760
1542242824
Python
Python (3.4.3)
py
Runtime Error
1582
14252
299
N=int(input()) A=[int(i) for i in input().split()] A.sort(reverse=True) x=0 y=0 for i in range(len(A)): x=A[0] if A[0]==A[1]: A.remove(x) A.remove(x) if A[0]==A[1]: y=A[0] break else: A.remove(x) print(x*y)
s251897399
p03625
u848647227
1542078545
Python
Python (3.4.3)
py
Runtime Error
18
2940
299
a = int(input()) ar = list(map(int,input().split(" "))) br = sorted(set(ar)) cr = [] for b in br: if ar.count(b) >= 2: cr.append(b) if len(cr) == 0: print(0) else: if ar.count(max(cr)) >= 4: print(max(cr) ** 2) else: dr = sorted(cr,reverse=True) print(dr[0] * dr[1])
s690382947
p03625
u848647227
1542078429
Python
Python (3.4.3)
py
Runtime Error
2104
14252
259
a = int(input()) ar = list(map(int,input().split(" "))) br = sorted(set(ar)) cr = [] for b in br: if ar.count(b) >= 2: cr.append(b) if ar.count(max(cr)) >= 4: print(max(cr) ** 2) else: dr = sorted(cr,reverse=True) print(dr[0] * dr[1])
s403044456
p03625
u848647227
1542078142
Python
Python (3.4.3)
py
Runtime Error
17
3064
291
for b in br: if ar.count(b) >= 4: cr.append(b) dr.append(b) elif ar.count(b) >= 2: dr.append(b) if len(cr) >= 1: mc = max(cr) ** 2 else: mc = 0 if len(dr) >= 2: er = sorted(dr,reverse=True) md = er[0] * er[1] else: md = 0 print(max(mc,md))
s135653495
p03625
u726615467
1541913024
Python
Python (3.4.3)
py
Runtime Error
77
14252
385
# encoding: utf-8 N = int(input()) A = list(map(int, input().split())) A.sort() view = 10 * 9 + 7 lengths = [0] * 2 idx = 0 for Ai in reversed(A): if Ai < view: view = Ai cnt = 0 cnt += 1 if cnt >= 2: lengths[idx] = view cnt = 0 idx += 1 if idx > 1: break # pri...
s176953048
p03625
u505420467
1541902144
Python
Python (3.4.3)
py
Runtime Error
17
2940
234
import sys from collections import Counter n=int(input()) a=list(map(int,input().split())) a.sort(reverse=True) for i in range(n-1): if a[i]=a[i+1]: a[i+1]==0 else: a[i]=0 a.sort(reverse=True) print(a[0]*a[1])
s047671854
p03625
u883048396
1541174596
Python
Python (3.4.3)
py
Runtime Error
91
14480
437
def 解(): iN = int(input()) aA = [int(_) for _ in input().split()] aA = reversed(sorted(aA)) d = {} for a in aA: if a in d: if d[a] == 3: print(a*a) exit() elif iC and iC != a: print(iC * a) exit() ...
s936277759
p03625
u411858517
1540858010
Python
Python (3.4.3)
py
Runtime Error
133
14672
416
N = int(input()) L = list(map(int, input().split())) L.sort() a = [0,0] count = 0 for i in range(N): count += 1 if i == N-1: if count >= 2: a.append(L[i]) a.pop(0) res = a[0]*a[1] count = 0 elif L[i] != L[i+1]: if count >= 2: a.append(...
s215970603
p03625
u001024152
1540308343
Python
Python (3.4.3)
py
Runtime Error
42
14252
348
N = int(input()) a = list(map(int, input().split())) cnt = [0]*(int(1e9)+1) for ai in a: cnt[ai] += 1 ans = 0 condi = 0 for ai in a[::-1]: if cnt[ai] >= 4: ans = max(ans, ai*ai) break else: if condi==0: condi = ai else: ans = condi * ai b...
s806367261
p03625
u237493274
1539648597
Python
Python (3.4.3)
py
Runtime Error
26
5404
363
import math import collections N = int(input()) A = [int(input()) for x in range(N)] c = collections.Counter(A) #print(c) aaa = [] for i in (reversed(sorted(A))): #print(i) #print(">>",c[i]) #print() if c[i] > 1: c[i]-=2 aaa.append(i) if len(aaa) == 2: break if len(aaa) < 2: ...
s069277149
p03625
u237493274
1539648550
Python
Python (3.4.3)
py
Runtime Error
17
3060
364
import math import collections N = int(input()) A = [int(input()) for x in range(N)] c = collections.Counter(A) #print(c) aaa = [] for i in (reversed(sorted(A))): #print(i) #print(">>",c[i]) #print() if c[i] > 1: c[i]-=2 aaa.append(i) if len(aaa) == 2: break if len(aaa) < 2: ...
s678302679
p03625
u237493274
1539648343
Python
Python (3.4.3)
py
Runtime Error
27
5292
323
import math import collections N = int(input()) A = [int(input()) for x in range(N)] c = collections.Counter(A) #print(c) aaa = [] for i in (reversed(sorted(A))): #print(i) #print(">>",c[i]) #print() if c[i] > 1: c[i]-=2 aaa.append(i) if len(aaa) == 2: break print(aaa[0]*aaa[...
s011982061
p03625
u255280439
1539647339
Python
Python (3.4.3)
py
Runtime Error
79
17960
353
N = int(input()) A = list(map(int,input().split())) Acount = {} q = [] for a in A: if a not in Acount: Acount[a] = 0 else: Acount[a] += 1 for key, val in Acount.items(): if val >= 2: q.append(key) if val >= 4: q.append(key) q.sort(reverse=True) if len(q) < 2: print(0) else: p...
s951032715
p03625
u473633103
1539646510
Python
Python (3.4.3)
py
Runtime Error
2104
20876
229
n = int(input()) a = input().split() d = {} for i in a: d[i] = d.get(i,0)+1 for i in d: d[i] = d[i]//2 s = [] for i in d: for _ in range(d.get(i)): s.append(int(i)) s.sort() print(s[-1]*s[-2])
s689174648
p03625
u255280439
1539645554
Python
Python (3.4.3)
py
Runtime Error
17
3192
3346
import sys import math import collections import itertools import array import inspect # Set max recursion limit sys.setrecursionlimit(1000000) # Debug output def chkprint(*args): names = { id(v): k for k, v in inspect.currentframe().f_back.f_locals.items() } print(', '.join( name...
s147527552
p03625
u724892495
1539461315
Python
Python (3.4.3)
py
Runtime Error
207
21512
410
N = int(input()) A = {} a = [int(i) for i in input().split()] for i in range(N): if a[i] in A: A[a[i]] += 1 else: A[a[i]] = 1 ans = [] A = list(sorted(list(A.items()), reverse=True)) for i in range(N): if A[i][1] >= 2: ans.append(A[i][0]) if A[i][1] >= 4: ans.append(A[i]...
s375251746
p03625
u826263061
1538320488
Python
Python (3.4.3)
py
Runtime Error
62
18600
590
# -*- coding: utf-8 -*- """ Created on Sun Sep 30 10:49:33 2018 ABC071C @author: maezawa """ import collections n = int(input()) a = list(map(int,input().split())) acount = collections.Counter(a) auniq = acount.keys() auniq.sort(reverse=True) edge1 = 0 ans = 0 for edge in auniq: if acount[edge] >= 4: if edg...
s448644078
p03625
u102902647
1536734188
Python
Python (3.4.3)
py
Runtime Error
17
2940
488
from collections import defaultdict N = int(input()) A = sorted([int(i) for i in input().split()], reverse=True) A_dict = defaultdict(lambda:0) for a in A: A_dict[a] += 1 key1 = 0 key2 = 0 for key in A_dict.keys(): if key2 > 0: break if A_dict[key] > 3: if key1 == 0; key1 = key ...
s053404813
p03625
u073775598
1536535071
Python
Python (3.4.3)
py
Runtime Error
44
14672
577
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 ans=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(int(ans)) else: for i in range(max_A): j=max_A-i if lines[j]>=4: if long_line>0: ans=j*long_line ...
s343833138
p03625
u073775598
1536534726
Python
Python (3.4.3)
py
Runtime Error
44
14672
574
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 ans=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(int(ans)) else: for i in range(max_A): j=max_A-i if lines[j]>=4: if long_line>0: ans=j*long_line ...
s777687502
p03625
u073775598
1536534485
Python
Python (3.4.3)
py
Runtime Error
44
14224
512
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(0) exit() for i in range(max_A-1): j=max_A-i if lines[j]>=4: if long_line>0: print(long_line*j) exit() ...
s537216669
p03625
u073775598
1536534398
Python
Python (3.4.3)
py
Runtime Error
43
14224
516
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 for i in range(N): lines[A[i]]+=1 # if max(lines)<2: # print(0) # exit() for i in range(max_A): j=max_A-i if lines[j]>=4: if long_line>0: print(long_line*j) exit() ...
s382703271
p03625
u073775598
1536534193
Python
Python (3.4.3)
py
Runtime Error
44
14252
512
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(0) exit() for i in range(max_A+1): j=max_A-i if lines[j]>=4: if long_line>0: print(long_line*j) exit() ...
s488599767
p03625
u073775598
1536533252
Python
Python (3.4.3)
py
Runtime Error
44
14252
510
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(0) exit() for i in range(max_A): j=max_A-i if lines[j]>=4: if long_line>0: print(long_line*j) exit() ...
s651360753
p03625
u073775598
1536532602
Python
Python (3.4.3)
py
Runtime Error
43
14252
707
#ABC071C N=int(input()) A=list(map(int,input().split())) max_A=max(A) lines=[0]*(max_A+1) long_line=0 sqare_area=0 rectangl_area=0 for i in range(N): lines[A[i]]+=1 if max(lines)<2: print(0) exit() for i in range(max_A): j=max_A-i if lines[j]>=4: if sqare_area==0: sqare_area=j*j ...
s515807648
p03625
u497046426
1536355595
Python
Python (3.4.3)
py
Runtime Error
17
2940
728
N = int(input()) A = list(map(int, input().split())) bar_length_count = dict() for a in A: bar_length_count[a] = bar_length_count.get(a, 0) + 1 for val in bar_length_count.values(): pass count_at_least_2 = 0 for val in bar_length_count.values(): if val >= 2: if val >= 4: count_at_leas...
s382263469
p03625
u497046426
1536355513
Python
Python (3.4.3)
py
Runtime Error
17
3060
700
N = int(input()) A = list(map(int, input().split())) bar_length_count = dict() for a in A: bar_length_count[a] = bar_length_count.get(a, 0) + 1 for val in bar_length_count.values(): pass count_at_least_2 = 0 for val in bar_length_count.values(): if val >= 2: if val >= 4: count_at_leas...
s840496721
p03625
u497046426
1536355465
Python
Python (3.4.3)
py
Runtime Error
17
3060
703
N = int(input()) A = list(map(int, input().split())) bar_length_count = dict() for a in A: bar_length_count[a] = bar_length_count.get(a, 0) + 1 for val in bar_length_count.values(): pass count_at_least_2 = 0 for val in bar_length_count.values(): if val >= 2: if val >= 4: count_at_leas...
s790739238
p03625
u415905784
1536036712
Python
Python (3.4.3)
py
Runtime Error
95
14252
218
N = int(input()) A = [int(x) for x in input().split()] A.sort(reverse=True) pre = 0 e1, e2 = 0, 0 for a in A: if pre == a: if e1 == 0: e1 = a elif e2 == 0: e2 == a else: pre = a print(a * b)
s342379438
p03625
u807772568
1534255907
Python
Python (3.4.3)
py
Runtime Error
43
14244
253
a = int(input()) b = list(map(int,input().split())) b.sorted() c = 1 d = 0 dd = 0 p = b[0] for i in range(1,a): if p == b[i]: c += 1 elif p != b[i]: p = b[i] c = 1 if c == 2: d = dd dd = p elif c == 4: d = p dd = p print(d*dd)
s154312713
p03625
u135282263
1533872697
Python
Python (3.4.3)
py
Runtime Error
79
14252
187
n = int(input()) a = list(map(int,input().split())) x=0 y=0 a.sort() i=len(a) while (i>1): if a[i-1]==a[i]: x=y y=a[i] i-=2 else: i+=1 if y>0: break print(x*y)
s609095849
p03625
u803647747
1533620451
Python
Python (3.4.3)
py
Runtime Error
106
18060
588
N = int(input()) int_list = list(map(int, input().split())) count_dct = {} for input_num in int_list: if input_num in count_dct.keys(): count_dct[input_num] += 1 else: count_dct[input_num] = 1 count_sort_list = [] max_num = 0 for i, j in count_dct.items(): if j >= 2: count_...
s937700601
p03625
u599547273
1533357504
Python
Python (3.4.3)
py
Runtime Error
2104
23564
231
n = int(input()) a = map(int, input().split(" ")) d = dict() for a_i in a: if a_i not in d: d[a_i] = 0 d[a_i] += 1 d = sum([[d_i[0] for i in range(d_i[1]//2)] for d_i in d.items()], []) d.sort(reverse=True) print(d[0] * d[1])
s945879897
p03625
u599547273
1533356943
Python
Python (3.4.3)
py
Runtime Error
2104
14252
151
n = int(input()) a = list(map(int, input().split(" "))) for a_i in set(a): a.remove(a_i) max_2 = sorted(a, reverse=True)[:2] print(max_2[0]*max_2[1])
s498142059
p03625
u594956556
1530149585
Python
Python (3.4.3)
py
Runtime Error
91
14244
260
n=int(input()) a=list(map(int,input().split())) a.sort() a.reverse() max1=0;max2=0 for i in range(n-3): if a[i]==a[i+1]: max1=a[i] a[i+1]=0 count=i+1 break for j in range(count,n-1): if a[j]==a[j+1]: max2=a[j] break print(max1*max2)
s996598478
p03625
u594956556
1530149418
Python
Python (3.4.3)
py
Runtime Error
92
14252
258
n=int(input()) a=list(map(int,input().split())) a.sort() a.reverse() max1=0;max2=0 for i in range(n-1): if a[i]==a[i+1]: max1=a[i] a[i+1]=0 count=i break for j in range(count,n-1): if a[j]==a[j+1]: max2=a[j] break print(max1*max2)
s324996266
p03625
u828847847
1529419016
Python
Python (2.7.6)
py
Runtime Error
106
23248
383
n = int(input()) arr = map(int,raw_input().split()) dic = {} for i in range(n): if dic.has_key(arr[i]): dic[arr[i]] += 1 else : dic[arr[i]] = 1 ans = [[k,v] for k, v in dic.items() if v > 1] ans = ans[-2:] if len(ans) > 1: if ans[1][1] > 3: print ans[1][0] ** 2 else : print ans[1][0] * ans[0][0] els...
s004754232
p03625
u503901534
1525758390
Python
Python (3.4.3)
py
Runtime Error
42
14244
307
N = int(input()) A = list(map(int, input().split())) Adict = [] for i in A: if i in Adict: Adict[i]=Adict[i]+1 else: Adict.update({i:1}) B = [0, 0] for i in Adict.keys(): if Adict[i] >= 2: B.append(i) if Adict[i] >= 4: B.append(i) B.sort() print(B[-1]*B[-2])
s691292790
p03625
u503901534
1525758144
Python
Python (3.4.3)
py
Runtime Error
44
14224
295
N = int(input()) A = list(map(int, input().split())) Adict = [] for i in A: if i in Adict: Adict[i]=Adict[i]+1 else: Adict.update({i:1}) B = [0, 0] for i in Adict.keys(): if Adict[i] >= 2: B.append(i) if Adict[i] >= 4: B.append(i) B.sort() print(B[-1]*B[-2])
s166393863
p03625
u591295155
1525745411
Python
Python (3.4.3)
py
Runtime Error
61
24104
221
from collections import Counter N = int(input()) A = Counter(map(int, input().split())) B = [0, 0] for i in A.keys(): if A[i] >= 2: B.append(v) if A[i] >= 4: B.append(v) B.sort() print(B[-1]*B[-2])
s085105581
p03625
u327248573
1525562523
Python
Python (3.4.3)
py
Runtime Error
86
17960
468
N = int(input()) A = list(map(int, input().split(' '))) rod = {} for i in A: if i in rod: rod[i] += 1 else: rod[i] = 1 if len([i for i in rod.values() if i >= 2]) < 2: print(0) else: length4 = [k for k, v in rod.items() if v >= 4] length4.sort() length2 = [k for k, v in rod.items...
s365595496
p03625
u503901534
1525481557
Python
Python (3.4.3)
py
Runtime Error
17
2940
427
n = int(input()) a = list(map(int,input().split())) a_sort = list(reversed(list(sorted(a)))) amax = max(a_sort) if a_sort.count(amax) >3: print(amax ** 2) else: one = 0 two = 0 for i in a_sort: if a_sort.count(i) > 1 and one = 0 and two = 0: one = i elif a_sort.count(i...
s400634084
p03625
u503901534
1525480429
Python
Python (3.4.3)
py
Runtime Error
17
2940
453
n = int(input()) a = list(map(int,input().split())) a_sort = list(sorted(a)) ad = {} for i in range(len(a_sort)): if ad in a_sort[i]: ad[a_sort[i]] = ad[a_sort[i]] + 1 else: ad.update(a_sort[i]:1) ad2 = ad for key in ad.keys(): if ad[key] < 2: del ad2[key] amax = max(ad2.keys()) b ...
s957707261
p03625
u143492911
1525314180
Python
Python (3.4.3)
py
Runtime Error
75
18216
407
n=int(input()) a=list(map(int,input().split())) from collections import Counter data=Counter(a) two=[] four=[] for i,j in data.items(): if 2<=j<=3: two.append(i) elif 4<=j: four.append(i) if len(four)==0: four.append(0) four.append(0) four[1]=0 elif len(two)==0: two.append(0) ...
s527584602
p03625
u281303342
1525134498
Python
Python (3.4.3)
py
Runtime Error
219
21668
433
from collections import Counter N = int(input()) A = list(map(int,input().split())) C = sorted(Counter(A).most_common(),reverse=True) D = [] F = [] for i in range(len(C)): x,y = C[i][0],C[i][1] if y >= 2: D.append(x) if y >= 4: F.append(x) E = sorted(D,reverse=True) G = sorted(F,reverse=True...
s189436738
p03625
u143492911
1517637177
Python
Python (3.4.3)
py
Runtime Error
2104
14244
349
def test(): n=int(input()) a=list(map(int,input().split())) a.sort() a.reverse() s=list(set(a)) s.sort() s.reverse() ans=[] v=0 for i in s: if 4<=a.count(i): return i*i elif 2<=a.count(i)<=3: ans.append(i) return ans[0]*ans[1] ...
s443647849
p03625
u143492911
1517636999
Python
Python (3.4.3)
py
Runtime Error
2104
14800
392
def test(): n=int(input()) a=list(map(int,input().split())) a.sort() a.reverse() s=list(set(a)) s.sort() s.reverse() ans=[] v=0 for i in s: if 4<=a.count(i): v="i" elif 2<=a.count(i)<=3: ans.append(i) if v or 2<=len(ans): ...
s662623169
p03625
u562016607
1517620109
Python
Python (3.4.3)
py
Runtime Error
118
14484
272
N = int(input()) st = input().split() A = [0 for i in range(N)] for i in range(N): A[i] = int(st[i]) A.sort(reverse = True) U = [] for i in range(N-1): if A[i] == A[i+1]: U.append(A[i]) A[i] = -1 A[i+1] = -1 if len(U) >= 2: break print(U[0] * U[1])
s721256921
p03625
u622878217
1508186437
Python
Python (3.4.3)
py
Runtime Error
89
14252
367
n = int(input()) ai = list(map(int,input().split())) ai.sort() l = list(set(ai)).reverse m1 = 0 m2 = 0 for x in l: if(ai.count(x) >= 4): if m1 > 0: m2 = x else: m1 = m2 = x break elif(2 <= ai.count(x) < 4): if m1: m2 = x break ...
s862525346
p03625
u937164028
1506567380
Python
Python (3.4.3)
py
Runtime Error
2230
1746792
463
import itertools def findsq(a,b,c,d): if a == b and c == d: return a*c elif a == c and b == d: return a*b elif a == d and b == c: return a*b else: return 0 if __name__ == '__main__': N = int(input()) A = list(map(int, input().split())) ans = [] for l in...
s191232719
p03625
u937164028
1506566522
Python
Python (3.4.3)
py
Runtime Error
30
11096
515
def findsq(a,b,c,d): if a == b and c == d: return 1 elif a == c and b == d: return 1 elif a == d and b == c: return 1 else: return 0 if __name__ == '__main__': N = int(input()) A = map(int, input().split()) ans = 0 for i in range(N-3): for j in r...
s878619787
p03625
u813450984
1506295094
Python
Python (3.4.3)
py
Runtime Error
2104
14252
439
N = int(input()) A = list(map(int, input().split())) A.sort(reverse =True) width = 0 height = 0 found = False for i in A: if A.count(i) >= 4: width = i height = i count += 1 break elif A.count(i) >= 2: if width == 0: width = i elif not i == width: ...
s875372154
p03625
u410996052
1505256065
Python
Python (3.4.3)
py
Runtime Error
127
15020
283
n = int(input()) num_l=sorted(map(int,input().split()),reverse=True) s=sorted(set(num_l),reverse=True) res=[] for i in num_l: if len(res) == 2: print(res[0]*res[1]) break if d[i] >= 2: d[i]-=2 res.append(i) else: pass else:print(0)
s085146995
p03625
u112465297
1504968816
Python
Python (3.4.3)
py
Runtime Error
57
18600
358
from collections import Counter N=int(input()) a=list(map(int, input().split())) h = w = 0 for i, cnt in Counter(a).items: if cnt >= 2 and i > w: if i > h: if cnt >= 4: h = i w = i else: w = h h = i else: ...
s412173171
p03625
u112465297
1504968661
Python
Python (3.4.3)
py
Runtime Error
106
20900
384
from collections import Counter N=int(input()) c=[] a=list(map(int, input().split())) s=sorted(set(a), reverse=True) for i, cnt in Counter(a).items: if cnt >= 2 and i > w: if i > h: if cnt >= 4: h = i w = i else: w = h ...
s140514264
p03625
u943004959
1504358743
Python
Python (3.4.3)
py
Runtime Error
77
18064
715
def solve(): # 071C - Make a Rectangle n = int(input()) sides = list(map(int, input().split(" "))) check_dual = {} possible_sides = [] for i in sides: if i in check_dual: check_dual[i] += 1 else: check_dual[i] = 1 tmp_square = 0 for k, v in check_dua...
s994411138
p03625
u943004959
1504358269
Python
Python (3.4.3)
py
Runtime Error
77
17936
715
def solve(): # 071C - Make a Rectangle n = int(input()) sides = list(map(int, input().split(" "))) check_dual = {} possible_sides = [] for i in sides: if i in check_dual: check_dual[i] += 1 else: check_dual[i] = 1 tmp_square = 0 for k, v in check_dua...
s407406775
p03625
u998273299
1503684067
Python
Python (2.7.6)
py
Runtime Error
11
2568
234
#! /bin/python # coding:utf-8 N = input() A = map(int, raw_input().split()) s = set() dep = [] for i in A: if i in s: dep.append(i) s.add(i) dep.sort() dep.reverse() if (len(dep) 2): print "None" else: print dep[0] * dep[1]
s012867415
p03625
u010110540
1503630850
Python
Python (3.4.3)
py
Runtime Error
178
21540
395
from collections import Counter N = int(input()) A = list(map(int, input().split())) A_counter = Counter(A).most_common() A_counter.sort(reverse = True) ans = [] for i, cnt in A_counter.items(): if cnt >= 2: ans.append(i) if len(ans) == 2: print(ans[0] * ans[1]) break ...
s854644695
p03625
u010110540
1503629266
Python
Python (3.4.3)
py
Runtime Error
100
18728
475
from collections import Counter N = int(input()) A = sorted(list(map(int, input().split())), reverse=True) two = [] four = [] for i, cnt in Counter(A).items(): if cnt >= 4: four.append(i) if 4 > cnt >= 2: two.append(i) if len(two) >= 2: break if two: if four: print(max...
s136802765
p03625
u010110540
1503628763
Python
Python (3.4.3)
py
Runtime Error
106
18728
411
from collections import Counter N = int(input()) A = sorted(list(map(int, input().split())), reverse=True) two = [] four = [] for i, cnt in Counter(A).items(): if cnt >= 4: four.append(i) if 4 > cnt >= 2: two.append(i) if len(two) >= 2: break if two: if four: print(max...
s175713183
p03625
u010110540
1503628037
Python
Python (3.4.3)
py
Runtime Error
95
18728
324
from collections import Counter N = int(input()) A = sorted(list(map(int, input().split())), reverse=True) two = [] four = [] for i, cnt in Counter(A).items(): if cnt >= 4: four.append(i) if cnt >= 2: two.append(i) if len(two) >= 2: break print(max(two[0] * two[1], four[0] * four[...
s884315054
p03625
u260764548
1503438052
Python
Python (3.4.3)
py
Runtime Error
2104
19728
501
# -*- coding:utf-8 -*- N = int(input()) A = map(int,input().split()) A = set(A) A = sorted(A,reverse=True) i = 0 check = 0 x = 0 y = 0 while(i<N and check == 0): count = A.count(A[i]) if(count>=4 and x==0): x = A[i] y = A[i] check = 1 elif(count>=2): if(x == 0): ...
s647970260
p03625
u528825252
1503435967
Python
Python (3.4.3)
py
Runtime Error
17
2940
397
N = int(input()) A = list(map(int, input().split(' '))) B = sorted(list(set(A)), reverse=True) for i in range(len(B)): b = B[i] n = A.count(b) if n >= 2: if n >= 4: print(b*b) exit() elif: C = B[i+1:] for c in C: if A.count(...