45292023-03-29 12:50:28TomaSajtAranycipők (45)cpp17Accepted 45/453ms4072 KiB
#include <bits/stdc++.h>
using namespace std;
#define speed cin.tie(0); ios::sync_with_stdio(0)

int main() {
    speed;
    int n; cin >> n;
    vector<int> v(n);
    for (auto& a : v) cin >> a;
    int m = *max_element(v.begin(), v.end());
    vector<int> sol;
    for (int i = 0; i < n; i++) {
        if (v[i] == m) sol.push_back(i);
    }
    cout << m << '\n' << sol.size();
    for (auto i : sol) cout << '\n' << i + 1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1824 KiB
2Accepted0/03ms2020 KiB
3Accepted3/33ms2248 KiB
4Accepted3/33ms2460 KiB
5Accepted3/32ms2524 KiB
6Accepted3/33ms2760 KiB
7Accepted3/33ms2988 KiB
8Accepted3/33ms3096 KiB
9Accepted3/32ms3180 KiB
10Accepted3/33ms3412 KiB
11Accepted3/33ms3404 KiB
12Accepted3/33ms3604 KiB
13Accepted3/32ms3696 KiB
14Accepted3/33ms3732 KiB
15Accepted3/33ms3972 KiB
16Accepted3/33ms3912 KiB
17Accepted3/33ms4072 KiB