| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1119795 | kasdo | Poi (IOI09_poi) | C++14 | 436 ms | 38376 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int maxn = 2005;
int a[maxn][maxn], scores[maxn];
int n, t, p;
signed main()
{
    cin>>n>>t>>p;
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<t; j++)
        {
            cin>>a[i][j];
            scores[j] += a[i][j];
        }
    }
    
    int ans = 0, cnt = 0;
    set<int> s;
    for(int i=0; i<n; i++)
    {
        int cur = 0;
        for(int j=0; j<t; j++)
        {
            if (a[i][j] == 1) cur += n - scores[j];
        }
        if (i == p - 1) ans = cur;
        s.insert(cur);
    }
    
    for(auto i : s)
    {
        if (i >= ans) cnt++;
    }
    cout<<ans<<" "<<cnt<<endl;
    
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
