#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.rbegin(), v.rend());
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 |
0 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 |
0 ms |
340 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 |
400 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
468 KB |
Output isn't correct |
11 |
Incorrect |
7 ms |
660 KB |
Output isn't correct |
12 |
Incorrect |
11 ms |
852 KB |
Output isn't correct |
13 |
Incorrect |
32 ms |
1756 KB |
Output isn't correct |
14 |
Incorrect |
47 ms |
2352 KB |
Output isn't correct |
15 |
Incorrect |
82 ms |
5200 KB |
Output isn't correct |
16 |
Incorrect |
82 ms |
5600 KB |
Output isn't correct |
17 |
Incorrect |
119 ms |
6360 KB |
Output isn't correct |
18 |
Incorrect |
140 ms |
7108 KB |
Output isn't correct |
19 |
Incorrect |
188 ms |
8364 KB |
Output isn't correct |
20 |
Incorrect |
206 ms |
9496 KB |
Output isn't correct |