Problem:


Score : 300 points

Problem Statement

In AtCoder, a person who has participated in a contest receives a color, which corresponds to the person's rating as follows:  

Rating 1-399 : gray

Rating 400-799 : brown

Rating 800-1199 : green

Rating 1200-1599 : cyan

Rating 1600-1999 : blue

Rating 2000-2399 : yellow

Rating 2400-2799 : orange

Rating 2800-3199 : red

Other than the above, a person whose rating is 3200 or higher can freely pick his/her color, which can be one of the eight colors above or not.

Currently, there are N users who have participated in a contest in AtCoder, and the i-th user has a rating of a_i.

Find the minimum and maximum possible numbers of different colors of the users.  

Constraints

1 ≤ N ≤ 100

1 ≤ a_i ≤ 4800

a_i is an integer.

Input

Input is given from Standard Input in the following format:

N
a_1 a_2 ... a_N

Output

Print the minimum possible number of different colors of the users, and the maximum possible number of different colors, with a space in between.  

Sample Input 1

4
2100 2500 2700 2700

Sample Output 1

2 2

The user with rating 2100 is "yellow", and the others are "orange". There are two different colors.  

Sample Input 2

5
1100 1900 2800 3200 3200

Sample Output 2

3 5

The user with rating 1100 is "green", the user with rating 1900 is blue and the user with rating 2800 is "red".

If the fourth user picks "red", and the fifth user picks "blue", there are three different colors. This is one possible scenario for the minimum number of colors.

If the fourth user picks "purple", and the fifth user picks "black", there are five different colors. This is one possible scenario for the maximum number of colors.  

Sample Input 3

20
800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990

Sample Output 3

1 1

All the users are "green", and thus there is one color.



Sample input:
4
2100 2500 2700 2700


Sample output:
2 2

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
if syurui_min == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
if over3200 == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
if over3200 >= 1:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_max >= 8:
    syurui_max = 8
if over3200 >= 8:
    syurui_max = 8
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if over3200 >= 8:
    syurui_max = 8
print("{0} {1}".format(syurui_min, syurui_max))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<=799:
        b[1]+=1
    elif i<=1199:
        b[2]+=1
    elif i<=1599:
        b[3]+=1
    elif i<=1999:
        b[4]+=1
    elif i<=2399:
        b[5]+=1
    elif i<=2799:
        b[6]+=1
    elif i<=3199:
        b[7]+=1
    elif i>=3200:
        free+=1
min_color=8-b.count(0)
if min_color==0 and free!=0:
    min_color=1
max_color=8-b.count(0)
if b.count(0)>free:
    max_color+=free
else:
    max_color=9
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<=799:
        b[1]+=1
    elif i<=1199:
        b[2]+=1
    elif i<=1599:
        b[3]+=1
    elif i<=1999:
        b[4]+=1
    elif i<=2399:
        b[5]+=1
    elif i<=2799:
        b[6]+=1
    elif i<=3199:
        b[7]+=1
    elif i>=3200:
        free+=1
min_color=8-b.count(0)
max_color=8-b.count(0)
if b.count(0)>free:
    max_color+=free
else:
    max_color=9
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
import sys
def color(x):
  if x<400:return('灰')
  elif 399<x<800:return('茶')
  elif 799<x<1200:return('緑')
  elif 1199<x<1600:return('水')
  elif 1599<x<2000:return('青')
  elif 1999<x<2400:return('黄')
  elif 2399<x<2800:return('橙')
  elif 2799<x<3200:return('赤')
  else:return('*')
input()
l=list(map(int,input().split()))
l=[color(i) for i in l]
v=l.count('*')
l=len(set(l))
if v==0:
  print(' '.join([str(l)]*2))
  sys.exit()
else:
  if l==v:v-=1
  else:l-=1
  print(l,end=' ')
print(l+v)

Submission status: Wrong Answer

Solution code:
import sys
def color(x):
  if x<400:return('灰')
  elif 399<x<800:return('茶')
  elif 799<x<1200:return('緑')
  elif 1199<x<1600:return('水')
  elif 1599<x<2000:return('青')
  elif 1999<x<2400:return('黄')
  elif 2399<x<2800:return('橙')
  elif 2799<x<3200:return('赤')
  else:return('*')
input()
l=list(map(int,input().split()))
l=[color(i) for i in l]
v=l.count('*')
l=len(set(l))
if v==0:
  print(' '.join([str(l)]*2))
  sys.exit()
else:
  l-=1
  print(l,end=' ')
print(l+v)

Submission status: Wrong Answer

Solution code:
import sys
iN = int(input())
aA = [int(_) for _ in input().split()]

aCol = [0]*(4800//400 +1)
for a in aA:
    aCol[a//400] += 1
iMin = 0
for i in range(8):
    if aCol[i]:
        iMin += 1
iMax = iMin + sum(aCol[8:])
print(iMin,iMax)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = []
rainbow = 0
for i in range(N):
    if a[i] >= 3200:
        rainbow += 1
    else:
        b.append(a[i]//400)
color = set(b)
min = len(color)
max = min + rainbow
if rainbow == N:
    min = 1
if max > 8:
    max = rainbow
print(str(min)+" "+str(max))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = []
rainbow = 0
for i in range(N):
    if a[i] >= 3200:
        rainbow += 1
    else:
        b.append(a[i]//400)
color = set(b)
min = len(color)
max = min + rainbow
if rainbow == N:
    min = 1
if max > 8:
    max = 8
print(str(min)+" "+str(max))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = []
rainbow = 0
for i in range(N):
    if a[i] >= 3200:
        rainbow += 1
    else:
        b.append(a[i]//400)
color = set(b)
min = len(color)
max = min + rainbow
if max > 8:
    max = 8
print(str(min)+" "+str(max))

Submission status: Wrong Answer

Solution code:
import sys
def color(x):
  if x<400:return('灰')
  elif 399<x<800:return('茶')
  elif 799<x<1200:return('緑')
  elif 1199<x<1600:return('水')
  elif 1599<x<2000:return('青')
  elif 1999<x<2400:return('黄')
  elif 2399<x<2800:return('橙')
  elif 2799<x<3200:return('赤')
  else:return('*')
input()
l=list(map(int,input().split()))
l=[color(i) for i in l]
v=l.count('*')
l=len(set(l))
if v:l-=1
if v==0:
  print(' '.join([str(l)]*2))
  sys.exit()
else: print(l,end=' ')
print(min(l+v,8))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
n = int(input())
va = list(map(int, input().split()))

res = set()
cnt = 0
for a in va:
    if a < 400:
        res.add(0)
    elif a < 800:
        res.add(1)
    elif a < 1200:
        res.add(2)
    elif a < 1600:
        res.add(3)
    elif a < 2000:
        res.add(4)
    elif a < 2400:
        res.add(5)
    elif a < 2800:
        res.add(6)
    elif a < 3200:
        res.add(7)
    else:
        cnt += 1
print(len(res), len(res) + cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
rate = [0]*9
for i in a:
    if i < 400:
        rate[0] += 1
    elif i < 800:
        rate[1] += 1
    elif i < 1200:
        rate[2] += 1
    elif i < 1600:
        rate[3] += 1
    elif i < 2000:
        rate[4] += 1
    elif i < 2400:
        rate[5] += 1
    elif i < 2800:
        rate[6] += 1
    elif i < 3200:
        rate[7] += 1
    else:
        rate[8] += 1
counter = 0
for j in range(len(rate)-1):
    if rate[j] > 0:
        counter += 1

print(str(counter) + " " + str(counter + rate[-1] if counter != 0 else "1 " + str(rate[-1])))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
rate = [0]*9
for i in a:
    if i < 400:
        rate[0] += 1
    elif i < 800:
        rate[1] += 1
    elif i < 1200:
        rate[2] += 1
    elif i < 1600:
        rate[3] += 1
    elif i < 2000:
        rate[4] += 1
    elif i < 2400:
        rate[5] += 1
    elif i < 2800:
        rate[6] += 1
    elif i < 3200:
        rate[7] += 1
    else:
        rate[8] += 1
counter = 0
for j in range(len(rate)-1):
    if rate[j] > 0:
        counter += 1

print(str(counter) + " " + str(counter + rate[-1] if counter != 0 else 1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
rate = [0]*9
for i in a:
    if i < 400:
        rate[0] += 1
    elif i < 800:
        rate[1] += 1
    elif i < 1200:
        rate[2] += 1
    elif i < 1600:
        rate[3] += 1
    elif i < 2000:
        rate[4] += 1
    elif i < 2400:
        rate[5] += 1
    elif i < 2800:
        rate[6] += 1
    elif i < 3200:
        rate[7] += 1
    else:
        rate[8] += 1
counter = 0
for j in range(len(rate)-1):
    if rate[j] > 0:
        counter += 1

print(str(counter) + " " + str(counter + rate[-1]))

Submission status: Wrong Answer

Solution code:
def solve(N, As):
    colors = set()
    allcount = 0
    for a in As:
        a -= a % 400
        n = a // 400
        if n < 8:
            colors.add(n)
        else:
            allcount += 1
    return max(len(colors), 1), min(len(colors) + allcount, 8)

if __name__ == "__main__":
    N = int(input())
    As = map(int, input().split(" "))
    m1, m2 = solve(N, As)
    print(m1, m2)

Submission status: Wrong Answer

Solution code:
def solve(N, As):
    colors = set()
    allcount = 0
    for a in As:
        a -= a % 400
        n = a // 400
        if n < 8:
            colors.add(n)
        else:
            allcount += 1

    return max(len(colors), 1), min(len(colors) + allcount, 8)


if __name__ == "__main__":
    N = int(input())
    As = map(int, input().split(" "))
    m1, m2 = solve(N, As)
    print(m1, m2)

Submission status: Wrong Answer

Solution code:
def solve(N, As):
    colors = set()
    allcount = 0
    for a in As:
        color = "ALL"
        if a < 400:
            color = "Gray"
        elif a < 800:
            color = "cha"
        elif a < 1200:
            color = "green"
        elif a < 1600:
            color = "lblue"
        elif a < 2000:
            color = "blue"
        elif a < 2400:
            color = "yellow"
        elif a < 2800:
            color = "orange"
        elif a < 3200:
            color = "red"

        if color != "ALL":
            colors.add(color)
        else:
            allcount += 1

    return len(colors), min(len(colors) + allcount, 8)


if __name__ == "__main__":
    N = int(input())
    As = map(int, input().split(" "))
    min, max = solve(N, As)
    print(min, max)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
an = list(map(int, input().split()))

col = {x:0 for x in range((4800//400) + 1)}
for ai in an:
    col[ai//400] +=1

cnt1 = 0
cnt2 = 0
for k,v in col.items():
    if v > 0:
        if k < 8:
            cnt1 += 1
        else:
            cnt2 += v

print(cnt1,cnt1+cnt2)

Submission status: Wrong Answer

Solution code:
def inpl(): return [int(i) for i in input().split()]

H = set([])
N = int(input())
a = inpl()
sugoi = 0

for i in range(N):
    if a[i] < 400:
        H.add('gray')
    elif a[i] < 800:
        H.add('brown')
    elif a[i] < 1200:
        H.add('green')
    elif a[i] < 1600:
        H.add('sky')
    elif a[i] < 2000:
        H.add('blue')
    elif a[i] < 2400:
        H.add('yellow')
    elif a[i] < 2800:
        H.add('orange')
    elif a[i] < 3200:
        H.add('red')
    else:
        sugoi += 1

ans = [min(len(H),1),len(H)+sugoi]
print(*ans)

Submission status: Wrong Answer

Solution code:
def inpl(): return [int(i) for i in input().split()]

H = set([])
N = int(input())
a = inpl()
sugoi = 0

for i in range(N):
    if a[i] < 400:
        H.add('gray')
    elif a[i] < 800:
        H.add('brown')
    elif a[i] < 1200:
        H.add('green')
    elif a[i] < 1600:
        H.add('sky')
    elif a[i] < 2000:
        H.add('blue')
    elif a[i] < 2400:
        H.add('yellow')
    elif a[i] < 2800:
        H.add('orange')
    elif a[i] < 3200:
        H.add('red')
    else:
        sugoi += 1

ans = [len(H),len(H)+sugoi]
print(*ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
#for i in range(7):
#    c[i+1] += c[i]
print(max(sum(c)-c[8], 1), sum(c))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    elif a[i] <= 4800:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], 1), c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 8
d = 0
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        d += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], 1), c[7]+d)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], 1), min(c[7]+c[8], 100))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], 1), c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(8):
    c[i+1] += c[i]
print(max(c[7],1), c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(8):
    c[i+1] += c[i]
print(c[7], c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(c[7], c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], c[8]), c[7]+c[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0] * 9
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:
        c[6] = 1
    elif a[i] < 3200:
        c[7] = 1
    else:
        c[8] += 1
for i in range(7):
    c[i+1] += c[i]
print(max(c[7], c[8]), min(c[7]+c[8], 8))

Submission status: Wrong Answer

Solution code:
#	ABC 064: C [beta]

N = int(input())

scores = list(map(int, input().split()))
for i in range(N):
  scores[i] = scores[i] // 400
  if scores[i] > 8:
    scores[i] = 8

color=0

for i in range(8):
  if i in scores:
    color += 1
    
free = scores.count(8)

max_colors = color+ free

if color == 0:
  color += 1
  max_colors = color+ free

print(color, max_colors)

Submission status: Wrong Answer

Solution code:
#	ABC 064: C [beta]

N = int(input())

scores = list(map(int, input().split()))
for i in range(N):
  scores[i] = scores[i] // 400
  if scores[i] > 8:
    scores[i] = 8

color=0

for i in range(8):
  if i in scores:
    color += 1
    
free = scores.count(8)

max_colors = color+ free

print(color, max_colors)

Submission status: Wrong Answer

Solution code:
#	ABC 064: C [beta]

N = int(input())

scores = list(map(int, input().split()))
for i in range(N):
  scores[i] = scores[i] // 400
  if scores[i] > 8:
    scores[i] = 8

color=0

for i in range(8):
  if i in scores:
    color += 1
    
free = scores.count(8)

max_colors = min(color+ free, 8)

print(color, max_colors)

Submission status: Wrong Answer

Solution code:
#	ABC 064: C [beta]

N = int(input())

scores = list(map(int, input().split()))
for i in range(N):
  scores[i] = scores[i] // 400
  if scores[i] > 8:
    scores[i] = 8

color=0

for i in range(8):
  if i in scores:
    color += 1
    
free = scores.count(8)

max_colors = min(color+ free, 7)

print(color, max_colors)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))

abv3200 = 0 # count for above 3200
colors = set([])
for ai in a:
    if ai//400 >= 8:
        abv3200 += 1
    else:
        colors.add(ai//400)
    
print(len(colors), len(colors)+abv3200)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      break
  if x >= 3200:
    d += 1
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  for i in range(7):
    if x < 400*(i+1):
      c[i] = 1
      break
  if x >= 3200:
    d += 1
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  for i in range(7):
    if x < 400*(i+1):
      c[i] = 1
      break
  if x >= 3200:
    d += 1
s = sum(c)
print(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  if x >= 3200:
    d += 1
    continue
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      break
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  if x >= 3200:
    d += 1
    continue
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      break
s = sum(c)
print(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))

list1=[0 for i in range(8)]
W=0
for i in range(N):
    if A[i]>=3200:
        W+=1
    else:
        list1[int(A[i]//400)]=1

print(max(1,sum(list1)),min(8,sum(list1)+W))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))

list1=[0 for i in range(8)]
W=0
for i in range(N):
    if A[i]>=3200:
        W+=1
    else:
        list1[int(A[i]/400)]=1

print(max(1,sum(list1)),min(8,sum(list1)+W))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))

list1=[0 for i in range(8)]
W=0
for i in range(N):
    if A[i]>=3200:
        W+=1
    else:
        list1[int(A[i]/400)]=1
if sum(list1)==8:
    print(sum(list1),sum(list1))
else:
    print(max(1,sum(list1)),min(8,sum(list1)+W))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))

list1=[0 for i in range(8)]
W=0
for i in range(N):
    if A[i]>=3200:
        W+=1
    else:
        list1[int(A[i]/400)]=1
if sum(list1)==8:
    print(sum(list1),sum(list1))
else:
    print(sum(list1),min(8,sum(list1)+W))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  if x >= 3200:
    d += 1
    continue
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      break
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  print(x)
  if x >= 3200:
    d += 1
    continue
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      continue
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
c = [0]*8
d = 0
for x in a:
  if x >= 3200:
    d += 1
  for i in range(8):
    if x < 400*(i+1):
      c[i] = 1
      break
s = sum(c)
print(max(s,1), min(8,s+d))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
N = int(input())
A = [int(i) for i in input().split()]

def upper(x):
    if x < 3200:
        return (x//400 + 1) * 400 -1
    else:
        return 3200

Rate = defaultdict(int)
for a in A:
    Rate[upper(a)] += 1

ans = 0
for r in Rate:
    if r < 3200:
        ans += 1
print(ans, ans + Rate[3200])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

iro = []
for i in range(N):
    iro.append(A[i] // 399)

if 8 in iro:
    print(len(set(iro)) - 1, end=" ")
else:
    print(len(set(iro)), end=" ")

if 8 in iro:
    if len(iro) >= 8:
        print("8")
    else:
        print(len(iro))
else:
    print(len(set(iro)))

Submission status: Wrong Answer

Solution code:
def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))

n = getN()
nums = getList()
rainbow = 0
colors = [0 for i in range(8)]
for n in nums:
    if n >= 3200:
        rainbow+=1
    else:
        grade = n//400
        if colors[grade] == 0:
            colors[grade] = 1

clnum = sum(colors)
ansmin = max(1, clnum)
ansmax = min(9, clnum+rainbow)


print(ansmin,ansmax)

Submission status: Wrong Answer

Solution code:
def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))

n = getN()
nums = getList()
rainbow = 0
colors = [0 for i in range(8)]
for n in nums:
    if n >= 3200:
        rainbow+=1
    else:
        grade = n//400
        if colors[grade] == 0:
            colors[grade] = 1

clnum = sum(colors)
ansmin = max(1, clnum)
ansmax = min(8, clnum+rainbow)

print(ansmin,ansmax)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

cnt = [0 for _ in range(8)]
over = 0

for a in A:
    if a < 3200:
        ind = a//400
        cnt[ind] = 1
    else:
        over += 1

print(cnt)
ans = sum(cnt)

if over != 0:
    ans_min = max(ans,1)
    ans_max = ans+over
else:
    ans_min = ans
    ans_max = ans
print(ans_min, ans_max)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

cnt = [0 for _ in range(9)]
over = 0

for a in A:
    if a < 3200:
        key = a//400
        cnt[key] = 1
    else:
        over += 1

ans = sum(cnt)

if over != 0:
    ans_min = max(ans,1)
    ans_max = min(8,ans+over)
else:
    ans_min = ans
    ans_max = ans
print(ans_min, ans_max)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

cnt = [0 for _ in range(9)]
over = 0

for a in A:
    if a < 3200:
        key = a//400
        cnt[key] = 1
    else:
        over += 1

ans = sum(cnt)

if over != 0:
    ans_min = ans
    ans_max = min(8,ans+over)
else:
    ans_min = max(ans,1)
    ans_max = ans
print(ans_min, ans_max)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

dic = {}
for i in range(10):
    dic[i] = 0

for a in A:
    if a < 3200:
        key = a//100
        key = key//4

        dic[key] += 1
    else:
        dic[9] += 1

ans = 0
for i in range(9):
    v = dic[i]
    if v > 0:
        ans += 1

if dic[9] != 0:
    ans_min = ans
    ans_max = min(8,ans+dic[9])
else:
    ans_min = ans
    ans_max = ans
print(ans_min, ans_max)

Submission status: Wrong Answer

Solution code:
color_used = [0 for i in range(9)]

N = int(input())
a = [int(i) for i in input().split()]
for i in range(N):
    for j in range(1,9):
        if a[i] < 400*j:
            color_used[j-1] += 1
            break
    else:
        color_used[8] += 1

ma = 0
for i in range(8):
    if color_used[i]:
        ma += 1
# ma = min(8, ma+min(8-ma, color_used[8]))
ma = ma+color_used[8]
if ma > 8:
    ma = 8

mi = 0
for i in range(8):
    if color_used[i]:
        mi += 1

if mi==0:
    mi = 1

print(mi, ma)

Submission status: Wrong Answer

Solution code:
color_used = [0 for i in range(9)]

N = int(input())
a = [int(i) for i in input().split()]
for i in range(N):
    for j in range(1,9):
        if a[i] < 400*j:
            color_used[j-1] += 1
            break
    else:
        color_used[8] += 1

ma = 0
for i in range(8):
    if color_used[i]:
        ma += 1
# ma = min(8, ma+min(8-ma, color_used[8]))
ma = min(8, ma+color_used[8])

mi = 0
for i in range(8):
    if color_used[i]:
        mi += 1

if mi==0:
    mi = 1

print(mi, ma)