Borderou de evaluare (job #2894346)

Utilizator toma_ariciuAriciu Toma toma_ariciu Data 27 aprilie 2022 18:33:45
Problema Kinetic Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void gentest()': main.cpp:65:25: warning: unused variable 'genz' [-Wunused-variable] 65 | int genx, geny, genz; | ^~~~ main.cpp: In function 'int main()': main.cpp:122:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<intersect>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 122 | while(curr < events.size() && events[curr].timp <= qry[i].timp) | ~~~~~^~~~~~~~~~~~~~~ main.cpp:124:21: warning: capture of variable 'poz' with non-automatic storage duration 124 | if(abs([poz[events[curr].c1]] - poz[events[curr].c2]) == 1) | ^~~ main.cpp:12:22: note: 'int poz [505]' declared here 12 | int n, q, ord[maxN], poz[maxN], ans[maxQ], ansbrut[maxQ]; | ^~~ main.cpp:124:24: error: expected ',' before '[' token 124 | if(abs([poz[events[curr].c1]] - poz[events[curr].c2]) == 1) | ^ | , main.cpp:124:24: error: expected identifier before '[' token main.cpp: In lambda function: main.cpp:124:43: error: expected '{' before '-' token 124 | if(abs([poz[events[curr].c1]] - poz[events[curr].c2]) == 1) | ^ main.cpp: In function 'int main()': main.cpp:124:43: error: no match for 'operator-' (operand types are 'main()::<lambda()>' and 'int') 124 | if(abs([poz[events[curr].c1]] - poz[events[curr].c2]) == 1) In file included from /usr/include/c++/10/bits/stl_algobase.h:67, from /usr/include/c++/10/bits/char_traits.h:39, from /usr/include/c++/10/ios:40, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/bits/stl_iterator.h:525:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)' 525 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/10/bits/stl_iterator.h:525:5: note: template argument deduction/substitution failed: main.cpp:124:64: note: 'main()::<lambda()>' is not derived from 'const std::reverse_iterator<_Iterator>' 124 | if(abs([poz[events[curr].c1]] - poz[events[curr].c2]) == 1) | ^ In file included from /usr/include/c++/10/bits/stl_algobase.h:67, from /usr/include/c++/10/bits/char_traits.h:39, from /usr/include/c++/10/ios:40, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/bits/stl_iterator.h:1566:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)' 1566 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/10/bits/stl_iterator.h:1566:5: note: template argument deduction/substitution failed: main.cpp:124:64: note: 'main()::<lambda()>' is not derived from 'const std::move_iterator<_IteratorL>' Non zero exit status: 1

Ceva nu functioneaza?