| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 998653 | bachhoangxuan | Poi (IOI09_poi) | C++17 | 153 ms | 23992 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int N,T,P;cin >> N >> T >> P;P--;
    vector<vector<int>> c(N,vector<int>(T,0));
    vector<int> cnt(T,N);
    for(int i=0;i<N;i++) for(int j=0;j<T;j++) cin >> c[i][j],cnt[j]-=c[i][j];
    vector<array<int,3>> cc(N);
    for(int i=0;i<N;i++){
        int total=0,sum=0;
        for(int j=0;j<T;j++) sum+=c[i][j],total+=c[i][j]*cnt[j];
        cc[i]={-total,-sum,i};
    }
    sort(cc.begin(),cc.end());
    for(int i=0;i<N;i++) if(cc[i][2]==P){
        cout << -cc[i][0] << ' ' << i+1 << '\n';
        return 0;
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
