Borderou de evaluare (job #1587476)
Utilizator | Data | 2 februarie 2016 09:21:30 | |
---|---|---|---|
Problema | Arbore partial de cost minim | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void extindere(int)’:
user.cpp:19:57: warning: left operand of comma operator has no effect [-Wunused-value]
q.push(make_pair((-it.second,make_pair(nod,it.first))));
^
user.cpp:19:59: error: no matching function for call to ‘make_pair(std::pair<int, int>)’
q.push(make_pair((-it.second,make_pair(nod,it.first))));
^
user.cpp:19:59: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/deque:60,
from /usr/include/c++/4.8/queue:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:19:59: note: candidate expects 2 arguments, 1 provided
q.push(make_pair((-it.second,make_pair(nod,it.first))));
^
user.cpp: In function ‘int main()’:
user.cpp:32:5: error: ‘ap’ was not declared in this scope
ap[1]=1;
^
user.cpp:36:19: error: ‘class std::queue<std::pair<int, std::pair<int, int> > >’ has no member named ‘top’
int nodd=q.top().second.second;
^
user.cpp:37:19: error: ‘class std::queue<std::pair<int, std::pair<int, int> > >’ has no member named ‘top’
int nods=q.top().second.first;
^
user.cpp:38:20: error: ‘class std::queue<std::pair<int, std::pair<int, int> > >’ has no member named ‘top’
int dist=-q.top().first;
^
user.cpp:41:15: error: ‘nod’ was not declared in this scope
if (ap[nod])continue;
^
user.cpp:46:18: error: ‘nod’ was not declared in this scope
extindere(nod);
^
user.cpp:23:32: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("apm.in","r",stdin);
^
user.cpp:24:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("apm.out","w",stdout);
^
user.cpp:26:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d\n",&n,&m);
^
user.cpp:28:37: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d\n",&x,&y,&z);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !