Submission #741486

# Submission time Handle Problem Language Result Execution time Memory
741486 2023-05-14T08:31:19 Z rahidilbayramli 올림픽 (KOI13_olympic) C++17
100 / 100
2 ms 344 KB
#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

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 time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 308 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 304 KB Output is correct
6 Correct 1 ms 312 KB Output is correct
7 Correct 1 ms 312 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 312 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 312 KB Output is correct
5 Correct 2 ms 344 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 336 KB Output is correct