# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
767908 |
2023-06-27T09:21:13 Z |
benjaminkleyn |
Poi (IOI09_poi) |
C++17 |
|
240 ms |
12072 KB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
int N, T, P;
bool solved[2000][2000];
int value[2000] = {0};
int score[2000] = {0};
int num_solved[2000] = {0};
int rankings[2000];
int main()
{
cin.tie(0)->sync_with_stdio(0);
cin >> N >> T >> P;
for (int i = 0; i < N; i++)
for (int j = 0; j < T; j++)
{
cin >> solved[i][j];
if (!solved[i][j])
value[j]++;
}
for (int i = 0; i < N; i++)
for (int j = 0; j < T; j++)
if (solved[i][j])
score[i] += value[j], num_solved[i]++;
iota(rankings, rankings + N, 0);
sort(rankings, rankings + N, [] (const int &x, const int &y) {return mp(score[x], mp(num_solved[x], x)) < mp(score[y], mp(num_solved[y], y));});
cout << score[P - 1] << ' ';
for (int i = 0; i < N; i++)
if (rankings[i] == P - 1)
return cout << i + 1 << '\n', 0;
return 0;
}
# |
Verdict |
Execution time |
Memory |
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 |
1 ms |
332 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
468 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
468 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
468 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
724 KB |
Output isn't correct |
11 |
Incorrect |
10 ms |
1108 KB |
Output isn't correct |
12 |
Incorrect |
12 ms |
1628 KB |
Output isn't correct |
13 |
Incorrect |
51 ms |
2860 KB |
Output isn't correct |
14 |
Incorrect |
48 ms |
3864 KB |
Output isn't correct |
15 |
Incorrect |
84 ms |
5524 KB |
Output isn't correct |
16 |
Incorrect |
121 ms |
6068 KB |
Output isn't correct |
17 |
Incorrect |
138 ms |
7936 KB |
Output isn't correct |
18 |
Incorrect |
154 ms |
8940 KB |
Output isn't correct |
19 |
Incorrect |
240 ms |
11260 KB |
Output isn't correct |
20 |
Incorrect |
221 ms |
12072 KB |
Output isn't correct |