# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
439263 |
2021-06-29T13:02:20 Z |
luka1234 |
Poi (IOI09_poi) |
C++14 |
|
758 ms |
23896 KB |
#include <bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
using namespace std;
int task[2001];
int cont[2001][2001];
pair<int,pair<int,int> > a[2001];
bool comp(pair<int,pair<int,int> > a,pair<int,pair<int,int> > b){
if(a.ff<b.ff)
return 1;
else{
if(a.ff==b.ff){
if(a.ss.ff<b.ss.ff)
return 1;
else{
if(a.ss.ff==b.ss.ff){
if(a.ss.ss<b.ss.ss)
return 1;
else
return 0;
}
else
return 0;
}
}
else
return 0;
}
}
int main(){
int n,m,p;
cin>>n>>m>>p;
for(int k=1;k<=n;k++){
for(int i=1;i<=m;i++){
cin>>cont[k][i];
if(cont[k][i]==0)
task[i]++;
}
}
for(int k=1;k<=n;k++){
for(int i=1;i<=m;i++){
if(cont[k][i]==1){
a[k].ff+=task[i];
a[k].ss.ff++;
}
}
a[k].ss.ss=k;
}
sort(a+1,a+n+1,comp);
for(int k=1;k<=n;k++){
if(a[k].ss.ss==p){
cout<<a[k].ff<<' '<<k;
//return 0;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
460 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
588 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
588 KB |
Output isn't correct |
9 |
Incorrect |
4 ms |
716 KB |
Output isn't correct |
10 |
Incorrect |
7 ms |
1228 KB |
Output isn't correct |
11 |
Incorrect |
26 ms |
2148 KB |
Output isn't correct |
12 |
Incorrect |
40 ms |
3396 KB |
Output isn't correct |
13 |
Incorrect |
121 ms |
6488 KB |
Output isn't correct |
14 |
Incorrect |
167 ms |
9284 KB |
Output isn't correct |
15 |
Incorrect |
284 ms |
12612 KB |
Output isn't correct |
16 |
Incorrect |
346 ms |
13708 KB |
Output isn't correct |
17 |
Incorrect |
474 ms |
16852 KB |
Output isn't correct |
18 |
Incorrect |
519 ms |
18988 KB |
Output isn't correct |
19 |
Incorrect |
688 ms |
23008 KB |
Output isn't correct |
20 |
Incorrect |
758 ms |
23896 KB |
Output isn't correct |