66632023-12-15 18:40:14szabelrAranycipők (45)cpp17Accepted 45/454ms4240 KiB
#include <iostream>
using namespace std;
int main()
{
	int n=0, a,ln=0,db=0;
	cin >> n;
	int tomb[1001]{ 0 };
	for (int i = 1; i <= n; i++) 
	{
		cin >> a;
		tomb[i] = a;
		if (a > ln) {
			ln = a;
			db = 0;
			db++;
		}
		else if (a == ln) {
			db++;
		}
			
	}
	cout << ln << endl;
	cout << db << endl;
	for (int i = 1; i <= n; i++) 
	{
		if (tomb[i] == ln)
			cout << i << endl;
	}
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1880 KiB
2Accepted0/03ms2088 KiB
3Accepted3/33ms2320 KiB
4Accepted3/33ms2544 KiB
5Accepted3/33ms2724 KiB
6Accepted3/33ms2800 KiB
7Accepted3/33ms2928 KiB
8Accepted3/33ms3140 KiB
9Accepted3/33ms3360 KiB
10Accepted3/34ms3468 KiB
11Accepted3/33ms3440 KiB
12Accepted3/33ms3716 KiB
13Accepted3/33ms3692 KiB
14Accepted3/34ms3672 KiB
15Accepted3/34ms3924 KiB
16Accepted3/33ms4156 KiB
17Accepted3/33ms4240 KiB