# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
399385 |
2021-05-05T16:15:25 Z |
iulia13 |
Poi (IOI09_poi) |
C++14 |
|
694 ms |
23748 KB |
#include <iostream>
#include <algorithm>
using namespace std;
const int nmax = 2005;
int a[nmax][nmax];
int v[nmax];
struct ura{
int sc, id;
};
ura b[nmax];
bool cmp(ura x, ura y)
{
if (x.sc != y.sc)
return x.sc < y.sc;
return x.id < y.id;
}
int main()
{
int n, t, p, i, j;
cin >> n >> t >> p;
for (i = 1; i <= n; i++)
for (j = 1; j <= t; j++)
cin >> a[i][j];
for (j = 1; j <= t; j++)
for (i = 1; i <= n; i++)
v[j] += (1 - a[i][j]);
for (i = 1; i <= n; i++)
{
b[i].id = i;
for (j = 1; j <= t; j++)
b[i].sc += a[i][j] * v[j];
}
sort (b + 1, b + n + 1, cmp);
for (i = 1; i <= n; i++)
if (b[i].id == p)
{
cout << b[i].sc << " " << i;
return 0;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
332 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 |
Incorrect |
1 ms |
460 KB |
Output isn't correct |
7 |
Correct |
2 ms |
588 KB |
Output is correct |
8 |
Incorrect |
2 ms |
588 KB |
Output isn't correct |
9 |
Incorrect |
4 ms |
716 KB |
Output isn't correct |
10 |
Incorrect |
6 ms |
1228 KB |
Output isn't correct |
11 |
Incorrect |
22 ms |
2116 KB |
Output isn't correct |
12 |
Incorrect |
35 ms |
3460 KB |
Output isn't correct |
13 |
Incorrect |
108 ms |
6660 KB |
Output isn't correct |
14 |
Incorrect |
166 ms |
9284 KB |
Output isn't correct |
15 |
Incorrect |
263 ms |
12644 KB |
Output isn't correct |
16 |
Incorrect |
282 ms |
13676 KB |
Output isn't correct |
17 |
Incorrect |
410 ms |
16660 KB |
Output isn't correct |
18 |
Incorrect |
478 ms |
19012 KB |
Output isn't correct |
19 |
Incorrect |
621 ms |
22964 KB |
Output isn't correct |
20 |
Incorrect |
694 ms |
23748 KB |
Output isn't correct |