Submission #239443

#TimeUsernameProblemLanguageResultExecution timeMemory
239443AutoratchPoi (IOI09_poi)C++14
55 / 100
310 ms23928 KiB
#include <bits/stdc++.h>
using namespace std;

const int N = 2001;

int n,t,p,lv;
int a[N][N],no[N],sc[N];
vector<pair<int,int> > res;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin >> n >> t >> p;
    for(int i = 1;i <= n;i++) for(int j = 1;j <= t;j++) cin >> a[i][j];
    for(int i = 1;i <= n;i++) for(int j = 1;j <= t;j++) if(!a[i][j]) no[j]++;
    for(int i = 1;i <= n;i++) for(int j = 1;j <= t;j++) if(a[i][j]) sc[i]+=no[j];
    for(int i = 1;i <= n;i++) if(sc[i]>sc[p]) lv++;
    cout << sc[p] << ' ' << lv+1 << '\n';
}
#Verdict Execution timeMemoryGrader output
Fetching results...