# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
415267 | Antekb | Poi (IOI09_poi) | C++14 | 770 ms | 23824 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.
#include<bits/stdc++.h>
#define st first
#define nd second
using namespace std;
const int N=2005;
int tab[N][N];
int sco[N];
int main(){
int n, m, t;
cin>>n>>m>>t;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
cin>>tab[i][j];
sco[j]+=1-tab[i][j];
}
}
vector<pair<int, int> > V;
int ans=0;
for(int i=0; i<n; i++){
int k=0;
for(int j=0; j<m; j++){
k+=sco[j]*tab[i][j];
}
if(i==t-1)ans=k;
V.push_back({k, i});
}
sort(V.begin(), V.end());
reverse(V.begin(), V.end());
cout<<ans<<" ";
for(int i=0; i<n; i++)if(V[i].st==ans){
cout<<i+1;
break;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |