Please sign in first.
Submission #53322674
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e12;
const int N = 1e3 + 5;
const int MOD = 1e9 + 7;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (auto &i : a)
cin >> i;
for (int i = 1; i < n; i++) {
if (a[i] > a[0]) {
cout << (i + 1);
return 0;
}
}
cout << -1;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Buildings |
| User | shivam_bhalla |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 366 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3652 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 3456 KiB |
| 00_sample_02.txt | AC | 1 ms | 3640 KiB |
| 00_sample_03.txt | AC | 1 ms | 3464 KiB |
| 01_test_01.txt | AC | 1 ms | 3644 KiB |
| 01_test_02.txt | AC | 1 ms | 3460 KiB |
| 01_test_03.txt | AC | 1 ms | 3460 KiB |
| 01_test_04.txt | AC | 1 ms | 3464 KiB |
| 01_test_05.txt | AC | 1 ms | 3464 KiB |
| 01_test_06.txt | AC | 1 ms | 3452 KiB |
| 01_test_07.txt | AC | 1 ms | 3428 KiB |
| 01_test_08.txt | AC | 1 ms | 3440 KiB |
| 01_test_09.txt | AC | 1 ms | 3340 KiB |
| 01_test_10.txt | AC | 1 ms | 3652 KiB |
| 01_test_11.txt | AC | 1 ms | 3560 KiB |
| 01_test_12.txt | AC | 1 ms | 3452 KiB |