Borderou de evaluare (job #1352315)
Utilizator | Data | 21 februarie 2015 12:21:24 | |
---|---|---|---|
Problema | Muzeu | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void lee()’:
user.cpp:17:38: error: no matching function for call to ‘std::queue<int>::push(std::pair<int, int>)’
q.push(make_pair(xpaznic,ypaznic));
^
user.cpp:17:38: note: candidates are:
In file included from /usr/include/c++/4.8/queue:64:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const value_type& {aka const int&}’
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘std::queue<int>::value_type&& {aka int&&}’
user.cpp:21:27: error: request for member ‘first’ in ‘q.std::queue<_Tp, _Sequence>::front<int, std::deque<int, std::allocator<int> > >()’, which is of non-class type ‘int’
int x = q.front().first;
^
user.cpp:22:27: error: request for member ‘second’ in ‘q.std::queue<_Tp, _Sequence>::front<int, std::deque<int, std::allocator<int> > >()’, which is of non-class type ‘int’
int y = q.front().second;
^
user.cpp:28:30: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
if(inside(newx,newy) && dp[newx][newy]==-1 || dp[newx][newy]>dp[x][y]+1)
^
user.cpp:31:41: error: no matching function for call to ‘std::queue<int>::push(std::pair<int, int>)’
q.push(make_pair(newx, newy));
^
user.cpp:31:41: note: candidates are:
In file included from /usr/include/c++/4.8/queue:64:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const value_type& {aka const int&}’
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘std::queue<int>::value_type&& {aka int&&}’
user.cpp:35:24: error: ‘i’ was not declared in this scope
fout << dp[i][j] << ' ';
^
user.cpp:35:27: error: ‘j’ was not declared in this scope
fout << dp[i][j] << ' ';
^
user.cpp: In function ‘int main()’:
user.cpp:50:26: error: no matching function for call to ‘std::queue<int>::push(std::pair<int, int>)’
q.push(make_pair(i,j));
^
user.cpp:50:26: note: candidates are:
In file included from /usr/include/c++/4.8/queue:64:0,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !