| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 940869 | HappyCapybara | Poi (IOI09_poi) | C++17 | 470 ms | 24176 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n, t, p;
    cin >> n >> t >> p;
    vector<int> st(t, n);
    vector<vector<int>> ts(n);
    for (int i=0; i<n; i++){
        for (int j=0; j<t; j++){
            int x;
            cin >> x;
            ts[i].push_back(x);
            if (x) st[j]--;
        }
    }
    vector<pair<int, pair<int,int>>> scores;
    for (int i=0; i<n; i++){
        int score = 0, tasks = 0;
        for (int j=0; j<t; j++){
            if (ts[i][j]){
                tasks++;
                score += st[j];
            }
        }
        scores.push_back({score, {tasks, -i}});
    }
    sort(scores.begin(), scores.end());
    //for (pair<int,pair<int,int>> v : scores) cout << v.first << " " << v.second.first << " " << -v.second.second << "\n";
    for (int i=0; i<n; i++){
        if (-scores[i].second.second == p-1){
            cout << scores[i].first << " " << n-i << "\n";
        }
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
