# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
347918 |
2021-01-13T18:21:54 Z |
Alma |
Poi (IOI09_poi) |
C++14 |
|
713 ms |
24172 KB |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void POI (vector<vector<int>>& results, int& N, int& T, int& P) {
vector<int> value;
value.assign(T, 0);
for (int i = 0; i < N; i++) {
for (int j = 0; j < T; j++) {
if (results[i][j] == 0) {
value[j]++;
}
}
}
vector<int> scores (N);
for (int i = 0; i < N; i++) {
int points = 0;
for (int j = 0; j < T; j++) {
if (results[i][j] == 1) {
points += value[j];
}
scores[i] = points;
}
}
int P_score = scores[P-1];
int P_rank = P;
cout << P_score << ' ' << P_rank << endl;
}
int main () {
int N, T, P; cin >> N >> T >> P;
vector<vector<int>> results;
for (int i = 0; i < N; i++) {
vector<int> res (T);
for (int j = 0; j < T; j++) {
int a; cin >> a;
res[j] = a;
}
results.push_back(res);
}
POI (results, N, T, P);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
364 KB |
Output isn't correct |
10 |
Incorrect |
6 ms |
492 KB |
Output isn't correct |
11 |
Incorrect |
22 ms |
1004 KB |
Output isn't correct |
12 |
Incorrect |
36 ms |
1516 KB |
Output isn't correct |
13 |
Incorrect |
107 ms |
3804 KB |
Output isn't correct |
14 |
Incorrect |
150 ms |
5356 KB |
Output isn't correct |
15 |
Incorrect |
269 ms |
9196 KB |
Output isn't correct |
16 |
Incorrect |
292 ms |
9964 KB |
Output isn't correct |
17 |
Incorrect |
428 ms |
14572 KB |
Output isn't correct |
18 |
Incorrect |
485 ms |
16364 KB |
Output isn't correct |
19 |
Incorrect |
640 ms |
21612 KB |
Output isn't correct |
20 |
Incorrect |
713 ms |
24172 KB |
Output isn't correct |