Borderou de evaluare (job #695036)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Alune (clasa a 8-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 13 feb. 2023 18:14:26 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void debug(std::vector<long long int>)':
main.cpp:54:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'unsigned int'} [-Wsign-compare]
54 | for(int i = 0;i < v.size();i++) cout << v[i] << ' ';
| ~~^~~~~~~~~~
main.cpp: In function 'std::string decToBin(int, int)':
main.cpp:73:22: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} and 'int' [-Wsign-compare]
73 | while(ans.size() < sz) ans.insert(ans.begin(), '0');
| ~~~~~~~~~~~^~~~
main.cpp:66:9: warning: unused variable 'it' [-Wunused-variable]
66 | int it = 0;
| ^~
main.cpp: In function 'int main()':
main.cpp:94:20: error: no matching function for call to '__gcd(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, long long int&)'
94 | GCD = __gcd(c[i], GCD);
| ~~~~~^~~~~~~~~~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/algorithm:62,
from main.cpp:10:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_algo.h:1199:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
1199 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_algo.h:1199:5: note: template argument deduction/substitution failed:
main.cpp:94:20: note: deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
94 | GCD = __gcd(c[i], GCD);
| ~~~~~^~~~~~~~~~~