Borderou de evaluare (job #3272963)
Utilizator | Data | 31 ianuarie 2025 19:12:28 | |
---|---|---|---|
Problema | Base3 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void readEdges()':
main.cpp:36:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for(int j = 0; j < a[i].size(); j++) {
| ~~^~~~~~~~~~~~~
main.cpp:38:31: error: call of overloaded 'abs(std::__cxx11::basic_string<char>::size_type)' is ambiguous
38 | int node = abs(j - (a[i].size() - j - 1));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/std_abs.h:38,
from /usr/include/c++/12.2.1/cmath:47,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
main.cpp:39:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
39 | if(dist[node] > a[i].size() && s.find({dist[node], node}) != s.end())
| ~~~~~~~~~~~^~~~~~~~~~~~~
main.cpp: In function 'void dijkstra()':
main.cpp:56:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
56 | if(dist[next] > node.d + a[i].size()) {
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !