# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
526101 | 2022-02-13T17:40:30 Z | Deepesson | Poi (IOI09_poi) | C++17 | 568 ms | 23760 KB |
#include <bits/stdc++.h> typedef std::pair<int,int> pii; typedef std::pair<pii,int> ppi; bool sortar(ppi a,ppi b){ if(a.first.first!=b.first.first){ return a<b; }else { if(a.first.second!=b.first.second){ return a>b; }else return a<b; } } int main() { int N,T,P; std::cin>>N>>T>>P; int pontos[T]={}; int resolveu[N]={}; int tab[N][T]; for(int i=0;i!=N;++i){ for(int j=0;j!=T;++j){ int x; std::cin>>x; tab[i][j]=x; if(!x)pontos[j]++;else resolveu[i]++; } } int score[N]={}; for(int i=0;i!=N;++i){ for(int j=0;j!=T;++j){ if(tab[i][j])score[i]+=pontos[j]; } } std::cout<<score[P-1]<<" "; std::vector<ppi> geral; for(int i=0;i!=N;++i){ geral.push_back({{score[i],resolveu[i]},i}); } std::sort(geral.begin(),geral.end(),sortar); for(int i=0;i!=geral.size();++i){ if(geral[i].second==P-1){ std::cout<<(i+1)<<"\n"; return 0; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |
3 | Incorrect | 0 ms | 204 KB | Output isn't correct |
4 | Incorrect | 0 ms | 204 KB | Output isn't correct |
5 | Incorrect | 1 ms | 204 KB | Output isn't correct |
6 | Incorrect | 1 ms | 332 KB | Output isn't correct |
7 | Incorrect | 1 ms | 204 KB | Output isn't correct |
8 | Incorrect | 1 ms | 204 KB | Output isn't correct |
9 | Incorrect | 3 ms | 332 KB | Output isn't correct |
10 | Incorrect | 6 ms | 460 KB | Output isn't correct |
11 | Incorrect | 17 ms | 972 KB | Output isn't correct |
12 | Incorrect | 28 ms | 1356 KB | Output isn't correct |
13 | Incorrect | 83 ms | 3736 KB | Output isn't correct |
14 | Incorrect | 119 ms | 5252 KB | Output isn't correct |
15 | Incorrect | 215 ms | 9160 KB | Output isn't correct |
16 | Incorrect | 223 ms | 9832 KB | Output isn't correct |
17 | Incorrect | 337 ms | 14524 KB | Output isn't correct |
18 | Incorrect | 388 ms | 16296 KB | Output isn't correct |
19 | Incorrect | 495 ms | 21448 KB | Output isn't correct |
20 | Incorrect | 568 ms | 23760 KB | Output isn't correct |