# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
474091 | ValiAntonie | Poi (IOI09_poi) | C++14 | 803 ms | 23748 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;
int n,t,p,a[2001][2001],i,j,suma,task[2001],total[2001],nr;
int main()
{
cin>>n>>t>>p;
for(i=1;i<=n;i++){
for(j=1;j<=t;j++){
cin>>a[i][j];
}
}
for(i=1;i<=t;i++){
suma = 0;
for(j=1;j<=n;j++){
if(!a[j][i])
suma++;
}
task[i] = suma;
}
for(i=1;i<=n;i++){
for(j=1;j<=t;j++){
if(a[i][j])
total[i] += task[j];
}
}
nr = total[p];
cout << total[p] << " ";
sort(total+1,total+n+1);
for(i=1;i<=n;i++){
if(total[i] == nr){
cout << i;
break;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |