| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 987141 | lyu | Poi (IOI09_poi) | C++17 | 205 ms | 12112 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
