Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int n;
- int main() {
- ifstream cin("in.txt");
- cin >> n;
- int ans=0, maxLike=-1e9;
- for (int i = 0; i < n; i++) {
- int like; cin >> like;
- if (like > maxLike) {
- maxLike = like;
- ans = i;
- }
- }
- cout << 1 + ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement