Submission #741486

#TimeUsernameProblemLanguageResultExecution timeMemory
741486rahidilbayramli올림픽 (KOI13_olympic)C++17
100 / 100
2 ms344 KiB
#include<bits/stdc++.h> #define ll long long #define ld long double #define pb push_back #define vl vector<ll> #define sl set<ll> #define pii pair<int, int> #define pll pair<ll, ll> #define all(v) v.begin(), v.end() using namespace std; int main(){ ll n, k, x = 0, y, i, d = 1; cin >> n >> k; vl g(n+1), s(n+1), b(n+1); for(i = 1; i <= n; i++){ cin >> x; cin >> g[x] >> s[x] >> b[x]; } for(i = 1; i <= n; i++) { if(g[i] > g[k]) d++; else if(g[i] == g[k] && s[i] > s[k]) d++; else if(g[i] == g[k] && s[i] == s[k] && b[i] > b[k]) d++; } cout << d << "\n"; }

Compilation message (stderr)

olympic.cpp: In function 'int main()':
olympic.cpp:12:21: warning: unused variable 'y' [-Wunused-variable]
   12 |     ll n, k, x = 0, y, i, d = 1;
      |                     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...