237712026-01-29 08:41:19ProgramozoRokaAranycipők (45)cpp17Accepted 45/452ms508 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin >> n;
	int max=0,x;
	vector<int> tomb;
	for (int i = 0;i < n;++i)
	{
		cin >> x;
		if (x > max)
		{
			max = x;
			tomb.clear();
			tomb.push_back(i + 1);
		}
		else if (x==max) tomb.push_back(i + 1);
	}
	cout << max << endl << tomb.size() << endl;
	for (int i = 0; i < tomb.size();++i) cout << tomb[i] << endl;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms316 KiB
2Accepted0/01ms500 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms508 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms500 KiB
9Accepted3/31ms316 KiB
10Accepted3/32ms316 KiB
11Accepted3/31ms316 KiB
12Accepted3/31ms500 KiB
13Accepted3/31ms316 KiB
14Accepted3/32ms316 KiB
15Accepted3/32ms316 KiB
16Accepted3/31ms508 KiB
17Accepted3/32ms316 KiB