# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
937954 | 2024-03-04T17:10:31 Z | guymmk | Poi (IOI09_poi) | C++14 | 189 ms | 8744 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define endl "\n" #define vi vector<int> #define vpii vector<pair<int,int> > #define umap unordered_map #define uset unordered_set #define mk make_pair #define pb push_back #define all(x) x.begin(),x.end() #define read(x) for (auto& zu: (x)) cin >> zu; #define F first #define S second #define mustawa ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr) #define pii pair<int,int> #define mishari main const int inf=1e9+7; void fa(bool ok){ cout << (ok ? "YES": "NO") << "\n";} void usaco(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } void solve(){ int n,t,p; cin>>n>>t>>p; vpii v(n); vector<int>points(n); bool solved[n][t]={}; for(int i=0;i<n;i++){ for(int j=0;j<t;j++){ int x; cin>>x; solved[i][j]=x; points[j]+=!x; } }for(int i=0;i<n;i++){ v[i].S=i+1; for(int j=0;j<t;j++){ if(solved[i][j]){ v[i].F+=points[j]; } } }sort(all(v)); for(int i=0;i<n;i++){ if(v[i].S==p){ cout<<v[i].F<<" "<<i+1<<endl; } } }signed mishari(){ mustawa; int t=1; //usaco("") //cin>>t; while(t--)solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Incorrect | 1 ms | 348 KB | Output isn't correct |
3 | Incorrect | 1 ms | 456 KB | Output isn't correct |
4 | Incorrect | 0 ms | 348 KB | Output isn't correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Incorrect | 1 ms | 344 KB | Output isn't correct |
7 | Incorrect | 1 ms | 348 KB | Output isn't correct |
8 | Incorrect | 1 ms | 344 KB | Output isn't correct |
9 | Incorrect | 1 ms | 348 KB | Output isn't correct |
10 | Incorrect | 3 ms | 348 KB | Output isn't correct |
11 | Incorrect | 6 ms | 600 KB | Output isn't correct |
12 | Incorrect | 9 ms | 860 KB | Output isn't correct |
13 | Incorrect | 28 ms | 1864 KB | Output isn't correct |
14 | Incorrect | 42 ms | 2388 KB | Output isn't correct |
15 | Runtime error | 77 ms | 5248 KB | Execution killed with signal 6 |
16 | Incorrect | 80 ms | 3996 KB | Output isn't correct |
17 | Incorrect | 123 ms | 5432 KB | Output isn't correct |
18 | Incorrect | 126 ms | 5972 KB | Output isn't correct |
19 | Incorrect | 170 ms | 7712 KB | Output isn't correct |
20 | Incorrect | 189 ms | 8744 KB | Output isn't correct |