rainbow.cpp: In function 'void init(int, int, int, int, int, char*)':
rainbow.cpp:32:13: error: 'n' was not declared in this scope
cin >> n >> k >> slen >> q;
^
rainbow.cpp:32:18: error: 'k' was not declared in this scope
cin >> n >> k >> slen >> q;
^
rainbow.cpp:32:23: error: 'slen' was not declared in this scope
cin >> n >> k >> slen >> q;
^~~~
rainbow.cpp:32:23: note: suggested alternative: 'wcslen'
cin >> n >> k >> slen >> q;
^~~~
wcslen
rainbow.cpp:32:31: error: 'q' was not declared in this scope
cin >> n >> k >> slen >> q;
^
rainbow.cpp:35:13: error: 's' was not declared in this scope
cin >> s;
^
rainbow.cpp:67:16: error: 'colours' was not declared in this scope
colours(x1, y1, x2, y1);
^~~~~~~
rainbow.cpp:67:16: note: suggested alternative: 'colour'
colours(x1, y1, x2, y1);
^~~~~~~
colour
rainbow.cpp:66:32: warning: unused variable 'y2' [-Wunused-variable]
int x1, y1, x2, y2;
^~
rainbow.cpp:71:15: warning: unused variable 'a' [-Wunused-variable]
int a[5][100111];
^
rainbow.cpp: In function 'int colours(int, int, int, int)':
rainbow.cpp:79:33: error: 'k' was not declared in this scope
t[i].resize(k + 2, 0);
^
rainbow.cpp:81:20: error: redeclaration of 'int ans'
int ans = 0;
^~~
rainbow.cpp:76:10: note: 'int ans' previously declared here
int ans = 0;
^~~
rainbow.cpp:82:28: error: 'x1' was not declared in this scope
for(int i = x1; i <= x2; ++i){
^~
rainbow.cpp:82:28: note: suggested alternative: 'y1'
for(int i = x1; i <= x2; ++i){
^~
y1
rainbow.cpp:82:37: error: 'x2' was not declared in this scope
for(int i = x1; i <= x2; ++i){
^~
rainbow.cpp:83:33: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
for(int j = y1; j <= y2; ++j){
^~
rainbow.cpp:83:42: error: 'y2' was not declared in this scope
for(int j = y1; j <= y2; ++j){
^~
rainbow.cpp:83:42: note: suggested alternative: 'yn'
for(int j = y1; j <= y2; ++j){
^~
yn
rainbow.cpp:84:29: error: 'a' was not declared in this scope
if(a[i][j] == 0){
^