Problem | doll_noi |
---|---|
User | wilson9304 |
Submission Time | 2025-02-16 09:36:37 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
doll_noi.cpp: In function ‘int main()’:
doll_noi.cpp:33:22: error: assignment of member ‘std::pair<int, int>::first’ in read-only object
33 | a->first = size;
| ~~~~~~~~~^~~~~~
doll_noi.cpp:36:23: error: assignment of member ‘std::pair<int, int>::second’ in read-only object
36 | p->second = size;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from doll_noi.cpp:2:
/usr/include/c++/9/bits/stl_set.h: In instantiation of ‘void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]’:
doll_noi.cpp:10:36: required from here
/usr/include/c++/9/bits/stl_set.h:567:4: