# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
631145 |
2022-08-17T17:53:21 Z |
chinmoy_101 |
Poi (IOI09_poi) |
C++14 |
|
567 ms |
15932 KB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int n, t, p;
cin>>n >>t >>p;
int points[t];
memset(points, 0, sizeof points);
int arr[n][t];
vector<pair<int, pair<int, int> > > final_standing; // score, solves, -id
for(int i=0; i<n; i++)
{
for(int j=0; j<t; j++)
{
cin>>arr[i][j];
if(arr[i][j]==0)
{
points[j]++;
}
}
}
for(int i=0; i<n; i++)
{
int ans=0, prob=0;
for(int j=0; j<t; j++)
{
if(arr[i][j]==1)
{
ans+=points[j];
prob++;
}
}
final_standing.push_back(make_pair(ans, make_pair(prob, i+1)));
}
sort(final_standing.begin(), final_standing.end());
reverse(final_standing.begin(), final_standing.end());
for(int i=0; i<n; i++)
{
if(final_standing[i].second.second==p)
{
cout<<final_standing[i].first <<" " <<i-1 <<"\n";
return 0;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
0 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 |
212 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
212 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
5 ms |
340 KB |
Output isn't correct |
11 |
Incorrect |
18 ms |
724 KB |
Output isn't correct |
12 |
Incorrect |
31 ms |
980 KB |
Output isn't correct |
13 |
Incorrect |
91 ms |
2616 KB |
Output isn't correct |
14 |
Incorrect |
120 ms |
3604 KB |
Output isn't correct |
15 |
Incorrect |
227 ms |
6148 KB |
Output isn't correct |
16 |
Incorrect |
235 ms |
6632 KB |
Output isn't correct |
17 |
Incorrect |
339 ms |
9684 KB |
Output isn't correct |
18 |
Incorrect |
398 ms |
10928 KB |
Output isn't correct |
19 |
Incorrect |
515 ms |
14380 KB |
Output isn't correct |
20 |
Incorrect |
567 ms |
15932 KB |
Output isn't correct |