| Problem | subwaytrip |
|---|---|
| User | yc |
| Submission Time | 2026-04-18 16:21:59 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
subwaytrip.cpp: In function ‘int main()’:
subwaytrip.cpp:34:7: error: ‘class std::map<std::pair<int, int>, int>’ has no member named ‘resize’; did you mean ‘size’?
34 | d.resize(n+m+1);
| ^~~~~~
| size
subwaytrip.cpp:36:41: error: no match for ‘operator[]’ (operand types are ‘std::map<std::pair<int, int>, int>’ and ‘int’)
36 | for (int i = 0;i<d.size();i++) d[i].assign(c1,-1);
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from subwaytrip.cpp:1:
/usr/include/c++/9/bits/stl_map.h:490:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc