# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383303 | Iwanttobreakfree | Poi (IOI09_poi) | C++17 | 752 ms | 24044 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
long long int n,t,p;
cin>>n>>t>>p;
p--;
vector<pair<long long int,pair<long long int,long long int> > > puntos(n);
int task[n][t];
for(int i=0;i<n;i++){
puntos[i].second.second=n-i;
puntos[i].first=0;
puntos[i].second.first=0;
}
for(int i=0;i<n;i++){
for(int j=0;j<t;j++){
cin>>task[i][j];
}
}
for(int i=0;i<t;i++){
int cont=0;
for(int j=0;j<n;j++){
if(task[j][i]==0)cont++;
}
for(int j=0;j<n;j++){
if(task[j][i]==1){
puntos[j].first+=cont;
puntos[j].second.first++;
}
}
}
cout<<puntos[p].first<<' ';
sort(puntos.rbegin(),puntos.rend());
for(int i=0;i<n;i++){
if(puntos[i].second.second==n-p)cout<<i+1;
//cout<<puntos[i].first<<' '<<puntos[i].second.first<<' '<<puntos[i].second.second<<'\n';
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |