Borderou de evaluare (job #2594170)

Utilizator coronavirusCovid19 coronavirus Data 5 aprilie 2020 15:34:05
Problema Egal Status done
Runda corona_day7 Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void solve(int, int, bool)': main.cpp:34:18: error: no match for 'operator++' (operand type is 'std::map<int, int>') if(keep) ++freq[col[nod]]; ^~~~~~~~~~~~~~~~ main.cpp:48:5: error: no match for 'operator++' (operand type is 'std::map<int, int>') ++freq[col[nod]]; ^~~~~~~~~~~~~~~~ main.cpp:49:23: error: no match for 'operator>' (operand types are 'std::map<int, int>' and 'int') if(freq[col[nod]] > cnt[nod] || (freq[col[nod]] == cnt[nod] && col[nod] < ans[nod])) ans[nod] = col[nod], cnt[nod] = freq[col[nod]]; ~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/6/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110, from main.cpp:1: /usr/include/c++/6/bits/regex.h:995:5: note: candidate: template<class _BiIter> bool std::__cxx11::operator>(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&) operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) ^~~~~~~~ /usr/include/c++/6/bits/regex.h:995:5: note: template argument deduction/substitution failed: main.cpp:49:32: note: 'std::map<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' if(freq[col[nod]] > cnt[nod] || (freq[col[nod]] == cnt[nod] && col[nod] < ans[nod])) ans[nod] = col[nod], cnt[nod] = freq[col[nod]]; ^ In file included from /usr/include/c++/6/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110, from main.cpp:1: /usr/include/c++/6/bits/regex.h:1056:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&) operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, ^~~~~~~~ /usr/include/c++/6/bits/regex.h:1056:5: note: template argument deduction/substitution failed: main.cpp:49:32: note: 'std::map<int, int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' if(freq[col[nod]] > cnt[nod] || (freq[col[nod]] == cnt[nod] && col[nod] < ans[nod])) ans[nod] = col[nod], cnt[nod] = freq[col[nod]]; ^ In file included from /usr/include/c++/6/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110, from main.cpp:1: /usr/include/c++/6/bits/regex.h:1136:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&) operator>(const sub_match<_Bi_iter>& __lhs, ^~~~~~~~ /usr/include/c++/6/bits/regex.h:1136:5: note: template argument deduction/substitution failed: main.cpp:49:32: note: 'std::map<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' if(freq[col[nod]] > cnt[nod] || (freq[col[nod]] == cnt[nod] && col[nod] < ans[nod])) ans[nod] = col[nod], cnt[nod] = freq[col[nod]]; ^ In file included from /usr/include/c++/6/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110, from main.cpp:1: /usr/include/c++/6/bits/regex.h:1210:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&) operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, ^~~~~~~~ /usr/include/c++/6/bits/regex.h:1210:5: note: template argument deduction/substitution failed: main.cpp:49:32: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' if(freq[col[nod]] > cnt[nod] || (freq[col[nod]] == cnt[nod] && col[nod] < ans[nod])) ans[nod] = col[nod], cnt[nod] = freq[col[nod]]; ^ Non zero exit status: 1

Ceva nu functioneaza?