Borderou de evaluare (job #3033357)

Utilizator Luka77Anastase Luca George Luka77 Data 23 martie 2023 19:42:28
Problema Oz Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void solution()': main.cpp:36:31: error: 'struct Element' has no member named 'idx'; did you mean 'idx1'? 36 | if(ans[arr[i].idx] * arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2]) <= LIM) | ^~~ | idx1 main.cpp:38:31: error: 'struct Element' has no member named 'idx'; did you mean 'idx1'? 38 | if(ans[arr[i].idx] * arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2] <= LIM) | ^~~ | idx1 main.cpp:38:56: error: no matching function for call to '__gcd(long long int&, bool)' 38 | if(ans[arr[i].idx] * arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2] <= LIM) | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/algorithm:61, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:65, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_algo.h:1182:5: note: candidate: 'template<class _EuclideanRingElement> constexpr _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)' 1182 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) | ^~~~~ /usr/include/c++/12.2.1/bits/stl_algo.h:1182:5: note: template argument deduction/substitution failed: main.cpp:38:56: note: deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'bool') 38 | if(ans[arr[i].idx] * arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2] <= LIM) | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:40:13: error: expected primary-expression before '}' token 40 | } | ^ main.cpp:39:96: error: expected ')' before '}' token 39 | ans[arr[i].idx2] *= arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2]); | ^ | ) 40 | } | ~ main.cpp:38:19: note: to match this '(' 38 | if(ans[arr[i].idx] * arr[i].gcd / __gcd(ans[arr[i].idx1], ans[arr[i].idx2] <= LIM) | ^ main.cpp:40:13: error: expected primary-expression before '}' token 40 | } | ^ Non zero exit status: 1

Ceva nu functioneaza?