Borderou de evaluare (job #1727198)

Utilizator StarGold2Emanuel Nrx StarGold2 Data 10 iulie 2016 01:04:08
Problema Matrice 2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void SolveTestCase()’: user.cpp:81:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for( int i = 0; i < MyElements.size(); i ++ ) { ^ user.cpp:106:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if( i < MyElements.size() && Cursor < MyQuerys.size() && MyElements[i + 1].Value >= MyQuerys[Cursor].Answer + k ) ^ user.cpp:106:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if( i < MyElements.size() && Cursor < MyQuerys.size() && MyElements[i + 1].Value >= MyQuerys[Cursor].Answer + k ) ^ user.cpp:109:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while( Cursor < MyQuerys.size() && MyElements[i].Value <= MyQuerys[Cursor].Answer + k ) { ^ user.cpp:123:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for( int i = 0; i < MyQuerys.size(); i ++ ) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Element*, std::vector<Element> >; _Tp = Element; _Compare = bool (*)(Element&, Element&)]’: /usr/include/c++/4.8/bits/stl_algo.h:2319:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Element*, std::vector<Element> >; _Compare = bool (*)(Element&, Element&)]’ /usr/include/c++/4.8/bits/stl_algo.h:2360:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Element*, std::vector<Element> >; _Size = int; _Compare = bool (*)(Element&, Element&)]’ /usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<Element*, std::vector<Element> >; _Compare = bool (*)(Element&, Element&)]’ user.cpp:76:64: required from here /usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: invalid initialization of reference of type ‘Element&’ from expression of type ‘const Element’ while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: invalid initialization of reference of type ‘Element&’ from expression of type ‘const Element’ while (__comp(__pivot, *__last)) ^ /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Query*, std::vector<Query> >; _Tp = Query; _Compare = bool (*)(Query&, Query&)]’: /usr/include/c++/4.8/bits/stl_algo.h:2319:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Query*, std::vector<Query> >; _Compare = bool (*)(Query&, Query&)]’ /usr/include/c++/4.8/bits/stl_algo.h:2360:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Query*, std::vector<Query> >; _Size = int; _Compare = bool (*)(Query&, Query&)]’ /usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<Query*, std::vector<Query> >; _Compare = bool (*)(Query&, Query&)]’ user.cpp:77:60: required from here /usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: invalid initialization of reference of type ‘Query&’ from expression of type ‘const Query’ while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: invalid initialization of reference of type ‘Query&’ from expression of type ‘const Query’ while (__comp(__pivot, *__last)) ^ user.cpp:55:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf( "%d %d", &N, &Q ); ^ user.cpp:65:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf( "%d", &Matrix[i][j] ); ^ user.cpp:71:51: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf( "%d %d %d %d", &X1, &Y1, &X2, &Y2 ); ^ user.cpp: In function ‘int main(int, const char**)’:

Ceva nu functioneaza?