Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- signed main()
- {
- int n;
- cin >> n;
- int max, x, ind = 0;
- cin >> max;
- for (int i = 1; i < n; i++)
- {
- cin >> x;
- if (max < x)
- {
- max = x;
- ind = i;
- }
- }
- cout << ind << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement