Problem magicwand
User chatdanai
Submission Time 2026-05-02 15:57:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

magicwand.cpp: In function ‘int main()’:
magicwand.cpp:18:22: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type’ {aka ‘std::pair<long long int, long long int>’} to ‘long long int’ in initialization
18 | int a=q.front(); q.pop();
| ~~~~~~~^~
| |
| __gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type {aka std::pair<long long int, long long int>}
magicwand.cpp:19:11: error: request for member ‘first’ in ‘a’, which is of non-class type ‘long long int’
19 | int x=a.first, y=a.second;
| ^~~~~
magicwand.cpp:21:31: error: ‘y’ was not declared in this scope; did you mean ‘ny’?
21 | int nx=x+dx[k