Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:10: error: 'bits' was not declared in this scope
1 | include <bits/stdc++.h>
| ^~~~
Main.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'?
1 | include <bits/stdc++.h>
| ^~~~
| std
Main.cpp:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
Main.cpp:6:1: error: 'string' does not name a type
6 | string allZero;
| ^~~~~~
Main.cpp:9:24: error: 'string' has not been declared
9 | int test_row(int rowId,string& choice)
| ^~~~~~
Main.cpp: In function 'int test_row(int, int&)':
Main.cpp:11:9: error: 'cout' was not declared in this scope
11 | cout << "?" << endl;
| ^~~~
Main.cpp:11:24: error: 'endl' was not declared in this scope
11 | cout << "?" << endl;
| ^~~~
Main.cpp:17:33: error: 'allZero' was not declared in this scope
17 | cout << allZero << endl;
| ^~~~~~~
Main.cpp:20:9: error: 'cin' was not declared in this scope
20 | cin >> litCells;
| ^~~
Main.cpp: In function 'int test_horizontal_aux(int, int, int)':
Main.cpp:26:9: error: 'cout' was not declared in this scope
26 | cout << "?" << endl;
| ^~~~
Main.cpp:26:24: error: 'endl' was not declared in this scope
26 | cout << "?" << endl;
| ^~~~
Main.cpp:31:25: error: 'allZero' was not declared in this scope
31 | allZero[col]='1';
| ^~~~~~~
Main.cpp:36:33: error: 'allZero' was not declared in this scope
36 | cout << allZero << endl;
| ^~~~~~~
Main.cpp:39:9: error: 'cin' was not declared in this scope
39 | cin >> litCells;
| ^~~
Main.cpp: In function 'bool test_horizontal(int, int)':
Main.cpp:58:9: error: 'assert' was not declared in this scope
58 | assert(false);
| ^~~~~~
Main.cpp:1:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
+++ |+#include <cassert>
1 | include <bits/stdc++.h>
Main.cpp: In function 'bool test_horizontal2(int, int, int)':
Main.cpp:63:9: error: 'assert' was not declared in this scope
63 | assert(row>0);
| ^~~~~~
Main.cpp:63:9: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
Main.cpp:64:9: error: 'cout' was not declared in this scope
64 | cout << "?" << endl;
| ^~~~
Main.cpp:64:24: error: 'endl' was not declared in this scope
64 | cout << "?" << endl;
| ^~~~
Main.cpp:69:25: error: 'allZero' was not declared in this scope
69 | allZero[colFirst]='1';
| ^~~~~~~
Main.cpp:75:25: error: 'allZero' was not declared in this scope
75 | allZero[col]='1';
| ^~~~~~~
Main.cpp:80:33: error: 'allZero' was not declared in this scope
80 | cout << allZero << endl;
| ^~~~~~~
Main.cpp:83:9: error: 'cin' was not declared in this scope
83 | cin >> litCells;
| ^~~
Main.cpp: In function 'bool test_vertical2(int, int, int)':
Main.cpp:89:9: error: 'cout' was not declared in this scope
89 | cout << "?" << endl;
| ^~~~
Main.cpp:89:24: error: 'endl' was not declared in this scope
89 | cout << "?" << endl;
| ^~~~
Main.cpp:92:17: error: 'string' was not declared in this scope
92 | string s(N,'0');
| ^~~~~~
Main.cpp:94:25: error: 's' was not declared in this scope
94 | s[col]='1';
| ^
Main.cpp:96:25: error: 's' was not declared in this scope
96 | s[knownCol]='1';
| ^
Main.cpp:97:25: error: 's' was not declared in this scope
97 | cout << s << endl;
| ^
Main.cpp:100:9: error: 'cin' was not declared in this scope
100 | cin >> litCells;
| ^~~
Main.cpp: In function 'void full_row(int)':
Main.cpp:106:9: error: 'cout' was not declared in this scope
106 | cout << "!" << endl;
| ^~~~
Main.cpp:106:24: error: 'endl' was not declared in this scope
106 | cout << "!" << endl;
| ^~~~
Main.cpp:110:33: error: 'string' was not declared in this scope
110 | cout << string(N,'1') << endl;
| ^~~~~~
Main.cpp:112:33: error: 'allZero' was not declared in this scope
112 | cout << allZero << endl;
| ^~~~~~~
Main.cpp: At global scope:
Main.cpp:116:6: error: variable or field 'print_picked_row' declared void
116 | void print_picked_row(vector<int>& picked)
| ^~~~~~~~~~~~~~~~
Main.cpp:116:23: error: 'vector' was not declared in this scope
116 | void print_picked_row(vector<int>& picked)
| ^~~~~~
Main.cpp:116:30: error: expected primary-expression before 'int'
116 | void print_picked_row(vector<int>& picked)
| ^~~
Main.cpp:127:6: error: variable or field 'try_print_picked_col' declared void
127 | void try_print_picked_col(vector<int>& picked)
| ^~~~~~~~~~~~~~~~~~~~
Main.cpp:127:27: error: 'vector' was not declared in this scope
127 | void try_print_picked_col(vector<int>& picked)
| ^~~~~~
Main.cpp:127:34: error: expected primary-expression before 'int'
127 | void try_print_picked_col(vector<int>& picked)
| ^~~
Main.cpp:148:22: error: 'string' has not been declared
148 | int cut_half(int cnt,string& choice,string& prevChoice)
| ^~~~~~
Main.cpp:148:37: error: 'string' has not been declared
148 | int cut_half(int cnt,string& choice,string& prevChoice)
| ^~~~~~
Main.cpp: In function 'int cut_half(int, int&, int&)':
Main.cpp:153:30: error: invalid types 'int[int]' for array subscript
153 | if(prevChoice[j]=='1' && curCnt<(cnt+1)/2)
| ^
Main.cpp:155:31: error: invalid types 'int[int]' for array subscript
155 | choice[j]='1';
| ^
Main.cpp:159:31: error: invalid types 'int[int]' for array subscript
159 | choice[j]='0';
| ^
Main.cpp: At global scope:
Main.cpp:164:29: error: 'string' has not been declared
164 | void other_half(int& curCnt,string& choice,string& prevChoice)
| ^~~~~~
Main.cpp:164:44: error: 'string' has not been declared
164 | void other_half(int& curCnt,string& choice,string& prevChoice)
| ^~~~~~
Main.cpp: In function 'void other_half(int&, int&, int&)':
Main.cpp:169:30: error: invalid types 'int[int]' for array subscript
169 | if(prevChoice[j]=='1' && choice[j]=='0')
| ^
Main.cpp:169:48: error: invalid types 'int[int]' for array subscript
169 | if(prevChoice[j]=='1' && choice[j]=='0')
| ^
Main.cpp:171:31: error: invalid types 'int[int]' for array subscript
171 | choice[j]='1';
| ^
Main.cpp:175:31: error: invalid types 'int[int]' for array subscript
175 | choice[j]='0';
| ^
Main.cpp: In function 'int main()':
Main.cpp:181:9: error: 'cin' was not declared in this scope
181 | cin >> N;
| ^~~
Main.cpp:182:9: error: 'allZero' was not declared in this scope
182 | allZero=string(N,'0');
| ^~~~~~~
Main.cpp:182:17: error: 'string' was not declared in this scope
182 | allZero=string(N,'0');
| ^~~~~~
Main.cpp:183:9: error: 'vector' was not declared in this scope
183 | vector<int> pickedRow(N,-1),pickedCol(N,-1);
| ^~~~~~
Main.cpp:183:16: error: expected primary-expression before 'int'
183 | vector<int> pickedRow(N,-1),pickedCol(N,-1);
| ^~~
Main.cpp:187:23: error: expected ';' before 'choice'
187 | string choice(N,'0');
| ^~~~~~~
| ;
Main.cpp:191:28: error: 'pickedCol' was not declared in this scope
191 | if(pickedCol[j]==-1)
| ^~~~~~~~~
Main.cpp:193:33: error: 'choice' was not declared in this scope
193 | choice[j]='1';
| ^~~~~~
Main.cpp:196:38: error: 'pickedCol' was not declared in this scope
196 | try_print_picked_col(pickedCol);
| ^~~~~~~~~
Main.cpp:196:17: error: 'try_print_picked_col' was not declared in this scope
196 | try_print_picked_col(pickedCol);
| ^~~~~~~~~~~~~~~~~~~~
Main.cpp:200:33: error: 'choice' was not declared in this scope
200 | int col=choice.find('1');
| ^~~~~~
Main.cpp:201:25: error: 'assert' was not declared in this scope
201 | assert(knownCol!=-1);
| ^~~~~~
Main.cpp:201:25: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
Main.cpp:209:33: error: 'pickedRow' was not declared in this scope
209 | pickedRow[i]=col;
| ^~~~~~~~~
Main.cpp:214:31: error: expected ';' before 'prevChoice'
214 | string prevChoice=choice;
| ^~~~~~~~~~~
| ;
Main.cpp:215:49: error: 'choice' was not declared in this scope
215 | int litCells=test_row(i,choice);
| ^~~~~~
Main.cpp:225:64: error: 'prevChoice' was not declared in this scope
225 | int curCnt=cut_half(cnt,choice,prevChoice);
| ^~~~~~~~~~
Main.cpp:229:111: error: 'pickedRow' was not declared in this scope
229 | if((i==0 && test_horizontal(i,col)) || (i>0 && test_horizontal2(i,col,pickedRow[0])))
| ^~~~~~~~~
Main.cpp:238:73: error: 'assert' was not declared in this scope
238 | assert(!test_horizontal(i,j));
| ^~~~~~
Main.cpp:238:73: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
Main.cpp:256:49: error: 'pickedRow' was not declared in this scope
256 | pickedRow[i]=choice.find('1');
| ^~~~~~~~~
Main.cpp:275:33: error: 'pickedRow' was not declared in this scope
275 | pickedRow[i]=prevChoice.find('1');
| ^~~~~~~~~
Main.cpp:275:46: error: 'prevChoice' was not declared in this scope
275 | pickedRow[i]=prevChoice.find('1');
| ^~~~~~~~~~
Main.cpp:277:40: error: 'pickedRow' was not declared in this scope
277 | assert(pickedRow[i]!=-1);
| ^~~~~~~~~
Main.cpp:277:33: error: 'assert' was not declared in this scope
277 | assert(pickedRow[i]!=-1);
| ^~~~~~
Main.cpp:277:33: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
Main.cpp:280:26: error: 'pickedRow' was not declared in this scope
280 | print_picked_row(pickedRow);
| ^~~~~~~~~
Main.cpp:280:9: error: 'print_picked_row' was not declared in this scope
280 | print_picked_row(pickedRow);
| ^~~~~~~~~~~~~~~~
Main.cpp: In function 'bool test_horizontal(int, int)':
Main.cpp:59:1: warning: control reaches end of non-void function [-Wreturn-type]
59 | }
| ^