//IOI 2023 I am coming.
#include "bits/stdc++.h"
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define int int64_t
#define pb push_back
int32_t main(){
fast;
int n,t,p;
cin>>n>>t>>p;
vector<vector<int>>a(n,vector<int>(t,0));
vector<int>b(t);
for(int i=0;i<n;++i){
for(int j=0;j<t;++j){
cin>>a[i][j];
b[j]+=a[i][j];
}
}
vector<array<int,3>>scores(n);
for(int i=0;i<n;++i){
for(int j=0;j<t;++j){
if(a[i][j]!=0){
scores[i][0]+=(n-b[j]);
scores[i][2]=i;
scores[i][1]+=a[i][j];
}
}
}
p--;
sort(scores.begin(),scores.end());
for(int i=0;i<n;++i){
if(scores[i][2]==p){
cout<<scores[i][0]<<" "<<i+1<<"\n";
break;
}
}
//~ cout<<"\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
468 KB |
Output isn't correct |
11 |
Incorrect |
10 ms |
1236 KB |
Output isn't correct |
12 |
Incorrect |
16 ms |
1876 KB |
Output isn't correct |
13 |
Incorrect |
35 ms |
5004 KB |
Output isn't correct |
14 |
Incorrect |
49 ms |
7016 KB |
Output isn't correct |
15 |
Incorrect |
82 ms |
12116 KB |
Output isn't correct |
16 |
Incorrect |
95 ms |
13084 KB |
Output isn't correct |
17 |
Incorrect |
132 ms |
19168 KB |
Output isn't correct |
18 |
Incorrect |
154 ms |
21800 KB |
Output isn't correct |
19 |
Incorrect |
196 ms |
28620 KB |
Output isn't correct |
20 |
Incorrect |
220 ms |
31704 KB |
Output isn't correct |