criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define ll long long
#define D double
#define veb vector<bool>
#define vveb vector<veb>
#define V vector
#define pin pair<int,int>
#define sor(a) sort(a.begin(),a.end())
#define mp make_pair 
#define rep(i,n) for(int i=0;i<n;i++)
#define mmin(x,y) x=min(x,y)
#define mmax(x,y) x=max(x,y)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int ord(int x) {
	return count_bits((x & (-x)) - 1)
}
signed main() {
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s; cin >> s;
	int sz = 1 << L;
	int sum = 0;
	rep(i, sz) {lis[0][i] = s[i] - '0'; sum += lis[0][i];}
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = j / (1 << i);
			if (smt % 2 == 1) {
				lis[1][j] += lis[1][j - (1 << i)];
			}
		}
	}
	rep(i, L) {
		rep(j, sz) {
			int smt = j / (1 << i);
			if (smt % 2 == 0) {
				lis[2][j] += lis[2][j + (1 << i)];
			}
		}
	}
	rep(i, q) {
		string s; cin >> s;
		int c = 0, c0 = 0, c1 = 0;
		vel all(0), all0(0), all1(0);
		rep(j, L) {
			if (s[j] == '?') { c++; all.push_back(L-1-j); }
			else  if (s[j] == '0') { c0++; all0.push_back(L-1-j); }
			else { c1++; all1.push_back(L-1-j); }
		}
		if (c <= min(c0, c1)) {
			int num = 0;
			rep(j, c1) { num += (1 << all1[j]); }
			int ans0 = 0;
			rep(j, 1 << c) {
				ans0 += lis[0][num];
				int x = ord(j + 1);
				if (x < c) {
					num = num xor (1 << all[x]);
				}
			}
			printf("%d\n", ans0);
		}
		else if (c0 < c1) {
			int num = 0;
			rep(j, c1) { num += (1 << all1[j]); }
			int ans0 = 0;
			rep(j, 1 << c0) {
				ans0 += (1-2*(j%2))*lis[2][num];
				int x = ord(j + 1);
				if (x < c0) {
					num = num xor (1 << all0[x]);
				}
			}
			printf("%d\n", ans0);
		}
		else {
			int num = 0;
			rep(j, c0) { num += (1 << all0[j]); }
			num = sz - 1 - num;
			int ans0 = 0;
			rep(j, 1 << c1) {
				ans0 += (1 - 2 * (j % 2))*lis[1][num];
				int x = ord(j + 1);
				if (x < c1) {
					num = num xor (1 << all1[x]);
				}
			}
			printf("%d\n", ans0);
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int ord(int)':
a.cc:26:16: error: 'count_bits' was not declared in this scope
   26 |         return count_bits((x & (-x)) - 1)
      |                ^~~~~~~~~~
a.cc:26:42: error: expected ';' before '}' token
   26 |         return count_bits((x & (-x)) - 1)
      |                                          ^
      |                                          ;
   27 | }
      | ~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define ll long long
#define D double
#define veb vector<bool>
#define vveb vector<veb>
#define V vector
#define pin pair<int,int>
#define sor(a) sort(a.begin(),a.end())
#define mp make_pair 
#define rep(i,n) for(int i=0;i<n;i++)
#define mmin(x,y) x=min(x,y)
#define mmax(x,y) x=max(x,y)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
vel rui(21);
vel ord((1 << 20) + 1);
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
void make_rui() {
	rui[0] = 1;
	for (int i = 1; i <= 20; i++) { rui[i] = rui[i - 1] * 2; }
}
signed main() {
	make_rui();
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s; cin >> s;
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = j / (1 << i);
			if (smt % 2 == 1) {
				lis[1][j] += lis[1][j - (1 << i)];
			}
			else {
				lis[2][j] += lis[2][j + (1 << i)];
			}
		}
	}
	vel all(20), all0(20), all1(20);
	rep(i, q) {
		string s; cin >> s;
		int c = 0, c0 = 0, c1 = 0;
		int num = 0;
		rep(j, L) {
			if (s[j] == '?') { all[c] = L - 1 - j; c++; }
			else  if (s[j] == '0') {all0[c0] = L - 1 - j; c0++; }
			else { all1[c1] = L - 1 - j; num += (1 << all1[c1]); c1++; }
		}
		int ans0 = 0;
		if (c <= min(c0, c1)) {
			int lim = rui[c] - 1;
			rep(j, lim) {
				ans0 += lis[0][num];
				int x = ord[j + 1];
				num = num xor (1 << all[x]);
			}
			ans0 += lis[0][num];
		}
		else if (c0 < c1) {
			int lim = rui[c0] - 1;
			int bi = 1;
			rep(j,lim) {
				ans0 +=bi*lis[2][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all0[x]);
			}
			ans0 += bi * lis[2][num];
		}
		else {
			rep(j, c) { num += (1 << all[j]); }
			int lim = rui[c1] - 1;
			int bi = 1;
			rep(j, lim) {
				ans0 += bi*lis[1][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all1[x]);
			}
			ans1 += bi * lis[1][num];
		}
		printf("%d\n", ans0);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:105:25: error: 'ans1' was not declared in this scope; did you mean 'ans0'?
  105 |                         ans1 += bi * lis[1][num];
      |                         ^~~~
      |                         ans0
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
#pragma GCC optimize ("O3")
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define sor(a) sort(a.begin(),a.end())
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int rui[21];
int ord[(1 << 20) + 1];
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
void make_rui() {
	rui[0] = 1;
	for (int i = 1; i <= 20; i++) { rui[i] = rui[i - 1] * 2; }
}
signed main() {
	make_rui();
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s; cin >> s;
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = j / (1 << i);
			if (smt % 2 == 1) {
				lis[1][j] += lis[1][j - (1 << i)];
			}
			else {
				lis[2][j] += lis[2][j + (1 << i)];
			}
		}
	}
	int all[20], all0[20], all1[20];
	rep(i, q) {
		string s; cin >> s;
		int c = 0, c0 = 0, c1 = 0;
		int num = 0;
		rep(j, L) {
			if (s[j] == '?') { all[c] = L - 1 - j; c++; }
			else  if (s[j] == '0') {all0[c0] = L - 1 - j; c0++; }
			else { all1[c1] = L - 1 - j; num += (1 << all1[c1]); c1++; }
		}
		int ans0 = 0;
		if (c <= min(c0, c1)) {
			int lim = rui[c] - 1;
			rep(j, lim) {
				ans0 += lis[0][num];
				int x = ord[j + 1];
				num = num xor (1 << all[x]);
			}
			ans0 += lis[0][num];
		}
		else if (c0 < c1) {
			int lim = rui[c0] - 1;
			int bi = 1;
			rep(j,lim) {
				ans0 +=bi*lis[2][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all0[x]);
			}
			ans0 += bi * lis[2][num];
		}
		else {
			rep(j, c) { num += (1 << all[j]); }
			int lim = rui[c1] - 1;
			int bi = 1;
			rep(j, lim) {
				ans0 += bi*lis[1][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all1[x]);
			}
			ans0 += bi * lis[1][num];
		}
		printf("%d\n", ans0);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: 'i' was not declared in this scope
   41 |         rep(i, sz) { lis[0][i] = s[i] - '0'; }
      |             ^
a.cc:41:9: error: 'rep' was not declared in this scope
   41 |         rep(i, sz) { lis[0][i] = s[i] - '0'; }
      |         ^~~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
#pragma GCC optimize ("O3")
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define sor(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i=0;i<n;i++)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int rui[21];
int ord[(1 << 20) + 1];
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
void make_rui() {
	rui[0] = 1;
	for (int i = 1; i <= 20; i++) { rui[i] = rui[i - 1] * 2; }
}
signed main() {
	make_rui();
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s; cin >> s;
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = (j >> i);
			if (smt % 2 == 1) {
				lis[1][j] += lis[1][j - (1 << i)];
			}
			else {
				lis[2][j] += lis[2][j + (1 << i)];
			}
		}
	}
	int all[3][20];
	rep(i, q) {
		string s; cin >> s;
		int c = 0, c0 = 0, c1 = 0;
		int num = 0;
		rep(j, L) {
			if (s[j] == '?') { all[0][c] = L - 1 - j; c++; }
			else  if (s[j] == '0') {all[1][c0] = L - 1 - j; c0++; }
			else { all[2][c1] = L - 1 - j; num += (1 << all1[c1]); c1++; }
		}
		int ans0 = 0;
		if (c <= min(c0, c1)) {
			int lim = rui[c] - 1;
			rep(j, lim) {
				ans0 += lis[0][num];
				int x = ord[j + 1];
				num = num xor (1 << all[0][x]);
			}
			ans0 += lis[0][num];
		}
		else if (c0 < c1) {
			int lim = rui[c0] - 1;
			int bi = 1;
			rep(j,lim) {
				ans0 +=bi*lis[2][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all[1][x]);
			}
			ans0 += bi * lis[2][num];
		}
		else {
			rep(j, c) { num += (1 << all[0][j]); }
			int lim = rui[c1] - 1;
			int bi = 1;
			rep(j, lim) {
				ans0 += bi*lis[1][num];
				int x = ord[j + 1];
				bi *= -1;
				num = num xor (1 << all[2][x]);
			}
			ans0 += bi * lis[1][num];
		}
		printf("%d\n", ans0);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:69: error: 'all1' was not declared in this scope; did you mean 'all'?
   64 |                         else { all[2][c1] = L - 1 - j; num += (1 << all1[c1]); c1++; }
      |                                                                     ^~~~
      |                                                                     all
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define sor(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i=0;i<n;i++)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int ord[(1 << 20) + 1];
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
signed main() {
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s; scanf_s("%s",&s);
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = (j >> i);
			int pla = (smt%2)+1;
			lis[pla][j] += lis[pla][j xor (1<<i)];
		}
	}
	int pot = 0;
	rep(i, sz) {
		if (i % 2 == 1) { lis[1][pot] *= -1; lis[2][pot] *= -1; }
		pot ^=1<<ord[i];
	}
	bool fl = (q <= 50000);
	rep(i, q) {
		string s; cin >> s;
		int all[3][20];
		int c[3]; c[0] = 0; c[1] = 0; c[2] = 0;
		int num = 0; int qnum = 0;
		for (int j = L - 1; j >= 0; j--) {
			int pla = (s[L - 1 - j] + 1) % 16;
			all[pla][c[pla]] = j;
			c[pla]++;
			if (pla == 2) { num += 1 << j; }
		}
		int ans0 = 0;
		int mn1 = 0;
		rep(j, 3) {if (c[j] < c[mn1]) { mn1 = j; }}
		if (mn1 == 2) { rep(j, c[0]) { num += 1 << all[0][j]; } }
		int lim = (1 << c[mn1]) - 1;
		rep(j, lim) {
			ans0 += lis[mn1][num]; 
			num ^= 1 << all[mn1][ord[j + 1]];
		}
		ans0 += lis[mn1][num];
		printf("%d\n", abs(ans0));
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:19: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   33 |         string s; scanf_s("%s",&s);
      |                   ^~~~~~~
      |                   scanf
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define sor(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i=0;i<n;i++)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int ord[(1 << 20) + 1];
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
signed main() {
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s;scanf("%s",s)
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = (j >> i);
			int pla = (smt%2)+1;
			lis[pla][j] += lis[pla][j xor (1<<i)];
		}
	}
	int pot = 0;
	rep(i, sz) {
		if (i % 2 == 1) { lis[1][pot] *= -1; lis[2][pot] *= -1; }
		pot ^=1<<ord[i];
	}
	bool fl = (q <= 50000);
	rep(i, q) {
	    string t;cin >> t;
		int all[3][20];
		int c[3]; c[0] = 0; c[1] = 0; c[2] = 0;
		int num = 0; int qnum = 0;
		for (int j = L - 1; j >= 0; j--) {
			int pla = (t[L - 1 - j] + 1) % 16;
			all[pla][c[pla]] = j;
			c[pla]++;
			if (pla == 2) { num += 1 << j; }
		}
		int ans0 = 0;
		int mn1 = 0;
		rep(j, 3) {if (c[j] < c[mn1]) { mn1 = j; }}
		if (mn1 == 2) { rep(j, c[0]) { num += 1 << all[0][j]; } }
		int lim = (1 << c[mn1]) - 1;
		rep(j, lim) {
			ans0 += lis[mn1][num]; 
			num ^= 1 << all[mn1][ord[j + 1]];
		}
		ans0 += lis[mn1][num];
		printf("%d\n", abs(ans0));
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:31: error: expected ';' before 'int'
   33 |         string s;scanf("%s",s)
      |                               ^
      |                               ;
   34 |         int sz = 1 << L;
      |         ~~~                    
a.cc:35:16: error: 'sz' was not declared in this scope; did you mean 's'?
   35 |         rep(i, sz) { lis[0][i] = s[i] - '0'; }
      |                ^~
a.cc:13:32: note: in definition of macro 'rep'
   13 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:39:24: error: 'sz' was not declared in this scope; did you mean 's'?
   39 |                 rep(j, sz) {
      |                        ^~
a.cc:13:32: note: in definition of macro 'rep'
   13 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:46:16: error: 'sz' was not declared in this scope; did you mean 's'?
   46 |         rep(i, sz) {
      |                ^~
a.cc:13:32: note: in definition of macro 'rep'
   13 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
#include<string>
#include<stdio.h>
using namespace std;
#define vel vector<int>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
int ord[(1 << 20) + 1];
void make_ord() {
	ord[1] = 0;
	int max1 = 0;
	for (int i = 2; i <= (1 << 20); i++) {
		int mi = (i&(-i));
		if (i == mi) {
			max1++;
			ord[i] = max1;
		}
		else { ord[i] = ord[mi]; }
	}
}
signed main() {
	make_ord();
	int L; cin >> L; int q; cin >> q;
	vvel lis(3, vel(1 << L));
	string s;scanf(" %s",s)
	int sz = 1 << L;
	rep(i, sz) { lis[0][i] = s[i] - '0'; }
	lis[1] = lis[0];
	lis[2] = lis[0];
	rep(i, L) {
		rep(j, sz) {
			int smt = (j >> i);
			int pla = (smt%2)+1;
			lis[pla][j] += lis[pla][j xor (1<<i)];
		}
	}
	int pot = 0;
	rep(i, sz) {
		if (i % 2 == 1) { lis[1][pot] *= -1; lis[2][pot] *= -1; }
		pot ^=1<<ord[i];
	}
	rep(i, q) {
	    string t;cin >> t;
		int all[3][20];
		int c[3]; c[0] = 0; c[1] = 0; c[2] = 0;
		int num = 0; int qnum = 0;
		for (int j = L - 1; j >= 0; j--) {
			int pla = (t[L - 1 - j] + 1) % 16;
			all[pla][c[pla]] = j;
			c[pla]++;
			if (pla == 2) { num += 1 << j; }
		}
		int ans0 = 0;
		int mn1 = 0;
		rep(j, 3) {if (c[j] < c[mn1]) { mn1 = j; }}
		if (mn1 == 2) { rep(j, c[0]) { num += 1 << all[0][j]; } }
		int lim = (1 << c[mn1]) - 1;
		rep(j, lim) {
			ans0 += lis[mn1][num]; 
			num ^= 1 << all[mn1][ord[j + 1]];
		}
		ans0 += lis[mn1][num];
		printf("%d\n", abs(ans0));
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:32: error: expected ';' before 'int'
   30 |         string s;scanf(" %s",s)
      |                                ^
      |                                ;
   31 |         int sz = 1 << L;
      |         ~~~                     
a.cc:32:16: error: 'sz' was not declared in this scope; did you mean 's'?
   32 |         rep(i, sz) { lis[0][i] = s[i] - '0'; }
      |                ^~
a.cc:12:32: note: in definition of macro 'rep'
   12 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:36:24: error: 'sz' was not declared in this scope; did you mean 's'?
   36 |                 rep(j, sz) {
      |                        ^~
a.cc:12:32: note: in definition of macro 'rep'
   12 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:43:16: error: 'sz' was not declared in this scope; did you mean 's'?
   43 |         rep(i, sz) {
      |                ^~
a.cc:12:32: note: in definition of macro 'rep'
   12 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

# include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <chrono>
# include <random>
# include <limits.h>
# include <unordered_map>
# include <unordered_set>
# include <deque>
# include <cstdio>
# include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <cstdint>
#include <cfenv>
#include <intrin.h>
//#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = std::numeric_limits<long long>::max();
const double PI = acos(-1);
#define fir first
#define sec second
#define thi third
#define debug(x) cerr<<#x<<": "<<x<<'\n'
typedef pair<LL, LL> Pll;
typedef pair<LL, pair<LL, LL>> Ppll;
typedef pair<LL, pair<LL, bitset<100001>>> Pbll;
typedef pair<LL, pair<LL, vector<LL>>> Pvll;
typedef pair<LL, LL> Vec2;
struct Tll { LL first, second, third; };
typedef pair<LL, Tll> Ptll;
#define rep(i,rept) for(LL i=0;i<rept;i++)
#define Mfor(i,mf) for(LL i=mf-1;i>=0;i--)
LL h, w, n, m, k, s, t, q, sum, last, cnt, ans, a[1000000],dp[1<<20];
string str, ss;
bool f;
char c;
int di[4][2] = { {1,0},{-1,0} ,{0,1},{0,-1} };
struct Edge { LL to,cost; };
vector<Edge>vec[10000];
void YN(bool f) {
	if (f)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}
void yn(bool f) {
	if (f)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
int main() {
	cin >> n >> m;
	cin >> str;
	rep(i, 1 << n) {
		dp[((1 << n) - 1) ^ i] = str[i]-'0';
	}
	rep(i,n)
		rep(s, 1 << n) {
		if ((s & (1 << i)) == 0) {
			dp[s] += dp[s | (1 << i)];
		}
	}
	rep(i, m) {
		LL ma0 = 0, ma1 = 0, ma2 = 0;
		ans = 0;
		cin >> str;
		rep(j, n)
			if (str[n-1-j] == '0')
				ma0 |= 1 << j;
			else if (str[n-1-j] == '1')
				ma1 |= 1 << j;
			else ma2 |= 1 << j;

		rep(s, 1 << n) {
			if ((ma0&s) == ma0&&(ma2&s)==0) {
				if ((__popcnt(s&ma1)) % 2)ans -= dp[s];
				else ans += dp[s];
			}
		}
		cout << ans << endl;
	}
	return 0;
}


Compiler output:
a.cc:34:10: fatal error: intrin.h: No such file or directory
   34 | #include <intrin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

# include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <chrono>
# include <random>
# include <limits.h>
# include <unordered_map>
# include <unordered_set>
# include <deque>
# include <cstdio>
# include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <cstdint>
#include <cfenv>
//#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = std::numeric_limits<long long>::max();
const double PI = acos(-1);
#define fir first
#define sec second
#define thi third
#define debug(x) cerr<<#x<<": "<<x<<'\n'
typedef pair<LL, LL> Pll;
typedef pair<LL, pair<LL, LL>> Ppll;
typedef pair<LL, pair<LL, bitset<100001>>> Pbll;
typedef pair<LL, pair<LL, vector<LL>>> Pvll;
typedef pair<LL, LL> Vec2;
struct Tll { LL first, second, third; };
typedef pair<LL, Tll> Ptll;
#define rep(i,rept) for(LL i=0;i<rept;i++)
#define Mfor(i,mf) for(LL i=mf-1;i>=0;i--)
LL h, w, n, m, k, s, t, q, sum, last, cnt, ans, a[1000000],dp[1<<20];
string str, ss;
bool f;
char c;
int di[4][2] = { {1,0},{-1,0} ,{0,1},{0,-1} };
struct Edge { LL to,cost; };
vector<Edge>vec[10000];
void YN(bool f) {
	if (f)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}
void yn(bool f) {
	if (f)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
int main() {
	cin >> n >> m;
	cin >> str;
	rep(i, 1 << n) {
		dp[((1 << n) - 1) ^ i] = str[i]-'0';
	}
	rep(i,n)
		rep(s, 1 << n) {
		if ((s & (1 << i)) == 0) {
			dp[s] += dp[s | (1 << i)];
		}
	}
	rep(i, m) {
		LL ma0 = 0, ma1 = 0, ma2 = 0;
		ans = 0;
		cin >> str;
		rep(j, n)
			if (str[n-1-j] == '0')
				ma0 |= 1 << j;
			else if (str[n-1-j] == '1')
				ma1 |= 1 << j;
			else ma2 |= 1 << j;

		rep(s, 1 << n) {
			if ((ma0&s) == ma0&&(ma2&s)==0) {
				if ((__popcnt(s&ma1)) % 2)ans -= dp[s];
				else ans += dp[s];
			}
		}
		cout << ans << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:98:38: error: '__popcnt' was not declared in this scope
   98 |                                 if ((__popcnt(s&ma1)) % 2)ans -= dp[s];
      |                                      ^~~~~~~~
Language: C++

# include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <chrono>
# include <random>
# include <limits.h>
# include <unordered_map>
# include <unordered_set>
# include <deque>
# include <cstdio>
# include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <cstdint>
#include <cfenv>
//#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = std::numeric_limits<long long>::max();
const double PI = acos(-1);
#define fir first
#define sec second
#define thi third
#define debug(x) cerr<<#x<<": "<<x<<'\n'
typedef pair<LL, LL> Pll;
typedef pair<LL, pair<LL, LL>> Ppll;
typedef pair<LL, pair<LL, bitset<100001>>> Pbll;
typedef pair<LL, pair<LL, vector<LL>>> Pvll;
typedef pair<LL, LL> Vec2;
struct Tll { LL first, second, third; };
typedef pair<LL, Tll> Ptll;
#define rep(i,rept) for(LL i=0;i<rept;i++)
#define Mfor(i,mf) for(LL i=mf-1;i>=0;i--)
LL h, w, n, m, k, s, t, q, sum, last, cnt, ans, a[1000000],dp[1<<20];
string str, ss;
bool f;
char c;
int di[4][2] = { {1,0},{-1,0} ,{0,1},{0,-1} };
struct Edge { LL to,cost; };
vector<Edge>vec[10000];
void YN(bool f) {
	if (f)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}
void yn(bool f) {
	if (f)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
int main() {
	cin >> n >> m;
	cin >> str;
	rep(i, 1LL << n) {
		dp[((1LL << n) - 1) ^ i] = str[i]-'0';
	}
	rep(i,n)
		rep(s, 1LL << n) {
		if ((s & (1LL << i)) == 0) {
			dp[s] += dp[s | (1LL << i)];
		}
	}
	rep(i, m) {
		LL ma0 = 0, ma1 = 0, ma2 = 0;
		ans = 0;
		cin >> str;
		rep(j, n)
			if (str[n-1-j] == '0')
				ma0 |= 1LL << j;
			else if (str[n-1-j] == '1')
				ma1 |= 1LL << j;
			else ma2 |= 1LL << j;

		rep(s, (LL)1 << n) {
			if ((ma0&s) == ma0&&(ma2&s)==0) {
				if ((__popcnt(s&ma1)) % 2)ans -= dp[s];
				else ans += dp[s];
			}
		}
		cout << ans << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:98:38: error: '__popcnt' was not declared in this scope
   98 |                                 if ((__popcnt(s&ma1)) % 2)ans -= dp[s];
      |                                      ^~~~~~~~
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int goal = sc.nextInt();
        int day = 1;
        int coin = 0;
        
        while(coin < goal){
            coin += a;
            if(day % 7 == 0)
                coin += B;
            day++;
        }
        System.out.println(day);
    }
}


Compiler output:
Main.java:15: error: cannot find symbol
                coin += B;
                        ^
  symbol:   variable B
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scnner(System.in);
        int N = sc.nextInt();
        int[] piece = sc.nextLine().split(" ");
        int M = sc.nextInt();
        int[] operation[] = sc.nextLine().split(" ");
        
        
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        Scanner sc = new Scnner(System.in);
                         ^
  symbol:   class Scnner
  location: class Main
Main.java:7: error: incompatible types: String[] cannot be converted to int[]
        int[] piece = sc.nextLine().split(" ");
                                         ^
Main.java:9: error: incompatible types: String[] cannot be converted to int[][]
        int[] operation[] = sc.nextLine().split(" ");
                                               ^
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scaner(System.in);
        int N = sc.nextInt();
        int[] piece = sc.nextLine().split(" ");
        int M = sc.nextInt();
        int[] operation[] = sc.nextLine().split(" ");
        
        
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        Scanner sc = new Scaner(System.in);
                         ^
  symbol:   class Scaner
  location: class Main
Main.java:7: error: incompatible types: String[] cannot be converted to int[]
        int[] piece = sc.nextLine().split(" ");
                                         ^
Main.java:9: error: incompatible types: String[] cannot be converted to int[][]
        int[] operation[] = sc.nextLine().split(" ");
                                               ^
3 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] piece = sc.nextLine().split(" ");
        int M = sc.nextInt();
        int[] operation[] = sc.nextLine().split(" ");
        
        
    }
}


Compiler output:
Main.java:7: error: incompatible types: String[] cannot be converted to int[]
        int[] piece = sc.nextLine().split(" ");
                                         ^
Main.java:9: error: incompatible types: String[] cannot be converted to int[][]
        int[] operation[] = sc.nextLine().split(" ");
                                               ^
2 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Integer[] piece = sc.nextLine().split(" ");
        int M = sc.nextInt();
        int[] operation[] = sc.nextLine().split(" ");
        
        
    }
}


Compiler output:
Main.java:7: error: incompatible types: String[] cannot be converted to Integer[]
        Integer[] piece = sc.nextLine().split(" ");
                                             ^
Main.java:9: error: incompatible types: String[] cannot be converted to int[][]
        int[] operation[] = sc.nextLine().split(" ");
                                               ^
2 errors
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>
#include<queue>
#include<map>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
typedef long long int ll;

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T& t, const V& v) { t = v; }
template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T& t, const V& v) {
	for (auto& e : t) fill_v(e, v);
}


#define ARRAY_MAX 3005
const int INF = 1e9 + 7;

int used[ARRAY_MAX];

int main() {

	int n, m;
	cin >> n;
	auto a = make_v<int>(n + 10);
	fill_v(a, 0);

	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		used[a[i]] = 1;
	}

	cin >> m;

	for (int i = 0; i < m; i++)
	{
		int tmp;
		cin >> tmp;
		if (a[tmp] + 1 <= 2019)
		{
			if (used[a[tmp] + 1] == 0)
			{
				used[a[tmp]] = 0;
				used[a[tmp] + 1] = 1;
			
		}
	}

	for (int i = 1; i <= n; i++)
	{
		cout << a[i] << endl;
	}
	
}






Compiler output:
a.cc: In function 'int main()':
a.cc:82:2: error: expected '}' at end of input
   82 | }
      |  ^
a.cc:48:12: note: to match this '{'
   48 | int main() {
      |            ^
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;

class Main {

	static long[] orthometric;  //海抜
	static Long[] sea;  //海の変化
	static int num = 0;  //配列の長さ

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)){
			int len = sc.nextInt();
			orthometric = new long[len];  //海抜
			TreeSet<Long> seas = new TreeSet<Long>();
			long now = 0l;
			seas.add(0l);  //最初は0から始まる
			for (int i=0; i<len; i++) {
				long a = sc.nextLong();  //海抜を読み込み
				if (a != now) {  //隣が同じ高さだと無視
					orthometric[num] = a;  //海抜を読み込み
					seas.add(a);  //海の変化を読み込み
					now = a;
					num++;
				}
			}
			if (orthometric.size()>0) {
				//System.out.println();
				sea = new Long[seas.size()];
				seas.toArray(sea);  //配列にする
				List<int[]> land = new ArrayList<int[]>();
				land.add(new int[]{0,num});  //最初は全部
				int max = findLand(0, land);
				System.out.println(max);
			} else System.out.println("1");
		}
	}

	public static int findLand(int max, List<int[]> land) {
		int pointer = 0;
		while (pointer<sea.length) {
			int count = 0;
			int[] newLand = new int[2];
			List<int[]> l = new ArrayList<int[]>();
			for (int[] j : land) {
				newLand[0] = j[0];
				for (int k=j[0]; k<j[1]; k++) {
					if (orthometric[k]==sea[pointer]) {  //沈んだら
						if ((k!=j[0])) {  //最初ではなかったら
							count++;
							newLand[1] = k;  //新しい島のエンド
							int[] copy = new int[] {newLand[0],newLand[1]};
							l.add(copy);
						}
						newLand[0] = k+1;  //新しい島がスタート
					}
				}
				if (orthometric[j[1]-1]!=sea[pointer]) { //最後まで島だったら
					count++;
					newLand[1] = j[1];  //最後を島にする
					int[] copy = new int[] {newLand[0],newLand[1]};
					l.add(copy);
				}
				max = Math.max(max, count);
			}
			land = new ArrayList<int[]>(l);
			pointer++;
		}
		return max;
	}
}


Compiler output:
Main.java:28: error: cannot find symbol
			if (orthometric.size()>0) {
			               ^
  symbol:   method size()
  location: variable orthometric of type long[]
1 error
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int N;
int a[114514];
int numcheck(int h){
    //島の数を水位によって出力します
        vector<int> b(N);
        int n = 0;
        for(int i = 0;i < N;i++){
            if (a[i] - h > 0){
                b[i] = 1;
            }
            else{
                b[i] = 0;
            }
        }
        if (b[0] == 1) n++;
        for(int i = 1;i<N;i++){
            if (b[i] == 1 && b[i-1] == 0){
                n++;
            }
        }
    return n;
}
int main(){
    cin >> N;
    for(int i = 0;i < N ;i++){
        cin >> a[i];

    }
    int max = numcheck(0);
    int n = numcheck(1);
    int m = 1;
    while(n != 0){
        if(max < n){
            max = n;
        }
        m ++;
        n = numcheck(m);
    }
    cout << max　<< endl;
    return 0;
}


Compiler output:
a.cc:42:13: error: extended character 　 is not valid in an identifier
   42 |     cout << max　<< endl;
      |             ^
a.cc: In function 'int main()':
a.cc:42:13: error: 'max\U00003000' was not declared in this scope
   42 |     cout << max　<< endl;
      |             ^~~~~
Language: C++

#include<vector>
#include <algorithm>
using namespace std;
int N;
vector<long> a(114514);
int numcheck(long h){
    //島の数を水位によって出力します
        vector<int> b(N);
        int n = 0;
        for(int i = 0;i < N;i++){
            if (a[i] - h > 0){
                b[i] = 1;
            }
            else{
                b[i] = 0;
            }
        }
        if (b[0] == 1) n++;
        for(int i = 1;i<N;i++){
            if (b[i] == 1 && b[i-1] == 0){
                n++;
            }
        }
    return n;
}
int main(){
    cin >> N;
    vector <long> c(N);
    for(int i = 0;i < N ;i++){
        cin >> a[i];
        c[i] = a[i];
    }
    if(N == 1){cout << 1 << endl}else{
    sort (c.begin() , c.end());
    int max = numcheck(0);
    int m = 1;
    int n = numcheck(c[m]);
    while(n != 0){
        if(max < n){
            max = n;
        }
        m ++;
        n = numcheck(c[m]);
    }
    cout << max << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'cin' was not declared in this scope
   27 |     cin >> N;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:33:16: error: 'cout' was not declared in this scope
   33 |     if(N == 1){cout << 1 << endl}else{
      |                ^~~~
a.cc:33:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:29: error: 'endl' was not declared in this scope
   33 |     if(N == 1){cout << 1 << endl}else{
      |                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:45:5: error: 'cout' was not declared in this scope
   45 |     cout << max << endl;
      |     ^~~~
a.cc:45:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:45:20: error: 'endl' was not declared in this scope
   45 |     cout << max << endl;
      |                    ^~~~
a.cc:45:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<vector>
#include <algorithm>
using namespace std;
int N;
vector<long> a(114514);
int numcheck(long h){
    //島の数を水位によって出力します
        vector<int> b(N);
        int n = 0;
        for(int i = 0;i < N;i++){
            if (a[i] - h > 0){
                b[i] = 1;
            }
            else{
                b[i] = 0;
            }
        }
        if (b[0] == 1) n++;
        for(int i = 1;i<N;i++){
            if (b[i] == 1 && b[i-1] == 0){
                n++;
            }
        }
    return n;
}
int main(){
    cin >> N;
    vector <long> c(N);
    for(int i = 0;i < N ;i++){
        cin >> a[i];
        c[i] = a[i];
    }
    if(N == 1){cout << 1 << endl;}else{
    sort (c.begin() , c.end());
    int max = numcheck(0);
    int m = 1;
    int n = numcheck(c[m]);
    while(n != 0){
        if(max < n){
            max = n;
        }
        m ++;
        n = numcheck(c[m]);
    }
    cout << max << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'cin' was not declared in this scope
   27 |     cin >> N;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:33:16: error: 'cout' was not declared in this scope
   33 |     if(N == 1){cout << 1 << endl;}else{
      |                ^~~~
a.cc:33:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:29: error: 'endl' was not declared in this scope
   33 |     if(N == 1){cout << 1 << endl;}else{
      |                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:45:5: error: 'cout' was not declared in this scope
   45 |     cout << max << endl;
      |     ^~~~
a.cc:45:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:45:20: error: 'endl' was not declared in this scope
   45 |     cout << max << endl;
      |                    ^~~~
a.cc:45:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<cstdio>
#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
int main()
{
	int N=0;
	cin>>N;//区画の数
	vector<int> A(N);
	for(int i=0;i<N;i++){
		cin>>A[i];//
	}
	vector<bool> sea(N+2);
	sea[0]=sea[N+1]=true;
	for(int i=0;i<N;i++){
		sea[i+1]=(A[i]<=0);
	}
	int current=0;
	for(int i=1;i<=N;i++){
		if(!sea[i]&&sea[i-1]){
			current++;
		}
	}
	vector<pair<int,int>>AandID;
	for(int i=0;i<N;i++){
		if(A[i]>0){
			AandID.push_back(make_pair(A[i],i+1));
		}
	}
	sort(AandID.begin(),AandID.end());
	int answer=current;
	for(int t=0;t<AandID.size();t++){
		int i=AandID[t].second;
		sea[i]=true;
		if(sea[i-1]&&sea[i+1]){
			current--;
		}
		else if(!sea[i-1]&&![i+1]){
			current++;
		}
		if(t+1=AandID.size()||AandID[t].first<AandID[t+1].first){
			answer=max(answer,current);
		}
	}
	cout<<answer<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:39: error: expected ',' before '+' token
   39 |                 else if(!sea[i-1]&&![i+1]){
      |                                       ^
      |                                       ,
a.cc:39:39: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:39:42: error: expected '{' before ')' token
   39 |                 else if(!sea[i-1]&&![i+1]){
      |                                          ^
a.cc: In function 'int main()':
a.cc:39:36: error: no match for 'operator!' (operand type is 'main()::<lambda()>')
   39 |                 else if(!sea[i-1]&&![i+1]){
      |                                    ^~~~~~
a.cc:39:36: note: candidate: 'operator!(bool)' (built-in)
a.cc:39:36: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'bool'
a.cc:42:21: error: lvalue required as left operand of assignment
   42 |                 if(t+1=AandID.size()||AandID[t].first<AandID[t+1].first){
      |                    ~^~
Language: C++

#include<cstdio>
#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
int main()
{
	int N=0;
	cin>>N;//区画の数
	vector<int> A(N);
	for(int i=0;i<N;i++){
		cin>>A[i];//
	}
	vector<bool> sea(N+2);
	sea[0]=sea[N+1]=true;
	for(int i=0;i<N;i++){
		sea[i+1]=(A[i]<=0);
	}
	int current=0;
	for(int i=1;i<=N;i++){
		if(!sea[i]&&sea[i-1]){
			current++;
		}
	}
	vector<pair<int,int> >AandID;
	for(int i=0;i<N;i++){
		if(A[i]>0){
			AandID.push_back(make_pair(A[i],i+1));
		}
	}
	sort(AandID.begin(),AandID.end());
	int answer=current;
	for(int t=0;t<AandID.size();t++){
		int i=AandID[t].second;
		sea[i]=true;
		if(sea[i-1]&&sea[i+1]){
			current--;
		}
		else if(!sea[i-1]&&!sea[i+1]){
			current++;
		}
		if(t+1=AandID.size()||AandID[t].first<AandID[t+1].first){
			answer=max(answer,current);
		}
	}
	cout<<answer<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:21: error: lvalue required as left operand of assignment
   42 |                 if(t+1=AandID.size()||AandID[t].first<AandID[t+1].first){
      |                    ~^~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

class Main {

	static long[] beauty;  //美しさ
	static int[] L;
	static int[] R;

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)){
			int treeNum = sc.nextInt();
			beauty = new long[treeNum];
			boolean[] illumination = new boolean[treeNum];  //イルミネーション trueついてる falseついてない
			int mNum = sc.nextInt();
			L = new int[mNum];
			R = new int[mNum];
			for (int i=0; i<treeNum; i++) {
				beauty[i] = sc.nextLong();  //美しさを読み込み
				illumination[i]  = true;
			}
			for (int i=0; i<mNum; i++) {  //LとRを記録
				L[i] = sc.nextInt()-1;
				R[i] = sc.nextInt()-1;
			}
			long max_beauty = allPattern(-1l,illumination,0);
			System.out.println(max_beauty);
		}
	}

	public static long allPattern(long max,boolean[] illu, int pointer){  //maxの美しさ、イルミネーションの状態、何番目のルール
		if (pointer >= L.length) {  //ルールの数
			Long b = 0l;
			for (int i=0; i<beauty.length; i++) {
				//System.out.println(i + "-------" + illu[i]);
				if (illu[i]) {  //ついているなら
					b += beauty[i];  //美しさを加算
				}
			}
			//System.out.println(b);
			max=Math.max(max,b);
		} else {
			for (int i=L[pointer]; i<=R[pointer]; i++) {
				boolean[] copy = new boolean[illu.length];
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //コピーする
				//boolean[] copy = Arrays.copyOf(illu, illu.length);
				for (int j=L[pointer]; j<=R[pointer]; j++) copy[j] = false;  //まず範囲内をイルミネーションを全部消す
				if (illu[i]) {  //すでに消したら処理しない
					copy[i] = true;  //一個ずつつけて再帰する
				}
				max = allPattern(max,copy,pointer+1);
			}
		}
		return max;
	}
}


Compiler output:
Main.java:45: error: ',', ')', or '[' expected
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //?????
				      ^
Main.java:45: error: not a statement
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //?????
				^
Main.java:45: error: > or ',' expected
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //?????
				                       ^
Main.java:45: error: not a statement
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //?????
				           ^
Main.java:45: error: ';' expected
				(int j=0; j<illu.length; j++) copy[j] = illu[j];  //?????
				                            ^
5 errors
Language: Java

public class Main {
	Scanner sc = new Scanner(System.in);
	void doIt() {
		while(sc.hasNext()) {
			System.out.println(sc.nextInt() + sc.nextInt());
		}
	}
	public static void main(String[] args) {
		new Main().doIt();
	}

}



Compiler output:
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(true) {
			System.out.println(scan.nextInt() + scan.nextInt);
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
			System.out.println(scan.nextInt() + scan.nextInt);
			                                        ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(true) {
			System.out.println(scan.nextInt().equals(null) ? break : scan.nextInt() + scan.nextInt());
		}
	}
}

Compiler output:
Main.java:7: error: illegal start of expression
			System.out.println(scan.nextInt().equals(null) ? break : scan.nextInt() + scan.nextInt());
			                                                 ^
Main.java:7: error: ';' expected
			System.out.println(scan.nextInt().equals(null) ? break : scan.nextInt() + scan.nextInt());
			                                                      ^
Main.java:7: error: not a statement
			System.out.println(scan.nextInt().equals(null) ? break : scan.nextInt() + scan.nextInt());
			                                                                        ^
Main.java:7: error: ';' expected
			System.out.println(scan.nextInt().equals(null) ? break : scan.nextInt() + scan.nextInt());
			                                                                                        ^
4 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(true) {
			int a = scan.nextInt();
			if(a == null) break;

			System.out.println( a + scan.nextInt());
		}
	}
}

Compiler output:
Main.java:8: error: bad operand types for binary operator '=='
			if(a == null) break;
			     ^
  first type:  int
  second type: <null>
1 error
Language: Java

	int main(){
		Scanner sc = new Scanner(System.in);
		int a;
		int b;
		while(true){
			if(!sc.hasNext())break;
			a = sc.nextInt();
			b = sc.nextInt();
			System.out.println(a + b);
		}
		return 0;
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	int main(){
	^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

class Main {
	public static void main(String args[]){			
		Scanner input = new Scanner(System.in);
		
		while(true){
			System.out.println(input.nextInt() + input.nextInt());
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner input = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args){	
		Scanner input = new Scanner(System.in);
		
		while(10){
			System.out.println(input.nextInt() + input.nextInt());
		}
	}
}

Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to boolean
		while(10){
		      ^
1 error
Language: Java

import java.util.Scanner;

public class No_1000 {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		String line = "";
		String[] lineAry = new String[2];
		while (true) {
			line = sc.nextLine();
			if (line.length() == 0) {
				sc.close();
				break;
			} else {
				lineAry = line.split(" ");
				System.out.println(Integer.parseInt(lineAry[0]) + Integer.parseInt(lineAry[1]));
			}
		}
	}
}

Compiler output:
Main.java:3: error: class No_1000 is public, should be declared in a file named No_1000.java
public class No_1000 {
       ^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class j1000 {
  public static void main(String[] args) throws IOException {
    Scanner cin = new Scanner(System.in);
    while (cin.hasNext()) {
      final int a = cin.nextInt();
      final int b = cin.nextInt();
      System.out.println(a+b);
    }
  }
}

Compiler output:
Main.java:4: error: class j1000 is public, should be declared in a file named j1000.java
public class j1000 {
       ^
1 error