# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
440174 | dxz05 | Poi (IOI09_poi) | C++14 | 814 ms | 11992 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;
const int MAXN = 2022;
bool solved[MAXN][MAXN];
int cnt[MAXN];
pair<pair<int, int>, int> a[MAXN];
int main(){
int N, M, P;
cin >> N >> M >> P;
fill(cnt, cnt + M, N);
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
cin >> solved[i][j];
cnt[j] -= solved[i][j];
}
}
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
if (solved[i][j]){
a[i].first.first += cnt[j];
a[i].first.second++;
}
}
a[i].second = i + 1;
}
sort(a, a + N);
for (int i = 0; i < N; i++){
if (a[i].second == P){
cout << a[i].first.first << ' ' << i + 1 << endl;
return 0;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |