paint.cpp:2:46: error: 'vector' has not been declared
2 | int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
| ^~~~~~
paint.cpp:2:52: error: expected ',' or '...' before '<' token
2 | int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
| ^
paint.cpp: In function 'int minimumInstructions(int, int, int, int)':
paint.cpp:3:9: error: 'vector' was not declared in this scope
3 | vector<int> a, c;
| ^~~~~~
paint.cpp:3:16: error: expected primary-expression before 'int'
3 | vector<int> a, c;
| ^~~
paint.cpp:4:23: error: expected primary-expression before 'int'
4 | vector<vector<int>> b;
| ^~~
paint.cpp:6:9: error: 'n' was not declared in this scope
6 | n = N;
| ^
paint.cpp:7:9: error: 'm' was not declared in this scope
7 | m = M;
| ^
paint.cpp:8:9: error: 'k' was not declared in this scope
8 | k = K;
| ^
paint.cpp:9:9: error: 'c' was not declared in this scope
9 | c = C;
| ^
paint.cpp:9:13: error: 'C' was not declared in this scope
9 | c = C;
| ^
paint.cpp:10:9: error: 'a' was not declared in this scope
10 | a = A;
| ^
paint.cpp:10:13: error: 'A' was not declared in this scope
10 | a = A;
| ^
paint.cpp:11:9: error: 'b' was not declared in this scope
11 | b = B;
| ^
paint.cpp:11:13: error: 'B' was not declared in this scope
11 | b = B;
| ^
paint.cpp:12:9: error: 'assert' was not declared in this scope
12 | assert((int)c.size() == n);
| ^~~~~~
paint.cpp:1:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
+++ |+#include <cassert>
1 |
paint.cpp:19:16: error: expected primary-expression before 'int'
19 | vector<int> f(n, 0);
| ^~~
paint.cpp:22:25: error: 'f' was not declared in this scope
22 | f[it]++;
| ^
paint.cpp:25:16: error: expected primary-expression before 'int'
25 | vector<int> has(k, -1);
| ^~~
paint.cpp:26:16: error: expected primary-expression before 'int'
26 | vector<int> need(n, 0);
| ^~~
paint.cpp:30:33: error: 'has' was not declared in this scope
30 | has[it] = i;
| ^~~
paint.cpp:36:21: error: 'f' was not declared in this scope
36 | if (f[c[i]] == 0) {
| ^
paint.cpp:39:17: error: 'need' was not declared in this scope
39 | need[i] = has[c[i]];
| ^~~~
paint.cpp:39:27: error: 'has' was not declared in this scope
39 | need[i] = has[c[i]];
| ^~~
paint.cpp:41:20: error: 'need' was not declared in this scope
41 | int want = need[0];
| ^~~~
paint.cpp:51:16: error: 'sol' was not declared in this scope
51 | return sol;
| ^~~