prog.cpp:3:3: error: 'map' does not name a type
map<pair<int, string>, int> mapka;
^
prog.cpp:4:10: error: 'string' has not been declared
int dp(string& s, int to_cons, string acc) {
^
prog.cpp:4:34: error: 'string' has not been declared
int dp(string& s, int to_cons, string acc) {
^
prog.cpp:28:19: error: 'string' has not been declared
long long count(string s) {
^
prog.cpp: In member function 'int BracketSequenceDiv1::dp(int&, int, int)':
prog.cpp:5:9: error: 'mapka' was not declared in this scope
if (mapka.count({to_cons, acc})) {
^
prog.cpp:8:24: error: 'SZ' was not declared in this scope
if (to_cons == SZ(s)) {
^
prog.cpp:9:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
return (acc == "");
^
prog.cpp:11:13: error: 'SZ' was not declared in this scope
if (SZ(s) - to_cons < SZ(acc)) {
^
prog.cpp:15:5: error: 'string' was not declared in this scope
string orig = acc;
^
prog.cpp:16:18: error: invalid types 'int[int]' for array subscript
if (s[to_cons] == '(' || s[to_cons] == '[') {
^
prog.cpp:16:39: error: invalid types 'int[int]' for array subscript
if (s[to_cons] == '(' || s[to_cons] == '[') {
^
prog.cpp:17:49: error: invalid types 'int[int]' for array subscript
here += dp(s, to_cons + 1, acc + s[to_cons]);
^
prog.cpp:19:16: error: request for member 'empty' in 'acc', which is of non-class type 'int'
if (!acc.empty() && ((s[to_cons] == ']' && acc.back() == '[') || (s[to_cons] == ')' && acc.back() == '('))) {
^
prog.cpp:19:38: error: invalid types 'int[int]' for array subscript
if (!acc.empty() && ((s[to_cons] == ']' && acc.back() == '[') || (s[to_cons] == ')' && acc.back() == '('))) {
^
prog.cpp:19:54: error: request for member 'back' in 'acc', which is of non-class type 'int'
if (!acc.empty() && ((s[to_cons] == ']' && acc.back() == '[') || (s[to_cons] == ')' && acc.back() == '('))) {
^
prog.cpp:19:82: error: invalid types 'int[int]' for array subscript
if (!acc.empty() && ((s[to_cons] == ']' && acc.back() == '[') || (s[to_cons] == ')' && acc.back() == '('))) {
^
prog.cpp:19:98: error: request for member 'back' in 'acc', which is of non-class type 'int'
if (!acc.empty() && ((s[to_cons] == ']' && acc.back() == '[') || (s[to_cons] == ')' && acc.back() == '('))) {
^
prog.cpp:20:13: error: request for member 'pop_back' in 'acc', which is of non-class type 'int'
acc.pop_back();
^
prog.cpp:24:5: error: 'mapka' was not declared in this scope
mapka[{to_cons, orig}] = here;
^
prog.cpp:24:21: error: 'orig' was not declared in this scope
mapka[{to_cons, orig}] = here;
^
prog.cpp: In member function 'long long int BracketSequenceDiv1::count(int)':
prog.cpp:30:23: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
return dp(s, 0, "") - 1;
^
prog.cpp:4:7: note: initializing argument 3 of 'int BracketSequenceDiv1::dp(int&, int, int)'
int dp(string& s, int to_cons, string acc) {
^