# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
715338 |
2023-03-26T14:22:09 Z |
Toxtaq |
Poi (IOI09_poi) |
C++17 |
|
652 ms |
23832 KB |
#include<bits/stdc++.h>
using namespace std;
struct Person{
int point, num_of_solved, indx;
friend bool operator<(Person &a, Person &b){
if(a.point == b.point)return a.num_of_solved < b.num_of_solved;
return a.point < b.point;
}
};
int main()
{
int n, t, p;
cin >> n >> t >> p;
vector<vector<int>>v(n + 1, vector<int>(t + 1));
for(int i = 1;i <= n;++i){
for(int j = 1;j <= t;++j){
cin >> v[i][j];
}
}
vector<int>point_for_each_task(t + 1);
for(int i = 1;i <= t;++i){
for(int j = 1;j <= n;++j){
point_for_each_task[i] += (v[j][i] == 0);
}
}
vector<Person>people(n + 1);
for(int i = 1;i <= n;++i){
for(int j = 1;j <= t;++j){
if(v[i][j])people[i].point += point_for_each_task[j];
people[i].num_of_solved += (v[i][j] == 1);
}
people[i].indx = i;
}
sort(people.begin(), people.end());
for(int i = 1;i <= n;++i){
if(people[i].indx == p){
cout << people[i].point << " " << i;
return 0;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
292 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
300 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
304 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
308 KB |
Output isn't correct |
10 |
Incorrect |
5 ms |
436 KB |
Output isn't correct |
11 |
Incorrect |
24 ms |
980 KB |
Output isn't correct |
12 |
Incorrect |
28 ms |
1484 KB |
Output isn't correct |
13 |
Incorrect |
84 ms |
3760 KB |
Output isn't correct |
14 |
Incorrect |
120 ms |
5320 KB |
Output isn't correct |
15 |
Incorrect |
243 ms |
9148 KB |
Output isn't correct |
16 |
Incorrect |
230 ms |
9908 KB |
Output isn't correct |
17 |
Incorrect |
350 ms |
14540 KB |
Output isn't correct |
18 |
Incorrect |
396 ms |
16240 KB |
Output isn't correct |
19 |
Incorrect |
554 ms |
21504 KB |
Output isn't correct |
20 |
Incorrect |
652 ms |
23832 KB |
Output isn't correct |