Submission #1993238


Source Code Expand

#include <math.h>
#include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
struct omt{omt(){ios::sync_with_stdio(false);cin.tie(0);}}star;

int main(){
    int n;
    cin >> n;

    int A[9] = {};
    REP(i, n){
        int tmp;
        cin >> tmp;
        if(1 <= tmp and tmp <= 399) A[0]++;
        else if(400 <= tmp and tmp <= 799) A[1]++;
        else if(800 <= tmp and tmp <= 1199) A[2]++;
        else if(1200 <= tmp and tmp <= 1599) A[3]++;
        else if(1600 <= tmp and tmp <= 1999) A[4]++;
        else if(2000 <= tmp and tmp <= 2399) A[5]++;
        else if(2400 <= tmp and tmp <= 2799) A[6]++;
        else if(2800 <= tmp and tmp <= 3199) A[7]++;
        else A[8]++;
    }

    int cnt = 0;
    REP(i, 8){
        if(A[i] > 0) cnt++;
    }
    if(A[8] == 0){
        cout << cnt << " " << cnt << endl;
    }else{
        int mi, ma;
        mi = cnt;
        if(8 - cnt <= A[8]) ma = 8;
        else ma = cnt + A[8];
        cout << mi << " " << ma << endl;
    }


    return 0;
}

Submission Info

Submission Time
Task C - Colorful Leaderboard
User tokizo
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1141 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 5
WA × 3
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
in1.txt WA 1 ms 256 KB
in2.txt AC 1 ms 256 KB
in3.txt WA 1 ms 256 KB
in4.txt WA 1 ms 256 KB
in5.txt AC 1 ms 256 KB
s1.txt AC 1 ms 256 KB
s2.txt AC 1 ms 256 KB
s3.txt AC 1 ms 256 KB