# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
402008 |
2021-05-11T07:30:16 Z |
Azimjon |
Poi (IOI09_poi) |
C++17 |
|
312 ms |
39612 KB |
// Muallif: Azimjon Mehmonali o'g'li
#include <bits/stdc++.h>
using namespace std;
#define int long long
const long double PI = 3.1415926535897;
const int mod = 1000000007LL;
const int INF = 1e18;
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, t, p;
cin >> n >> t >> p;
vector<vector<int>> g(n + 1, vector<int>(t + 1));
vector<int> tq(t + 1, n);
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= t; j++) {
cin >> g[i][j];
tq[j] -= g[i][j];
}
}
vector<pair<pair<int, int>, int>> v;
for (int i = 1; i <= n; i++) {
int imq = 0, ims = 0;
for (int j = 1; j <= t; j++) {
ims += g[i][j];
imq += g[i][j] * tq[j];
}
v.push_back({{imq, ims}, i});
}
sort(v.begin(), v.end());
for (int i = 0; i < n; i++) {
if (v[i].second == p) {
cout << v[i].first.first << " " << i + 1 << endl;
return 0;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
312 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
316 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
320 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
460 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
588 KB |
Output isn't correct |
11 |
Incorrect |
20 ms |
1512 KB |
Output isn't correct |
12 |
Incorrect |
16 ms |
2256 KB |
Output isn't correct |
13 |
Incorrect |
47 ms |
6148 KB |
Output isn't correct |
14 |
Incorrect |
67 ms |
8644 KB |
Output isn't correct |
15 |
Incorrect |
118 ms |
15044 KB |
Output isn't correct |
16 |
Incorrect |
128 ms |
16264 KB |
Output isn't correct |
17 |
Incorrect |
199 ms |
23888 KB |
Output isn't correct |
18 |
Incorrect |
216 ms |
27048 KB |
Output isn't correct |
19 |
Incorrect |
292 ms |
35748 KB |
Output isn't correct |
20 |
Incorrect |
312 ms |
39612 KB |
Output isn't correct |