# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
717727 | 2023-04-02T11:38:15 Z | AndrijaM | Poi (IOI09_poi) | C++14 | 585 ms | 32524 KB |
#include <bits/stdc++.h> using namespace std; int main() { long long n,t,p; cin>>n>>t>>p; long long cpt[t]={0}; vector<long long>v[n]; long long val[n]; memset(val,0,sizeof val); vector<pair<long long,long long>>r; for(long long i=0;i<n;i++) { for(long long j=0;j<t;j++) { long long num; cin>>num; v[i].push_back(num); cpt[j]+=num;///lugje-cpt[j] treba } } for(long long i=0;i<n;i++) { for(long long j=0;j<t;j++) { if(v[i][j]==1) val[i]+=n-cpt[j]; } r.push_back({val[i],i+1}); } sort(r.begin(),r.end()); for(long long i=0;i<r.size();i++) { if(r[i].second==p) { cout<<r[i].first<<" "<<i+1<<endl; return 0; } } return 0; }
Compilation message
# | 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 | Correct | 1 ms | 340 KB | Output is correct |
8 | Incorrect | 2 ms | 340 KB | Output isn't correct |
9 | Incorrect | 3 ms | 468 KB | Output isn't correct |
10 | Incorrect | 5 ms | 596 KB | Output isn't correct |
11 | Incorrect | 18 ms | 1492 KB | Output isn't correct |
12 | Incorrect | 31 ms | 2236 KB | Output isn't correct |
13 | Incorrect | 87 ms | 5956 KB | Output isn't correct |
14 | Incorrect | 125 ms | 8328 KB | Output isn't correct |
15 | Incorrect | 215 ms | 17004 KB | Output isn't correct |
16 | Incorrect | 236 ms | 18316 KB | Output isn't correct |
17 | Incorrect | 356 ms | 24456 KB | Output isn't correct |
18 | Incorrect | 398 ms | 27676 KB | Output isn't correct |
19 | Incorrect | 532 ms | 32524 KB | Output isn't correct |
20 | Incorrect | 585 ms | 32456 KB | Output isn't correct |