Submission #72347505
Source Code Expand
#include<bits/stdc++.h>
#define ll long long
#define int long long
using namespace std;
void solve()
{
int n; cin>>n;
vector<int> v(n);
vector<pair<int,int>> s;
for(int i=0;i<n;i++)
{
cin>>v[i];
s.push_back({v[i],i+1});
}
sort(s.begin(),s.end());
for(int i=0;i<3;i++) cout<<s[i].second<<" ";
cout<<endl;
}
main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
// int t; cin>>t;
// while(t--)
solve();
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Trifecta |
| User | faritu23 |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 509 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3620 KiB |
Compile Error
./Main.cpp:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
20 | main()
| ^~~~
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 | 3408 KiB |
| random_02.txt | AC | 1 ms | 3620 KiB |
| random_03.txt | AC | 1 ms | 3408 KiB |
| random_04.txt | AC | 1 ms | 3540 KiB |
| random_05.txt | AC | 1 ms | 3620 KiB |
| random_06.txt | AC | 1 ms | 3484 KiB |
| random_07.txt | AC | 1 ms | 3484 KiB |
| random_08.txt | AC | 1 ms | 3480 KiB |
| sample_01.txt | AC | 1 ms | 3396 KiB |
| sample_02.txt | AC | 1 ms | 3548 KiB |