# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
235293 | Pbezz | Poi (IOI09_poi) | C++14 | 858 ms | 18936 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>
using namespace std;
#define ll long long
#define INF 10000
#define MAXN 100005
typedef pair<ll int,ll int> pii;
int main(){
ll int n,t,p,i,j,k;
cin>>n>>t>>p;
vector<tuple<ll int,ll int, ll int> >ahm(n);
vector<ll int>solved(t);
vector<vector<int>>list(t);
for(i=0;i<n;i++){ get<2>(ahm[i])=i;
for(j=0;j<t;j++){
cin>>k;
if(k==1){
solved[j]++;
list[j].push_back(i);
get<1>(ahm[i])--;
}
}
}
for(j=0;j<t;j++){
k=n-solved[j];
for(auto u:list[j]){
get<0>(ahm[u])-=k;
}
}
sort(ahm.begin(),ahm.end());
for(i=0;i<n;i++){
if(get<2>(ahm[i])!=p-1)continue;
cout<<-get<0>(ahm[i])<<" "<<-get<1>(ahm[i])<<'\n';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |