# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
600317 | Codula | Poi (IOI09_poi) | C++17 | 217 ms | 31704 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//IOI 2023 I am coming.
#include "bits/stdc++.h"
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define int int64_t
#define pb push_back
int32_t main(){
fast;
int n,t,p;
cin>>n>>t>>p;
vector<vector<int>>a(n,vector<int>(t,0));
vector<int>b(t);
for(int i=0;i<n;++i){
for(int j=0;j<t;++j){
cin>>a[i][j];
b[j]+=a[i][j];
}
}
vector<array<int,3>>scores(n);
for(int i=0;i<n;++i){
for(int j=0;j<t;++j){
if(a[i][j]!=0){
scores[i][0]+=(n-b[j]);
}
scores[i][1]+=a[i][j];
}
scores[i][2]=-i;
}
p--;
sort(scores.rbegin(),scores.rend());
for(int i=0;i<n;++i){
//~ cerr<<scores[i][0]<<" "<<scores[i][1]<<" "<<scores[i][2]<<"\n";
if(scores[i][2]==-p){
cout<<scores[i][0]<<" "<<i+1<<"\n";
break;
}
}
//~ cout<<"\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |