# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
539506 |
2022-03-19T04:26:40 Z |
MurotY |
Poi (IOI09_poi) |
C++14 |
|
317 ms |
31764 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, ll> ans[N];
void solve()
{
ll n, m, p;
cin >> n >> m >> p;
for (int i=1;i<=n;i++) ans[i].ff=ans[i].ss=0;
for (int i=1;i<=m;i++) b[i]=0;
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];
}
ans[i].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 == 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 |
0 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
4 |
Incorrect |
0 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 |
Correct |
2 ms |
604 KB |
Output is correct |
8 |
Incorrect |
2 ms |
596 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
852 KB |
Output isn't correct |
10 |
Incorrect |
5 ms |
1364 KB |
Output isn't correct |
11 |
Incorrect |
9 ms |
2488 KB |
Output isn't correct |
12 |
Incorrect |
15 ms |
3868 KB |
Output isn't correct |
13 |
Incorrect |
40 ms |
7732 KB |
Output isn't correct |
14 |
Incorrect |
53 ms |
10956 KB |
Output isn't correct |
15 |
Incorrect |
102 ms |
16788 KB |
Output isn't correct |
16 |
Incorrect |
111 ms |
18188 KB |
Output isn't correct |
17 |
Incorrect |
171 ms |
23916 KB |
Output isn't correct |
18 |
Incorrect |
227 ms |
26956 KB |
Output isn't correct |
19 |
Incorrect |
317 ms |
31720 KB |
Output isn't correct |
20 |
Incorrect |
270 ms |
31764 KB |
Output isn't correct |