# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
440178 |
2021-07-01T17:02:11 Z |
dxz05 |
Poi (IOI09_poi) |
C++14 |
|
888 ms |
8496 KB |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2022;
bool sol[MAXN][MAXN];
int cnt[MAXN];
pair<pair<int, int>, int> a[MAXN];
int points[MAXN], solved[MAXN];
int main(){
int N, M, P;
cin >> N >> M >> P;
fill(cnt, cnt + M, N);
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
cin >> sol[i][j];
cnt[j] -= sol[i][j];
}
}
vector<int> v(N);
for (int i = 0; i < N; i++){
v[i] = i;
for (int j = 0; j < M; j++){
if (sol[i][j]){
points[i] += cnt[j];
solved[i]++;
}
}
}
sort(v.begin(), v.end(), [](int i, int j){
if (points[i] > points[j]) return true;
if (solved[i] > solved[j]) return true;
return i < j;
});
for (int i = 0; i < N; i++){
int j = v[i];
if (j + 1 == P){
cout << points[j] << ' ' << j + 1 << endl;
return 0;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
204 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 |
Runtime error |
2 ms |
540 KB |
Execution killed with signal 11 |
7 |
Runtime error |
2 ms |
588 KB |
Execution killed with signal 11 |
8 |
Incorrect |
2 ms |
460 KB |
Output isn't correct |
9 |
Runtime error |
4 ms |
844 KB |
Execution killed with signal 11 |
10 |
Runtime error |
8 ms |
1228 KB |
Execution killed with signal 11 |
11 |
Runtime error |
28 ms |
1572 KB |
Execution killed with signal 11 |
12 |
Runtime error |
45 ms |
2372 KB |
Execution killed with signal 11 |
13 |
Runtime error |
124 ms |
3148 KB |
Execution killed with signal 11 |
14 |
Runtime error |
182 ms |
4420 KB |
Execution killed with signal 11 |
15 |
Runtime error |
303 ms |
5260 KB |
Execution killed with signal 11 |
16 |
Runtime error |
335 ms |
5564 KB |
Execution killed with signal 11 |
17 |
Runtime error |
497 ms |
6644 KB |
Execution killed with signal 11 |
18 |
Runtime error |
605 ms |
7148 KB |
Execution killed with signal 11 |
19 |
Runtime error |
736 ms |
8484 KB |
Execution killed with signal 11 |
20 |
Runtime error |
888 ms |
8496 KB |
Execution killed with signal 11 |