# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962577 | starchan | Poi (IOI09_poi) | C++17 | 195 ms | 31736 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;
#define int long long
#define in array<int, 2>
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define INF (int)1e17
#define MX (int)3e5+5
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL)
signed main()
{
fast();
int n, t, p;
cin >> n >> t >> p;
int pp[n][t];
for(int i = 0; i < n; i++)
{
for(int j = 0; j < t; j++)
cin >> pp[i][j];
}
in a[t];
for(int i = 0; i < t; i++)
{
a[i][0] = 0;
a[i][1] = i;
for(int j = 0; j < n; j++)
{
int ppp = pp[j][i];
a[i][0]-=ppp;
}
}
sort(a, a+t);
for(int i = 0; i < t; i++)
{
if(a[i][1] == (p-1))
{
cout << (-a[i][0]) << " " << (i+1) << "\n";
return 0;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |