# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
489409 |
2021-11-22T21:06:14 Z |
Alexandruabcde |
Poi (IOI09_poi) |
C++14 |
|
269 ms |
23752 KB |
#include <bits/stdc++.h>
using namespace std;
constexpr int NMAX = 2005;
int N, T, P;
int mat[NMAX][NMAX];
int value[NMAX];
int main () {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cin >> N >> T >> P;
for (int i = 1; i <= N; ++ i )
for (int j = 1; j <= T; ++ j )
cin >> mat[i][j];
for (int j = 1; j <= T; ++ j ) {
int val = 0;
for (int i = 1; i <= N; ++ i )
val += (1 - mat[i][j]);
for (int i = 1; i <= N; ++ i )
value[i] += val * mat[i][j];
}
int pos = 0;
for (int i = 1; i <= N; ++ i )
if (value[i] > value[P]) ++ pos;
cout << value[P] << " " << pos+1 << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
472 KB |
Output isn't correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
0 ms |
336 KB |
Output is correct |
4 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
5 |
Correct |
1 ms |
336 KB |
Output is correct |
6 |
Correct |
1 ms |
448 KB |
Output is correct |
7 |
Incorrect |
2 ms |
592 KB |
Output isn't correct |
8 |
Correct |
1 ms |
592 KB |
Output is correct |
9 |
Incorrect |
3 ms |
844 KB |
Output isn't correct |
10 |
Correct |
3 ms |
1232 KB |
Output is correct |
11 |
Correct |
11 ms |
2256 KB |
Output is correct |
12 |
Incorrect |
13 ms |
3480 KB |
Output isn't correct |
13 |
Incorrect |
33 ms |
6604 KB |
Output isn't correct |
14 |
Incorrect |
44 ms |
9288 KB |
Output isn't correct |
15 |
Incorrect |
103 ms |
12560 KB |
Output isn't correct |
16 |
Correct |
97 ms |
13648 KB |
Output is correct |
17 |
Incorrect |
150 ms |
16884 KB |
Output isn't correct |
18 |
Correct |
191 ms |
18940 KB |
Output is correct |
19 |
Correct |
236 ms |
22984 KB |
Output is correct |
20 |
Correct |
269 ms |
23752 KB |
Output is correct |