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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s641368194 | p03695 | u989345508 | 1575737991 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 574 | n=int(input())
a=sorted(list(map(int,input().split())))
c=[0]*8
k=-1
for i in range(n):
if a[i]<400:
c[0]=1
elif a[i]<800:
c[1]=1
elif a[i]<1200:
c[2]=1
elif a[i]<1600:
c[3]=1
elif a[i]<2000:
c[4]=1
elif a[i]<2400:
c[5]=1
elif a[i]<2800:
... |
s202857862 | p03695 | u989345508 | 1575737960 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 574 | n=int(input())
a=sorted(list(map(int,input().split())))
c=[0]*8
k=-1
for i in range(n):
if a[i]<400:
c[0]=1
elif a[i]<800:
c[1]=1
elif a[i]<1200:
c[2]=1
elif a[i]<1600:
c[3]=1
elif a[i]<2000:
c[4]=1
elif a[i]<2400:
c[5]=1
elif a[i]<2800:
... |
s168430930 | p03695 | u470542271 | 1575431133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 231 | n = int(input())
a = list(map(int, input().split()))
l = [0] * 9
for i in range(n):
s = min(a[i] // 400, 9)
l[s] += 1
m = 0
for i in range(len(l) - 1):
if l[i] != 0:
m += 1
M = min(9, l[-1] + m)
print(m, M)
|
s648295044 | p03695 | u470542271 | 1575431066 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 213 | n = int(input())
a = list(map(int, input().split()))
l = [0] * 9
for i in range(n):
l[a[i] // 400] += 1
m = 0
for i in range(len(l) - 1):
if l[i] != 0:
m += 1
M = min(9, l[-1] + m)
print(m, M)
|
s029887366 | p03695 | u836737505 | 1575320081 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 186 | #ABC64C
n = int(input())
a = list(map(int,input().split()))
c = set()
d = 0
fot i in a:
c = a // 400:
if c < 8:
b.add(c)
else:
d += 1:
print(len(b) len(b)+d) |
s683178250 | p03695 | u799691369 | 1575250462 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1049 | N = int(input())
A = [int(i) for i in input().split()]
def CheckColor(a):
global free_count
if 1 <= 0 a and a <= 399:
return 'gray'
elif 400 <= a and a <= 799:
return 'blown'
elif 800 <= a and a <= 1199:
return 'green'
elif 1200 <= a and a <= 1599:
return 'water'
... |
s035822670 | p03695 | u503228842 | 1575249646 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 519 | N = int(input())
color = [0]*8
free = 0
for _ in range(N):
a = int(input())
if 1<=a<=399:
color[0] = 1
elif 400<=a<=799:
color += 1
elif 800<=a<=1199:
color += 1
elif 1200<=a<=1599:
color += 1
elif 1600<=a<=1999:
color += 1
elif 2000<=a<=2399:
... |
s148239023 | p03695 | u503228842 | 1575249628 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 520 | N = int(input())
color = [0]*8
free = 0
for _ in range(N):
a = int(input())
if 1<=a<=399:
color[0] = 1
elif 400<=a<=799:
color += 1
elif 800<=a<=1199:
color += 1
elif 1200<=a<=1599:
color += 1
elif 1600<=a<=1999:
color += 1
elif 2000<=a<=2399:
... |
s616026544 | p03695 | u358360701 | 1574951574 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 701 | N = int(input())
rate = list( map(int, input().split()))
color = [0] * 8
a = 400
free = 0
for i in range(0,N):
if rate[i] < a:
color[0] = 1
elif a <= rate[i] < 2*a:
color[1] = 1
elif 2*a <= rate[i] < 3*a:
color[2] = 1
elif 3*a <= rate[i] < 4*a:
color[3] = 1
e... |
s237032479 | p03695 | u358360701 | 1574901059 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3192 | 815 | N = int(input())
rate = list( map(int, input().split()))
color = [0] * 9
a = 400
flag = 1
for i in range(0,N):
if 8*a <= rate[i]:
color[8] += 1
else:
flag = 0
if rate[i] < a:
color[0] = 1
elif a <= rate[i] < 2*a:
color[1] = 1
elif 2*a <= r... |
s108648977 | p03695 | u940061594 | 1573658475 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 297 | #Colorful Leaderboard
N = int(input())
a = list(map(int, input().split()))
L = [0 for i in range(9)]
for i in range(N):
L[a[i]//400] = L[a[i]//400] + 1
n = 0
for i in range(8):
if L[i] > 0:
n = n + 1
nmin = n
nmax = n + L[8]
if nmax > 9:
nmax = 9
print(str(nmin)+" "+str(nmax)) |
s207449459 | p03695 | u673361376 | 1573594060 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 160 | N = int(input())
A = [0 for _ in range(9)]
for a in map(int,input().split()):
A[a//400]+=1
rate_num = 8-A[:-1].count(0)
print(rate_num, min(8,rate_num+A[-1])) |
s011236197 | p03695 | u332253305 | 1573544535 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 646 | n=int(input())
a=[int(i) for i in input().split()]
cnt=[0]*8
count=0
for i in range(n):
if a[i]>=1 and a[i]<=399:
cnt[0]=1
elif a[i]>=400 and a[i]<=799:
cnt[1]=1
elif a[i]>=800 and a[i]<=1199:
cnt[2]=1
elif a[i]>=1200 and a[i]<=1599:
cnt[3]=1
elif a[i]>=1600 and a[i]... |
s363658346 | p03695 | u518042385 | 1573223436 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 452 | n=input()
l=list(map(int,input().split()))
col=[False for i in range(8)]
val=0
count=0
for i in range(n):
m=l[i]
if m<400:
col[0]=True
elif m<800:
col[1]=True
elif m<1200:
col[2]=True
elif m<1600:
col[3]=True
elif m<2000:
col[4]=True
elif m<2400:
col[5]=True
elif m<2800:
col[... |
s943970974 | p03695 | u803617136 | 1573021520 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 281 | N = int(input())
an = list(map(int, input().split()))
over_cnt = 0
colors = []
for a in an:
rate = a // 400
if rate >= 8:
over_cnt += 1
elif rate not in colors:
colors.append(rate)
min = len(colors)
max = min(len(colors) + over_cnt, 8)
print(min, max)
|
s293947618 | p03695 | u380772254 | 1572534448 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38512 | 691 | import numpy as np
N = int(input())
A = list(map(int, input().split()))
colors = np.array([0 for _ in range(9)])
for a in A:
if 1 <= a <= 399: colors[0] += 1
elif 400 <= a <= 799: colors[1] += 1
elif 800 <= a <= 1199: colors[2] += 1
elif 1200 <= a <= 1599: colors[3] += 1
elif 1600 <= a <= 1999: co... |
s914688369 | p03695 | u614875193 | 1572290218 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 255 | N=int(input())
A=sorted(list(map(int,input().split())))
A=[i//400 for i in A]
Colors=[0,0,0,0,0,0,0,0,0]
for i in A:
Colors[i]+=1
Count=0
for i in range(8):
if Colors[i]>0:
Count+=1
if Count==0:
Count=1
print(Count,Count+Colors[-1]) |
s302769186 | p03695 | u622045059 | 1572098042 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 876 |
N = int(input())
a = list(map(int, input().split()))
def get_color(point):
color = ''
if 400 > point:
color = 'grey'
elif 800 > point:
color = 'brown'
elif 1200 > point:
color = 'green'
elif 1600 > point:
color = 'light blue'
elif 2000 > point:
color = '... |
s359863234 | p03695 | u167681750 | 1572045372 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 195 | n = int(input())
colors = [0] * 12
for i in list(map(int, input().split())):
colors[i//400] += 1
ans = 8 - colors[:8].count(0)
free = sum(colors[8:])
print(max(1, ans), max(1, ans + free)) |
s784494407 | p03695 | u970082363 | 1571365778 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 613 | import os
n = int(input())
alist = [int(i) for i in input().split()]
set = set()
arfa = 0
for a in alist:
if a<=399:
set.add(1)
elif a<=799:
set.add(2)
elif a<=1199:
set.add(3)
elif a<=1599:
set.add(4)
elif a<=1999:
set.add(5)
elif a<=2399:
set.... |
s397219603 | p03695 | u970082363 | 1571365543 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 613 | import os
n = int(input())
alist = [int(i) for i in input().split()]
set = set()
arfa = 0
for a in alist:
if a<=399:
set.add(1)
elif a<=799:
set.add(2)
elif a<=1199:
set.add(3)
elif a<=1599:
set.add(4)
elif a<=1999:
set.add(5)
elif a<=2399:
set.... |
s708611700 | p03695 | u970082363 | 1571365503 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 612 | import os
n = int(input())
alist = [int(i) for i in input().split()]
set = set()
arfa = 0
for a in alist:
if a<=399:
set.add(1)
elif a<=799:
set.add(2)
elif a<=1199:
set.add(3)
elif a<=1599:
set.add(4)
elif a<=1999:
set.add(5)
elif a<=2399:
set.... |
s741873987 | p03695 | u924374652 | 1571069700 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 403 | n = int(input())
list_a = list(map(int, input().split()))
num_rank = [0 for _ in range(9)]
for one_a in list_a:
temp_rank = one_a // 400
num_rank[temp_rank] += 1
if len([i for i in num_rank[:-1] if i > 0]) > 0:
min_color = len([i for i in num_rank[:-1] if i > 0])
else:
min_color = 1
max_color = len([i for i in ... |
s353188770 | p03695 | u924374652 | 1571069513 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 331 | n = int(input())
list_a = list(map(int, input().split()))
num_rank = [0 for _ in range(9)]
for one_a in list_a:
temp_rank = one_a // 400
num_rank[temp_rank] += 1
min_color = len([i for i in num_rank[:-1] if i > 0])
max_color = len([i for i in num_rank[:-1] if i > 0]) + num_rank[-1]
print("{} {}".format(min_color, ... |
s423316055 | p03695 | u756514276 | 1570802100 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 206 | N = int(input())
A = list(map(int, input().split()))
col = [0] * 9
for i in A:
r = i//400
if r > 9:
r = 8
col[r] += 1
ans = 0
for i in col[:8]:
if i > 0:
ans += 1
print(ans, ans + col[-1]) |
s906339792 | p03695 | u756514276 | 1570801995 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 178 | N = int(input())
A = list(map(int, input().split()))
col = [0] * 9
for i in A:
col[i // 400] += 1
ans = 0
for i in col[:8]:
if i > 0:
ans += 1
print(ans, ans + col[-1]) |
s186689338 | p03695 | u797016134 | 1569893808 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 319 | n = int(input())
a = list(map(int, input().split()))
li = [0]*9
tourist = 0
for i in a:
if i // 400 == 8:
tourist += 1
if li[i//400] == 0:
li[i//400] = 1
minrate = sum(li[:8])
maxrate = 0
if minrate + tourist > 8:
maxrate = 8
else:
maxrate = minrate + tourist
print(minrate, maxrate) |
s985764844 | p03695 | u721082205 | 1569597428 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 386 | N=input()
N=int(N)
a=input()
a=a.split()
score=[0]*8
legend=0
inrank=0
a=[int(item) for item in a]
for i in range(N):
p=int(a[i]/400)
if p >= 8:
legend+=1
else:
score[p]=1
inrank=score.count(1)
if legend!=0:
if inrank==0:
t_max=legend
t_min=0
else:
t_max=inran... |
s336154977 | p03695 | u728498511 | 1569335291 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 145 | n = int(input());l = [0]*9
for i in map(int, input().split()):l[i//400]+=1
mn = len(list(filter(lambda x:x>0, l[:8])))
print(mn, min(8, mn+l[8])) |
s574962332 | p03695 | u811362276 | 1569197844 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 478 | import collections
N = int(input())
a = list(map(int, input().split()))
if (len(a) != N or N > 100 or N < 1 or max(a) > 4800 or min(a < 1)):
exit()
sort = sorted(a, key=int)
for i in range(N):
sort[i] = sort[i] // 400
normal = [i for i in sort if i < 8]
incredible = [i for i in sort if i >= 8]
min = len(co... |
s707455146 | p03695 | u811362276 | 1569197777 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 461 | import collections
N = int(input())
a = list(map(int, input().split()))
if (len(a) != N or N > 100 or N < 1 or max(a) > 4800 or min(a < 1):
exit()
sort=sorted(a, key=int)
for i in range(N):
sort[i]=sort[i] // 400
normal=[i for i in sort if i < 8]
incredible=[i for i in sort if i >= 8]
min=len(collections.C... |
s260604152 | p03695 | u033606236 | 1569093243 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 146 | n,*a = map(int,open(0).read().split())
b = filter(lambda x:x < 3200,a)
c = len(set([i//400 for i in b]))
print(c or 1,end=" ")
print(c + n-len(b)) |
s834063285 | p03695 | u033606236 | 1569093144 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 141 | n,*a = map(int,open(0).read().split())
b = filter(lambda x:x < 3200,a)
c = set([i//400 for i in b])
print(c or 1,end=" ")
print(c + n-len(b)) |
s244838766 | p03695 | u759412327 | 1568402781 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 128 | N = int(input())
A = list(map(int,input().split()))
C = [a//400 for a in A if s<3200]
m = len(set(C))
print(max(1,m),m+N-len(C)) |
s045546740 | p03695 | u408620326 | 1568255424 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 175 | N = int(input())
rate = [0] * 9
for a in [int(x) for x in input().split()]:
rate[a // 400] += 1
ret = 0
for r in rate[:-1]:
if r:
ret += 1
print(ret, ret + rate[-1]) |
s358200626 | p03695 | u027929618 | 1568241782 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 167 | N = int(input())
A = list(map(int, input().split()))
c = 0
s = set()
for a in A:
if a >= 3200:
c += 1
else:
s.add(a//400
print(max(1, len(s)), len(s) + c) |
s185123942 | p03695 | u266874640 | 1567882237 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 552 | N = int(input())
A = list(map(int,input().split()))
color = {}
f = 0
for a in A:
if 1 <= a <= 399:
color['g'] = 1
elif 400 <= a <= 799:
color['br'] = 1
elif 800 <= a <= 1199:
color['gr'] = 1
elif 1200 <= a <= 1599:
color['m'] = 1
elif 1600 <= a <= 1999:
color[... |
s409586531 | p03695 | u266874640 | 1567881804 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 555 | N = int(input())
A = list(map(int,input()))
color = {}
f = 0
for a in A:
if 1 <= a <= 399:
color['g'] = 1
elif 400 <= a <= 799:
color['br'] = 1
elif 800 <= a <= 1199:
color['gr'] = 1
elif 1200 <= a <= 1599:
color['m'] = 1
elif 1600 <= a <= 1999:
color['b'] = 1... |
s399645231 | p03695 | u147571984 | 1567744110 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 191 | N = int(input())
a = list(map(int, input().split()))
colors = [0]*9
for i in a:
colors[i//400] += 1
ans = 0
for i in colors[0:8]:
if i != 0:
ans += 1
print(ans, ans+colors[8]) |
s152131499 | p03695 | u896741788 | 1567546051 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 152 | n=int(input())
def f(x):
return x//400 if x<3200 else return 8
l=set(map(lambda x:x//400 if x < 3200 else 8 ,list(map(int,input().split()))))
print(l) |
s001893594 | p03695 | u518987899 | 1567139784 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 531 | _ = input().strip()
kind_set = {}
colors = list(map(int, input().strip().split(' ')))
def whatcolor(rate):
if rate < 400:
return 0
elif rate < 800:
return 1
elif rate < 1200:
return 2
elif rate < 1600:
return 3
elif rate < 2000:
return 4
elif rate < 2400:
return 5
elif rate < 2800... |
s624345646 | p03695 | u948524308 | 1566945819 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 834 | N = int(input())
A = list(map(int, input().split()))
C = [0] * 9
for i in range(N):
if 1 <= A[i] <= 399:
C[0] += 1
elif 400 <= A[i] <= 799:
C[1] += 1
elif 800 <= A[i] <= 1199:
C[2] += 1
elif 1200 <= A[i] <= 1599:
C[3] += 1
elif 1600 <= A[i] <= 1999:
C[4] +=... |
s875950214 | p03695 | u666198201 | 1566548113 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 209 | N=int(input())
A=list(map(int,input().split()))
B=[0]*10
count=0
for i in range(N):
B[A[i]//400]+=1
for i in range(8):
if B[i]>=1:
count+=1
print(count, end=" ")
print(min(count+int(B[8]),8)) |
s886090152 | p03695 | u296150111 | 1566342406 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 207 | n=int(input())
a=list(map(int,input().split()))
for i in range(n):
a[i]//=400
free=0
b=set()
for i in range(n):
if a[i]>=8:
free+=1
else:
b.add(a[i])
cnt=len(b)
x=max(cnt,1)
y=min(cnt+free)
print(x,y) |
s273811859 | p03695 | u904804404 | 1565449404 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 435 | rates = [399,799,1199,1599,1999,2399,2799,3199]
from collections import defaultdict
def return_index(score):
for i in rates:
if score <= i:
return rates.index(i)
else:
return 8
N = int(input())
A = list(map(int,input().split()))
d = defaultdict(int)
for a in A:
d[return_index(a)] += 1
num_of_9s ... |
s263467715 | p03695 | u704001626 | 1565060307 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38384 | 252 | # -*- coding: utf-8 -*-
n = int(input())
an = list(map(int,input().split()))
rate_bucket = [0] * 9
ret = 0
for a in an:
rate_bucket[a//400]+=1
for i in rate_bucket[0:-1:]:
if i > 0:
ret+=1
print("{} {}".format(ret,ret+rate_bucket[-1]))
|
s264009550 | p03695 | u196697332 | 1564722703 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 459 | from collections import Counter
N = int(input())
A = [int(_) // 400 if int(_) < 3199 else 8 for _ in input().split()]
min_counter = Counter(A)
if 8 in min_counter.keys():
min_counter.pop(8)
maximum = 0
max_counter = Counter(A)
if max_counter[8] >= 8:
maximum = 8
else:
if 8 in max_counter.keys():
m... |
s817914848 | p03695 | u899975427 | 1564079013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 178 | n = int(input())
an = [int(i) for i in input().split()]
score = [0]*9
ans = 0
for i in an:
score[i//400] += 1
for i in score[:8]:
if i:
ans += 1
print(ans,ans+score[8]) |
s170384399 | p03695 | u593938737 | 1563428368 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3572 | 404 | import sys
from functools import reduce
def solve():
pass
def main():
N = int(input())
a = list(map(int, input().split()))
colors = [0] * 9 # 8色 + 任意の1色
for rate in a:
colors[rate // 400] += 1
mn = 0
for c in colors[0:8]:
if c != 0:
mn += 1
mx = mn + min(8... |
s145003248 | p03695 | u360116509 | 1562814423 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 336 | def main():
_ = int(input())
A = list(map(int, input().split()))
c = [False] * (4800 // 400 - 1)
d = [0] * (4800 // 400 - 1)
for a in A:
c[a // 400] = True
d[a // 400] += 1
mn = 1 if c[:8].count(True) == 0 else c[:8].count(True)
mx = c[:8].count(True) + sum(d[8:])
print(m... |
s414544100 | p03695 | u360116509 | 1562811307 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 298 | def main():
_ = int(input())
A = list(map(int, input().split()))
c = [0] * (4800 // 400)
mx = 0
for a in A:
c[a // 400] = True
if a >= 3200:
mx += 1
print(max(c[:3200 // 400].count(True), mx),
c[:3200 // 400].count(True) + mx)
main()
|
s352300307 | p03695 | u180058306 | 1562617699 | Python | Python (3.4.3) | py | Runtime Error | 152 | 12484 | 992 | import numpy as np
# 参加人数を入力する
N = int(input())
# レートを入力する
a = list(map(int, input().split()))
# ndarray型に変換
arr_a = np.array(a)
# 3200未満のレートを持つ人について、色の種類数を設定する
under3200 = 0
# 色ごとのレートの下限と上限を設定
lower = 1
upper = 399
# 上限が3200未満である限り繰り返す
while upper < 3200:
# 範囲内のレートを持つ人がいる場合、色の種類数を増やす
if len(arr_a[(arr_a >= lo... |
s594781660 | p03695 | u180058306 | 1562617504 | Python | Python (3.4.3) | py | Runtime Error | 148 | 12484 | 992 | import numpy as np
# 参加人数を入力する
N = int(input())
# レートを入力する
a = list(map(int, input().split()))
# ndarray型に変換
arr_a = np.array(a)
# 3200未満のレートを持つ人について、色の種類数を設定する
under3200 = 0
# 色ごとのレートの下限と上限を設定
lower = 1
upper = 399
# 上限が3200未満である限り繰り返す
while upper < 3200:
# 範囲内のレートを持つ人がいる場合、色の種類数を増やす
if len(arr_a[(arr_a >= lo... |
s676585749 | p03695 | u180058306 | 1562616455 | Python | Python (3.4.3) | py | Runtime Error | 151 | 12448 | 1171 | import numpy as np
# 参加人数を入力する
N = int(input())
# レートを入力する
a = list(map(int, input().split()))
# ndarray型に変換
arr_a = np.array(a)
# 3200未満のレートを持つ人について、色の種類数を設定する
under3200 = 0
# 色ごとのレートの下限と上限を設定
lower = 1
upper = 399
# 上限が3200未満である限り繰り返す
while upper < 3200:
# 範囲内のレートを持つ人がいる場合、色の種類数を増やす
if len(arr_a[(arr_a >= lo... |
s368138861 | p03695 | u698902360 | 1562444235 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 598 | N = int(input())
a = list(map(int, input().split()))
rank = [0]*9
for i in range(N):😌
if a[i] < 400:
rank[0] += 1
elif a[i] < 800:
rank[1] += 1
elif a[i] < 1200:
rank[2] += 1
elif a[i] < 1600:
rank[3] += 1
elif a[i] < 2000:
rank[4] += 1
elif a[i] < 2400... |
s809751958 | p03695 | u144980750 | 1562354304 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 289 | n=int(input())
a=[int(i) for i in input().split()]
a.sort()
c=[]
cc=1
l=0
for i in range(399,3200,400):
for j in range(n):
if i-400<a[j] and a[j]<=i:
c.append(i)
ccc=j
for i in range(ccc):
if c[i]!=c[i+1]:
cc+=1
print(cc,min(8,cc+n-(ccc+1))) |
s417279266 | p03695 | u777028980 | 1562347138 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 186 | n=int(input())
hoge=list(map(int,input().split()))
color=[0]*9
for i in range(n):
color[hoge[i]//400]+=1
ans=0
for i in color[:8]:
if(i!=0):
ans+=1
print(ans,ans+color[8]) |
s048355206 | p03695 | u527867336 | 1561128201 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38512 | 452 | #coding; utf-8
def main():
N = int(input())
A = list(map(int, input().split()))
min_color = 0
max_color = 0
rate_criteria = 400
rate = [0]*9
for i in range(N):
diva = A[i]//rate_criteria
rate[diva] += 1
for i in range(8):
if rate[i] > 0:
min_color +... |
s970024060 | p03695 | u623687794 | 1560950746 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 221 | n=int(input())
rates=list(map(int,input().split()))
over3200=sum(1 for i in rates if i>=3200)
fixed=set()
for i in rates:
if i//<=7:
fixed.add(i)
f=len(fixed)
if f==0:
print(1,over3200)
else:
print(f,f+over3200) |
s259794058 | p03695 | u263830634 | 1560721451 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 232 | N = int(input())
a = list(map(int, input().split()))
lst = [0] * 9
for i in range(N):
lst[min(a[i]//400, 8)] += 1
count = lst[:8].count(0)
kind_max = min(8-count+lst[8])
kind_min = max(8-count,1)
print (kind_min, kind_max) |
s120841374 | p03695 | u463655976 | 1560471261 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 375 | N = int(input())
c = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199]
i = 0
cnt = 0
ansOne = 0
ansAny = 0
for ai in sorted(map(int, input())):
while i < len(c):
if ai <= c[i]:
cnt += 1
break
elif cnt > 0:
ansOne += 1
cnt = 0
else:
ansAny += 1
continue
print("{} {}".for... |
s074757924 | p03695 | u797550216 | 1560188367 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 819 | n = int(input())
colors = list(map(int,input().split()))
col_n = [0]*9
for c in colors:
if c >= 1 and c <= 399:
col_n[0] += 1
elif c >= 400 and c <= 799:
col_n[1] += 1
elif c >= 800 and c <= 1199:
col_n[2] += 1
elif c >= 1200 and c <= 1599:
col_n[3] += 1
elif c >= ... |
s189899108 | p03695 | u770077083 | 1560135835 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 303 | n = int(input())
a = list(map(int, input().split()))
flag = [False for _ in range(8)]
flex = 0
for x in a:
if x >= 3200:
flex += 1
else:
flag[int(x/400)] = True
les = flag.count(True)
if les == 0 and flex > 0:
print("1 " + flex)
else:
print("{} {}".format(les, les+flex)) |
s510097578 | p03695 | u770077083 | 1560135271 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 243 | n = int(input())
a = list(map(int, input().split()))
flag = [False for _ in range(8)]
flex = 0
for x in a:
if x >= 3200:
flex += 1
else:
flag[int(x/400)] = True
les = flag.count(True)
print(f"{les} {min([8,les+flex])}") |
s206704800 | p03695 | u844005364 | 1560115435 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 259 | n = int(input())
scores = list(map(int, input().split()))
colors = [0] * 8
over = 0
for score in scores:
if score < 3200:
colors[score // 400] += 1
else:
over += 1
ans = sum(colors > 0 for color in colors)
print(ans, ans + over)
|
s198889488 | p03695 | u844005364 | 1560115353 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 198 | n = int(input())
scores = list(map(int, input().split()))
colors = [0] * 9
for score in scores:
colors[score // 400] += 1
ans = sum(colors[x] > 0 for x in range(8))
print(ans, ans + colors[8]) |
s218765188 | p03695 | u844005364 | 1560115309 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 212 | n = int(input())
scores = list(map(int, input().split()))
colors = [0] * 9
for score in scores:
colors[score // 400] += 1
ans = sum(colors[x] > 0 for x in range(8))\
print(ans, min(8, ans + colors[8]))
|
s839998602 | p03695 | u762557532 | 1559954035 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 543 | import bisect
N = int(input())
A = list(map(int,input().split()))
A.sort()
rank = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3200, 3200, 3200, 3200, 3200]
n_rank = []
for i in range(1,len(rank)):
var = bisect.bisect_left(A, rank[i]) - bisect.bisect_left(A, rank[i-1])
n_rank.append(var)
else:
n_rank.appe... |
s477835536 | p03695 | u762557532 | 1559954016 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 543 | import bisect
N = int(input())
A = list(map(int,input().split()))
A.sort()
rank = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3200, 3200, 3200, 3200, 3200]
n_rank = []
for i in range(1,len(rank)):
var = bisect.bisect_left(A, rank[i]) - bisect.bisect_left(A, rank[i-1])
n_rank.append(var)
else:
n_rank.appe... |
s654497442 | p03695 | u745561510 | 1559666113 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 390 | N = int(input())
a = list(map(int, input().split()))
a.sort()
min_color = [0] * 8
max_color = [0] * 8
extra = 0
for i in a:
if i >= 3200:
if sum(min_color) == 0:
min_color[0] = 1
if sum(max_color + extra) < 8:
extra += 1
else:
min_color[i // 400] = 1
ma... |
s970311379 | p03695 | u960653324 | 1559665923 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 614 | N = int(input())
A = [int(i) for i in input().split()]
colors = [0,0,0,0,0,0,0,0,0]
for a in A:
if a < 400:
colors[0] +=1
elif 400<=a and a <800:
colors[1] +=1
elif 800<=a and a<1200:
colors[2] +=1
elif 1200<=a and a<1600:
colors[3] +=1
elif 1600<=a and a<2000:
colors[4] +=... |
s623597452 | p03695 | u497596438 | 1559186657 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38640 | 226 | N=int(input())
A=list(map(int,input().split()))
c=[0]*9
for i in A:
c[i//400]+=1
for i in range(8):
if c[i]>0:
c[i]=1
if c[:8]==[0]*8:
print(min(1,c[-1]),c[-1])
else:
print(sum(c[:8]),sum(c[:8])+c[-1])
|
s857354731 | p03695 | u687044304 | 1558529254 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1646 | # -*- coding:utf-8 -*-
def determine_color(rate):
if rate >= 1 and rate <= 399:
return 0
elif rate >= 400 and rate <= 799:
return 1
elif rate >= 800 and rate <= 1199:
return 2
elif rate >= 1200 and rate <= 1599:
return 3
elif rate >= 1600 and rate <= 1999:
re... |
s549956917 | p03695 | u063052907 | 1557792990 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 338 | N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0
for a in lst_a:
i = a // 400
if i == 8:
cnt_super += 1
else:
lst_color[i] = 1
cnt_existed = sum(1 for x in lst_color if x!=0)
ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super
print... |
s846385257 | p03695 | u063052907 | 1557792780 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 343 | N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0
for a in lst_a:
i = int(a / 400)
if i == 8:
cnt_super += 1
else:
lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)
ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super
... |
s322968450 | p03695 | u063052907 | 1557792648 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 339 | N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0
for a in lst_a:
i = a // 400
if i == 8:
cnt_super += 1
else:
lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)
ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super
prin... |
s695550285 | p03695 | u063052907 | 1557792466 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 339 | N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0
for a in lst_a:
i = a // 400
if i == 8:
cnt_super += 1
else:
lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)
ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super
prin... |
s956150304 | p03695 | u782685137 | 1556690081 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 220 | def color(r):
if r<3200:return r//400
else:return 8
colors = [0]*9
N=int(input())
for a in map(int,input().split()):
colors[color(a)]+=1
base=0
for i n range(8):
if colors[i]>0:base+=1
print(base, base+colors[8]) |
s942197869 | p03695 | u664610890 | 1556230908 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 362 | N = int(input())
a = list(map(int, input().split()))
rate = [0 for i in range(9)]
c = 0
for i in range(N):
m = a[i] // 400
if m < 8:
rate[m] = 1
else:
rate[8] += 1
for i in range(8):
if rate[i] > 0:
c += 1
c = 8 - c
if c < rate[8]:
print(sum(rate[:8]), sum(rate[:8] + c))
... |
s793947964 | p03695 | u664610890 | 1556230787 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 363 | N = int(input())
a = list(map(int, input().split()))
rate = [0 for i in range(9)]
c = 0
for i in range(N):
m = a[i] // 400
if m != 8:
rate[m] = 1
else:
rate[m] += 1
for i in range(8):
if rate[i] > 0:
c += 1
c = 8 - c
if c < rate[8]:
print(sum(rate[:8]), sum(rate[:8] + c))... |
s864277460 | p03695 | u664610890 | 1556230033 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 337 | N = int(input())
a = list(map(int, input().split()))
rate = [0 for i in range(9)]
for i in range(N):
m = a[i] // 400
rate[m] += 1
flag = False
for i in range(8):
if rate[i] == 0:
flag = True
else:
rate[i] = 1
if flag:
print(sum(rate[:8]), sum(rate))
else:
print(sum(rate[:8])... |
s939048131 | p03695 | u912599273 | 1555645371 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 541 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
boolean[] color = new boolean[8];
int topcoder = 0;
int ans = 0;
for(int i = 0; i < N; i++) {
int rate = sc.nextInt();
for(int j = 1; j <= 8; j++) {
if(rate... |
s339343360 | p03695 | u885899351 | 1555548601 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 143 | n=input()
l=list(map(int,input().split()))
c=[0]*9
for i in l:c[i//400]+=1
mi=0
for i in range(8):
if c[i]>0:mi+=1
print(max(mi,1),mi+c[8]) |
s509007948 | p03695 | u268516119 | 1555453696 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 189 | N=int(input())
a=[int(i) for i in input().split()]
rates=[0]*9
for rate in a:
rates[rate//400]+=1
ans=0
for color in rates[:8]:
ans+=(color!=0)
ansmax=ans+rates[8]
print(ans,ansmax) |
s628434489 | p03695 | u268516119 | 1555453628 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 190 | N=int(input())
a=[int(i) for i in input().split()]
rates=[0]*9
for rate in a:
rates[rate//400]+=1
ans=0
for color in rates[:8]:
ans+=bool(color)
ansmax=ans+rates[8]
print(ans,ansmax) |
s722861079 | p03695 | u083960235 | 1555266277 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 510 | #13:27
N = int(input())
A = list(map(int,input().split()))
ex_red = [0]*8
red_cnt = 0
for i in range(8):#0-7
for j in range(N):
if 400*i<=A[j] and A[j]<400*(i+1):
ex_red[i]+=1
n = 0
for i in range(N):
if 3200 <= A[i]:
n += 1
not_red_color = 0
c = 0
for i in range(8):
if ex_red[i... |
s885283415 | p03695 | u083960235 | 1555264687 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 777 | #13:27
N = int(input())
A = list(map(int,input().split()))
ex_red = [0]*8
red_cnt = 0
for i in range(8):#0-7
for j in range(N):
if 400*i<=A[j] and A[j]<400*(i+1):
ex_red[i]+=1
for i in range(N):
if 3200 <= A[i]:
red_cnt += 1
not_red_color = 0
for i in range(8):
if ex_red[i] > 0... |
s703461480 | p03695 | u565204025 | 1554259479 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 794 | # -*- coding: utf-8 -*-
n = int(input())
a = list(map(int,input().split()))
color = [0,0,0,0,0,0,0,0,0]
for i in range(n):
if 1 <= a[i] <= 399:
color[0] += 1
elif 400 <= a[i] <= 799:
color[1] += 1
elif 800 <= a[i] <= 1199:
color[2] += 1
elif 1200 <= a[i] <= 1599:
color... |
s477205320 | p03695 | u721316601 | 1554064612 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 263 | N = int(input())
a = list(map(int, input().split()))
late = [0 for i in range(9)]
for n in a:
late[n//400] += 1
max_a = min_a = 8-late[:-1].count(0)
if late[8] and not min_a:
min_a = 1
if late[8]:
max_a = min(max_a+late[8], 8)
print(min_a, max_a) |
s007045241 | p03695 | u543954314 | 1553287266 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 238 | n = int(input())
a = list(map(int, input().split()))
color = [0]*8
for i in a:
color[min(8,i//400)] += 1
kind = 0
for i in color[:7]:
if i:
kind += 1
if kind == 0 and color[7]:
color[7] -= 1
kind += 1
print(kind,kind+color[7]) |
s216116198 | p03695 | u555947166 | 1552343165 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 264 | N = int(input())
rates = list(map(int, input().split()))
colors = [0]*9
for rate in rates:
colors[rate // 400] += 1
zeros = colors[0:8].count(0)
nonzeros = 8 - zeros
M = nonzeros + colors[8]
if nonzeros == 0:
m = 1
else:
m = nonzeros
print(m, M)
|
s116115872 | p03695 | u555947166 | 1552340539 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 270 | N = int(input())
rates = list(map(int, input().split()))
colors = [0]*9
for rate in rates:
colors[rate // 400] += 1
if colors[0:8] == [0] * 8:
print(1, min(colors[8], 8))
else:
zeros = colors[0:8].count(0)
print(8-zeros, 8-zeros+min(zeros, colors[8])) |
s738480479 | p03695 | u555947166 | 1552340409 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 270 | N = int(input())
rates = list(map(int, input().split()))
colors = [0]*9
for rate in rates:
colors[rate // 400] += 1
if colors[0:8] == [0] * 8:
print(1, min(colors[8], 8))
else:
zeros = colors[0:8].count(0)
print(8-zeros, 8-zeros+min(zeros, colors[8])) |
s488050184 | p03695 | u677705680 | 1552188734 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 659 | N = input()
A = sorted([int(x) for x in input().split()])
#配列と範囲の条件をもとに、
#条件を満たすものの個数と、満たさないもののリストを返す。
def Count(A,max):
if len(A)==0:
A_next = A
elif len(A)==1:
if A<=max:
A_next = []
else:
A_next = A
else:
A_next = [y for y in A if not(y<=max)]
num = 0
if (len(A) -... |
s364842739 | p03695 | u677705680 | 1552188657 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 659 | N = input()
A = sorted([int(x) for x in input().split()])
#配列と範囲の条件をもとに、
#条件を満たすものの個数と、満たさないもののリストを返す。
def Count(A,max):
if len(A)==0:
A_next = A
elif len(A)==1:
if A<=max:
A_next = []
else:
A_next = A
else:
A_next = [y for y in A if not(y<=max)]
num = 0
if (len(A) -... |
s100533639 | p03695 | u455696302 | 1552174191 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 288 | N = int(input())
A = [int(i) for i in input().split()]
counts = [0]*9
for i in A:
counts[int(i/400)] += 1
#print(counts)
v = 8 - counts[:-1].count(0)
if counts[-1] == 0:
print(v,v)
else:
if v == 0:
print(1,counts[-1])
else :
print(v,v+counts[-1])
|
s565084553 | p03695 | u455696302 | 1552174166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 290 | N = int(input())
A = [int(i) for i in input().split()]
counts = [0]*9
for i in A:
counts[int(i/400)] += 1
#print(counts)
v = 8 - counts[:-1].count(0)
if counts[-1] == 0:
print(v,v)
else:
if v == 0:
print(1,counts[-1])
else :
print(v,v+counts[-1])
|
s893038276 | p03695 | u371763408 | 1550158476 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 298 | n=int(input())
A=list(map(int,input().split()))
A=list(map(lambda x:x//400 if x<3200 else 8,A))
n_red=A.count(8)
red_exist=1 if len(n_red) else 0
red_only=1 if red_exist and list(set(A))[0]==8 else 0
n_min=len(set(A)) if not red_exist else len(set(A))-1
print(1 if red_only else n_min,n_min+n_red)
|
s768962971 | p03695 | u812973725 | 1550093304 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 735 | #include <stdio.h>
int max(int a,int b){
if(a > b){
return a;
}
return b;
}
int main(void){
int N,a;
int counter = 0;
int ans = 0;
int flag[9] = {0,0,0,0,0,0,0,0,0};
scanf("%d",&N);
for(int i = 0;i < N;i++){
scanf("%d",&a);
if(a < 400) flag[0] = 1;
else if(a < 800) flag[1] = 1;
... |
s189176634 | p03695 | u052332717 | 1549408529 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 272 | n = int(input())
A = list(map(int,input().split()))
color = []
cnt = 0
for i in range(n):
c = A[i]//400
if c<=7:
color.append(c)
else:
cnt += 1
diff = set(color)
minimum = max(len(diff),1)
maximum = min(len(diff)+cnt)
print(minimum, maximum) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.