# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
598459 |
2022-07-18T11:32:16 Z |
Trisanu_Das |
Poi (IOI09_poi) |
C++17 |
|
627 ms |
40204 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, t, p; cin >> n >> t >> p;
vector<int> solves(t, 0);
vector<vector<int> > v(n,vector(t,int(0)));
for(int i = 1;i < n;i++){for(int j = 1;j < t; j++) {cin >> v[i][j]; solves[j] += v[i][j];}}
vector<array<int, 3>> stats(n);
vector<int> cnt(n, 0);
vector<int> sum(n, 0);
for(int i = 0;i < n;i++) { for(int j = 0;j < t;j++) {cnt[i] += v[i][j]; sum[i] += v[i][j] * (n - solves[j]);} stats[i-1]={-sum[i],-cnt[i],i}; /* pro gamer move */}
sort(stats.begin(), stats.end()); // ez
for(int i = 0;i < n;i++) if(stats[i][2] == p) cout << -stats[i][0] << ' ' << i + 1 << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
2 |
Runtime error |
1 ms |
428 KB |
Execution killed with signal 6 |
3 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
4 |
Runtime error |
1 ms |
384 KB |
Execution killed with signal 6 |
5 |
Runtime error |
1 ms |
428 KB |
Execution killed with signal 6 |
6 |
Runtime error |
2 ms |
424 KB |
Execution killed with signal 6 |
7 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 6 |
8 |
Runtime error |
2 ms |
468 KB |
Execution killed with signal 6 |
9 |
Runtime error |
5 ms |
564 KB |
Execution killed with signal 6 |
10 |
Runtime error |
6 ms |
724 KB |
Execution killed with signal 6 |
11 |
Runtime error |
21 ms |
1620 KB |
Execution killed with signal 6 |
12 |
Runtime error |
36 ms |
2372 KB |
Execution killed with signal 6 |
13 |
Runtime error |
109 ms |
6380 KB |
Execution killed with signal 6 |
14 |
Runtime error |
137 ms |
8908 KB |
Execution killed with signal 6 |
15 |
Runtime error |
247 ms |
15396 KB |
Execution killed with signal 6 |
16 |
Runtime error |
260 ms |
16528 KB |
Execution killed with signal 6 |
17 |
Runtime error |
400 ms |
24320 KB |
Execution killed with signal 6 |
18 |
Runtime error |
420 ms |
27496 KB |
Execution killed with signal 6 |
19 |
Runtime error |
555 ms |
36208 KB |
Execution killed with signal 6 |
20 |
Runtime error |
627 ms |
40204 KB |
Execution killed with signal 6 |