Borderou de evaluare (job #1750075)

Utilizator delia_ioanaCeapa Delia Ioana delia_ioana Data 29 august 2016 16:10:42
Problema Heapuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:19:52: error: wrong number of template arguments (3, should be 2) vector< pair<int, int>,vector<pair<int,int> >, cmp> mypq; ^ In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/queue:61, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:210:11: error: provided for ‘template<class _Tp, class _Alloc> class std::vector’ class vector : protected _Vector_base<_Tp, _Alloc> ^ user.cpp:19:58: error: invalid type in declaration before ‘;’ token vector< pair<int, int>,vector<pair<int,int> >, cmp> mypq; ^ user.cpp:27:17: error: ‘b’ was not declared in this scope scanf("%d", &b); ^ user.cpp:28:4: error: ‘myheap’ was not declared in this scope myheap.push(make_pair(b, pos)); ^ user.cpp:31:17: error: ‘b’ was not declared in this scope scanf("%d", &b); ^ user.cpp:35:23: error: request for member ‘top’ in ‘mypq’, which is of non-class type ‘int’ while (erased[mypq.top().second]) ^ user.cpp:36:10: error: request for member ‘pop’ in ‘mypq’, which is of non-class type ‘int’ mypq.pop(); ^ user.cpp:37:22: error: request for member ‘top’ in ‘mypq’, which is of non-class type ‘int’ printf("%d", mypq.top().first); ^ user.cpp:16:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("heapuri.in", "r", stdin); ^ user.cpp:17:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("heapuri.out", "w", stdout); ^ user.cpp:21:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ user.cpp:24:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &a); ^

Ceva nu functioneaza?