Submission #2179344
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int A[9] = {}; for(int i = 0; i < n; i++){ int tmp; cin >> tmp; if(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, min_value, max_value; for(int i = 0; i < 8; i++){ if(A[i]) cnt++; } if(A[8]){ if(cnt){ min_value = cnt; max_value = cnt + A[8]; }else min_value = 1; }else min_value = max_value = cnt; cout << min_value << " " << max_value << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Colorful Leaderboard |
User | T_M |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 968 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
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 | AC | 1 ms | 256 KB |
in4.txt | AC | 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 |