199202025-12-30 09:42:00PappMatyasAranycipők (45)cpp17Accepted 45/453ms564 KiB
#include <iostream>
#include <vector>

using namespace std;

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