Borderou de evaluare (job #2786868)
Utilizator | Data | 21 octombrie 2021 19:55:30 | |
---|---|---|---|
Problema | Project management | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:14:13: error: 'int time [105]' redeclared as different kind of entity
14 | int time[105], nrA1[105], nrA2[105], mini[105], maxi[105];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
from /usr/include/c++/10/ext/atomicity.h:35,
from /usr/include/c++/10/bits/ios_base.h:39,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
main.cpp: In function 'void bfs()':
main.cpp:36:60: warning: pointer to a function used in arithmetic [-Wpointer-arith]
36 | mini[it] = max(mini[it], mini[node] + time[node]);
| ^
main.cpp:36:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
36 | mini[it] = max(mini[it], mini[node] + time[node]);
| ~~~~~~~~~~~^~~~~~~~~~~~
main.cpp:36:61: error: no matching function for call to 'max(int&, time_t (*)(time_t*) throw ())'
36 | mini[it] = max(mini[it], mini[node] + time[node]);
| ^
In file included 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_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
main.cpp:36:61: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'})
36 | mini[it] = max(mini[it], mini[node] + time[node]);
| ^
In file included 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_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
main.cpp:36:61: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'})
36 | mini[it] = max(mini[it], mini[node] + time[node]);
| ^
main.cpp: In function 'void dfs(int)':
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !