Submission #72348217
Source Code Expand
/*
Contest Name : AtCoder Beginner Contest 440
Problem : B Trifecta
Date : 2026-01-10
Time taken :
*/
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
typedef long long ll;
const int N = 61;
struct H{
int t, idx;
bool operator <(const H &W)const{
return t < W.t;
}
}hor[N];
int main(){
//freopen("C:\\Users\\HP\\Downloads\\.in", "r", stdin);
//freopen("C:\\Users\\HP\\Desktop\\.txt", "w", stdout);
int n;
scanf("%d", &n);
for(int i=1;i<=n;i++){
scanf("%d", &hor[i].t);
hor[i].idx = i;
}
sort(hor + 1, hor + n + 1);
printf("%d %d %d", hor[1].idx, hor[2].idx, hor[3].idx);
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Trifecta |
| User | Queryme |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 757 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3892 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 3812 KiB |
| random_02.txt | AC | 1 ms | 3728 KiB |
| random_03.txt | AC | 1 ms | 3784 KiB |
| random_04.txt | AC | 1 ms | 3672 KiB |
| random_05.txt | AC | 1 ms | 3892 KiB |
| random_06.txt | AC | 1 ms | 3708 KiB |
| random_07.txt | AC | 1 ms | 3744 KiB |
| random_08.txt | AC | 1 ms | 3708 KiB |
| sample_01.txt | AC | 1 ms | 3716 KiB |
| sample_02.txt | AC | 1 ms | 3760 KiB |