191902025-11-28 16:07:49Teret222Aranycipők (45)cpp17Hibás válasz 17/451ms644 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int>list(N);
	for (int i = 0; i < N; i++)
	{
		cin >> list[i];
	}
	int max = list[0];
	for (int i = 1; i < N; i++)
	{
		if (list[i] > max)
			max = list[i];
	}
	vector<int>res;
	for (int i = 0; i < N; i++)
	{
		if (list[i] == max)
			res.push_back(i + 1);
	}
	cout << max << '\n';
	for (int i = 0; i < res.size(); i++)
	{
		cout << res[i] << '\n';
	}
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base17/45
1Hibás válasz0/01ms508 KiB
2Hibás válasz0/01ms316 KiB
3Részben helyes2/31ms316 KiB
4Részben helyes1/31ms316 KiB
5Részben helyes1/31ms316 KiB
6Részben helyes1/31ms316 KiB
7Részben helyes1/31ms400 KiB
8Részben helyes2/31ms316 KiB
9Részben helyes1/31ms644 KiB
10Részben helyes1/31ms316 KiB
11Részben helyes1/31ms500 KiB
12Részben helyes1/31ms408 KiB
13Részben helyes1/31ms316 KiB
14Részben helyes1/31ms316 KiB
15Részben helyes1/31ms508 KiB
16Részben helyes1/31ms316 KiB
17Részben helyes1/31ms316 KiB