foo.cc:14:1: error: ‘vector’ does not name a type
14 | vector<array<int, 3>> v;
| ^~~~~~
foo.cc: In function ‘void solve()’:
foo.cc:43:9: error: ‘v’ was not declared in this scope
43 | v.push_back({i, l, r});
| ^
foo.cc:50:10: error: ‘v’ was not declared in this scope
50 | sort(v.begin(), v.end(), cmp);
| ^
foo.cc:53:20: error: ‘r’ was not declared in this scope
53 | while (i < r) adds(a[++ i], res);
| ^
foo.cc:54:20: error: ‘r’ was not declared in this scope
54 | while (i > r) del(a[i --], res);
| ^
foo.cc:55:20: error: ‘l’ was not declared in this scope
55 | while (j < l) del(a[j ++], res);
| ^
foo.cc:56:20: error: ‘l’ was not declared in this scope
56 | while (j > l) adds(a[-- j], res);
| ^