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
s504512732
p03695
u821251381
1600989779
Python
Python (3.8.2)
py
Runtime Error
116
26932
322
import numpy as np N,*A=map(int,open(0).read().split()) A=(np.array(A)//400).astype("int32") color_num=0 colors=np.zeros(9) for a in A: colors[a]+=1 c=np.count_nonzero(colors[:8]) min_color_num = 1 if (c==0 and colors[-1]>0) else c max_color_num = min(8,c+max(int(colors[-1]),0)) print(min_color_num,max_color_nu...
s532777539
p03695
u521323621
1600825995
Python
Python (3.8.2)
py
Runtime Error
30
9068
213
n = int(input()) a = list(map(int, input().split())) c = [0]*9 for i in a: t = i // 400 if t < 8: c[t] = 1 else: c[8] += 1 cmin = max(sum(c[:-1]), min(c[8], 1)) cmax = min(sum(c)) print(cmin, cmax)
s637066129
p03695
u521323621
1600824238
Python
Python (3.8.2)
py
Runtime Error
24
9136
235
n = int(input()) a = list(map(int, input().split())) c = [0]*9 for i in a: t = i // 400 if t < 8: c[t] = 1 elif t >= 8: c[t] += 1 cmin = max(sum(c[:-1]), min(c[8], 1)) cmax = min(sum(c[:-1]) + c[8], 8) print(cmin, cmax)
s650215137
p03695
u773686010
1600789106
Python
Python (3.8.2)
py
Runtime Error
21
9040
333
N = int(input()) N_List = list(map(int,input().split())) NR_List = [i // 400 for i in N_List] Number_NRD = len(set([i for i in NR_List if i < 8])) Number_NRU = len([i for i in NR_List if i >= 8]) max_p= (Number_NRD + Number_NRU,8)[Number_NRD +Number_NRU>=8] min_P= (Number_NRD,1)[Number_NRD == 0] print(str(min_p) + " " ...
s083955588
p03695
u773686010
1600788966
Python
Python (3.8.2)
py
Runtime Error
21
9200
323
N = int(input()) N_List = list(map(int,input().split())) NR_List = [i // 400 for i in N_List] Number_NRD = len(set([i for i in NR_List if i < 8])) Number_NRU = len([i for i in NR_List if i >= 8]) max_p= (Number_NRD + Number_NRU,8)[Number_NRD +Number_NRU>=8] min_P= (Number_NRD,1)[Number_NRD == 0] print(min_p + " " + max...
s809726713
p03695
u650932312
1600786258
Python
Python (3.8.2)
py
Runtime Error
28
9228
272
N = int(input()) a = list(map(int, input().split())) free = 0 color = [0]*9 for i in range(N): if a[i]>3200: color[8] += 1 color[a[i]//400] += 1 mini = 0 for i in color[0:8]: if i != 0: mini += 1 print(str(mini)+' '+str(min(mini+color[8],9)))
s334073818
p03695
u698868214
1600097211
Python
Python (3.8.2)
py
Runtime Error
22
9136
498
N = int(input()) A = list(map(int,input().split())) hai = 0 tya = 0 mizu = 0 ao = 0 ki = 0 dai = 0 aka = 0 mu = 0 for a in A: if a <= 399: hai = 1 elif a <= 799: tya = 1 elif a <= 1199: mizu = 1 elif a <= 1599: ao = 1 elif a <= 1999: ki = 1 elif a <= 2399: dai = 1 elif a <= 3199:...
s058926794
p03695
u703823201
1600011438
Python
Python (3.8.2)
py
Runtime Error
27
9048
704
N = int(input()) A = list(map(int, input().split())) cnt = [0]*8 c = 0 for a in A: if a <= 399: cnt[0] += 1 elif a >= 400 and a <= 799: cnt[1] += 1 elif a >= 800 and a <= 1199: cnt[2] += 1 elif a >= 1200 and a <= 1599: cnt[3] += 1 elif a >= 1600 and a <= 1999: ...
s444583807
p03695
u365156087
1599860209
Python
Python (3.8.2)
py
Runtime Error
23
9124
232
N = int(input()) R = list(map(int, input().split())) X = [0]*8 p = 0 for r in R: if r >= 3200: p += 1 else: X[r//400] = 1 s = sum(X) if s == 0: print(str(1) + " " + str(cnt)) else: print(str(s) + " " + str(s + cnt))
s652786317
p03695
u666550725
1599851827
Python
PyPy3 (7.3.0)
py
Runtime Error
98
68732
269
N = int(input()) A = list(map(int, input().split())) X = [0 for i in range(8)] cnt = 0 for a in A: if a == 3200: cnt += 1 else: X[a // 400] = 1 s = sum(X) if s == 0: print(str(1) + " " + str(min(8, cnt))) else: print(str(s) + " " + str(min(8, s + cnt)))
s417003111
p03695
u705418271
1599774849
Python
Python (3.8.2)
py
Runtime Error
20
8876
461
n=int(input()) a=list(map(int,input().split())) a1=0 b=0 c=0 d=0 e=0 f=0 g=0 h=0 ans=0 for i in range(n): if 1<=a[i]<=399: a1=1 elif 400<=a[i]<=799: b=1 elif 800<=a[i]<=1199: c=1 elif 1200<=a[i]<=1599: d=1 elif 1600<=a[i]<=1999: e=1 elif 2000<=a[i]<=2399: f=1 elif 2400<=a[i]<=2799:...
s945901836
p03695
u359358631
1599605398
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74672
336
def main(): n = int(input()) a_list = list(map(int, input().split())) rate_list = [0] * 9 for a in a_list: rate_list[a // 400] += 1 min_cnt = 0 for i in range(8): if rate_list[i] > 0: min_cnt += 1 print(min_cnt, min_cnt + rate_list[-1]) if __name__ == "__main...
s534959099
p03695
u909224749
1599364598
Python
Python (3.8.2)
py
Runtime Error
25
9100
673
N = int(input()) a = list(map(int, input().split())) color = set() rainbow = 0 for n in range(N): if 1 <= a[n] < 400: color.add("gray") elif 400 <= a[n] < 800: color.add("brown") elif 800 <= a[n] < 1200: color.add("green") elif 1200<= a[n] < 1600: color.add("water") elif 1600 <= a[n] < 2000: ...
s044052127
p03695
u259190728
1599248791
Python
Python (3.8.2)
py
Runtime Error
27
9156
482
n=int(input()) x=list(map(int,input().split())) l=[0 for i in range(10)] d=0 for i in x: if i in range(400): l[0]+=1 elif i in range(400,800): l[1]+=1 elif i in range(800,1200): l[2]+=1 elif i in range(1200,1600): l[3]+=1 elif i in range(1600,2000): l[4]+=1 elif i in range(2000,2400): ...
s087058018
p03695
u259190728
1599248731
Python
Python (3.8.2)
py
Runtime Error
22
9188
481
n=int(input()) l=list(map(int,input().split())) x=[0 for i in range(10)] d=0 for i in l: if i in range(400): l[0]+=1 elif i in range(400,800): l[1]+=1 elif i in range(800,1200): l[2]+=1 elif i in range(1200,1600): l[3]+=1 elif i in range(1600,2000): l[4]+=1 elif i in range(2000,2400): ...
s587911783
p03695
u510331904
1599106139
Python
PyPy3 (7.3.0)
py
Runtime Error
103
74700
604
#!/usr/bin/env python3 import sys def input(): return sys.stdin.readline()[:-1] def main(): N = int(input()) a = list(map(int, input().split())) l = [0] * 9 for i in range(N): l[a[i] // 400] += 1 ans_min = 0 for i in range(8): if l[i] > 0: ans_min += 1 gol...
s181840449
p03695
u802234211
1599016176
Python
Python (3.8.2)
py
Runtime Error
25
8876
423
n = int(input()) rate = list(map(int,input().split())) ratecolor = 0 free = 0 ratecolor = 0 color = [0]*9 for i in range(n): if(rate[i] >= 3200): free += 1 break for j in range(9): if(rate[i] < j*400 + 400): if(color[j] == 0): color[j] += 1 ...
s667472435
p03695
u802234211
1599016004
Python
Python (3.8.2)
py
Runtime Error
29
9132
457
n = int(input()) rate = list(map(int,input().split())) ratecolor = 0 free = 0 ratecolor = 0 color = [0]*9 for i in range(n): for j in range(13): if(rate[i] < j*400 + 400): if(rate[i] >= 3200): free += 1 break if(color[j] == 0 and rate[i] < 3200): ...
s952085414
p03695
u481250941
1598915507
Python
Python (3.8.2)
py
Runtime Error
22
9168
1293
# # abc064 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.r...
s799068693
p03695
u465652095
1598907330
Python
Python (3.8.2)
py
Runtime Error
25
9300
1256
N = int(input()) A = list(map(int, input().split())) rate = {"a":0, "b":0, "c":0, "d":0, "e":0, "f":0, "g":0, "h":0} ratez = {"z":0} for i in range(N): if A[i] >=1 and A[i] <= 399: rate["a"] += 1 if A[i] >=400 and A[i] <= 799: rate["b"] += 1 if A[i] >=800 and A[i] <= 1199: rate["c"] ...
s312177576
p03695
u219831209
1598747724
Python
Python (3.8.2)
py
Runtime Error
26
9228
596
n = int(input()) a = list(map(int, input().split())) tuyoi = 0 c = [0, 0, 0, 0, 0, 0, 0, 0] for i in a: if 1 <= i <= 399: c[0] = 1 elif 400 <= i <= 799: c[1] = 1 elif 800 <= i <= 1199: c[2] = 1 elif 1200 <= i <= 1599: c[3] = 1 elif 1600 <= i <= 1999: c[4] = 1 ...
s618902373
p03695
u885634168
1598746522
Python
PyPy3 (7.3.0)
py
Runtime Error
107
74576
271
def cin(): return list(map(int,input().split())) N = cin()[0] a = cin() b = [0 for _ in range(9)] for i in range(N): ind = min(8, a[i] // 400) if ind <= 7: b[ind] = 1 else: b[ind] += 1 ma = sum(b) if cnt == N: mi = sum(b[:-1]) else: mi = 1 print(mi, ma)
s065056106
p03695
u087731474
1598724082
Python
Python (3.8.2)
py
Runtime Error
25
9084
366
n=int(input()) a=list(map(int,input().split())) rate=[0]*9 over=0 for i in a: for j in range(1,9): if 400*(j-1) <= i < 400*j: rate[j]=1 break elif i >= 3200: over+=1 break ansmin = rate.counta(1) ansmax = rate.count(1) if ansmin == 0: ansmin=1 if over > 0: ansmax = ansmax + ove...
s897993770
p03695
u580316619
1597940954
Python
Python (3.8.2)
py
Runtime Error
27
8972
403
n=int(input()) a=list(map(int,input().split())) b=[0]*9 for i in range(n): if a[i]<400: b[0]+=1 elif a[i]<800: b[1]+=1 elif a[i]<1200: b[2]+=1 elif a[i]<1600: b[3]+=1 elif a[i]<2000: b[4]+=1 elif a[i]<2400: b[5]+=1 elif a[i]<2800: b[6]+=1 elif a[i]<3200: b[7]+=1 else: ...
s014580968
p03695
u338597441
1597879433
Python
Python (3.8.2)
py
Runtime Error
25
9128
301
n=int(input()) a=list(map(int,input().split())) color=[] free=0 count=0 for i in a: if i//400<8 and i//400 not in color: color.append(i//400) Sans+=1 elif i>=3200: free+=1 Mans=Sans if free+count>8: Mans=8 else: Mans=count+free print(Sans,Mans)
s021675728
p03695
u510331904
1597798492
Python
Python (3.8.2)
py
Runtime Error
30
9196
326
#!/usr/bin/env python3 N = int(input()) a = list(map(int, input().split())) c = [0] * 9 for i in a: c[i // 400] += + 1 ans_min = 0 for i in range(8): if c[i] > 0: ans_min += 1 ans_max = ans_min if c[-1] == 0: pass else: f = c[-1] g = c.count(0) ans_max += min(f, g) print(ans_min, ans...
s205515814
p03695
u364862909
1597525781
Python
PyPy3 (7.3.0)
py
Runtime Error
105
73912
261
is_alive = [0]*8#各ランク N = int(input()) a = list(map(int,input().split())) count_over=0 for i in range(0,N,1): if a[i]>=3200: count_over +=1 else: is_alive[a[i]//400]=1 print(max(1,sum(is_alive)),min(sum(is_alive)+count_over))
s388946994
p03695
u869790980
1597451288
Python
PyPy2 (7.3.0)
py
Runtime Error
329
85824
242
import collections n = int(raw_input()) def f(ais): extra = 0 cc = collections.Counter() for ai in ais: if ai/400 < 8: cc[ai/400] +=1 else: extra +=1 print min(cc.values()), max(cc.values()) + extra f(map(int, raw_input().split()))
s478776300
p03695
u869790980
1597451238
Python
PyPy2 (7.3.0)
py
Runtime Error
351
84284
245
import collections n = int(raw_input()) def f(ais): extra = 0 cc = collections.Counter() for ai in ais: if ai/400 < 8: cc[ai/400] +=1 else: extra +=1 print min(cc.values()), max(cc.values()) + extra f(map(int, raw_input().split()))
s997691231
p03695
u869790980
1597451211
Python
PyPy2 (7.3.0)
py
Runtime Error
352
84256
213
import collections n = int(raw_input()) def f(ais): extra = 0 cc = collections.Counter() for ai in ais: if ai/400 < 8: cc[ai/400] +=1 else: extra +=1 print min(cc.values()), max(cc.values()) + extra
s686277871
p03695
u845650912
1597264968
Python
Python (3.8.2)
py
Runtime Error
23
8996
725
#C - Colorful Leaderboard N = int(input()) A = list(map(int, input().split())) n = 399 a, b, c, d, e, f, g, h, z = 0,0,0,0,0,0,0,0,0 for i in A: if i >= 1 and i <= n: a = 1 elif i >= 400 and i <= n + 400: b = 1 elif i >= 2*400 and i <= 2*400 + n: c = 1 elif i >= 3*400 and i <...
s673205472
p03695
u249987458
1597194555
Python
Python (3.8.2)
py
Runtime Error
27
8956
758
w = [] num = 0 for i in a: if 1 <= i <= 399: if 1 not in w: w.append(1) elif 400 <= i <= 799: if 400 not in w: w.append(400) elif 800 <= i <= 1199: if 800 not in w: w.append(800) elif 1200 <= i <= 1599: if 1200 not in w: w.a...
s140545865
p03695
u540631540
1596993484
Python
Python (3.8.2)
py
Runtime Error
27
9000
561
n = int(input()) a = [int(i) for i in input().split()] color = [0] * 8 any = 0 for i in a: if 1 <= i <= 399: color[0] = 1 elif 400 <= i <= 799: color[1] = 1 elif 800 <= i <= 1199: color[2] = 1 elif 1200 <= i <= 1599: color[3] = 1 elif 1600 <= i <= 1999: color[...
s204993078
p03695
u036104576
1596309998
Python
Python (3.8.2)
py
Runtime Error
27
9088
256
N = int(input()) A = sorted(map(int, input().split())) colors = [0] * 9 for a in A: colors[a // 400] += 1 ans = 0 for i in range(8): if colors[i] > 0: ans += 1 max_ans = ans if colors[8] > 0: max_ans += colors[8] print(ans, max_ans)
s522115372
p03695
u162612857
1595696829
Python
Python (3.8.2)
py
Runtime Error
25
9104
267
n = int(input()) nums = list(map(int, input().split())) num_free = 0 num_color = [False] * 8 for rate in nums: if rate < 3200: num_color(rate // 400) = True else: num_free += 1 ans = sum(num_color) print('{} {}'.format(ans, ans + num_free))
s788873763
p03695
u633450100
1595471202
Python
Python (3.8.2)
py
Runtime Error
26
9100
589
N = int(input()) a = [int(i) for i in input().split()] list = {} for i in a: if 1 <= i <= 399: list[0] = 1 elif 400 <= i <= 799: list[1] = 1 elif 800 <= i <= 1199: list[2] = 1 elif 1200 <= i <= 1599: list[3] = 1 elif 1600 <= i <= 1999: list[4] = 1 elif 2...
s299625809
p03695
u357751375
1595357309
Python
Python (3.8.2)
py
Runtime Error
26
9092
223
n = int(input()) a = list(map(int,input().split())) t = [0] * 9 for i in range(n): t[a[i] // 400] += 1 z = t.pop(8) p = t.count(0) amax = min(8,8-p+z) if p == 8: amin = 1 else: amin = 8 - p print(amin,amax)
s719689821
p03695
u212328220
1595311678
Python
Python (3.8.2)
py
Runtime Error
24
9324
734
from collections import defaultdict N = int(input()) al = list(map(int,input().split())) cnt = 0 dic = defaultdict(int) for i in al: if 1<= i <= 399: dic['gray'] += 1 elif 400 <= i <= 799: dic['brown'] += 1 elif 800 <= i <= 1199: dic['green'] += 1 elif 1200 <= i <= 1599: ...
s201279410
p03695
u266014018
1595179358
Python
Python (3.8.2)
py
Runtime Error
27
8996
452
def main(): import sys def input(): return sys.stdin.readline().rstrip() n = int(input()) a =list(map(int, input().split())) rate = [0]*8 cnt = 0 for x in a: r = x//400 if r > 7: cnt += 1 if not rate[r]: rate[r] = 1 s = sum(rate) ...
s051778102
p03695
u811176339
1595164110
Python
Python (3.8.2)
py
Runtime Error
25
9172
176
n = int(input()) la = [int(w) for w in input().split()] cnt = [0]*9 for a in la: cnt[a // 400] += 1 mi = len([_ for _ in cnt[:8] if _ > 0]) ma = mi+cnt[8] print(mi, ma)
s904706053
p03695
u968404618
1595092962
Python
Python (3.8.2)
py
Runtime Error
26
8908
728
n = int(input()) A = list(map(int, input().split())) Colors = [] High_scorer = [] for a in A: if a < 400: Colors.append("Gray") if 400 <= a and a < 800: Colors.append("Brown") if 800 <= a and a < 1200: Colors.append("Green") if 1200 <= a and a < 1600: Colors.append("Ligh...
s531049110
p03695
u044964932
1595006890
Python
Python (3.8.2)
py
Runtime Error
22
9104
400
def main(): n = int(input()) As = list(map(int, input().split())) nums = [] rainbow = 0 for A in As: num = A // 400 if num < 8: if num not in nums: nums.append(num) else: rainbow += 1 ans_max = len(nums)+rainbow ans_min = max(le...
s355320837
p03695
u748241164
1594670979
Python
Python (3.8.2)
py
Runtime Error
26
8868
290
N = int(input()) A = list(map(int, input().split())) ans = [0] * 9 for i in range(N): aa = int(A[i] / 400) ans[aa] += 1 min_a = 0 max_a = 0 for i in range(9): if i != 8: if ans[i] != 0: min_a += 1 max_a += 1 else: max_a += ans[i] print(min_a, max_a)
s941846534
p03695
u626891113
1594565713
Python
PyPy3 (7.3.0)
py
Runtime Error
96
67664
649
n = int(input()) a = list(map(int, input().split())) color = [0]*9 cnt = 0 for i in range(n): if a[i] < 400: color[0] += 1 elif a[i] < 800: color[1] += 1 elif a[i] < 1200: color[2] += 1 elif a[i] < 1600: color[3] += 1 elif a[i] < 2000: color[4] += 1 elif ...
s852105488
p03695
u232873434
1594299589
Python
PyPy3 (7.3.0)
py
Runtime Error
87
74508
542
N = int(input()) S = list(map(int,input().split())) col_list = [399,799,1199,1599,1999,2399,2799,3199] count_list = [0]*(len(col_list)+1) for i in range(N): for j in range(len(col_list)+1): if j == len(col_list): if 3200<=S[i]: count_list[j] = count_list[j] + 1 elif S[i...
s862161267
p03695
u232873434
1594299554
Python
PyPy3 (7.3.0)
py
Runtime Error
93
74704
542
N = int(input()) S = list(map(int,input().split())) col_list = [399,799,1199,1599,1999,2399,2799,3199] count_list = [0]*(len(col_list)+1) for i in range(N): for j in range(len(col_list)+1): if j == len(col_list): if 3200<=S[i]: count_list[j] = count_list[j] + 1 elif S[i...
s452597338
p03695
u232873434
1594299516
Python
PyPy3 (7.3.0)
py
Runtime Error
108
74556
545
N = int(input()) S = list(map(int,input().split())) col_list = [399,799,1199,1599,1999,2399,2799,3199] count_list = [0]*(len(col_list)+1) for i in range(N): for j in range(len(col_list)+1): if j == len(col_list): if 3200<=S[i]: count_list[j] = count_list[j] + 1 elif S[i...
s028480705
p03695
u103208639
1594089121
Python
Python (3.8.2)
py
Runtime Error
26
9208
247
n=int(input()) a=list(map(int, input().split())) col=[0]*9 for i in range(n): col[a[i]//400]+=1 zero=0 cnt=0 for c in range(len(col)-1): if col[c]==0: zero+=1 else: cnt+=1 m=max(cnt,1) M=cnt+min(zero,col[-1]) print(m,M)
s213295157
p03695
u388971072
1594087123
Python
Python (3.8.2)
py
Runtime Error
23
9016
598
N = int(input()) a = list(map(int,input().split())) color = [False]*8 over_human = 0 for i in a: if(i<=399): color[0]=True elif(i<=799): color[1]=True elif(i<=1199): color[2]=True elif(i<=1599): color[3]=True elif(i<=1999): color[4]=True elif(i<=2399): ...
s761128082
p03695
u131453093
1593965711
Python
Python (3.8.2)
py
Runtime Error
28
9172
665
N = int(input()) lank = [0, 0, 0, 0, 0, 0, 0, 0] a = list(map(int, input().split())) for i in range(N): if 1 <= a[i] <= 399: lank[0] = 1 elif 400 <= a[i] <= 799: lank[1] = 1 elif 800 <= a[i] <= 1199: lank[2] = 1 elif 1200 <= a[i] <= 1599: lank[3] = 1 elif 1600 <= a[i...
s749266531
p03695
u731322489
1593798410
Python
Python (3.8.2)
py
Runtime Error
25
9156
243
n = int(input()) A = map(int, input().split()) rate = [0] * 9 for a in A: rate[a // 400] += 1 color_min = 8 - rate[:-1].count(0) color_max = color_min + (min(rate[-1], rate[:-1].count(0)) if rate[-1] > 0 else 0) print(color_min, color_max)
s467376297
p03695
u188827677
1593456555
Python
Python (3.8.2)
py
Runtime Error
27
9232
562
n = int(input()) a = list(map(int, input().split())) flag = [False]*8 t = 0 for i in a: if i < 400: flag[0] = True elif i < 800: flag[1] = True elif i < 1200: flag[2] = True elif i < 1600: flag[3] = True elif i < 2000: flag[4] = True elif i < 2400: flag[5] = True elif i < 2800: flag[6] = True elif i < ...
s087684073
p03695
u188827677
1593449188
Python
Python (3.8.2)
py
Runtime Error
30
9148
571
n = int(input()) a = list(map(int, input().split())) flag = [False]*8 t = 0 for i in a: if i < 400: flag[0] = True elif i < 800: flag[1] = True elif i < 1200: flag[2] = True elif i < 1600: flag[3] = True elif i < 2000: flag[4] = True elif i < 2400: flag[5] = True elif i < 2800: flag[6] = True elif i < ...
s877297504
p03695
u188827677
1593448598
Python
Python (3.8.2)
py
Runtime Error
28
9116
496
n = int(input()) a = list(map(int, input().split())) flag = [False]*8 t = 0 for i in a: if i < 400: flag[0] = True elif i < 800: flag[1] = True elif i < 1200: flag[2] = True elif i < 1600: flag[3] = True elif i < 2000: flag[4] = True elif i < 2400: flag[5] = True elif i < 2800: flag[6] = True elif i < ...
s278559046
p03695
u509739538
1593358635
Python
Python (3.8.2)
py
Runtime Error
30
9404
357
from collections import defaultdict def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChar(): return input() def readChars(): return input().split() rate = [0]*9 n = readInt() a = readInts() for i in a: rate[i//400]+=1 print(8-rate[:-1].count(0),end=" ") print(mi...
s056283400
p03695
u168416324
1593274524
Python
PyPy3 (7.3.0)
py
Runtime Error
87
68740
277
n=int(input()) a=list(map(int,input().split())) c=[0]*9 for r in a: x=r//400 if x>8: x==8 c[x]+=1 ans=0 for i in range(9): if i==8: if ans==0: mn=1 mx=n else: mn=ans mx=ans+c[i] if c[i]!=0: ans+=1 print("{} {}".format(mn,mx))
s480293487
p03695
u976225138
1593111692
Python
Python (3.8.2)
py
Runtime Error
24
9008
130
n = input() a = [int(x) for x in input().split() if x < 3200] c = len(set([x // 400 for x in a])) print(max(c, 1), c + n - len(a))
s216145907
p03695
u103902792
1592961095
Python
PyPy3 (7.3.0)
py
Runtime Error
128
74700
174
n = int(input()) A = list(map(int,input().split())) col = [0 for _ in range(9)] for a in A: if a >= 3200: col[8] += 1 col[a//400] += 1 print(sum(col[:-1]), sum(col))
s684521985
p03695
u750651325
1592257684
Python
Python (3.4.3)
py
Runtime Error
17
3064
633
N = int(input()) a = list(map(int, input().split())) cnt = [0 for i in range(8)] count = 0 for i in range(N): if 1<= a[i] <= 399: cnt[0] += 1 elif 400<=a[i]<=799: cnt[1] += 1 elif 800<=a[i]<=1199: cnt[2] += 1 elif 1200<=a[i]<=1599: cnt[3] += 1 elif 1600<=a[i]<=1999:...
s304864369
p03695
u750651325
1592257298
Python
Python (3.4.3)
py
Runtime Error
17
3064
718
N = int(input()) a = list(map(int, input().split())) cnt = [0 for i in range(8)] count = 0 for i in range(N): if 1<= a[i] <= 399: cnt[0] += 1 elif 400<=a[i]<=799: cnt[1] += 1 elif 800<=a[i]<=1199: cnt[2] += 1 elif 1200<=a[i]<=1599: cnt[3] += 1 elif 1600<=a[i]<=1999:...
s289896288
p03695
u630511239
1591752346
Python
Python (3.4.3)
py
Runtime Error
18
3064
980
N = int(input()) a = list(map(int, input().split())) A = [0 for i in range(8)] b = 0 ans1 = 0 for i in range(N): if a[i] < 400: if A[0] == 0: A[0] = 1 ans1 += 1 else: continue elif a[i] < 800: if A[1] == 0: A[1] = 1 ans1 += 1 else: continue elif a[i] < 1200: ...
s991425023
p03695
u630511239
1591752222
Python
Python (3.4.3)
py
Runtime Error
17
3064
793
N = int(input()) a = list(map(int, input().split())) A = [0 for i in range(8)] b = 0 ans1 = 0 for i in range(N): if a[i] < 400: if A[0] == 0: A[0] = 1 ans1 += 1 elif a[i] < 800: if A[1] == 0: A[1] = 1 ans1 += 1 elif a[i] < 1200: if A[2] == 0: A[2] = 1 ans1 += 1 el...
s311636268
p03695
u629350026
1591670024
Python
Python (3.4.3)
py
Runtime Error
17
3064
402
n=int(input()) a=list(map(int,input().split())) temp=[0,0,0,0,0,0,0,0] r=0 for i in range(n): if a[i]>=3200: r=r+1 elif a[i]>=2800: temp[7]=1 elif a[i]>=2400: temp[6]=1 elif a[i]>=2000: temp[5]=1 elif a[i]>=1600: temp[4]=1 elif a[i]>=1200: temp[3]=1 elif a[i]>=800: temp[2]=1 ...
s283188402
p03695
u730769327
1591599265
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38256
142
n=int(input()) a=list(map(int,input().split())) b=[0]*9 for i in a: b[min(i//400,9)]+=1 print(8-b[:8].count(0),min(8-b[:8].count(0)+b[8],8))
s300687102
p03695
u730769327
1591599124
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38256
136
n=int(input()) a=list(map(int,input().split())) b=[0]*9 for i in a: b[i//400]+=1 print(8-b[:8].count(0),min(8-b[:8].count(0)+b[8],8))
s647493761
p03695
u146597538
1591478251
Python
Python (3.4.3)
py
Runtime Error
17
3060
182
n = int(input()) a = map(int, input().split()) c = [0]*9 for i in a: col = i//400 if 4800<= i: c[8] += 1 else: c[col] = 1 print(max(1,sum(c[:8])),sum(c))
s663526084
p03695
u072717685
1591410293
Python
Python (3.4.3)
py
Runtime Error
17
3064
407
def main(): n = int(input()) rate_count = [0] * 9 a = tuple(map(int, input().split())) for ae in a: rank = ae // 400 rate_count[rank] += 1 reds = rate_count[8] rate_count[8] = 0 res = 0 for i1 in range(8): res += rate_count[i1] > 0 r_min = max(res, 1) r_...
s213247957
p03695
u072717685
1591409645
Python
Python (3.4.3)
py
Runtime Error
17
3060
404
def main(): n = int(input()) rate_count = [0] * 9 a = tuple(map(int, input().split())) for ae in a: rank = ae // 400 rate_count[rank] += 1 reds = rate_count[8] rate_count[8] = 0 rc2 = [1 for rce in rate_count if rce > 0] res = sum(rc2) r_min = max(res, 1) r_max ...
s254510545
p03695
u363146889
1591277944
Python
PyPy3 (2.4.0)
py
Runtime Error
278
64108
624
# -*- coding: utf-8 -*- ## Library import sys from fractions import gcd import math from math import ceil,floor import collections ## input # n=int(input()) # A,B,C,D=map(int, input().split()) # string = input() # yoko = list(map(int, input().split())) # tate = [int(input()) for _ in range(N)] # N, M = map(int,inpu...
s444776875
p03695
u119982001
1591064530
Python
Python (3.4.3)
py
Runtime Error
17
3064
584
ans = [0]*8 leng = 0 for i in range(N): if 1 <= A[i] <= 399: ans[0] = 1 elif 400 <= A[i] <= 799: ans[1] = 1 elif 800 <= A[i] <= 1199: ans[2] = 1 elif 1200 <= A[i] <= 1599: ans[3] = 1 elif 1600 <= A[i] <= 1999: ans[4] = 1 elif 2000 <= A[i] <= 2399: ...
s279899947
p03695
u489959379
1591060268
Python
Python (3.4.3)
py
Runtime Error
18
3064
494
import sys sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 10 ** 9 + 7 def resolve(): n = int(input()) A = list(map(int, input().split())) Color = [0] * 9 for a in A: if a >= 3200: Color[-1] += 1 else: Color[a // 400] = 1 ...
s866736806
p03695
u312078744
1590981872
Python
Python (3.4.3)
py
Runtime Error
154
12508
350
import math import numpy as np n = int(input()) a = list(map(int, input().split())) check = [0] * 9 for i, val in enumerate(a): tar = math.floor(val / 400) check[tar] += 1 checkA = np.array(check[:8]) num = np.count_nonzero(checkA != 0) rest = 8 - num if (rest > check[8]): more = num + check[8] else: ...
s881528325
p03695
u203383537
1590288268
Python
Python (3.4.3)
py
Runtime Error
17
3064
175
n = int(input()) a = list(map(int,input().split())) l = [0]*9 for i in a: l[i//400] +=1 b = [i for i in l[:8] if i > 0] mx = len(b)+l[8] mn = len(b) print(mn,mx)
s323757061
p03695
u683406607
1589943643
Python
Python (3.4.3)
py
Runtime Error
17
3064
621
def judge_color(n): if 1 <= n <= 399: return "gray" elif 400 <= n <= 799: return "brown" elif 800 <= n <= 1199: return "green" elif 1200 <= n <= 1599: return "sky" elif 1600 <= n <= 1999: return "blue" elif 2000 <= n <= 2399: return "yellow" elif 2400 <= n <= 2799: return "oran...
s609846775
p03695
u496687522
1589939226
Python
Python (3.4.3)
py
Runtime Error
17
2940
353
N = int(input()) a = list(map(lambda x: int(x) // 400, input().split())) s_a = [] b_a = [] for i in range(N): if a[i] <= 7: s_a.append(a[i]) else: b_a.append(a[i]) if len(s_a) == 0: min = 1 else: min = len(set(s_a)) if len(set(s_a)) + len(b_a) <= : max = len(set(s_a)) + len(b_a) e...
s658278154
p03695
u001769145
1589644335
Python
Python (3.4.3)
py
Runtime Error
17
3064
340
# ABC064 # C # Colorful Leaderboard n = int(input()) a_list = list(map(int, input().split())) color_list = [0]*8 over = 0 for i in range(n): _ = a_list[i] // 400 if _ < 8: color_list[_] = 1 else: over += 1 _tmp = sum(color_list) if _tmp == 0: print("1 %d"%_over) else: print("%d %d...
s568370993
p03695
u001769145
1589643990
Python
Python (3.4.3)
py
Runtime Error
17
3064
292
# ABC064 # C # Colorful Leaderboard n = int(input()) a_list = list(map(int, input().split())) color_list = [0]*8 over = 0 for i in range(n): _ = a_list[i] // 400 if _ < 8: color_list[i] = 1 else: over += 1 _tmp = sum(color_list) print("%d %d"%(_tmp, _tmp+over))
s535414478
p03695
u029000441
1589594340
Python
Python (3.4.3)
py
Runtime Error
21
3316
1144
# coding: utf-8 # hello worldと表示する #dpでできないかな? import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from hea...
s610890343
p03695
u556371693
1589466015
Python
Python (3.8.2)
py
Runtime Error
21
9020
638
n=int(input()) r=list(map(int,input().split())) rlist=[] def color(n): if n<400: return 1 elif n<800: return 2 elif n<1200: return 3 elif n<1600: return 4 elif n<2000: return 5 elif n<2400: return 6 elif n<2800: return 7 elif n<3...
s781479386
p03695
u556371693
1589465983
Python
Python (3.8.2)
py
Runtime Error
20
9056
627
n=int(input()) r=list(map(int,input().split())) rlist=[] def color(n): if n<400: return 1 elif n<800: return 2 elif n<1200: return 3 elif n<1600: return 4 elif n<2000: return 5 elif n<2400: return 6 elif n<2800: return 7 elif n<3...
s803097354
p03695
u044459372
1589414666
Python
Python (3.4.3)
py
Runtime Error
18
3064
531
def main(): n = int(input()) a = [int(i) for i in input().split()] ans = solve(n, a) print(*ans) def solve(n, a): m = 8 colors = [0 for i in range(m + 1)] for i in range(n): for j in range(m): if a[i] < 400 * (j + 1): colors[j] += 1 break...
s456985276
p03695
u902151549
1589327131
Python
Python (3.4.3)
py
Runtime Error
100
8420
3762
# coding: utf-8 import re import math from collections import defaultdict from collections import deque import itertools from copy import deepcopy import random import time import os import queue import sys import datetime from functools import lru_cache #@lru_cache(maxsize=None) readline=sys.stdin.readline sys.setrecu...
s994091717
p03695
u902151549
1589326749
Python
Python (3.4.3)
py
Runtime Error
51
5868
3617
# coding: utf-8 import re import math from collections import defaultdict from collections import deque import itertools from copy import deepcopy import random import time import os import queue import sys import datetime from functools import lru_cache #@lru_cache(maxsize=None) readline=sys.stdin.readline sys.setrecu...
s600060501
p03695
u551109821
1589325965
Python
Python (3.4.3)
py
Runtime Error
17
3064
539
N = int(input()) a = list(map(int,input().split())) color = [0]*8 count = 0 for i in a: if a < 400: color[0] = 1 elif a < 800: color[1] = 1 elif a < 1200: color[2] = 1 elif a < 1600: color[3] = 1 elif a < 2000: color[4] = 1 elif a < 2400: color[5...
s342131935
p03695
u535171899
1589065946
Python
Python (3.4.3)
py
Runtime Error
17
3060
198
n = int(input()) a_input=list(map(int,input().split())) rate_li=[0]*9 top_coder=0 for a in a_input: rate_li[a//400]+=1 min_ = sum(i!=0 for i in rate_li[:8]) print(min_,min(8,min_+rate_li[-1]))
s788674556
p03695
u390727364
1588629483
Python
Python (3.4.3)
py
Runtime Error
17
3064
371
from sys import stdin def main(): n = int(stdin.readline()) a = map(int, stdin.readline().split()) r = [0] * 12 for ai in a: r[int(ai / 400)] += 1 min = 0 for i in range(8): if r[i] > 0: min += 1 max = min for i in range(8, 12): max += r[i] print...
s916292062
p03695
u390727364
1588629231
Python
Python (3.4.3)
py
Runtime Error
17
3060
328
from sys import stdin def main(): n = int(stdin.readline()) a = map(int, stdin.readline().split()) r = [0]*9 for ai in a: r[int(ai / 400)] += 1 min = 0 for i in range(8): if r[i] > 0: min += 1 max = min + r[8] print(min, max) if __name__ == "__main__": ...
s373095193
p03695
u755180064
1588541242
Python
Python (3.4.3)
py
Runtime Error
18
3064
517
def main(): input() rate = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 3200] t = list(map(int, input().split())) ret = {399: 0, 799: 0, 1199: 0, 1599: 0, 1999: 0, 2399: 0, 2799: 0, 3199: 0, 4800: 0} for v in t: for r in rate: if v <= r: ret[r] += 1 ...
s164005275
p03695
u318127926
1588529986
Python
Python (3.4.3)
py
Runtime Error
18
3060
200
n = int(input()) a = list(map(int, input().split())) colors = [0]*9 for i in a: colors[i//400] += 1 mi = 0 for i in range(8): if colors[i]>0: mi += 1 print(mi, min(mi+colors[-1], 8))
s983579304
p03695
u151785909
1588395535
Python
Python (3.4.3)
py
Runtime Error
18
3060
210
n = int(input()) a = list(map(int,input().split())) rate=[0]*9 for i in a: rate[i//400]+=1 min = 0 for i in range(8): if rate[i]>0: min+=1 max = min + rate[8] if max>8: max=8 print(min,max)
s778068876
p03695
u839246671
1588211121
Python
Python (3.4.3)
py
Runtime Error
17
3064
543
N = int(input()) A = list(map(int, input().split())) B = [0,0,0,0,0,0,0,0,0] mi = 0 for i in range(len(A)): if A[i] < 400: B[0] =+ 1 elif A[i] < 800: B[1] =+ 1 elif A[i] < 1200: B[2] =+ 1 elif A[i] < 1600: B[3] =+ 1 elif A[i] < 2000: B[4] =+ 1 elif A[i] < ...
s114949691
p03695
u666608435
1588127224
Python
Python (3.4.3)
py
Runtime Error
17
3064
709
N = int(input()) list = list(map(int, input().split())) huriwake = [0, 0, 0, 0, 0, 0, 0, 0] rea = 0 count = 0 for i in list: if i < 400: huriwake[0] = 1 elif i < 800: huriwake[1] = 1 elif i < 1200: huriwake[2] = 1 elif i < 1600: huriwake[3] = 1 elif i < 2000: ...
s952858578
p03695
u488884575
1587947580
Python
Python (3.4.3)
py
Runtime Error
21
3316
416
n = int(input()) A = list(map(int, input().split())) A = list(map(lambda x: x//400, A)) #print(A) import collections c = collections.Counter(A) #print(c) f1 = f2 = 0 for k in c.keys(): if k >= 8: f1 += 1 f2 += c[k] if f1 == 0: min_ = max_ = len(c.keys()) else: min_ = len(c.keys()) -f1 ...
s459445524
p03695
u784022244
1587881470
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38256
280
N=int(input()) A=list(map(int, input().split())) def judge(n): return n//400 rate=[0]*8 masters=0 for a in A: if judge(a)<8: rate[judge(a)]+=1 else: masters+=1 count=0 for r in rate: if r!=0: count+=1 MAX=min(count+masters) print(max(1,count),MAX)
s481694425
p03695
u784022244
1587878600
Python
PyPy3 (2.4.0)
py
Runtime Error
193
39664
308
N=int(input()) A=list(map(int, input().split())) master=False if max(A)>=3200: master=True def judge(n): return n//400 rate=[0]*8 for a in A: if judge(a)>=8: rate[judge(a)]+=1 count=0 for r in rate: if r!=0: count+=1 if master: MAX=min(count+1, 8) else: MAX=count print(count,MAX)
s773920891
p03695
u784022244
1587878492
Python
Python (3.4.3)
py
Runtime Error
17
3064
288
N=int(input()) A=list(map(int, input().split())) master=False if max(A)>=3200: master=True def judge(n): return n//400 rate=[0]*8 for a in A: rate[judge(a)]+=1 count=0 for r in rate: if r!=0: count+=1 if master: MAX=min(count+1, 8) else: MAX=count print(count,MAX)
s450543387
p03695
u690037900
1587868100
Python
Python (3.4.3)
py
Runtime Error
18
3064
295
import sys input=sys.stdin.readline def atc(atc): result=["1","2","3","4","5","6","7","8","9"][atc//400] return result num=0 L1=[] n=int(input()) L=list(map(int,input().split())) for i in L: a=atc(i) if a=="9": num+=1 else:L1.append(a) b=len(set(L1)) print(b,b+num)
s985052205
p03695
u690037900
1587868031
Python
PyPy3 (2.4.0)
py
Runtime Error
181
38640
295
import sys input=sys.stdin.readline def atc(atc): result=["1","2","3","4","5","6","7","8","9"][atc//400] return result num=0 L1=[] n=int(input()) L=list(map(int,input().split())) for i in L: a=atc(i) if a=="9": num+=1 else:L1.append(a) b=len(set(L1)) print(b,b+num)
s424352408
p03695
u281610856
1587865414
Python
Python (3.4.3)
py
Runtime Error
18
3064
744
import sys input = sys.stdin.readline INF = float("inf") def main(): n = int(input()) A = list(map(int, input().split())) color = [0] * 8 god = 0 for i in A: if i < 400: color['gray'] = 1 elif i < 800: color['brown'] = 1 elif i < 1200: col...
s283829990
p03695
u281610856
1587865374
Python
Python (3.4.3)
py
Runtime Error
154
12484
1103
from heapq import heappush, heappop from itertools import permutations, accumulate, combinations from math import pi, ceil, floor import numpy as np from collections import defaultdict, deque, Counter from operator import itemgetter from bisect import bisect_left, bisect_right, insort_left, insort_right import sys inpu...