| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 593198 | Bench0310 | Poi (IOI09_poi) | C++17 | 218 ms | 23848 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n,t,p;
    cin >> n >> t >> p;
    vector<int> solves(t+1,0);
    vector v(n+1,vector(t+1,int(0)));
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=t;j++)
        {
            cin >> v[i][j];
            solves[j]+=v[i][j];
        }
    }
    vector<array<int,3>> e(n);
    vector<int> cnt(n+1,0);
    vector<int> sum(n+1,0);
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=t;j++)
        {
            cnt[i]+=v[i][j];
            sum[i]+=v[i][j]*(n-solves[j]);
        }
        e[i-1]={-sum[i],-cnt[i],i};
    }
    sort(e.begin(),e.end());
    for(int i=0;i<n;i++)
    {
        if(e[i][2]==p) cout << -e[i][0] << " " << i+1 << "\n";
    }
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
