# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
771877 |
2023-07-03T11:05:16 Z |
BlockOG |
Poi (IOI09_poi) |
C++14 |
|
495 ms |
23712 KB |
#include <iostream>
using namespace std;
/*
5 3 2
0 0 1
1 1 0
1 0 0
1 1 0
1 1 0
*/
int solved[2000][2000];
int amt_solved[2000];
int not_solved[2000];
int score[2000];
int main() {
int n, t, p; cin >> n >> t >> p; p--;
for (int i = 0; i < n; i++) {
for (int j = 0; j < t; j++) {
cin >> solved[i][j];
if (solved[i][j]) amt_solved[i]++;
else not_solved[j]++;
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < t; j++) {
if (solved[i][j]) score[i] += not_solved[j];
}
}
int place = 1;
for (int i = 0; i < n; i++) {
if (i == p) continue;
if (score[i] > score[p]) place++;
else if (score[i] == score[p]) {
if (amt_solved[i] > amt_solved[p]) place++;
else if (amt_solved[i] == amt_solved[p])
if (i < p) place++;
}
}
cout << place << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
308 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
300 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
312 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
432 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
468 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
704 KB |
Output isn't correct |
10 |
Incorrect |
4 ms |
1236 KB |
Output isn't correct |
11 |
Incorrect |
15 ms |
2176 KB |
Output isn't correct |
12 |
Incorrect |
27 ms |
3444 KB |
Output isn't correct |
13 |
Incorrect |
84 ms |
6624 KB |
Output isn't correct |
14 |
Incorrect |
108 ms |
9256 KB |
Output isn't correct |
15 |
Incorrect |
182 ms |
12584 KB |
Output isn't correct |
16 |
Incorrect |
201 ms |
13608 KB |
Output isn't correct |
17 |
Incorrect |
295 ms |
16716 KB |
Output isn't correct |
18 |
Incorrect |
336 ms |
18836 KB |
Output isn't correct |
19 |
Incorrect |
484 ms |
22884 KB |
Output isn't correct |
20 |
Incorrect |
495 ms |
23712 KB |
Output isn't correct |