57032023-09-09 17:46:27TomaSajtAranycipők (45)cpp17Accepted 45/453ms3772 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(0), ios::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int& a : v) cin >> a;
  int m = *max_element(v.begin(), v.end());
  cout << m << '\n';
  cout << count(v.begin(), v.end(), m) << '\n';
  for (int i = 0; i < n; i++) {
    if (v[i] == m) cout << i + 1 << '\n';
  }
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1992 KiB
2Accepted0/03ms2148 KiB
3Accepted3/33ms2312 KiB
4Accepted3/32ms2392 KiB
5Accepted3/33ms2528 KiB
6Accepted3/33ms2736 KiB
7Accepted3/32ms2704 KiB
8Accepted3/33ms2944 KiB
9Accepted3/32ms3028 KiB
10Accepted3/33ms2920 KiB
11Accepted3/33ms3056 KiB
12Accepted3/33ms3260 KiB
13Accepted3/33ms3472 KiB
14Accepted3/33ms3572 KiB
15Accepted3/33ms3556 KiB
16Accepted3/33ms3684 KiB
17Accepted3/33ms3772 KiB