souvenirs.cpp: In function 'void Sub2_3(ll)':
souvenirs.cpp:24:15: error: 'transaction' was not declared in this scope
24 | res = transaction(P[i-1]-2);
| ^~~~~~~~~~~
souvenirs.cpp:30:9: error: 'transaction' was not declared in this scope
30 | transaction(P[i]);
| ^~~~~~~~~~~
souvenirs.cpp:31:30: error: 'transaction' was not declared in this scope
31 | FOR(j, num[n-1], n-2, 1) transaction(P[n-1]-1);
| ^~~~~~~~~~~
souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:36:17: error: 'transaction' was not declared in this scope
36 | if (n == 2) transaction(P[0]-1);
| ^~~~~~~~~~~
souvenirs.cpp:38:15: error: 'transcation' was not declared in this scope
38 | res = transcation(P[0]-1);
| ^~~~~~~~~~~
souvenirs.cpp:40:13: error: 'transaction' was not declared in this scope
40 | transaction(P[0]-res.se-2);
| ^~~~~~~~~~~
souvenirs.cpp:43:14: error: 'transaction' was not declared in this scope
43 | else transaction((P[0]-1-res.se)/2);
| ^~~~~~~~~~~
souvenirs.cpp: In function 'int main()':
souvenirs.cpp:50:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
50 | freopen (task".inp", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
souvenirs.cpp:51:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
51 | freopen (task".out", "w", stdout);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~