Submission #4066748
Source Code Expand
#include <bits/stdc++.h> #define int long long #define mii map<int,int> #define low lower_bound #define upp upper_bound #define inf 1000000007 //10^9+7 #define rep(i,n) for(int i=0;i<n;i++) #define all(vec) vec.begin(),vec.end() #define sort(vec) sort(all(vec)); #define rever(vec) reverse(all(vec)); #define bisea binary_search #define unsort(vec) sort(vec); rever(vec); #define cend cout<<endl; #define gcd __gcd #define F first #define S second using namespace std; int a[114]; signed main() { int n,cnta=0,cntb=0,cntc=0,cntd=0,cnte=0,cntf=0,cntg=0,cnth=0,cnti=0,ans=0; cin>>n; rep(i,n)cin>>a[i]; rep(i,n){ if(a[i]<400)cnta++; else if(a[i]<800)cntb++; else if(a[i]<1200)cntc++; else if(a[i]<1600)cntd++; else if(a[i]<2000)cnte++; else if(a[i]<2400)cntf++; else if(a[i]<2800)cntg++; else if(a[i]<3200)cnth++; else cnti++; } if(cnta)ans++; if(cntb)ans++; if(cntc)ans++; if(cntd)ans++; if(cnte)ans++; if(cntf)ans++; if(cntg)ans++; if(cnth)ans++; if(ans+cnti>8)cout<<ans<<" "<<8<<endl; else if(ans==0)cout<<1<<" "<<cnti<<endl; else cout<<ans<<" "<<ans+cnti<<endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Colorful Leaderboard |
User | sanadayukimura73 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1142 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 | AC | 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 |