| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 631146 | chinmoy_101 | Poi (IOI09_poi) | C++14 | 564 ms | 15928 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long   
int main()
{
    int n, t, p;
    cin>>n >>t >>p;
    int points[t];
    memset(points, 0, sizeof points);
    int arr[n][t];
    vector<pair<int, pair<int, int> > > final_standing; // score, solves, -id
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<t; j++)
        {
            cin>>arr[i][j];
            if(arr[i][j]==0)
            {
                points[j]++;
            }
        }
    }
    for(int i=0; i<n; i++)
    {
        int ans=0, prob=0;
        for(int j=0; j<t; j++)
        {
            if(arr[i][j]==1)
            {
                ans+=points[j];
                prob++;
            }
        }
        final_standing.push_back(make_pair(ans, make_pair(prob, -i-1)));
    }
    sort(final_standing.begin(), final_standing.end());
    reverse(final_standing.begin(), final_standing.end());
    for(int i=0; i<n; i++)
    {
        if(final_standing[i].second.second== -p)
        {
            cout<<final_standing[i].first <<" " <<i+1 <<"\n";
            return 0;
        }
    }
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
