# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
539498 |
2022-03-19T04:15:31 Z |
MurotY |
Poi (IOI09_poi) |
C++14 |
|
301 ms |
39596 KB |
#include <bits/stdc++.h>
#define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ff first
#define ss second
#define ll long long
using namespace std;
const int N=2*1e3+7, M=1e9+7;
ll a[N][N], b[N];
pair <ll, pair <ll,ll>> ans[N];
void solve()
{
ll n, m, p;
cin >> n >> m >> p;
for (int i=1;i<=n;i++){
for (int j=1;j<=m;j++) cin >> a[i][j];
}
for (int j=1;j<=m;j++){
for (int i=1;i<=n;i++){
if (a[i][j] == 0) b[j]++;
}
}
for (int i=1;i<=n;i++){
for (int j=1;j<=m;j++){
if (a[i][j] == 1) ans[i].ff+=b[j];
if (a[i][j] == 1) ans[i].ss.ff+=1;
ans[i].ss.ss=i;
}
}
sort(ans+1,ans+n+1);
for (int i=1;i<=n;i++){
// cout << ans[i].ff <<" " << ans[i].ss.ff <<" " << ans[i].ss.ss <<"\n";
if (ans[i].ss.ss == p){
cout << ans[i].ff << " " << i;
return ;
}
}
}
int main()
{
ios;
int t=1;
// cin >> t;
while (t--){
solve();
cout << "\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
340 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 |
468 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
736 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
596 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
856 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
1372 KB |
Output isn't correct |
11 |
Incorrect |
9 ms |
2644 KB |
Output isn't correct |
12 |
Incorrect |
16 ms |
4308 KB |
Output isn't correct |
13 |
Incorrect |
44 ms |
8880 KB |
Output isn't correct |
14 |
Incorrect |
62 ms |
12632 KB |
Output isn't correct |
15 |
Incorrect |
163 ms |
19804 KB |
Output isn't correct |
16 |
Incorrect |
122 ms |
21388 KB |
Output isn't correct |
17 |
Incorrect |
237 ms |
28620 KB |
Output isn't correct |
18 |
Incorrect |
210 ms |
32376 KB |
Output isn't correct |
19 |
Incorrect |
301 ms |
38792 KB |
Output isn't correct |
20 |
Incorrect |
296 ms |
39596 KB |
Output isn't correct |