0_0_34808239_21521.cpp:16:12: error: 'pair_hash' was not declared in this scope
map<P, int,pair_hash> m;
^
0_0_34808239_21521.cpp:16:21: error: template argument 3 is invalid
map<P, int,pair_hash> m;
^
0_0_34808239_21521.cpp:16:24: error: invalid type in declaration before ';' token
map<P, int,pair_hash> m;
^
0_0_34808239_21521.cpp: In function 'LL solve(int, int, int)':
0_0_34808239_21521.cpp:36:15: error: request for member 'find' in 'm', which is of non-class type 'int'
if (l<x && m.find(P(l, x - 1)) == m.end() || r>x&& m.find(P(x + 1, r)) == m.end())
^
0_0_34808239_21521.cpp:36:38: error: request for member 'end' in 'm', which is of non-class type 'int'
if (l<x && m.find(P(l, x - 1)) == m.end() || r>x&& m.find(P(x + 1, r)) == m.end())
^
0_0_34808239_21521.cpp:36:55: error: request for member 'find' in 'm', which is of non-class type 'int'
if (l<x && m.find(P(l, x - 1)) == m.end() || r>x&& m.find(P(x + 1, r)) == m.end())
^
0_0_34808239_21521.cpp:36:78: error: request for member 'end' in 'm', which is of non-class type 'int'
if (l<x && m.find(P(l, x - 1)) == m.end() || r>x&& m.find(P(x + 1, r)) == m.end())
^
0_0_34808239_21521.cpp:39:37: error: no match for 'operator[]' (operand types are 'int' and 'P {aka std::pair<int, int>}')
if (l < x) sum *= solve(l, x - 1, m[P(l, x - 1)]);
^
0_0_34808239_21521.cpp:40:37: error: no match for 'operator[]' (operand types are 'int' and 'P {aka std::pair<int, int>}')
if (r > x) sum *= solve(x + 1, r, m[P(x + 1, r)]);
^
0_0_34808239_21521.cpp: In function 'int main()':
0_0_34808239_21521.cpp:53:5: error: request for member 'clear' in 'm', which is of non-class type 'int'
m.clear();
^
0_0_34808239_21521.cpp:56:6: error: request for member 'insert' in 'm', which is of non-class type 'int'
m.insert({ P(l[i],r[i]),i });
^
0_0_34808239_21521.cpp:57:9: error: request for member 'find' in 'm', which is of non-class type 'int'
if (m.find(P(1, n)) == m.end()) printf("0\n");
^
0_0_34808239_21521.cpp:57:28: error: request for member 'end' in 'm', which is of non-class type 'int'
if (m.find(P(1, n)) == m.end()) printf("0\n");
^
0_0_34808239_21521.cpp:58:38: error: no match for 'operator[]' (operand types are 'int' and 'P {aka std::pair<int, int>}')
else printf("%lld\n", solve(1, n, m[P(1, n)]));
^
|