Borderou de evaluare (job #1930700)

Utilizator tudorcomanTudor Coman tudorcoman Data 19 martie 2017 11:11:28
Problema Wall Status done
Runda Algoritmiada 2017 Runda 1 Juniori Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:9:18: error: ‘int time [100001]’ redeclared as different kind of symbol int time[maxN + 1]; ^ In file included from /usr/include/pthread.h:26:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr-default.h:35, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr.h:148, from /usr/include/c++/4.8/ext/atomicity.h:33, from /usr/include/c++/4.8/bits/basic_string.h:39, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/random:41, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:4: /usr/include/time.h:186:15: error: previous declaration of ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^ user.cpp: In function ‘int main()’: user.cpp:19:24: warning: pointer to a function used in arithmetic [-Wpointer-arith] scanf("%d", &time[i]); ^ user.cpp:19:25: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=] scanf("%d", &time[i]); ^ user.cpp:20:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] v.push_back(make_pair(time[i], i)); ^ user.cpp:20:38: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(std::pair<long int (*)(long int*)throw (), int>)’ v.push_back(make_pair(time[i], i)); ^ user.cpp:20:38: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘std::pair<long int (*)(long int*)throw (), int>’ to ‘const value_type& {aka const std::pair<int, int>&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘std::pair<long int (*)(long int*)throw (), int>’ to ‘std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}’ user.cpp:13:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("wall.in", "r", stdin); ^ user.cpp:14:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("wall.out", "w", stdout); ^ user.cpp:17:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &N, &z); ^ user.cpp:19:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Ceva nu functioneaza?