#include <bits/stdc++.h>
typedef long long ll;
#define M 1000000007
#define N (1 << 18)
using namespace std;
int score[2001];
vector<int> solved[2001];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, t, p;
cin >> n >> t >> p;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= t; ++j) {
int x;
cin >> x;
if (x == 0) score[j]++;
else solved[i].push_back(j);
}
}
vector<pair<int, int>> v;
for (int i = 1; i <= n; ++i) {
int sc = 0;
for (int x : solved[i]) sc += score[x];
v.push_back({sc, i});
}
sort(v.begin(), v.end());
cout << v[p - 1].first << " " << v[p - 1].second << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
340 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
340 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
376 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
372 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 |
420 KB |
Output isn't correct |
10 |
Incorrect |
4 ms |
468 KB |
Output isn't correct |
11 |
Incorrect |
9 ms |
852 KB |
Output isn't correct |
12 |
Incorrect |
11 ms |
1236 KB |
Output isn't correct |
13 |
Incorrect |
31 ms |
2932 KB |
Output isn't correct |
14 |
Incorrect |
45 ms |
4044 KB |
Output isn't correct |
15 |
Incorrect |
78 ms |
8068 KB |
Output isn't correct |
16 |
Incorrect |
88 ms |
8716 KB |
Output isn't correct |
17 |
Incorrect |
126 ms |
11016 KB |
Output isn't correct |
18 |
Incorrect |
136 ms |
12488 KB |
Output isn't correct |
19 |
Incorrect |
194 ms |
14216 KB |
Output isn't correct |
20 |
Incorrect |
220 ms |
15344 KB |
Output isn't correct |