제출 #347918

#제출 시각아이디문제언어결과실행 시간메모리
347918AlmaPoi (IOI09_poi)C++14
0 / 100
713 ms24172 KiB
#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); }
#Verdict Execution timeMemoryGrader output
Fetching results...