Borderou de evaluare (job #1560045)

Utilizator PTAdrian64Pop-Tifrea Adrian PTAdrian64 Data 1 ianuarie 2016 15:20:26
Problema Infasuratoare convexa Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Tp = std::pair<double, double>; _Compare = bool (*)(std::pair<double, double>&, std::pair<double, double>&)]’: /usr/include/c++/4.8/bits/stl_algo.h:2319:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Compare = bool (*)(std::pair<double, double>&, std::pair<double, double>&)]’ /usr/include/c++/4.8/bits/stl_algo.h:2360:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Size = int; _Compare = bool (*)(std::pair<double, double>&, std::pair<double, double>&)]’ /usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<double, double>*; _Compare = bool (*)(std::pair<double, double>&, std::pair<double, double>&)]’ user.cpp:29:23: required from here /usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: invalid initialization of reference of type ‘std::pair<double, double>&’ from expression of type ‘const std::pair<double, double>’ while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: invalid initialization of reference of type ‘std::pair<double, double>&’ from expression of type ‘const std::pair<double, double>’ while (__comp(__pivot, *__last)) ^ user.cpp: In function ‘int main()’: user.cpp:23:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.in","r",stdin); ^ user.cpp:24:42: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.out","w",stdout); ^ user.cpp:26:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d ",&N); ^ user.cpp:28:66: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(i = 1;i <= N;++i)scanf("%lf %lf" ,&V[i].first,&V[i].second); ^

Ceva nu functioneaza?