제출 #987141

#제출 시각아이디문제언어결과실행 시간메모리
987141lyuPoi (IOI09_poi)C++17
0 / 100
205 ms12112 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, t, p; cin >> n >> t >> p; p--; vector<int> points(t, n); vector<int> task(n, 0); bool correct[n][t]; for(int i = 0; i < n; i++) { for(int j = 0; j < t; j++) { cin >> correct[i][j]; if(correct[i][j]) { points[j]--; task[i]++; } } } vector<int> score(n, 0); for(int i = 0; i < n; i++) { for(int j = 0; j < t; j++) score[i] += correct[i][j]*points[j]; } int front = 0; for(int i = 0; i < n; i++) { if(i == p) continue; if(score[i] > score[p]) front++; } front++; cout << n-front << ' ' << front << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...