# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
562933 |
2022-05-15T16:00:57 Z |
Drew_ |
Poi (IOI09_poi) |
C++17 |
|
353 ms |
12196 KB |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int MAX = 2069;
int N, M, P;
bool ar[MAX][MAX];
int score[MAX];
int main()
{
ios :: sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> N >> M >> P;
for (int j = 1; j <= M; ++j)
score[j] = N;
for (int i = 1; i <= N; ++i)
{
for (int j = 1; j <= M; ++j)
{
cin >> ar[i][j];
score[j] -= ar[i][j];
}
}
vector<array<int, 3>> v;
for (int i = 1; i <= N; ++i)
{
int sum = 0, solved = 0;
for (int j = 1; j <= M; ++j)
if (ar[i][j])
sum += score[j], solved++;
v.pb({sum, solved, i});
}
sort(v.begin(), v.end());
for (int i = 0; i < N; ++i)
{
if (v[i][2] == P)
{
cout << v[i][0] << " " << i+1 << '\n';
break;
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
3 |
Incorrect |
1 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 |
328 KB |
Output isn't correct |
7 |
Incorrect |
2 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 |
3 ms |
724 KB |
Output isn't correct |
11 |
Incorrect |
10 ms |
1108 KB |
Output isn't correct |
12 |
Incorrect |
17 ms |
1652 KB |
Output isn't correct |
13 |
Incorrect |
47 ms |
2896 KB |
Output isn't correct |
14 |
Incorrect |
70 ms |
4016 KB |
Output isn't correct |
15 |
Incorrect |
111 ms |
5704 KB |
Output isn't correct |
16 |
Incorrect |
120 ms |
6084 KB |
Output isn't correct |
17 |
Incorrect |
192 ms |
8016 KB |
Output isn't correct |
18 |
Incorrect |
246 ms |
9112 KB |
Output isn't correct |
19 |
Incorrect |
292 ms |
11324 KB |
Output isn't correct |
20 |
Incorrect |
353 ms |
12196 KB |
Output isn't correct |