# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
741486 | rahidilbayramli | 올림픽 (KOI13_olympic) | C++17 | 2 ms | 344 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |