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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s913892635 | p03695 | u683134447 | 1587863163 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38256 | 349 | n = int(input())
al = list(map(int,input().split()))
ansl = [0] * 9
for a in al:
ansl[a//400] += 1
min_ans = 0
for a in ansl[:8]:
if a > 0:
min_ans += 1
max_ans = min_ans
if ansl[-1] > 0:
if min_ans == 0:
min_ans += 1
max_ans += ansl[-1]
else:
max_ans = min_ans + ansl... |
s663423527 | p03695 | u114641312 | 1587620809 | Python | Python (3.4.3) | py | Runtime Error | 152 | 12508 | 1104 | # from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)
import ... |
s909988529 | p03695 | u021916304 | 1587605671 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 331 | def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n = ii()
A = iil()
l = [0]*9
for i in A:
l[max(i//400,8)] += 1
lf = l[:-1]
ans = 8-lf.count(0)
print(ans... |
s597388585 | p03695 | u021916304 | 1587559853 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 324 | def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n = ii()
A = iil()
l = [0]*9
for i in A:
l[i//400] += 1
lf = l[:-1]
ans = 8-lf.count(0)
print(ans,ans+l[... |
s516884758 | p03695 | u727148417 | 1587433495 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 204 | N = int(input())
a = [int(x) for x in input().split()]
b = [0]*9
ans = 0
count = 0
for i in a:
if i//400 < 8:
b[i//400] = 1
else:
b[i//400] += 1
print(max(1, sum(b[:8])), sum(b))
|
s603695790 | p03695 | u578694888 | 1587328381 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 664 | # -*- coding: utf-8 -*-
n=int(input())
a=list(map(int, input().split()))
a.sort()
d=[0 for _ in range(8)]
flg=False
minim=-1
for i in range(n):
if a[i]<400:
d[0]=1
elif a[i]<800:
d[1]=1
elif a[i]<1200:
d[2]=1
elif a[i]<1600:
d[3]=1
elif a[i]<2000:
d[4]=1
... |
s447376661 | p03695 | u578694888 | 1587328288 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 650 | # -*- coding: utf-8 -*-
n=int(input())
a=list(map(int, input().split()))
a.sort()
d=[0 for _ in range(8)]
flg=False
minim=-1
for i in range(n):
if a[i]<400:
d[0]=1
elif a[i]<800:
d[1]=1
elif a[i]<1200:
d[2]=1
elif a[i]<1600:
d[3]=1
elif a[i]<2000:
d[4]=1
... |
s421961669 | p03695 | u578694888 | 1587328201 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 656 | # -*- coding: utf-8 -*-
n=int(input())
a=list(map(int, input().split()))
a.sort()
d=[0 for _ in range(8)]
flg=False
minim=-1
for i in range(n):
if a[i]<400:
d[0]=1
elif a[i]<800:
d[1]=1
elif a[i]<1200:
d[2]=1
elif a[i]<1600:
d[3]=1
elif a[i]<2000:
d[4]=1
... |
s562750703 | p03695 | u235396011 | 1587177221 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38256 | 1759 | #include <bits/stdc++.h>
using namespace std;
template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }
#define pb push_back
#define mp make_pair
#define cotu cout
#define itn int
#define Red ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define... |
s726924861 | p03695 | u707124227 | 1586956044 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 361 | n=int(input())
a=list(map(lambda x:int(x)//400,input().split()))
cat=[0]*12
"""
cat=[0]*9
for ai in a:
if ai < 8:
cat[ai]=1
else:
cat[8]+=1
print(str(max(sum(cat[:8]),1))+' '+str(min(sum(cat),8)))
"""
for ai in a:
cat[ai]+=1
print(str(max(sum([x > 0 for x in cat[:8]]),1))+' '+str(min(sum([x ... |
s908500782 | p03695 | u580697892 | 1586922551 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 437 | # coding: utf-8
L = [0 for _ in range(8)]
N = int(input())
A = list(map(int, input().split()))
v = 0
for i in range(N):
idx = A[i] // 400
if idx > 8:
v += 1
else:
L[idx] += 1
amin, amax = 0, 0
for i in range(len(L)):
if L[i] > 0:
amin += 1
if L[i] == 0 and v > 0:
L[i]... |
s872795262 | p03695 | u818349438 | 1586881466 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 309 | n = int(input())
a = list(map(int,input().split()))
red = 0
ans = 0
cnt = [0]*10
for x in a:
if x < 3200:
cnt[x//400] +=1
else:
red+=1
for x in cnt:
if x >0:ans+=1
if red == n:ans = 1
print(ans)
ans+=red
print(ans)
|
s478658945 | p03695 | u735008991 | 1586714776 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38384 | 165 | N = int(input())
A = list(map(int, input().split()))
C = [0] * 9
for a in A:
C[a//400] += 1
s = sum([c > 0 for c in C[:-1]])
print(max(s, 1), min(9, s + C[-1]))
|
s054361956 | p03695 | u230717961 | 1586708463 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 450 | import collections
def solve(n, a_list):
count = collections.Counter()
for i in a_list:
count[i // 400] += 1
max_value = len([i for i in count.keys() if i != 8]) + count[8]
min_value = 1 if max_value - count[8] == 0 else max_value - count[8]
return "{0} {1}".format(min_value, max_value)
... |
s440877046 | p03695 | u230717961 | 1586707652 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 394 | import collections
def solve(n, a_list):
count = collections.Counter()
for i in a_list:
count[i // 400] += 1
min_value = len([i for i in count.keys() if i != 8])
max_value = min_value + count[8]
return "{0} {1}".format(min_value, max_value)
if __name__ == "__main__":
n = int(input())
... |
s007413860 | p03695 | u230717961 | 1586707614 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 402 | import collections
def solve(n, a_list):
count = collections.Counter()
for i in a_list:
count[i // 400] += 1
min_value = len([i for i in count.keys() if i != 8])
max_value = min_value + count[8]
return "{0} {1}".format(min_value, max_value)
if __name__ == "__main__":
n = int(input())
... |
s051443801 | p03695 | u931462344 | 1586566095 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 216 | N = int(input())
A = list(map(int, input().split()))
colors = [0]*9
for a in A:
colors[a//400] += 1
ansmin = 0
for c in colors[:-1]:
if c:
ansmin += 1
print("{} {}".format(ansmin, ansmin+colors[-1])) |
s422491234 | p03695 | u903005414 | 1586520081 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 276 | N = int(input())
A = list(map(int, input().split()))
cnt1 = 0
for i in range(8):
v1 = i * 400
v2 = (i + 1) * 400 - 1
for j in range(N):
if v1 <= A[i] <= v2:
cnt1 += 1
break
cnt2 = 0
for i in range(N):
if A[i] >= 3200:
cnt2 += 1
print(cnt1, cnt2) |
s133024399 | p03695 | u698919163 | 1586464781 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38256 | 273 | N = int(input())
a = list(map(int,input().split()))
color = [0]*9
for rate in a:
if rate >= 3200:
color[8] += 1
else:
color[rate//400] += 1
ans = 0
for i in range(8):
if color[i] > 0:
ans += 1
print(max(ans,1),ans + c[8]) |
s322910907 | p03695 | u698919163 | 1586464746 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38256 | 277 | N = int(input())
a = list(map(int,input().split()))
color = [0]*9
for rate in a:
if rate >= 3200:
color[8] += 1
else:
color[rate//400] += 1
ans = 0
for i in range(8):
if color[i] > 0:
ans += 1
print(max(ans,1),ans + c[8]) |
s281554318 | p03695 | u440129511 | 1586389720 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 192 | n=int(input())
a=[map(int,input().split())]
a=map(lambda x:x//400,a)
a1=[i for i in a if i<8]
a2=[i for i in a if i>7]
k=len(set(a1))
if k+len(a2)>8:m=8
else:m=k+len(a2)
print(len(set(a1)),m) |
s042767674 | p03695 | u189487046 | 1586260010 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 707 | N = int(input())
A = list(map(int, input().split()))
cnt = [0]*7
ziyu = 0
for a in A:
if 1 <= a <= 399 and cnt[0] == 0:
cnt[0] = 1
elif 400 <= a <= 799 and cnt[1] == 0:
cnt[1] = 1
elif 800 <= a < 1199 and cnt[2] == 0:
cnt[2] = 1
elif 1200 <= a <= 1599 and cnt[3] == 0:
cn... |
s996035108 | p03695 | u330661451 | 1586259685 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 352 | def main():
n = int(input())
a = list(map(int,input().split()))
l = [0] * 8
for v in a :
l[v//400] += 1
cnt = 0
for v in range(len(l)-1):
if v != 0: cnt+=1
mx = cnt + l[-1]
mn = cnt if cnt != 0 else 1 if l[-1] != 0 else 0
print("{} {}".format(str(mn),str(mx)))
if __... |
s524528066 | p03695 | u931462344 | 1586259451 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 215 | N = int(input(()))
A = list(map(int, input().split()))
hist = [0]*9
for i in A:
hist[i//400] += 1
ansmin = 0
for i in hist[:-1]:
if i > 0:
ansmin += 1
print("{} {}".format(ansmin, ansmin+hist[-1])) |
s394777533 | p03695 | u287500079 | 1586259422 | Python | PyPy3 (2.4.0) | py | Runtime Error | 188 | 38384 | 1358 | import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string ... |
s960170853 | p03695 | u312025627 | 1586259384 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38640 | 244 | def main():
N = int(input())
A = [int(i) for i in input().split()]
cnt = [0]*9
for a in A:
cnt[a//400] += 1
ans = sum(int(a > 0) for a in cnt[:-1])
print(ans, ans+cnt[-1])
if __name__ == '__main__':
main()
|
s986348219 | p03695 | u992910889 | 1585882106 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38384 | 453 | def resolve():
N = int(input())
A = list(map(int, input().split()))
ls = [False] * 8
cnt = 0
for i in A:
if i<3200:
ls[i//400]=True
else:
cnt += 1
if ls.count(True)==0:
if cnt==0:
minval=0
else:
minval=1
if ls.... |
s539625630 | p03695 | u270144704 | 1585667194 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38256 | 579 | def main():
import sys
n = int(input())
a = list(map(int, input().split()))
color = [0] * 8
sub_color = 0
count = 0
for score in a
if score <= 0:
continue
for i in range(8):
if i*400 < score <= 399+(i*400):
color[i] += 1
if scor... |
s494478705 | p03695 | u270144704 | 1585667115 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38512 | 580 | def main():
import sys
n = int(input())
a = list(map(int, input().split()))
color = [0] * 8
sub_color = 0
count = 0
for score in a
if score <= 0:
continue
for i in range(8):
if i*400 <= score <= 399+(i*400):
color[i] += 1
if sco... |
s823726565 | p03695 | u325956328 | 1585057978 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 567 | from bisect import bisect_right
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
rate = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
idx = []
for a in A:
idx.append(bisect_right(rate, a))
# print(idx)
c = Counter(idx)
print(c)/
min_c = len(c.keys())
if (7 in c.keys()) a... |
s164386997 | p03695 | u935984175 | 1585020998 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 364 | def solve():
_ = int(input())
a = list(map(int, input().split()))
counter = [0] * 9
for ai in a:
counter[ai // 400] += 1
ans_min = 0
for i in range(8):
if 0 < counter[i]:
ans_min += 1
ans_max = min(8, ans_min + counter[-1])
print(ans_min, ans_ma... |
s555641140 | p03695 | u102242691 | 1584791595 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 601 | n = int(input())
a = list(map(int,input().split()))
a.sort()
b = [0]*8
over = 0
for i in a:
if i < 400:
b[0] += 1
elif i < 800:
b[1] += 1
elif i < 1200:
b[2] += 1
elif i < 1600:
b[3] += 1
elif i < 2000:
b[4] += 1
elif i < 2400:
b[5] += 1
elif ... |
s915835404 | p03695 | u953110527 | 1584710095 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 282 | n = int(input())
a = list(map(int,input().split()))
w = [0 for i in range(9)]
count = 0
for i in a:
if i < 3200 and w[i//400]==0:
count+=1
w[i//400]+=1
if count == 0:
print(1,w[8])
elif w[8] == 0:
print(count,count)
else:
b= count+w[8]
print(count,b) |
s795619562 | p03695 | u953110527 | 1584710043 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 273 | n = int(input())
a = list(map(int,input().split()))
w = [0 for i in range(9)]
count = 0
for i in a:
if i < 3200 and w[i//400]==0:
count+=1
w[i//400]+=1
if count == 0:
print(1,w[8])
elif w[8] == 0:
print(count,count)
else:
print(count,count+w[8]) |
s775920404 | p03695 | u953110527 | 1584709911 | Python | Python (3.4.3) | py | Runtime Error | 151 | 12500 | 292 | import numpy as np
n = int(input())
a = list(map(int,input().split()))
w = np.zeros(9,dtype=int)
count = 0
for i in a:
if i < 3200 and w[i//400]==0:
count+=1
w[i//400]+=1
if count == 0:
print(1,w[8])
elif w[8] == 0:
print(count,count)
else:
print(count,count+w[8]) |
s716493871 | p03695 | u953110527 | 1584709387 | Python | Python (3.4.3) | py | Runtime Error | 152 | 12392 | 308 | import numpy as np
n = int(input())
a = list(map(int,input().split()))
w = np.zeros(9,dtype=int)
count = 0
for i in range(n):
if a[i] < 3200 and w[a[i]//400]==0:
count+=1
w[a[i]//400]+=1
if count == 0:
print(1,w[8])
elif w[7] == 0:
print(count,count)
else:
print(count,count+w[8]) |
s330252762 | p03695 | u953110527 | 1584709377 | Python | Python (3.4.3) | py | Runtime Error | 153 | 12512 | 320 | import numpy as np
n = int(input())
a = list(map(int,input().split()))
w = np.zeros(9,dtype=int)
count = 0
for i in range(n):
if a[i] < 3200 and w[a[i]//400]==0:
count+=1
w[a[i]//400]+=1
if count == 0:
print(1,w[8])
elif w[7] == 0:
print(count,count)
else:
print(count,count+w[8])
print(w[8]) |
s586253864 | p03695 | u953110527 | 1584709196 | Python | Python (3.4.3) | py | Runtime Error | 156 | 12484 | 400 | import numpy as np
n = int(input())
a = list(map(int,input().split()))
w = np.zeros(9,dtype=int)
count = 0
for i in range(n):
if a[i] < 3200 and w[a[i]//400]==0:
count+=1
w[a[i]//400]+=1
if count == 0 and w[8] <=8:
print(1,w[8])
elif count == 0:
print(1,8)
elif w[7] == 0:
print(count,count)
... |
s525174946 | p03695 | u223663729 | 1584475739 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 167 | n, *A = map(int, open(0).read().split())
c = [0]*9
for a in A:
c[min(8, a//400)] += 1
cl = 8-c[:-1].count(0)
cmin = max(1, cl)
cmax = min(cl+c[8])
print(cmin, cmax) |
s643574570 | p03695 | u223663729 | 1584475708 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 204 | n, *A = map(int, open(0).read().split())
c = [0]*9
for a in A:
c[min(8, a//400)] += 1
print(8-c[:-1].count(0))
print(c[8])
cl = 8-c[:-1].count(0)
cmin = max(1, cl)
cmax = min(cl+c[8])
print(cmin, cmax) |
s342766293 | p03695 | u223663729 | 1584474651 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 174 | n, *A = map(int, open(0).read().split())
c = [0]*9
for a in A:
c[min(8, a//400)] += 1
print(c)
cmin = max(1, 8-[c::-1].count(0))
cmax = min(8, cmin+c[8])
print(cmin, cmax) |
s698727006 | p03695 | u841623074 | 1584327826 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 189 | ans1=sum(1 for x in array[:-1]if x>0)
ans=8-array.count(0)
if array[8]==0:
ans+=1
else:
ans+=array[8]
if ans>8:
ans=8
if ans1==0:
ans1+=1
print(ans1,ans)
|
s445613362 | p03695 | u751843916 | 1584326269 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 149 | n=int(input())
s=list(map(int,input().split()))
l=[0 for _ in range(12)]
for x in s:
l[x//400]+=1
j=sum(r>0 for r in l[:8])
print(j,j+sum(l[8:])) |
s007027298 | p03695 | u678167152 | 1584076478 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 272 | N = int(input())
A = list(map(int, input().split()))
A = list(map(lambda x:x//400,A))
#print(A)
C = [0]*9
for a in A:
if a>=8:
C[8] +=1
elif C[a]==0:
C[a] = 1
#print(C[:-1])
mi = sum(C[:-1])
if mi == 0:
mini = min(1,C[-1])
ma = min(8,mi+C[-1])
print(mini,ma) |
s793516798 | p03695 | u308684517 | 1583890517 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 265 | n = int(input())
A = list(map(int, input().split()))
R = [0 for i in range(9)]
for i in range(n):
R[A[i]//400] += 1
mi = 0
for i in range(8):
if R[i] > 0: mi += 1
if mi == 0 and R[8] > 0:
print(mi+1, min(8, mi+R[8]))
else:
print(mi, min(8, mi+R[8])) |
s672137328 | p03695 | u811169796 | 1583815789 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 215 | n = int(input())
A = list(map(int,input().split()))
dic = [False]*7
cnt = 0
for i in range(n):
tmp = A[i] // 400
if(tmp >= 8):
cnt += 1
else:
dic[tmp] = True
print(sum(dic))
print(sum(dic) + cnt) |
s733480306 | p03695 | u811169796 | 1583815765 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 226 | n = int(input())
A = list(map(int,input().split()))
dic = [False]*7
cnt = 0
for i in range(n):
tmp = A[i] // 400
if(tmp >= 8):
cnt += 1
else:
dic[tmp] = True
print(str(sum(dic)) + ' ' + str(sum(dic) + cnt)) |
s881252304 | p03695 | u175590965 | 1583295898 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 252 | n = int(input())
a = list(map(int,input().split()))
l =[]
for i in a:
l.append(i//400)
x = set()
y = 0
for i in l:
if i< 7:
x.add(i)
else:
y +=1
x = len(x)
if x:
mi =x
else:
mi =1
ma =x+y
print('{} {}'.format(mi.ma)) |
s321408588 | p03695 | u175590965 | 1583295812 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 251 | n = int(input())
a = list(map(int,input().split()))
l =[]
for i in a:
l.append(i//400)
x = set()
y = 0
for i in l:
if i< 7:
x.add(i)
else:
y +=1
x = len(x)
if x:
mi =x
else:
mi =1
ma =x+y
print('{}{}'.format(mi.ma)) |
s726064913 | p03695 | u517447467 | 1583011631 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38256 | 232 | N = int(input())
X = list(map(int, input().split()))
X = [x//400 for x in X]
min_X = len(set([x for x in X if x < 8]))
max_X = min_X + len([x for x in X if x >= 8])
# この max は気づかないなあ
print(max([min_X, 1], max_X)
|
s044573945 | p03695 | u170183831 | 1582686428 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 190 | n = input()
A = list(map(int, input().split()))
flags = [0] * 8
count = 0
for a in A:
if a < 3200:
flags[a // 400] += True
else:
counts += 1
print(sum(flags), sum(flags) + count) |
s367762636 | p03695 | u094191970 | 1582594018 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 173 | n=int(input())
a=list(map(int,input().split())
cnt=0
l=[]
for i in a:
p=i//400
if p<=7:
l.append(p)
else:
cnt+=1
d=len(set(l))
if d==0:
d+=1
print(d,d+cnt) |
s018890586 | p03695 | u094191970 | 1582593930 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 183 | n=int(input())
a=list(map(int,input().split())
cnt=0
l=[]
for i in a:
p=i//400
if p<=7:
l.append(p)
else:
cnt+=1
def=len(set(l))
if def==0:
def+=1
print(def,def+cnt) |
s294673349 | p03695 | u217627525 | 1582005380 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 363 | n=int(input())
a=list(map(int,input().split()))
a.sort()
i=0
check=[0]*8
while i<n and a[i]<3200:
a_i=a[i]
for j in range(8):
if check[j]==0 and a_i>=400*j and a_i<400*(j+1):
check[j]=1
break
i+=1
if sum(check)==0:
ans_min=1
ans_max_=n
else:
ans_min=sum(check)
... |
s276435384 | p03695 | u821432765 | 1581995674 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 295 | n = int(input())
A = [int(i) for i in input().split()]
c = 0
for i in A: c += 1 if i<3200 else 0
Am = set()
for i in A:
if i<3200:
Am.add(i//400)
minc = len(Am if c>0 else Am+1)
AM = set([int(v)//400 if v<3200 else i+50 for i, v in enumerate(A)])
maxc = len(AM)
print(minc, maxc) |
s176266289 | p03695 | u063073794 | 1581918666 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 449 | n=int(input())
a=list(map(int, input().split()))
l=[0]*8
for i in range(n):
if a[i]<399:
l[0]="t"
elif a[i]<799:
l[1]="t"
elif a[i]<1199:
l[2]="t"
elif a[i]<1599:
l[3]="t"
elif a[i]<1999:
l[4]="t"
elif a[i]<2399:
l[5]="t"
elif a[i]<2799:
l[6]="t"
elif a[i]<3199:
l[7]="t... |
s057406034 | p03695 | u063073794 | 1581918587 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 453 | n=int(input())
a=list(map(int, input().split()))
l=[0]*8
for i in range(n):
if a[i]<399:
l[0]="t"
elif a[i]<799:
l[1]="t"
elif a[i]<1199:
l[2]="t"
elif a[i]<1599:
l[3]="t"
elif a[i]<1999:
l[4]="t"
elif a[i]<2399:
l[5]="t"
elif a[i]<2799:
l[6]="t"
elif a[i]<3199:
l[7]="t... |
s575329824 | p03695 | u637918426 | 1581722299 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 409 | ates = list(input().split())
for i in range(len(rates)):
rates[i] = int(rates[i]) // 400
MAX = 0
MIN = 0
j = 0
while j <= 8:
for k in range(N):
if j != 8 and j == rates[k]:
MAX += 1
MIN += 1
break
elif j == 8 and j <= rates[k]:
MAX += 1
... |
s635311812 | p03695 | u747703115 | 1581436734 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 207 | n = int(input())
A = list(map(int, input().split()))
k = [0]*n
mk = [0]*8
for i in range(n):
k[i] = A[i]//400
mk[k[i]-1] += 1
r1 = len(set(k))-min(1, mk[-1])
r2 = r1+mk[-1]
print(str(r1)+" "+str(r2)) |
s504033591 | p03695 | u747703115 | 1581436146 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 241 | n = int(input())
A = list(map(int, input().split()))
k = [0]*n
mk = [0]*8
for i in range(n):
k[i] = A[i]//400
mk[k[i]-1] += 1
if mk[-1]:
print(len(set(k))-1, min(len(set(k))-1+mk[-1], 8))
else:
print(len(set(k)), len(set(k))) |
s925190135 | p03695 | u488934106 | 1581228767 | Python | PyPy3 (2.4.0) | py | Runtime Error | 162 | 38256 | 54 | コードテスト - AtCoder Beginner Contest 064.html |
s325353491 | p03695 | u112317104 | 1580756597 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 666 | N = int(input())
A = list(map(int, input().split()))
colors = [0 for _ in range(N + 1)]
for a in A:
if 1<= a < 400:
colors[0] = 1
if 400 <= a < 800:
colors[1] = 1
if 800 <= a < 1200:
colors[2] = 1
if 1200 <= a < 1600:
colors[3] = 1
if 1600 <= a < 2000:
color... |
s544126580 | p03695 | u856169020 | 1580402719 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 373 | N = int(input())
A = map(int,input().split())
l = [0 for i in range(9)]
for a in A:
ind = 0
while ind < 9:
if a < (ind+1)*400:
break
ind += 1
l[ind] += 1
ans_max = 0
ans_min = 0
for i in range(0, 8):
if l[i] > 0:
ans_max += 1
ans_min += 1
if l[-1] > 0:
ans_max = min(ans_max + l[-1] , 9... |
s344006963 | p03695 | u644360640 | 1580252352 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 390 | n = int(input())
a = list(map(int,input().split()))
color = [0 for i in range(9)]
a.sort()
for i in a:
number = i//400
color[number] += 1
left = 8 - color[:8].count(0)
right = color[8]
if left == 8:
print('{} {}'.format(8,8))
else:
sum_color = left + right
if sum_color >= 8:
print('{} {}'.fo... |
s960812892 | p03695 | u344959886 | 1580238563 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38384 | 208 | n = int(input())
a = list(map(int, input().split()))
rank=[0]*9
for i in a:
rank[i//400]+=1
s=0
for i in range(8):
if rank[i]>0:
s+=1
if s>0:
s1=s
else:
s1=1
s2=s+rank[8]
print(s1,s2) |
s556724556 | p03695 | u344959886 | 1580238508 | Python | PyPy3 (2.4.0) | py | Runtime Error | 162 | 38384 | 208 | n = int(input())
a = list(map(int, input().split()))
rank=[0]*9
for i in a:
rank[i//400]+=1
s=0
for i in range(8):
if rank[i]>0:
s+=1
if s>0:
s1=s
else:
s1=1
s2=s+rank[8]
print(s1,s2) |
s329110135 | p03695 | u835924161 | 1580186217 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 227 | n=int(input())
A=list(map(int,input().split()))
B=[0,0,0,0,0,0,0,0]
red=int(0)
for i in range(n):
now=int(A[i]/400)
if now<=8:
B[now]=1
else:
red+=1
ans=B.count(1)
print("{} {}".format(ans,ans+red)) |
s826519496 | p03695 | u835924161 | 1580185871 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 226 | n=int(input())
A=list(map(int,input().split()))
B=[0,0,0,0,0,0,0,0,0]
for i in range(n):
now=int(A[i]/400)
B[now]+=1
ans=int(0)
for i in range(8):
if B[i]>0:
ans+=1
print("{} {}".format(ans,ans+B[8])) |
s078193956 | p03695 | u311636831 | 1579819788 | Python | PyPy3 (2.4.0) | py | Runtime Error | 161 | 38384 | 174 | N=int(input())
S=list(map(int,input().split()))
D=[0]*9
for s in S:
s//=400
D[s]+=1
c=0
for i in range(8):
if(D[i]==0):
c+=1
print(8-c,8-c+min(c,D[8]))
|
s558025312 | p03695 | u329407311 | 1579754353 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 490 | int(input())
a = list(map(int, input().split()))
c = [0] * 9
for rate in a:
i = rate // 400
if i < 8:
c[i] = 1
else:
c[8] += 1
c_sum = sum(c[:8])
c_min = max(c_sum, 1)
c_max = c_sum + c[8]
print(c_min, c_max)
N = int(input())
a = list(map(int, input().split()))
c = [0] * 9
for rat... |
s115702961 | p03695 | u329407311 | 1579754338 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 503 | int(input())
a = list(map(int, input().split()))
c = [0] * 9
for rate in a:
i = rate // 400
if i < 8:
c[i] = 1
else:
c[8] += 1
c_sum = sum(c[:8])
c_min = max(c_sum, 1)
c_max = c_sum + c[8]
print(c_min, c_max)
N = int(input())
a = list(map(int, input().split()))
c = [0] * 9
for rat... |
s474007673 | p03695 | u777283665 | 1579743990 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 197 | n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
r[i//400] += 1
c = sum([1 for i in r[:-1] if i != 0])
t = r[-1]
if c == 0:
print(1, t)
else:
print(c, c+t) |
s486397888 | p03695 | u777283665 | 1579743878 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 249 | n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
r[i//400] += 1
if sum([1 for i in r[:-1] if i != 0]) == 0:
print(1, r[-1])
else:
mi = sum([1 for i in r[:-1] if i != 0])
ma = mi + r[-1]
print(mi, ma) |
s406994988 | p03695 | u777283665 | 1579743623 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 230 | n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
r[i//400] += 1
if sum([1 for i in r[:-1] if i != 0]) == 0:
print(1, n)
else:
mi = sum([1 for i in r[:-1] if i != 0])
print(mi, mi+r[-1]) |
s679421265 | p03695 | u777283665 | 1579743292 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 380 | n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
r[i//400] += 1
if sum([1 for i in r[:-1] if i != 0]) == 0:
print(1, min(8, n))
else:
mi = sum([1 for i in r[:-1] if i != 0])
res = 8 - mi
if res == 0:
print(mi, mi)
else:
if res > r[-1]:
pri... |
s735732734 | p03695 | u777283665 | 1579742013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 289 | n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
r[i//400] += 1
if r[-1] == 0:
cnt = sum([1 for i in r[:-1] if i != 0])
print(cnt, cnt)
else:
cnt = sum([1 for i in r[:-1] if i != 0])
res = 8 - cnt
print(max(cnt, 1), cnt+min(res, r[-1])) |
s140257894 | p03695 | u530786533 | 1579460789 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 166 | ans = len(set(b))
if (8 in b):
ans -= 1
ans2 = b.count(8) + ans
if (ans == 0):
print(1, ans2)
else:
print(ans, ans2)
else:
print(ans, ans)
|
s269664657 | p03695 | u309141201 | 1579208282 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 734 | N = int(input())
a = list(map(int, input().split()))
colors = [0] * 9
for i in range(N):
if 1 <= a[i] and a[i] <= 399:
colors[0] = 1
elif 400 <= a[i] and a[i] <= 799:
colors[1] = 1
elif 800 <= a[i] and a[i] <= 1199:
colors[2] = 1
elif 1200 <= a[i] and a[i] <= 1599:
colors... |
s769640582 | p03695 | u506287026 | 1578976700 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 1081 | from collections import defaultdict
N = int(input())
rates = [int(i) for i in input().split()]
color_nums = defaultdict(int)
for rate in rates:
if rate <= 399:
color_nums['灰'] += 1
elif rate <= 799:
color_nums['茶'] += 1
elif rate <= 1199:
color_nums['緑'] += 1
elif rate <= 1599:... |
s887097507 | p03695 | u071680334 | 1578934596 | Python | PyPy3 (2.4.0) | py | Runtime Error | 171 | 38512 | 608 | #include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>
#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define revrep(i,begin,end) for(int i=begin; i>end; i--)
#define lld long long int
int main(){
int n;
int x[9]={0};
scanf("%d", &n);
rep(i, 0, n){
i... |
s681089163 | p03695 | u071680334 | 1578934505 | Python | PyPy3 (2.4.0) | py | Runtime Error | 160 | 38256 | 600 | #include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<limits.h>
#define rep(i,begin,end) for(int i=begin; i<end; i++)
#define revrep(i,begin,end) for(int i=begin; i>end; i--)
#define lld long long int
int main(){
int n, x[9]={0};
scanf("%d", &n);
rep(i, 0, n){
int a, b;... |
s751516931 | p03695 | u181215519 | 1577818441 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 237 | N = int( input() )
As = [ map( int, input().split() ) ]
rate = []
anycol = 0
for i in A :
if i >= 3200 :
anycol += 1
else :
rate.append( i // 400 )
count = let( set(rate) )
print( max(count, 1), min(count+anycol, 8) ) |
s736536239 | p03695 | u095021077 | 1577768137 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 175 | N=int(input())
a=list(map(int, input().split()))
c=[0]*9
for i in range(N):
c[a[i]//400]+=1
temp=[1 for i in range(8) if c[i]>0]
x=len(temp)
y=min(8, x+c[8])
print(x, y) |
s900457075 | p03695 | u095021077 | 1577768075 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 165 | N=int(input())
a=list(map(int, input().split()))
c=[0]*9
for i in range(N):
c[a[i]//400]+=1
x=sum([1 for i in range(8) if c[i]>0])
y=min(8, x+c[8])
print(x, y) |
s534449507 | p03695 | u993435350 | 1577396491 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1099 | #レート
#1-399:灰色
#400-799:茶色
#800-1199:緑色
#1200-1599:水色
#1600-1999:青色
#2000-2399:黄色
#2400-2799:橙色
#2800-3199:赤色
N = int(input())
scores = sorted(list(map(int,input().split())))
colors = []
color = ""
another = 0
for point in scores:
if point <= 399:
color = "gray"
if color not in colors:
colors.appe... |
s704454002 | p03695 | u993435350 | 1577396269 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1060 | #レート
#1-399:灰色
#400-799:茶色
#800-1199:緑色
#1200-1599:水色
#1600-1999:青色
#2000-2399:黄色
#2400-2799:橙色
#2800-3199:赤色
N = int(input())
scores = sorted(list(map(int,input().split())))
colors = []
color = ""
another = 0
for point in scores:
if point <= 399:
color = "gray"
if color not in colors:
colors.appe... |
s233281820 | p03695 | u735069283 | 1577393807 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 309 | N=int(input())
A=[int(x) for x in input().split()]
B=[0]*9
for i in range(N):
R=A[i]//400
if R>8:
R=8
B[R] +=1
answer_min=0
for i in range(8):
if not B[i]==0:
answer_min +=1
answer_max=answer_min+B[8]
if answer_max>8:
answer_max=8
if answer_min=0:
answer_min=1
print(answer_min,answer_max) |
s510245210 | p03695 | u226912938 | 1577288058 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 575 | n = int(input())
A = list(map(int, input().split()))
Colors = [0 for _ in range(7)]
any_color = 0
for a in A:
if a <= 399:
Colors[0] = 1
elif a <= 799:
Colors[1] = 1
elif a <= 1199:
Colors[2] = 1
elif a <= 1599:
Colors[3] = 1
elif a <= 1999:
Colors[4] = 1
... |
s936220913 | p03695 | u373593739 | 1577200511 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1068 | Nc = input()
N = int(Nc)
cor = ''
c = map(int,input().split())
l = list(c)
l2 = []
l3 = []
maxL = 0
for num in l:
if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int:
if 1 <= num <= 399:
cor = 'cinzento'
l2.append(cor)
elif 400 <= num <= 799:
cor = 'casta... |
s637112893 | p03695 | u373593739 | 1577092819 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1073 | Nc = input()
N = int(Nc)
cor = ''
c = map(int,input().split())
l = list(c)
l2 = []
l3 = []
maxL = 0
for num in l:
if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int:
if 1 <= num <= 399:
cor = 'cinzento'
l2.append(cor)
elif 400 <= num <= 799:
cor = 'cast... |
s191445528 | p03695 | u934978909 | 1577092770 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 888 | N=int(input())
gray=0
brown=0
green=0
cyan=0
blue=0
yellow=0
orange=0
red=0
qq=0
minimo=0
maximo=0
qtdCores=0
while N>0:
a=int(input())
if a>=1 and a<=399:
gray+=1
elif a>=400 and a<=799:
brown+=1
elif a>=800 and a<=1199:
green+=1
elif a>=1200 and a<=1599:
cyan+=1
... |
s039915606 | p03695 | u373593739 | 1577092444 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1075 | Nc = input()
N = int(Nc)
cor = ''
c = map(int,input().split())
l = list(c)
l2 = []
l3 = []
maxL = 0
for num in l:
if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int:
if 1 <= num <= 399:
cor = 'cinzento'
l2.append(cor)
elif 400 <= num <= 799:
cor = 'cast... |
s503579405 | p03695 | u130900604 | 1577054457 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 304 | li=[0]*8
o=0
n,*a=map(int,open(0).read().split())
for i in a:
if i>=3200:
o+=1
else:
li[i//400]=1
#全員3200以上==(sum(li)==0)> 1,min(o,8)
#全員3200未満==(o==0)> sum(li),min(sum(li)+o,8)
#それ以外>sum(li)
if sum(li)==0:
print(1,min(o,8))
else:
print(sum(li),min(sum(li)+o,8) |
s798287515 | p03695 | u130900604 | 1577053839 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 361 | n,*a=map(int,open(0).read().split())
"""
1 399:灰色
400 799:茶色
800 1199:緑色
1200 1599:水色
1600 1999:青色
2000 2399:黄色
2400 2799:橙色
2800 3199:赤色
"""
if n=1:
print(1,1)
exit()
li=[False]*8
over3200=0
for i in a:
if i>=3200:
over3200+=1
else:
li[(i//400)]=True
k=sum(li)
print(k,k+over3200)
|
s295393366 | p03695 | u683134447 | 1576982356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 224 | color = [0 for i in range(8)]
n = int(input())
al = list(map(int,input().split()))
p = 0
for a in al:
if a < 3200:
color[a//400] = 1
else:
p += 1
print(max(sum(color), 1))
print(min(sum(color) + p)) |
s030799177 | p03695 | u329706129 | 1576732543 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 256 | N = int(input())
a = list(map(int, input().split()))
color = [0] * 8
for p in a:
if p >= 3200: color[8] += 1
else: color[p // 400] += 1
small = len([c for c in color[0:8] if c > 0])
big = small + color[8]
if not small: small += 1
print(small, big)
|
s324032857 | p03695 | u984276646 | 1576618293 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 243 | N = int(input())
L = [0 for i in range(9)]
S = list(map(int, input().split()))
for i in range(N):
L[S[i] // 400] += 1
Z, M, m = 0, 0, 0
for i in range(8):
if L[i] == 0:
Z += 1
else:
M += 1
m += 1
M += min(Z, L[8])
print(m, M) |
s300598819 | p03695 | u327248573 | 1576462579 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 545 | from sys import stdin
n = int(stdin.readline().rstrip())
a = list(map(int, stdin.readline().rstrip().split()))
c = [0] * 9
for i in a:
if i >= 3200:
c[8] += 1
else:
for j in range(9):
if 400 * j <= i < 400 * j + 399:
c[j] += 1
if c[8] > 0:
resmin = len([i for i ... |
s275237145 | p03695 | u348868667 | 1576186866 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 234 | N = int(input())
a = list(map(int,input().split()))
col = [0]*8
wild = 0
for i in a:
if i//400 <= 7:
col[i//400] = 1
else:
wild += 1
minimum = max(1,sum(col))
maximum = min(sum(col)+wild)
print(minimum,maximum) |
s163175273 | p03695 | u540761833 | 1576166638 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 315 | N = int(input())
a = list(map(int,input().split()))
num = [0 for i in range(9)]
for i in range(N):
num[a[i]//400] += 1
if num[-1] == 0:
num = [i for i in num if i != 0]
print(len(num),len(num))
else:
n = num.pop(-1)
num2 = [i for i in num if i != 0]
print(len(num2),min(8,len(num2)+n))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.