Submission #2865506
Source Code Expand
#include <iostream> #include <cmath> #include <string> #include <algorithm> #include <set> #include <vector> #include <map> #include <list> #include <stack> #define REP(i, n) for(i=0; i<n; i++) #define REPR(i, n) for(i=n; i>=0; i--) #define FOR(i, m, n) for(i=m; i<n; i++) #define INF 10000000000 #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<ll, ll> p; ll modpow(ll x, ll n) { ll res=1; while(n>0) { if(n&1) res=res*x%MOD; x=x*x%MOD; n>>=1; } return res; } int main() { ll n, ans=0; ll color[8]={0}; cin >> n; ll a[n]; ll i; ll pro=0; for(i=0; i<n; i++) { cin >> a[i]; if(a[i]<3200) color[a[i]/400]=1; else pro++; } for(i=0; i<8; i++) { ans+=color[i]; } cout << ans << " "; while(pro>0) { if(ans<8) { ans++; pro--; } } cout << ans << endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Colorful Leaderboard |
User | eQe |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1034 Byte |
Status | WA |
Exec Time | 2103 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 | TLE | 2103 ms | 256 KB |
in4.txt | TLE | 2103 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 |