# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
835990 | Hanksburger | Poi (IOI09_poi) | C++17 | 182 ms | 15996 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;
pair<pair<int, int>, int> a[2005];
int x[2005][2005], s[2005];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m, k;
cin >> n >> m >> k;
for (int i=1; i<=n; i++)
{
for (int j=1; j<=m; j++)
{
cin >> x[i][j];
if (!x[i][j])
s[j]++;
}
}
for (int i=1; i<=n; i++)
{
a[i].second=i;
for (int j=1; j<=m; j++)
{
if (x[i][j])
{
a[i].first.first-=s[j];
a[i].first.second--;
}
}
}
sort(a+1, a+n+1);
for (int i=1; i<=n; i++)
if (a[i].second==k)
cout << -a[i].first.first << ' ' << i;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |