Submission #56305930
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
void justDoIt();
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
justDoIt();
return 0;
}
void justDoIt() {
int n;
cin >> n;
vector<pair<int, int>> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i].first;
a[i].second = i + 1;
}
sort(a.begin(), a.end());
cout << a[n - 2].second;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Second Best |
| User | SanguineChame |
| Language | C++ 20 (gcc 12.2) |
| Score | 200 |
| Code Size | 425 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3624 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 3552 KiB |
| 00_sample_02.txt | AC | 1 ms | 3488 KiB |
| 01_test_01.txt | AC | 1 ms | 3440 KiB |
| 01_test_02.txt | AC | 1 ms | 3500 KiB |
| 01_test_03.txt | AC | 1 ms | 3436 KiB |
| 01_test_04.txt | AC | 1 ms | 3500 KiB |
| 01_test_05.txt | AC | 1 ms | 3360 KiB |
| 01_test_06.txt | AC | 1 ms | 3624 KiB |
| 01_test_07.txt | AC | 1 ms | 3500 KiB |
| 01_test_08.txt | AC | 1 ms | 3428 KiB |
| 01_test_09.txt | AC | 1 ms | 3360 KiB |
| 01_test_10.txt | AC | 1 ms | 3476 KiB |
| 01_test_11.txt | AC | 1 ms | 3496 KiB |
| 01_test_12.txt | AC | 1 ms | 3424 KiB |
| 01_test_13.txt | AC | 1 ms | 3556 KiB |