# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1016092 | socpite | Poi (IOI09_poi) | C++14 | 349 ms | 16048 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 = 2005;
int n, t, p;
int A[maxn][maxn], W[maxn], sum[maxn], usum[maxn];
int main() {
cin >> n >> t >> p;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= t; j++){
cin >> A[i][j];
W[j] += !A[i][j];
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= t; j++){
sum[i] += W[j]*A[i][j];
usum[i] += A[i][j];
}
}
int re = 1;
for(int i = 1; i <= n; i++){
if(i == p)continue;
if(sum[i] != sum[p])re += sum[i] > sum[p];
else if(usum[i] != usum[p])re += usum[i] > usum[p];
else re += i < p;
}
cout << sum[p] << " " << re;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |