Submission #53319848
Source Code Expand
Copy
#include<bits/stdc++.h>#define ll long long#define INF 0x3f3f3f3f#define endl '\n'using namespace std;const int N=3e5+233;int n,a[N];bool flag;int main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin>>n;for(int i=1;i<=n;i++){cin>>a[i];if(a[i] > a[1]){cout<<i;return 0;}
#include<bits/stdc++.h> #define ll long long #define INF 0x3f3f3f3f #define endl '\n' using namespace std; const int N=3e5+233; int n,a[N]; bool flag; int main(){ ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(a[i] > a[1]){ cout<<i; return 0; } } cout<<-1; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Buildings |
User | wusixie |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 371 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3516 KB |
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 | 3464 KB |
00_sample_02.txt | AC | 1 ms | 3516 KB |
00_sample_03.txt | AC | 1 ms | 3432 KB |
01_test_01.txt | AC | 1 ms | 3408 KB |
01_test_02.txt | AC | 1 ms | 3400 KB |
01_test_03.txt | AC | 1 ms | 3384 KB |
01_test_04.txt | AC | 1 ms | 3396 KB |
01_test_05.txt | AC | 1 ms | 3408 KB |
01_test_06.txt | AC | 1 ms | 3388 KB |
01_test_07.txt | AC | 1 ms | 3388 KB |
01_test_08.txt | AC | 1 ms | 3324 KB |
01_test_09.txt | AC | 1 ms | 3456 KB |
01_test_10.txt | AC | 1 ms | 3412 KB |
01_test_11.txt | AC | 1 ms | 3460 KB |
01_test_12.txt | AC | 1 ms | 3408 KB |