| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 443681 | Belgutei | Poi (IOI09_poi) | C++17 | 884 ms | 12060 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define ff first
#define ss second
#define pb push_back
#define mk make_pair
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll n,t,p;
bool b[2005][2005];
ll cnt[2005];
ll point[2005];
int main(){
    cin>>n>>t>>p;
    for(int i=1; i<=n; i++){
        for(int j=1; j<=t; j++){
            cin>>b[i][j];
            // person / task
        }
    }
    for(int i=1; i<=t; i++){
        int a=0;
        for(int j=1; j<=n; j++){
            if(b[j][i]==1) a++;
        }
        a=n-a;
        for(int j=1; j<=n; j++){
            if(b[j][i]==1){
                point[j]+=a;
                cnt[j]++;
            }
        }
    }
    cout<<point[p]<<" ";
    int ans=1;
    for(int i=1; i<=n; i++){
        if(point[i]>point[p]) ans++;
        if(i!=p){
            if(point[i]==point[p]){
                if(cnt[i]>cnt[p]) ans++;
                else{
                    if(cnt[i]==cnt[p]){
                        if(i<p) ans++;
                    }
                }
            }
        }
    }
    cout<<ans;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
