119012024-11-17 12:08:39SRobHús sütés (75 pont)cpp11Wrong answer 19/7546ms816 KiB

#include <iostream>;
#include <iterator>;
# include <algorithm>;
#include <array>;
using namespace std;

const int MaxN = 100000;
int main()
{
	int husdb;
	cin >> husdb;
	int sutok[MaxN] = {};
	int max = 0;
	int ismDb;
	ismDb = 0;
	for (int i = 1; i <= husdb; i++)
	{
		cin >> sutok[i-1];
	}
	sort(sutok,sutok + husdb);

	for (int i = 1; i < husdb; i++)
	{
		
		if (sutok[i] == sutok[i-1])
		{
			ismDb++;
		}
	}
	max = sutok[husdb-1];
	cout << ismDb+max;

}

SubtaskSumTestVerdictTimeMemory
base19/75
1Accepted0/01ms568 KiB
2Accepted0/01ms568 KiB
3Wrong answer0/023ms568 KiB
4Accepted3/31ms572 KiB
5Accepted3/31ms592 KiB
6Accepted3/31ms568 KiB
7Wrong answer0/31ms568 KiB
8Wrong answer0/41ms568 KiB
9Wrong answer0/41ms568 KiB
10Wrong answer0/41ms568 KiB
11Wrong answer0/42ms568 KiB
12Wrong answer0/42ms568 KiB
13Wrong answer0/445ms568 KiB
14Wrong answer0/446ms816 KiB
15Wrong answer0/546ms800 KiB
16Wrong answer0/545ms788 KiB
17Wrong answer0/545ms760 KiB
18Wrong answer0/445ms792 KiB
19Wrong answer0/445ms792 KiB
20Accepted4/439ms792 KiB
21Accepted4/430ms788 KiB
22Wrong answer0/241ms792 KiB
23Accepted2/219ms568 KiB