#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pb push_back
#define ll long long
using namespace std;
bool a[2001][2001];
int tasks[2001];
pair<int , int > score [2001];
int main (){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n , t, p;
cin >> n >> t >> p;
memset(score , 0 , sizeof(score));
for(int i = 1; i<=n; i++){
for(int j = 1; j<=t; j++){
cin >> a[i][j];
if(a[i][j] == 0){
tasks[j]++;
}
}
}
for(int i = 1; i<=n; i++){
score[i].ss = i;
for(int j = 1; j<=t; j++){
if(a[i][j] == 1 ){
score[i].ff+=tasks[j];
}
}
}
int pl = score[p].ff;
sort(score +1 , score + n + 1);
for(int i = 1; i<=n; i++){
if(score[i].ff == pl){
cout << score[i].ff <<" " << score[i].ss << endl;
return 0;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
384 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
672 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
768 KB |
Output isn't correct |
11 |
Incorrect |
11 ms |
1152 KB |
Output isn't correct |
12 |
Incorrect |
18 ms |
1696 KB |
Output isn't correct |
13 |
Incorrect |
53 ms |
2936 KB |
Output isn't correct |
14 |
Incorrect |
75 ms |
3960 KB |
Output isn't correct |
15 |
Incorrect |
142 ms |
5752 KB |
Output isn't correct |
16 |
Incorrect |
148 ms |
6008 KB |
Output isn't correct |
17 |
Incorrect |
208 ms |
7992 KB |
Output isn't correct |
18 |
Incorrect |
247 ms |
8952 KB |
Output isn't correct |
19 |
Incorrect |
320 ms |
11256 KB |
Output isn't correct |
20 |
Incorrect |
393 ms |
12112 KB |
Output isn't correct |