Borderou de evaluare (job #847410)

Utilizator avatar popescu_george Popescu George popescu_george IP ascuns
Problemă Proiecte (clasa a 7-a) Compilator cpp
Rundă Arhiva de probleme Status evaluat
Dată 2 ian. 2026 08:40:03 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:9:14: error: 'n' was not declared in this scope 9 | for(cin>>n>>m;m--;) { | ^ main.cpp:9:17: error: 'm' was not declared in this scope 9 | for(cin>>n>>m;m--;) { | ^ main.cpp:13:26: error: expected ':' before ';' token 13 | cin>>l,!r?r=1;c=l:c!=l?--r:++r; | ^ | : main.cpp:13:26: error: expected primary-expression before ';' token main.cpp:13:30: error: found ':' in nested-name-specifier, expected '::' 13 | cin>>l,!r?r=1;c=l:c!=l?--r:++r; | ^ | :: main.cpp:13:29: error: 'l' is not a class, namespace, or enumeration 13 | cin>>l,!r?r=1;c=l:c!=l?--r:++r; | ^ main.cpp:15:14: error: no matching function for call to 'max(int&, unsigned char&)' 15 | p=max(p,++w[c]); | ~~~^~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/string:51, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/locale_classes.h:40, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/ios_base.h:41, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ios:44, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/istream:40, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/fstream:40, from main.cpp:1: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: main.cpp:15:14: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'unsigned char') 15 | p=max(p,++w[c]); | ~~~^~~~~~~~~~ /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided main.cpp:17:20: error: 'n' was not declared in this scope 17 | for(int i=1;i<=n;++i) | ^