Borderou de evaluare (job #1726265)
Utilizator | Data | 7 iulie 2016 17:09:10 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:9:19: error: wrong number of template arguments (1, should be 2)
vector < pair <int><int> > cost[N];
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:96:12: error: provided for ‘template<class _T1, class _T2> struct std::pair’
struct pair
^
user.cpp:9:24: error: template argument 1 is invalid
vector < pair <int><int> > cost[N];
^
user.cpp:9:24: error: template argument 2 is invalid
user.cpp:9:26: error: expected unqualified-id before ‘>’ token
vector < pair <int><int> > cost[N];
^
user.cpp:10:27: error: wrong number of template arguments (1, should be 2)
priority_queue < pair <int><int> > Q;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:96:12: error: provided for ‘template<class _T1, class _T2> struct std::pair’
struct pair
^
user.cpp:10:32: error: template argument 1 is invalid
priority_queue < pair <int><int> > Q;
^
user.cpp:10:32: error: template argument 2 is invalid
user.cpp:10:32: error: template argument 3 is invalid
user.cpp:10:34: error: expected unqualified-id before ‘>’ token
priority_queue < pair <int><int> > Q;
^
user.cpp:11:1: error: invalid use of template-name ‘std::bitset’ without an argument list
bitset vis[N];
^
user.cpp: In function ‘void read()’:
user.cpp:22:9: error: ‘cost’ was not declared in this scope
cost[make_pair(x,y)].push_back[c];
^
user.cpp: In function ‘void dijkstra(int)’:
user.cpp:28:3: error: ‘q’ was not declared in this scope
q.push_back(make_pair());
^
user.cpp:28:25: error: no matching function for call to ‘make_pair()’
q.push_back(make_pair());
^
user.cpp:28:25: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !