Submission #72341803


Source Code Expand

#include "bits/stdc++.h"
#define f(i, r, op) op ? i <= r : i < r
#define rep(i, l, r, op) for(int i = l; f(i, r, op); i++)
#define inline __inline__
#define change(x, type) static_cast<type>(x)

inline void read(int& x) {
    x = 0; bool f = 0;
    char ch = getchar();
    for (; !isdigit(ch); ch = getchar()) f = ch == '-';
    for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ '0');
    x *= f ? -1 : 1;
}

inline void print(int x) {
    if (x < 0) putchar('-'), x = -x;
    if (x > 9) print(x / 10);
    putchar(x % 10 ^ '0');
}

std::pair<int, int> a[35];

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0); std::cout.tie(0);
    int n; std::cin >> n;
    for (int i = 1; i <= n; i++) {
        int x; std::cin >> x;
        a[i] = {x, i};
    }
    std::sort(a + 1, a + n + 1, [](std::pair<int, int> x, std::pair<int, int> y) {
        return x.first < y.first;
    });
    std::cout << a[1].second << ' ' << a[2].second << ' ' << a[3].second;
}

Submission Info

Submission Time
Task B - Trifecta
User a_legend_cat
Language C++ IOI-Style(GNU++20) (GCC 14.2.0)
Score 200
Code Size 1026 Byte
Status AC
Exec Time 1 ms
Memory 1676 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 1 ms 1676 KiB
random_02.txt AC 0 ms 1676 KiB
random_03.txt AC 0 ms 1676 KiB
random_04.txt AC 0 ms 1676 KiB
random_05.txt AC 0 ms 1676 KiB
random_06.txt AC 0 ms 1676 KiB
random_07.txt AC 0 ms 1676 KiB
random_08.txt AC 0 ms 1676 KiB
sample_01.txt AC 0 ms 1676 KiB
sample_02.txt AC 0 ms 1676 KiB