-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathB_Booby_Prize.cpp
More file actions
49 lines (44 loc) · 883 Bytes
/
Copy pathB_Booby_Prize.cpp
File metadata and controls
49 lines (44 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//jai bholenath
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007
#define float double
#define pb push_back
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define endl "\n"
#define inf 3e18
const int N = 1e5 + 5;
int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
char dir[] = {'U', 'R', 'D', 'L'};
void solve()
{
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++)
{
cin >> v[i].ff;
v[i].ss = i + 1;
}
sort(all(v));
cout << v[n - 2].ss;
return;
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int q = 1;
//cin>>q;
for (int i = 0; i < q; i++)
{
solve();
cout << "\n";
}
return 0;
}