# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
937871 |
2024-03-04T15:50:54 Z |
Muaath_5 |
Poi (IOI09_poi) |
C++17 |
|
182 ms |
16172 KB |
#include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
using namespace std;
const int N = 2009;
int n, t, p;
int solved[N][N];
int points[N];
struct contestant {
int id = 0;
int score = 0;
int count = 0;
friend bool operator<(contestant a, contestant b) {
if (a.score == b.score) {
if (a.count == b.count) {
return a.id > b.id;
}
return a.count < b.count;
}
return a.score < b.score;
}
} c[N];
int main()
{
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n >> t >> p;
for (int i = 1; i <= n; i++) {
c[i].id = i;
for (int j = 1; j <= t; j++) {
cin >> solved[i][j];
if (solved[i][j])
c[i].count++, points[j]++;
}
}
for (int j = 1; j <= t; j++)
points[j] = n - points[j];
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= t; j++) {
if (solved[i][j])
c[i].score += points[j];
}
}
sort(c, c + n);
reverse(c, c + n);
for (int i = 1; i <= n; i++) {
if (c[i].id == p) {
cout << c[i].score << ' ' << i << '\n';
return 0;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
500 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
2396 KB |
Output isn't correct |
11 |
Incorrect |
6 ms |
4688 KB |
Output isn't correct |
12 |
Incorrect |
10 ms |
4440 KB |
Output isn't correct |
13 |
Incorrect |
36 ms |
6996 KB |
Output isn't correct |
14 |
Incorrect |
39 ms |
8796 KB |
Output isn't correct |
15 |
Incorrect |
76 ms |
10852 KB |
Output isn't correct |
16 |
Incorrect |
76 ms |
10868 KB |
Output isn't correct |
17 |
Incorrect |
110 ms |
12888 KB |
Output isn't correct |
18 |
Incorrect |
130 ms |
15188 KB |
Output isn't correct |
19 |
Incorrect |
163 ms |
15988 KB |
Output isn't correct |
20 |
Incorrect |
182 ms |
16172 KB |
Output isn't correct |