answer.code: In function ‘void qiqi::main()’:
answer.code:36:40: error: passing ‘const std::map<char, int>’ as ‘this’ argument discards qualifiers [-fpermissive]
36 | if (mp[s[i]-'A']) {
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from answer.code:1:
/usr/include/c++/11/bits/stl_map.h:512:7: note: in call to ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = char]’
512 | operator[](key_type&& __k)
| ^~~~~~~~
answer.code:37:51: error: passing ‘const std::map<char, int>’ as ‘this’ argument discards qualifiers [-fpermissive]
37 | cnt[0][mp[s[i]-'A']-1]++;
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from answer.code:1:
/usr/include/c++/11/bits/stl_map.h:512:7: note: in call to ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = char]’
512 | operator[](key_type&& __k)
| ^~~~~~~~
answer.code:42:40: error: passing ‘const std::map<char, int>’ as ‘this’ argument discards qualifiers [-fpermissive]
42 | if (mp[t[i]-'A']) {
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from answer.code:1:
/usr/include/c++/11/bits/stl_map.h:512:7: note: in call to ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = char]’
512 | operator[](key_type&& __k)
| ^~~~~~~~
answer.code:43:53: error: passing ‘const std::map<char, int>’ as ‘this’ argument discards qualifiers [-fpermissive]
43 | cnt[i+1][mp[t[i]-'A']-1]++;
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from answer.code:1:
/usr/include/c++/11/bits/stl_map.h:512:7: note: in call to ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = char]’
512 | operator[](key_type&& __k)
| ^~~~~~~~
answer.code: In function ‘int main()’:
answer.code:87:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
87 | freopen("test.in","r",stdin);
| ^
answer.code:88:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
88 | freopen("test.out","w",stdout);
| ^