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
s872534272
p03610
u260036763
1565914621
Python
Python (3.4.3)
py
Runtime Error
17
3188
75
s = input() t = '' i = 0 while i <= len(s-1): t += s[i] i += 2 print(t)
s851749657
p03610
u260036763
1565913826
Python
Python (3.4.3)
py
Runtime Error
37
3188
73
s = input() t = '' i = 0 while i <= len(s): t += s[i] i += 2 print(t)
s889909705
p03610
u260036763
1565913749
Python
Python (3.4.3)
py
Runtime Error
17
3188
67
s = input() t = '' while i <= len(s): t += s[i] i += 2 print(t)
s032554620
p03610
u260036763
1565913736
Python
Python (3.4.3)
py
Runtime Error
17
3188
67
s = input() t = '' while i <= len(s): t += s[i] i += 2 print(s)
s925175397
p03610
u703442202
1565702259
Python
Python (3.4.3)
py
Runtime Error
17
2940
90
s = inptu() s = list(s) s_cut = s[0::2] ans = "" for i in s_cut: ans += i print(ans)
s415960101
p03610
u882359130
1565580924
Python
Python (3.4.3)
py
Runtime Error
17
2940
233
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; int l; l = s.length(); string ans = ""; for(int i=0; i<l; i++){ if(i%2 == 0) ans += s[i]; } cout << ans; return 0; }
s599031536
p03610
u425834921
1561842615
Python
Python (3.4.3)
py
Runtime Error
17
2940
36
s = str(input()) print(0:len(s):2)
s510175031
p03610
u425834921
1561842572
Python
Python (3.4.3)
py
Runtime Error
17
2940
34
s = str(input()) print(0:len(s):2)
s801717298
p03610
u538956308
1561557464
Python
Python (3.4.3)
py
Runtime Error
17
3188
82
s = input() N = len(s) for i in range(N): if i%2 ==1: s.pop(i) print(s)
s984590805
p03610
u370429695
1560108939
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
s = input() cnt = 0 strings = "" for i in s: if cnt % 2 == 0: strings.= strings + i print(strings)
s916960288
p03610
u518042385
1557546963
Python
Python (3.4.3)
py
Runtime Error
46
3316
68
l=input() w="" c=1 while len(w)<len(l): w+=l[c] c+=2 print(w)
s923743413
p03610
u077291787
1556713489
Python
Python (3.4.3)
py
Runtime Error
28
3188
103
# ABC072B - OddString s = input() ans = "" for i in range(0, len(s) + 1, 2): ans += s[i] print(ans)
s243140341
p03610
u714300041
1555375741
Python
Python (3.4.3)
py
Runtime Error
18
2940
89
string = input() i = 1 ans = " for s in string: if i % 2 != 0: ans += s print(ans)
s972793037
p03610
u610473220
1555201416
Python
Python (3.4.3)
py
Runtime Error
19
3188
105
s = input() num = len(s) i = 0 ans = [] while i <= num/2: ans[i] = s[2 * i] ANS = sum(ans) print(ANS)
s397281362
p03610
u553070631
1553873090
Python
Python (3.4.3)
py
Runtime Error
19
3956
79
li=list(input()) n=1 c=len(li)+n while n<=c: li=li.pop(n) n=n+1 print(li)
s753118299
p03610
u553070631
1553873040
Python
Python (3.4.3)
py
Runtime Error
19
3956
81
li=list(input()) n=1 c=len(li)+n while n<=c: li=li.pop(n) n=n+1 print(a)
s021036967
p03610
u309039873
1553872481
Python
Python (3.4.3)
py
Runtime Error
19
3956
77
S = list(input()) for i in range(S): if i % 2 == 0: print(S[i], end='')
s162180855
p03610
u750612138
1553720691
Python
Python (3.4.3)
py
Runtime Error
17
2940
25
print(str(input(N))[::2])
s072782159
p03610
u077019541
1552785395
Python
Python (3.4.3)
py
Runtime Error
17
2940
7
atcoder
s469048689
p03610
u979060189
1551272069
Python
Python (3.4.3)
py
Runtime Error
27
3572
109
s = str(input()) odd =[] n = int(len(s)/2) for i in range(n+1): odd.append(s[2*i]) print(''.join(odd))
s328074152
p03610
u083960235
1550875456
Python
Python (3.4.3)
py
Runtime Error
17
2940
191
#include<iostream> using namespace std; int main(){ string s; cin>>s; int N=s.size(); string ans; for(int i=0;i<N;i+=2) ans+=s[i]; //in string, it means odd number cout<<ans<<endl; }
s357049147
p03610
u928784113
1544844794
Python
Python (3.4.3)
py
Runtime Error
18
2940
121
# -*- coding: utf-8 -*- S = str(input()) a.[] for i in range(len(S)): if i % 2 == 1: a.append(S[i]) print(a.join())
s674814085
p03610
u928784113
1544747544
Python
Python (3.4.3)
py
Runtime Error
18
3188
94
# -*- coding: utf-8 -*- s = str(input()) for i in range(len(S) / 2): s.pop(2*i - 1) print(s)
s832166983
p03610
u794603719
1542155188
Python
Python (3.4.3)
py
Runtime Error
20
3956
100
a = list(input()) b = [] for i in range(a): if i % 2 == 0: b.append(a[i]) print("".join(b))
s247114278
p03610
u794603719
1542155152
Python
Python (3.4.3)
py
Runtime Error
19
3956
98
a = list(input()) b = [] for i in range(a): if i % 2 == 0: b.push(a[i]) print("".join(b))
s087086446
p03610
u848647227
1542128850
Python
Python (3.4.3)
py
Runtime Error
34
5212
96
a = input() ar = [] for i in range(len(a)): if i % 2 == 0: ar.append(i) print("".join(ar))
s875495424
p03610
u426108351
1541708425
Python
Python (3.4.3)
py
Runtime Error
39
3188
86
s = input() ans = "" for i in range(len(s)//2 + 1): ans += str(s[2*i]) print(ans)
s585757987
p03610
u790877102
1538626694
Python
Python (3.4.3)
py
Runtime Error
17
3188
75
s = input() ans = "" for i in range(len(s),2): ans += s[i] print(ans)
s176825401
p03610
u790877102
1538626529
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
s = input() ans = "" for i in range(0,len(s),2) ans += s[i] print(ans)
s830245271
p03610
u790877102
1538624532
Python
Python (3.4.3)
py
Runtime Error
17
3188
58
S = input() for i in S: if i%2>0: continue print('i')
s302722084
p03610
u140251125
1529515157
Python
Python (3.4.3)
py
Runtime Error
17
2940
119
import math # input s = input() ans = '' for i in range(math.ceil(len(s) // 2): ans = ans + s[2 * i] print(ans)
s286208960
p03610
u140251125
1529515104
Python
Python (3.4.3)
py
Runtime Error
30
3188
100
# input s = input() ans = '' for i in range(len(s) // 2 + 1): ans = ans + s[2 * i] print(ans)
s928431531
p03610
u591295155
1524936044
Python
Python (3.4.3)
py
Runtime Error
19
3064
102
s = input() s1 = s[0] for i in range (len(s)): if i%2 == 0 && i > 0: s1 += s[i] print(s1)
s718524429
p03610
u321354941
1520542106
Python
Python (3.4.3)
py
Runtime Error
20
4264
41
s = list(str(input())) print(t = s[0::2])
s871923529
p03610
u667949809
1519863161
Python
Python (3.4.3)
py
Runtime Error
17
3188
70
s=input() outp="" for i in range(len(s),2): outp+=s[i] print(outp)
s052583131
p03610
u319612498
1519439332
Python
Python (3.4.3)
py
Runtime Error
17
2940
78
s=input() a="" for i in range(len(s): if i%2==0: a=a+s[i] print(a)
s877348157
p03610
u019584841
1519322318
Python
Python (3.4.3)
py
Runtime Error
18
3188
69
l=input() n=(len(l)+1)//2 for i in range(n): odd+=l[2*i] print(odd)
s238839749
p03610
u748135969
1518639460
Python
Python (3.4.3)
py
Runtime Error
17
3188
84
s = input() s_add for i in range(len(s)): if i % 2 == 1: s_add = s[i] print(s)
s230011632
p03610
u730606460
1516750170
Python
Python (2.7.6)
py
Runtime Error
10
2568
100
string = "" for ind in range(len(s)): if ind + 1 % 2 = 1: string += s[ind] print string
s024620903
p03610
u586577600
1515871848
Python
Python (3.4.3)
py
Runtime Error
17
2940
69
s = input() print(''.join([s[i] if i%2 == 1 for i in range(len(s))]))
s764084830
p03610
u825528847
1509618888
Python
Python (3.4.3)
py
Runtime Error
17
2940
63
s = input() print("".join([s[i] for i in range(0, len(s), 2)))
s120300061
p03610
u499259667
1505004387
Python
Python (2.7.6)
py
Runtime Error
21
2820
103
s=raw_input() slen=len(s) count=0 os="" while count <= slen: os=os+s[count] count+=2 print(os)
s167211581
p03610
u499259667
1505004241
Python
Python (2.7.6)
py
Runtime Error
21
4356
113
s=raw_input() slen=len(s) count=0 os="" for i in range(int(slen/2)+1): os=os+s[count] count+=2 print(os)
s749566040
p03610
u112465297
1504551509
Python
Python (3.4.3)
py
Runtime Error
16
2940
42
s=str(input()) x=list(s) if i in len(x):
s797925539
p03610
u359314361
1504494432
Python
Python (3.4.3)
py
Runtime Error
17
2940
138
input_line1 = raw_input() c = 1 p = "" for v in input_line1: if c == 1: p += v c = 0 else: c += 1 print(p)
s061427687
p03610
u359314361
1504494343
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
input_line1 = raw_input() c = 1 p = "" for v in input_line1: if c == 1: p += v c = 0 else: c += 1
s098573438
p03610
u068851354
1504404910
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
import sys; str=sys.argv[1] r='' for x in range(0, len(str)): if(x%2==0): r+=str[x] print(r)
s583776613
p03610
u318119829
1504403028
Python
Python (3.4.3)
py
Runtime Error
39
3188
79
s = input() i = 0 out = '' while i <= len(s): out += s[i] i += 2 print(out)
s282724602
p03610
u318119829
1504402862
Python
Python (3.4.3)
py
Runtime Error
56
3828
59
s = input() i = 0 while i <= len(s): print(s[i]) i += 2
s234466649
p03610
u484578205
1504401830
Python
Python (3.4.3)
py
Runtime Error
17
2940
82
ans = "" for i in range(len(s)): if(i % 2 == 0): ans = ans + s[i] print(ans)
s531499991
p03610
u484578205
1504401693
Python
Python (3.4.3)
py
Runtime Error
17
2940
94
s = intpu() ans = "" for i in range(len(s)): if(i % 2 == 0): ans = ans + s[i] print(ans)
s655398742
p03611
u821251381
1601132357
Python
Python (3.8.2)
py
Runtime Error
88
20036
180
N,*A =map(int,open(0).read().split()) L = [0 for i in range(N+3)] for a in A: L[a]+=1 ans = 0 for i in range(N+3): S = sum(L[i:i+3]) if ans < S: ans = S print(ans)
s355514339
p03611
u821251381
1601132310
Python
Python (3.8.2)
py
Runtime Error
92
20128
180
N,*A =map(int,open(0).read().split()) L = [0 for i in range(N+3)] for a in A: L[a]+=1 ans = 0 for i in range(N+2): S = sum(L[i:i+3]) if ans < S: ans = S print(ans)
s391834777
p03611
u613920660
1600879457
Python
Python (3.8.2)
py
Runtime Error
109
20652
317
N=int(input()) a=list(map(int,input().strip().split())) dp=[0 for n in range(max(a)+1)] for n in range(N): dp[a[n]]+=1 ans=0 for n in range(len(dp)): if n==0: ans=max(ans,a[0]+a[1]) elif n==N-1: ans=max(ans,a[N-2]+a[N-1]) else: ans=max(ans,dp[n-1]+dp[n]+dp[n+1]) print(ans)
s516297970
p03611
u613920660
1600879000
Python
Python (3.8.2)
py
Runtime Error
100
20648
210
N=int(input()) a=list(map(int,input().strip().split())) dp=[0 for n in range(max(a))] for n in range(N): dp[a[n]-1]+=1 ans=0 for n in range(1,len(dp)-1): ans=max(ans,dp[n-1]+dp[n]+dp[n+1]) print(ans)
s898120950
p03611
u546440137
1600736270
Python
Python (3.8.2)
py
Runtime Error
2206
20728
294
n = int(input()) a = list(map(int,input().split())) M = max(a) def counter(x): cnt = 0 for i in range(n): if a[i] == x or a[i] - 1 == x or a[i] + 1 == x: cnt += 1 return cnt cnt_list =[] for j in range(M): cnt_list.append(counter(j)) print(max(cnt_list))
s085494505
p03611
u883621917
1600657045
Python
PyPy3 (7.3.0)
py
Runtime Error
93
84912
324
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) n = int(input()) a = list(map(int, input().split())) t = [0] * (max(a) + 1) for v in a: t[v] += 1 if max(a) <= 1: print(t[0] + t[1]) sys.exit(0) ans = 0 for i in range(0, max(a) - 1): ans = max(ans, t[i] + t[i+1] + t[i+2]) print(a...
s810952810
p03611
u883621917
1600657012
Python
PyPy3 (7.3.0)
py
Runtime Error
96
85068
324
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) n = int(input()) a = list(map(int, input().split())) t = [0] * (max(a) + 1) for v in a: t[v] += 1 if max(a) <= 1: pritn(t[0] + t[1]) sys.exit(0) ans = 0 for i in range(0, max(a) - 1): ans = max(ans, t[i] + t[i+1] + t[i+2]) print(a...
s807742374
p03611
u080364835
1600649330
Python
Python (3.8.2)
py
Runtime Error
103
20872
249
n = int(input()) al = list(map(int, input().split())) if n == 1: print(1) else: m = max(al) num = [0]*m for a in al: num[a-1] += 1 ans = 0 for i in range(m-3): ans = max(ans, sum(num[i:i+3])) print(ans)
s527012630
p03611
u949315872
1600561152
Python
Python (3.8.2)
py
Runtime Error
2206
22256
381
import statistics import math N = int(input()) a = list(map(int, input().split())) a.sort() num = a[N-1] cnt_list = [] cnt = 0 cnt_v = 0 for j in range(num+1): for i in range(cnt_v,N): if a[i] == j: cnt += 1 cnt_v += 1 cnt_list.append(cnt) cnt = 0 sub = [] for i in range(num-1): sub.appen...
s661625432
p03611
u949315872
1600560489
Python
Python (3.8.2)
py
Runtime Error
2206
20884
319
N = int(input()) a = list(map(int, input().split())) a.sort() num = a[N-1] cnt_list = [] cnt = 0 for j in range(num+1): for i in range(N): if a[i] == j: cnt += 1 cnt_list.append(cnt) cnt = 0 sub = [] for i in range(num-1): sub.append(cnt_list[i]+cnt_list[i+1]+cnt_list[i+2]) print(max(sub))
s523238694
p03611
u703823201
1600521833
Python
Python (3.8.2)
py
Runtime Error
80
20756
305
import sys N = int(input()) A = list(map(int, input().split())) if N == 1: print(1) sys.exit(0) cnt = [0 for _ in range(10**5)] for a in A: if a == 0: cnt[a] += 1 cnt[a+1] += 1 else: cnt[a-1] += 1 cnt[a] += 1 cnt[a+1] += 1 print(max(cnt))
s482559245
p03611
u666550725
1599829663
Python
PyPy3 (7.3.0)
py
Runtime Error
86
74652
164
N = int(input()) A = list(map(int, input().split())) d = {} for a in A: for i in range(a - 1, a + 2) d[i] = d.get(i, 0) + 1 x = sorted(d.values()) print(max(x))
s434117533
p03611
u705418271
1599773841
Python
Python (3.8.2)
py
Runtime Error
2206
20668
212
n=int(input()) a=list(map(int,input().split())) if n==1: print(1) exit() a.sort() b=[] for i in range(a[0],a[n-1]-1): ans=0 ans+=a.count(i)+a.count(i+1)+a.count(i+2) b.append(ans) b.sort() print(b[-1])
s501692620
p03611
u531220228
1599435703
Python
Python (3.8.2)
py
Runtime Error
329
32216
174
N, *A = map(int, open(0).read().split()) import numpy as np max_a = max(A) mat = np.array([0]*max_a) for a in A: mat[max(a-2, 0):min(a+1,max_a)] += 1 print(max(mat))
s141476984
p03611
u650932312
1599058958
Python
Python (3.8.2)
py
Runtime Error
2206
22464
243
N = int(input()) a = list(map(int, input().split())) if len(a) == 1: print(1) exit() list = [] for i in range(N): list += [a[i]-1,a[i],a[i]+1] num = [] for i in range(min(a),max(a)): num.append(list.count(i)) print(max(num))
s033980522
p03611
u650932312
1599058835
Python
Python (3.8.2)
py
Runtime Error
2206
22340
202
N = int(input()) a = list(map(int, input().split())) list = [] for i in range(N): list += [a[i]-1,a[i],a[i]+1] num = [] for i in range(min(a),max(a)): num.append(list.count(i)) print(max(num))
s155288623
p03611
u450028885
1599024597
Python
Python (3.8.2)
py
Runtime Error
2206
20744
557
n = int(input()) a_list = list(map(int, input().split())) s1 = len(a_list) a_set = list(set(a_list)) s2 = len(a_set) max_cnt = 0 if s1 == 1 : max_cnt = 1 elif s1 == 2 : if s2 == 1 : max_cnt = 2 else : max_cnt = 1 else: cnt0 = a_list.count(a_set[0]) cnt1 = a_list.count(a_set[1]) ...
s891590177
p03611
u198930868
1598728638
Python
Python (3.8.2)
py
Runtime Error
85
20692
171
n = int(input()) a = list(map(int,input().split())) s = sorted(a) k = s[(n//2)-1] ans = 0 for i in s: if i == s[k] or i == s[k]-1 or i ==s[k]+1: ans += 1 print(ans)
s536284546
p03611
u860002137
1598403967
Python
Python (3.8.2)
py
Runtime Error
118
24540
241
from collections import defaultdict n = int(input()) arr = list(map(int, input().split())) d = defaultdict(int) for x in arr: d[x] += 1 ans = [] for i in range(1, max(arr)): ans.append(d[i - 1] + d[i] + d[i + 1]) print(max(ans))
s616190509
p03611
u860002137
1598403945
Python
Python (3.8.2)
py
Runtime Error
47
20692
204
n = int(input()) arr = list(map(int, input().split())) d = defaultdict(int) for x in arr: d[x] += 1 ans = [] for i in range(1, max(arr)): ans.append(d[i - 1] + d[i] + d[i + 1]) print(max(ans))
s088572163
p03611
u814271993
1598141937
Python
Python (3.8.2)
py
Runtime Error
86
20596
274
import collections n = int(input()) l = sorted(list(map(int, input().split())) ) c = collections.Counter(l) L = [0]*10**5 M = [0]*10**5 for x,y in c.items(): L[x-1] += y M[0] = L[0] M[n] = L[n] for i in range(1,10**5-1): M[i] = L[i-1] + L[i] + L[i+1] print(max(M))
s838971101
p03611
u397496203
1598061400
Python
PyPy3 (7.3.0)
py
Runtime Error
103
74704
239
import numpy as np N = int(input()) A = np.array(input().split(), dtype = np.int32) counter = np.bincount(A) if len(counter) <= 2: answer = counter.sum() else: answer = (counter[2:] + counter[1:-1] + counter[:-2]).max() print(answer)
s559611447
p03611
u612975321
1598054142
Python
Python (3.8.2)
py
Runtime Error
48
20700
185
n = int(input()) a = list(map(int, input().split())) cnt = [0]*10**5+5 for i in a: cnt[i] += 1 ans = 0 for i in range(1, 10**5+3): ans = max(ans, sum(cnt[i-1:i+2])) print(ans)
s904303599
p03611
u953379577
1598033894
Python
Python (3.8.2)
py
Runtime Error
25
10176
137
n = int(input()) a = list(map(int,input(),split())) s = [0]*max(a)+2 for i in a: i += 1 s[i-1] += 1 s[i] += 1 s[i+1] += 1
s988419476
p03611
u600261652
1597981396
Python
Python (3.8.2)
py
Runtime Error
74
20892
158
N = int(input()) A = list(map(int, input().split())) count = [0]*10**5 for i in A: count[i-1] += 1 count[i] += 1 count[i+1] += 1 print(max(count))
s390816313
p03611
u107915058
1597767352
Python
Python (3.8.2)
py
Runtime Error
76
20924
152
N = int(input()) a = list(map(int, input().split())) cnt = [0]*(10**5+1) for i in a: cnt[i] += 1 cnt[i+1] += 1 cnt[i+2] += 1 print(max(cnt))
s881021018
p03611
u107915058
1597767037
Python
Python (3.8.2)
py
Runtime Error
76
20864
150
N = int(input()) a = list(map(int, input().split())) cnt = [0]*(10**5) for i in a: cnt[i-1] += 1 cnt[i] += 1 cnt[i+1] += 1 print(max(cnt))
s031439769
p03611
u107915058
1597766999
Python
Python (3.8.2)
py
Runtime Error
76
20896
150
N = int(input()) a = list(map(int, input().split())) cnt = [0]*(10**5) for i in a: cnt[i-1] += 1 cnt[i] += 1 cnt[i+1] += 1 print(max(cnt))
s959774047
p03611
u481250941
1597607045
Python
Python (3.8.2)
py
Runtime Error
108
28488
1227
# # abc072 c # import sys from io import StringIO import unittest class TestClass(unittest.TestCase): def assertIO(self, input, output): stdout, stdin = sys.stdout, sys.stdin sys.stdout, sys.stdin = StringIO(), StringIO(input) resolve() sys.stdout.seek(0) out = sys.stdout....
s958589019
p03611
u191423660
1597562812
Python
Python (3.8.2)
py
Runtime Error
47
20712
272
def solve(): N = int(input()) a = list(map(int, input().split())) lists = [0] * ((10**5)+2) for i in range(a): lists[v] += 1 lists[v+1] += 1 lists[v-1] += 1 print(max(lists)) if __name__ == "__main__": solve()
s778697725
p03611
u191423660
1597562758
Python
Python (3.8.2)
py
Runtime Error
22
9048
271
def solve(): N = int(input()) a = list(map(int, input().split())) lists = [0] * ((10**5)+2) for i in range(a): lists[v] += 1 lists[v+1] += 1 lists[v-1] += 1 print(max(lists)) if __name__ = "__main__": solve()
s788834777
p03611
u739843002
1597464350
Python
Python (3.8.2)
py
Runtime Error
100
20564
375
import collections def main(): N = int(input()) A = [int(a) for a in input().split(" ")] CA = collections.Counter(A) minA = min(A) maxA = max(A) X = [CA[i] for i in range(minA, maxA + 1)] if len(X) == 1: print(X[0]) return 0 if len(X) == 2: print(X[0] + X[1]) Y = [X[j] + X[j+1] + X[j...
s309801416
p03611
u739843002
1597464173
Python
Python (3.8.2)
py
Runtime Error
2206
19992
330
def main(): N = int(input()) A = [int(a) for a in input().split(" ")] minA = min(A) maxA = max(A) X = [A.count(i) for i in range(minA, maxA + 1)] if len(X) == 1: print(X[0]) return 0 if len(X) == 2: print(X[0] + X[1]) Y = [X[j] + X[j+1] + X[j+2] for j in range(len(X) - 2)] print(max(Y...
s315612793
p03611
u637289184
1597371054
Python
PyPy3 (7.3.0)
py
Runtime Error
101
74860
339
A = list(map(int, input().split())) B=[] C=[] for i in range(N): B.append(A[i]-1) for i in range(N): C.append(A[i]+1) D=[] D=A+B+C mx=0 for i in D: cnt=0 for j in range(N): if i==A[j]: cnt+=1 elif i==B[j]: cnt+=1 elif i==C[j]: cnt+=1 mx=ma...
s735617811
p03611
u869790980
1596943155
Python
PyPy2 (7.3.0)
py
Runtime Error
386
84244
146
import collections n,cc = raw_input(),collections.Counter(map(int, raw_input().split())) print max([cc[k] + cc[k+1] + cc[k-1] for k in cc] or [0)
s659223415
p03611
u869790980
1596943138
Python
PyPy2 (7.3.0)
py
Runtime Error
66
63552
127
n,cc = raw_input(),collections.Counter(map(int, raw_input().split())) print max([cc[k] + cc[k+1] + cc[k-1] for k in cc] or [0)
s395767312
p03611
u472883337
1596399785
Python
Python (3.8.2)
py
Runtime Error
2206
20800
227
N = input() a = list(map(int, input().split())) M = max(a) l = list() for i in range(1, M): x = a.count(i - 1) y = a.count(i) z = a.count(i + 1) l.append(x + y + z) x = y y = z z = a.count(i + 2) print(max(l))
s098270525
p03611
u679089074
1596149169
Python
Python (3.8.2)
py
Runtime Error
64
20836
178
#10 n = int(input()) a = list(map(int,input().split())) cnt = [0 for i in range(10**5)] for i in a: cnt[i] += 1 cnt[i+1] += 1 cnt[i+2] += 1 print(max(cnt))
s928879688
p03611
u955691979
1595690103
Python
PyPy3 (7.3.0)
py
Runtime Error
168
98696
421
n = int(input()) a = list(map(int,input().split())) if n == 1: print(1) exit() a.sort() a.append(-1) b = [] c = [] cn = 1 for i in range(n): if a[i] != a[i+1]: b.append(cn) c.append(a[i]) cn = 1 else: cn += 1 #print(a) #print(b) #print(c) k = [] k_ = [] for i in range(1,len(b)-1): k_.app...
s191970203
p03611
u171065106
1595562407
Python
Python (3.8.2)
py
Runtime Error
47
20752
342
n = int(input()) a = list(map(int, input().split())) def func(a): count = [0] * (max(a)+1) for i in a: count[i] += 1 max_n = 0 for j in range(1, len(count)-1): max_n = max(max_n, count[j] + count[j-1] + count[j+1]) max_n = max(max_n, count[-1] + count[-2]) return max_n ptint(n if len(set(...
s628567271
p03611
u171065106
1595546451
Python
Python (3.8.2)
py
Runtime Error
98
20692
269
n = int(input()) a = list(map(int, input().split())) count = [0] * (max(a)+1) for i in a: count[i] += 1 max_n = 0 for j in range(1, len(count)-1): max_n = max(max_n, count[j] + count[j-1] + count[j+1]) max_n = max(max_n, count[-1] + count[-2]) print(max_n)
s878367237
p03611
u171065106
1595546320
Python
Python (3.8.2)
py
Runtime Error
97
20840
269
n = int(input()) a = list(map(int, input().split())) count = [0] * (max(a)+1) for i in a: count[i] += 1 max_n = 0 for j in range(1, len(count)-1): max_n = max(max_n, count[j] + count[j-1] + count[j+1]) max_n = max(max_n, count[-1] + count[-2]) print(max_n)
s404596466
p03611
u728200259
1594660954
Python
Python (3.8.2)
py
Runtime Error
26
9060
384
IN = iter(Input.split('\n')).__next__ def input(): return IN() N = int(input()) l = list(map(int, input().split())) result_list = [] for a in l: result_list.extend([a-1,a,a+1]) result_list import collections count = collections.Counter(result_list) # dictionary としてCounter({5: 1, 1: 3, 3: 2, 2: 2, 4: 2}...
s516188862
p03611
u583507988
1593996235
Python
Python (3.8.2)
py
Runtime Error
26
9040
212
n = int(input()) a = list(map(int, input().split())) if n == 1: print(1) else: ans = 0 for i in range(1, max(a)): res = a.count(i) + a.count(i+1) + a.count(i-1) ans = max(ans, res) print(ans
s618801681
p03611
u998741086
1593888600
Python
Python (3.8.2)
py
Runtime Error
25
9008
432
!/usr/bin/env python3 n = int(input()) a = list(map(int, input().split())) if n == 1: print(1) exit(0) if n == 2: if abs(a[0]-a[1]) <= 2: print(2) else: print(1) exit(0) if n >= 3: d = [0 for _ in range(100001)] for i in range(n): d[a[i]] += 1 ans = 0 for ...
s932959779
p03611
u998741086
1593888147
Python
Python (3.8.2)
py
Runtime Error
92
20560
428
#!/usr/bin/env python3 n = int(input()) a = list(map(int, input().split())) if n == 1: print(1) exit(0) if n == 2: if abs(a[0]-a[1]) <= 2: print(2) else: print(1) exit(0) if n >= 3: d = [0 for _ in range(n)] for i in range(n): d[a[i]] += 1 ans = 0 for i in...
s415819965
p03611
u998741086
1593888038
Python
Python (3.8.2)
py
Runtime Error
52
20612
432
#!/usr/bin/env python3 n = int(input()) a = list(map(int, input().split())) if n == 1: print(1) exit(0) if n == 2: if abs(a[0]-a[1]) <= 2: print(2) else: print(1) exit(0) if n >= 3: d = [0 for _ in range(10)] for i in range(n): d[a[i]] += 1 ans = 0 for i i...
s780869292
p03611
u998741086
1593887188
Python
Python (3.8.2)
py
Runtime Error
50
20816
430
#!/usr/bin/env python3 n = int(input()) a = list(map(int, input().split())) if n == 1: print(1) exit(0) if n == 2: if abs(a[0]-a[1]) <= 2: print(2) else: print(1) exit(0) if n >= 3: d = [0 for _ in range(10)] for i in range(n): d[a[i]] += 1 ans = 0 for i ...
s305077522
p03611
u188827677
1593614397
Python
Python (3.8.2)
py
Runtime Error
83
20824
340
n = int(input()) a = list(map(int, input().split())) nums = [0]*(max(a)+1) for i in a: nums[i] += 1 if n == 1: print(1) exit() elif n == 2: if abs(a[0]-a[1]) <= 2: print(2) else: print(1) exit() ans = 0 for i in range(1,n-1): if ans < nums[i-1] + nums[i] + nums[i+1]: ans = nums[i-1] + nums[i] + n...