# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
717687 |
2023-04-02T10:46:47 Z |
ZeroCool |
Poi (IOI09_poi) |
C++14 |
|
250 ms |
23756 KB |
#include <bits/stdc++.h>
#define ll long long
#define inf INT_MAX
#define endl '\n'
using namespace std;
const int mxn = 20;
struct Person{
int point = 0, num_of_solved = 0, indx = 0;
bool operator <(Person &a){
if(a.point == this->point && a.num_of_solved == this->num_of_solved)return a.indx < this->indx;
else if(a.point == this->point)return a.num_of_solved > this->num_of_solved;
return a.point > this->point;
}
};
void solve(){
int n, t, p;
cin>>n>>t>>p;
int v[n+1][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);
for(int i = 1;i <= n;i++){
for(int j = 1;j <= t;j++){
if(v[i][j])people[i - 1].point += point_for_each_task[j];
people[i - 1].num_of_solved += (v[i][j] == 1);
}
people[i - 1].indx = i;
}
sort(people.begin(), people.end());
for(int i = 0;i < n;++i){
if(people[i].indx == p){
cout<<people[i].point<<" "<<i + 1;
return;
}
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
//cin>>t;
while(t--) solve();
}
# |
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 |
212 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
284 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
336 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
400 KB |
Output isn't correct |
11 |
Incorrect |
8 ms |
972 KB |
Output isn't correct |
12 |
Incorrect |
12 ms |
1472 KB |
Output isn't correct |
13 |
Incorrect |
38 ms |
3772 KB |
Output isn't correct |
14 |
Incorrect |
49 ms |
5296 KB |
Output isn't correct |
15 |
Incorrect |
107 ms |
9232 KB |
Output isn't correct |
16 |
Incorrect |
98 ms |
9848 KB |
Output isn't correct |
17 |
Incorrect |
142 ms |
14304 KB |
Output isn't correct |
18 |
Incorrect |
164 ms |
16204 KB |
Output isn't correct |
19 |
Incorrect |
226 ms |
21424 KB |
Output isn't correct |
20 |
Incorrect |
250 ms |
23756 KB |
Output isn't correct |