Borderou de evaluare (job #2878383)

Utilizator lolismekAlex Jerpelea lolismek Data 26 martie 2022 17:57:32
Problema Civilizatie Status done
Runda oni9_in_python Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:15:18: error: 'long long int time [2001]' redeclared as different kind of entity 15 | int time[NMAX + 1]; | ^ 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 'bool check(long long int, long long int)': main.cpp:31:9: warning: unused variable 'lat' [-Wunused-variable] 31 | int lat = T - 1; | ^~~ main.cpp: In function 'int main()': main.cpp:56:15: warning: pointer to a function used in arithmetic [-Wpointer-arith] 56 | time[i] = ans; | ^ main.cpp:56:17: error: assignment of read-only location '*(time + ((sizetype)i))' 56 | time[i] = ans; | ~~~~~~~~^~~~~ main.cpp:60:64: warning: pointer to a function used in arithmetic [-Wpointer-arith] 60 | for(int i = 1; i <= N; i++) max_time = max(max_time, time[i]), Tarea += area(i, time[i]); | ^ main.cpp:60:65: error: no matching function for call to 'max(long long int&, time_t (&)(time_t*) throw ())' 60 | for(int i = 1; i <= N; i++) max_time = max(max_time, time[i]), Tarea += area(i, time[i]); | ^ 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:60:65: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'time_t(time_t*) throw ()' {aka 'long int(long int*)'}) 60 | for(int i = 1; i <= N; i++) max_time = max(max_time, time[i]), Tarea += area(i, time[i]); | ^ 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)' Non zero exit status: 1

Ceva nu functioneaza?