| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 277116 | barsbold | Poi (IOI09_poi) | C++14 | 361 ms | 5824 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pb push_back
#define ll long long
using namespace std;
bool a[2001][2001];
int tasks[2001];
pair<pair<int , int > , int > score[2001];
vector<int > hel;
int main (){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); 
    int n , t, p;
    cin >> n >> t >> p;
    memset(score , 0 , sizeof(score));
    for(int i = 1; i<=n; i++){
        for(int j = 1; j<=t; j++){
            cin >> a[i][j];
            if(a[i][j] == 0){
                tasks[j]++;
            }
        }
    }
    
    for(int i = 1; i<=n; i++){
        score[i].ss = -i;
        for(int j = 1; j<=t; j++){
            if(a[i][j] == 1 ){
                score[i].ff.ff+=tasks[j];
                score[i].ff.ss++;
            }
        }
    }
    int pl = score[p].ff.ff;
    sort(score +1 , score + n + 1);
    p=-p;
    for(int i =1 ; i<=n; i++){
        if(score[i].ff.ff == pl && score[i].ss ==p){
            cout << pl << " " << n - i + 1 << endl;
            return 0;
        }
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
