Borderou de evaluare (job #2076718)

Utilizator dariusdariusMarian Darius dariusdarius Data 26 noiembrie 2017 23:46:07
Problema Dreptunghiuri3 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:9:35: error: ‘int y1 [2005]’ redeclared as different kind of symbol int x1[MAX_K], x2[MAX_K], y1[MAX_K], y2[MAX_K], v[MAX_K]; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/utility:68, from /usr/include/c++/4.8/algorithm:60, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’ __MATHCALL (y1,, (_Mdouble_)); ^ user.cpp: In function ‘int main()’: user.cpp:18:29: warning: pointer to a function used in arithmetic [-Wpointer-arith] cin >> x1[i] >> y1[i] >> x2[i] >> y2[i] >> v[i]; ^ user.cpp:18:13: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’ cin >> x1[i] >> y1[i] >> x2[i] >> y2[i] >> v[i]; ^ In file included from /usr/include/c++/4.8/fstream:38:0, from user.cpp:2: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]’ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ user.cpp:21:26: warning: pointer to a function used in arithmetic [-Wpointer-arith] ys.push_back(y1[i]); ^ user.cpp:21:26: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘std::vector<int>::value_type {aka int}’ [-fpermissive] In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h:919:7: error: initializing argument 1 of ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]’ [-fpermissive] push_back(value_type&& __x) ^ user.cpp:31:56: warning: pointer to a function used in arithmetic [-Wpointer-arith] int s1 = lower_bound(ys.begin(), ys.end(), y1[i]) - ys.begin() + 1; ^ In file included from /usr/include/c++/4.8/algorithm:61:0, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h: In instantiation of ‘_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Tp = double(double)throw ()]’: user.cpp:31:57: required from here /usr/include/c++/4.8/bits/stl_algobase.h:965:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if (*__middle < __val) ^

Ceva nu functioneaza?