11900 | 2024-11-17 12:07:51 | SRob | Hús sütés (75 pont) | cpp11 | Forditási hiba |
#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;
open /var/local/lib/isolate/427/box/a.out: no such file or directory
main.cpp:2:20: warning: extra tokens at end of #include directive
2 | #include <iostream>;
| ^
main.cpp:3:20: warning: extra tokens at end of #include directive
3 | #include <iterator>;
| ^
main.cpp:4:22: warning: extra tokens at end of #include directive
4 | # include <algorithm>;
| ^
main.cpp:5:17: warning: extra tokens at end of #include directive
5 | #include <array>;
| ^
main.cpp: In function 'int main()':
main.cpp:32:27: error: expected '}' at end of input
32 | cout << ismDb+max;
| ^
main.cpp:10:1: note: to match this '{'
10 | {
| ^