kas.cpp:40:1: error: 'unorderd_map' does not name a type
unorderd_map<int, int> dpbefore, dpnow;
^~~~~~~~~~~~
kas.cpp:42:10: error: variable or field 'add' declared void
void add(unorderd_map<int, int> &dp, int key, int val) {
^~~~~~~~~~~~
kas.cpp:42:10: error: 'unorderd_map' was not declared in this scope
kas.cpp:42:23: error: expected primary-expression before 'int'
void add(unorderd_map<int, int> &dp, int key, int val) {
^~~
kas.cpp:42:28: error: expected primary-expression before 'int'
void add(unorderd_map<int, int> &dp, int key, int val) {
^~~
kas.cpp:42:38: error: expected primary-expression before 'int'
void add(unorderd_map<int, int> &dp, int key, int val) {
^~~
kas.cpp:42:47: error: expected primary-expression before 'int'
void add(unorderd_map<int, int> &dp, int key, int val) {
^~~
kas.cpp: In function 'int main()':
kas.cpp:60:2: error: 'dpnow' was not declared in this scope
dpnow[0] = 0;
^~~~~
kas.cpp:60:2: note: suggested alternative: 'pow'
dpnow[0] = 0;
^~~~~
pow
kas.cpp:62:15: error: 'dpbefore' was not declared in this scope
swap(dpnow, dpbefore);
^~~~~~~~
kas.cpp:64:18: error: unable to deduce 'auto&&' from 'dpbefore'
for (pii old : dpbefore) {
^~~~~~~~
kas.cpp:65:4: error: 'add' was not declared in this scope
add(dpnow, old.first + A[i], old.second);
^~~