# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
963303 |
2024-04-14T20:34:24 Z |
anango |
Poi (IOI09_poi) |
C++17 |
|
488 ms |
39760 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int n,t,p;
cin >> n >> t >> p;
p--;
vector<int> tasks(n);
vector<vector<int>> solves(t,vector<int>(n));
vector<int> points(t,n);
for (int i=0; i<n; i++) {
for (int j=0; j<t; j++) {
int x;
cin >> x;
if (x==1) solves[j][i]++;
if (x==1) points[j]--;
}
}
vector<int> score(n,0);
for (int i=0; i<n; i++) {
for (int j=0; j<t; j++) {
if (solves[j][i])score[i]+=points[j];
}
//cout << score[i] <<" ";
}
cout << endl;
vector<int> an;
for (int i=0; i<n; i++) {
an.push_back(i);
}
sort(an.begin(), an.end(), [=](const int x, const int y){
if (score[x]!=score[y]) {
return score[x]<score[y];
}
return x<y;
});
int c=-1;
for (int i=0; i<n; i++) {
if (an[i]==p) {
c=i+1;
}
}
cout << score[p] << " " << c << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
10 |
Incorrect |
4 ms |
600 KB |
Output isn't correct |
11 |
Incorrect |
14 ms |
1636 KB |
Output isn't correct |
12 |
Incorrect |
23 ms |
2400 KB |
Output isn't correct |
13 |
Incorrect |
69 ms |
6276 KB |
Output isn't correct |
14 |
Incorrect |
115 ms |
8784 KB |
Output isn't correct |
15 |
Incorrect |
193 ms |
15152 KB |
Output isn't correct |
16 |
Incorrect |
211 ms |
16464 KB |
Output isn't correct |
17 |
Incorrect |
302 ms |
23896 KB |
Output isn't correct |
18 |
Incorrect |
354 ms |
27472 KB |
Output isn't correct |
19 |
Incorrect |
459 ms |
35852 KB |
Output isn't correct |
20 |
Incorrect |
488 ms |
39760 KB |
Output isn't correct |