topovi.cpp: In function 'int main()':
topovi.cpp:4:3: error: 'ios' has not been declared
4 | ios::sync_with_stdio(false);
| ^~~
topovi.cpp:5:3: error: 'cin' was not declared in this scope
5 | cin.tie(0);
| ^~~
topovi.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 | using namespace std;
topovi.cpp:9:3: error: 'map' was not declared in this scope
9 | map<int, int> cx;
| ^~~
topovi.cpp:1:1: note: 'std::map' is defined in header '<map>'; did you forget to '#include <map>'?
+++ |+#include <map>
1 | using namespace std;
topovi.cpp:9:7: error: expected primary-expression before 'int'
9 | map<int, int> cx;
| ^~~
topovi.cpp:10:7: error: expected primary-expression before 'int'
10 | map<int, int> cy;
| ^~~
topovi.cpp:11:3: error: 'cx' was not declared in this scope
11 | cx[0] = n;
| ^~
topovi.cpp:12:3: error: 'cy' was not declared in this scope
12 | cy[0] = n;
| ^~
topovi.cpp:13:7: error: expected primary-expression before 'int'
13 | map<int, int> xs;
| ^~~
topovi.cpp:14:7: error: expected primary-expression before 'int'
14 | map<int, int> ys;
| ^~~
topovi.cpp:15:7: error: 'pair' was not declared in this scope
15 | map<pair<int, int>, int> val;
| ^~~~
topovi.cpp:1:1: note: 'std::pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
+++ |+#include <utility>
1 | using namespace std;
topovi.cpp:15:12: error: expected primary-expression before 'int'
15 | map<pair<int, int>, int> val;
| ^~~
topovi.cpp:16:3: error: 'function' was not declared in this scope
16 | function<void(int, int, int)> Add = [&](int x, int y, int v) {
| ^~~~~~~~
topovi.cpp:1:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
+++ |+#include <functional>
1 | using namespace std;
topovi.cpp:16:30: error: expression list treated as compound expression in functional cast [-fpermissive]
16 | function<void(int, int, int)> Add = [&](int x, int y, int v) {
| ^
topovi.cpp:16:12: error: expected primary-expression before 'void'
16 | function<void(int, int, int)> Add = [&](int x, int y, int v) {
| ^~~~
topovi.cpp:29:30: error: expression list treated as compound expression in functional cast [-fpermissive]
29 | function<void(int, int, int)> Remove = [&](int x, int y, int v) {
| ^
topovi.cpp:29:12: error: expected primary-expression before 'void'
29 | function<void(int, int, int)> Remove = [&](int x, int y, int v) {
| ^~~~
topovi.cpp:45:5: error: 'Add' was not declared in this scope
45 | Add(x, y, a);
| ^~~
topovi.cpp:54:17: error: 'val' was not declared in this scope
54 | Add(xb, yb, val[{xa, ya}]);
| ^~~
topovi.cpp:54:5: error: 'Add' was not declared in this scope
54 | Add(xb, yb, val[{xa, ya}]);
| ^~~
topovi.cpp:55:5: error: 'Remove' was not declared in this scope
55 | Remove(xa, ya, val[{xa, ya}]);
| ^~~~~~
topovi.cpp:56:5: error: 'cout' was not declared in this scope
56 | cout << n * 1LL * n - ans << '\n';
| ^~~~
topovi.cpp:56:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?