# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
611966 |
2022-07-29T09:09:38 Z |
tranxuanbach |
Poi (IOI09_poi) |
C++17 |
|
279 ms |
23768 KB |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
#define fi first
#define se second
#define For(i, l, r) for (auto i = (l); i < (r); i++)
#define ForE(i, l, r) for (auto i = (l); i <= (r); i++)
#define FordE(i, l, r) for (auto i = (l); i >= (r); i--)
#define Fora(v, a) for (auto v: (a))
#define bend(a) (a).begin(), (a).end()
#define isz(a) ((signed)(a).size())
using ll = long long;
using ld = long double;
using pii = pair <int, int>;
using vi = vector <int>;
using vpii = vector <pii>;
using vvi = vector <vi>;
const int N = 2e3 + 5;
int n, m, k;
int a[N][N];
int b[N], c[N], d[N];
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
// freopen("KEK.inp", "r", stdin);
// freopen("KEK.out", "w", stdout);
cin >> n >> m >> k;
ForE(i, 1, n){
ForE(j, 1, m){
cin >> a[i][j];
}
}
ForE(j, 1, m){
ForE(i, 1, n){
if (a[i][j] == 0){
b[j]++;
}
}
ForE(i, 1, n){
if (a[i][j] == 1){
c[i] += b[j];
d[i]++;
}
}
}
cout << c[k] << ' ';
vi e(n); iota(bend(e), 1);
sort(bend(e), [&](int i, int j){
if (c[i] != c[j]){
return c[i] < c[j];
}
if (d[i] != d[j]){
return d[i] < d[j];
}
return i < j;
});
ForE(i, 1, n){
if (e[i - 1] == k){
cout << i << endl;
break;
}
}
}
/*
==================================================+
INPUT: |
--------------------------------------------------|
--------------------------------------------------|
==================================================+
OUTPUT: |
--------------------------------------------------|
--------------------------------------------------|
==================================================+
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
468 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
460 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
724 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
1236 KB |
Output isn't correct |
11 |
Incorrect |
8 ms |
2156 KB |
Output isn't correct |
12 |
Incorrect |
14 ms |
3512 KB |
Output isn't correct |
13 |
Incorrect |
37 ms |
6544 KB |
Output isn't correct |
14 |
Incorrect |
78 ms |
9244 KB |
Output isn't correct |
15 |
Incorrect |
99 ms |
12672 KB |
Output isn't correct |
16 |
Incorrect |
109 ms |
13656 KB |
Output isn't correct |
17 |
Incorrect |
164 ms |
16784 KB |
Output isn't correct |
18 |
Incorrect |
179 ms |
18948 KB |
Output isn't correct |
19 |
Incorrect |
221 ms |
23104 KB |
Output isn't correct |
20 |
Incorrect |
279 ms |
23768 KB |
Output isn't correct |