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

typedef long long ll;
typedef long double ld;
#define INF 1LL<<60
ld lginf = -1;
ll mul(ll a, ll b) {
    if (lginf < 0) lginf = log10l(INF); ld aa = log10l(a), bb = log10l(b);
    if (lginf <= aa + bb) return INF; return a * b;
}




ll N, M;
int mod = 1000000007;
//--------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> M;
 
    if (N == 1) {
        int ans = (M + 1) % mod;
        cout << ans << endl;
        return;
    }
 
    ll ok = 0, ng = M + 1;
    while (ok + 1 != ng) {
        ll d = (ok + ng) / 2;
        ll b = mul(N - 1, d);
        if (M < b) ng = d;
        else ok = d;
    }
 
    mint ans = mint((M + 1) % mod) * mint(ok % mod);
    ans -= mint(ok%mod) / 2 * (mint((N - 1) % mod) + mint((N - 1) % mod) * mint(ok % mod));
    ans *= 2;
    ans += (M + 1) % mod;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'll mul(ll, ll)':
a.cc:6:28: error: 'log10l' was not declared in this scope
    6 |     if (lginf < 0) lginf = log10l(INF); ld aa = log10l(a), bb = log10l(b);
      |                            ^~~~~~
a.cc:6:49: error: 'log10l' was not declared in this scope
    6 |     if (lginf < 0) lginf = log10l(INF); ld aa = log10l(a), bb = log10l(b);
      |                                                 ^~~~~~
a.cc:7:23: error: 'bb' was not declared in this scope; did you mean 'b'?
    7 |     if (lginf <= aa + bb) return INF; return a * b;
      |                       ^~
      |                       b
a.cc: In function 'void _main()':
a.cc:17:5: error: 'cin' was not declared in this scope
   17 |     cin >> N >> M;
      |     ^~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << ans << endl;
      |         ^~~~
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout << ans << endl;
      |                        ^~~~
a.cc:33:5: error: 'mint' was not declared in this scope; did you mean 'int'?
   33 |     mint ans = mint((M + 1) % mod) * mint(ok % mod);
      |     ^~~~
      |     int
a.cc:34:5: error: 'ans' was not declared in this scope
   34 |     ans -= mint(ok%mod) / 2 * (mint((N - 1) % mod) + mint((N - 1) % mod) * mint(ok % mod));
      |     ^~~
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << ans << endl;
      |     ^~~~
a.cc:37:20: error: 'endl' was not declared in this scope
   37 |     cout << ans << endl;
      |                    ^~~~
Language: C++

package practice;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		int MOD = 1000000007;

		Scanner sc = new Scanner(System.in);
		Long first_N = sc.nextLong();
		Long first_M = sc.nextLong();

		Long first_limit;

		if(first_N == 1){
			System.out.println((first_M+1)%MOD);
		}else{

			if((first_M+1)%(first_N-1) == 0){
				first_limit = (first_M+1)/(first_N-1)-1;
			}else{
				first_limit = (first_M+1)/(first_N-1);
			}

			if(first_limit <= 0){
				System.out.println((first_M+1)%MOD);
			}else{

				BigInteger bigMOD = BigInteger.valueOf(MOD);

				BigInteger limit = BigInteger.valueOf(first_limit);

				BigInteger A = BigInteger.valueOf(first_M+1);

				BigInteger B = BigInteger.valueOf(2*(first_M+1));
				B = B.multiply(limit);

				BigInteger C = BigInteger.valueOf(first_N-1);
				C = C.multiply(limit);
				C = C.multiply(BigInteger.valueOf(first_limit+1));

				A = A.add(B).subtract(C);

				System.out.println(A.remainder(bigMOD));

			}

		}


	}
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package practice;
      | ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import java.math.BigInteger;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Scanner;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		int MOD = 1000000007;

		Scanner sc = new Scanner(System.in);
		Long first_N = sc.nextLong();
		Long first_M = sc.nextLong();

		Long first_limit;

		if(first_N == 1){
			System.out.println((first_M+1)%MOD);
		}else{

			if((first_M+1)%(first_N-1) == 0){
				first_limit = (first_M+1)/(first_N-1)-1;
			}else{
				first_limit = (first_M+1)/(first_N-1);
			}

			if(first_limit <= 0){
				System.out.println((first_M+1)%MOD);
			}else{

				BigInteger bigMOD = BigInteger.valueOf(MOD);

				BigInteger limit = BigInteger.valueOf(first_limit);

				BigInteger A = BigInteger.valueOf(first_M+1);

				BigInteger B = BigInteger.valueOf(2*(first_M+1)).multiply(limit);

				BigInteger C = BigInteger.valueOf(first_N-1).multiply(limit);
				C = C.multiply(BigInteger.valueOf(first_limit+1));

				System.out.println((A.add(B).subtract(C)).remainder(bigMOD));
			}
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.math.BigInteger;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <
#include <string>
#include <vector>
#include <string.h>
using namespace std;

int main(void) {

	string T, P;
	cin >> T;
	cin >> P;
	int array[P.size()];
	int pos = 0;
	bool flag = true;
	for (int i = 0; i < P.size(); i++)
		array[i] = 0;
#ifdef DEBUG
	for (int i = 0; i < P.size(); i++)
		cout << array[i] << endl;
#endif
	for (int i = 0; i < T.size(); i++) {
		if (P.size() < pos) {
			flag = false;
			break;
		}
		if (T[i] == P[pos]) {
			pos++;	
#ifdef DEBUG
	cout << pos-1 << endl;
	cout << P[pos-1] << endl;
#endif
		}					
		else if (pos) {
			if (T[i] == P[pos-1]) {
				array[pos-1]++;	
			}	
		}
	} 
#ifdef DEBUG
	cout << flag << endl;
#endif
	//?????????T.size < P.size ??¨???????????¨????????????
	//???????????¨????????????????????£?????´???
	//pos????????????P.size ??¨????????????
	if (flag && pos == P.size()) {
		bool f = true;
		for (int i = 0; i < P.size(); i++) {
#ifdef DEBUG
	cout << array[i] << endl;
#endif
			if (array[i] != 0)
				f = false;		
		}	
		if (f) {
			cout << "yes" << endl;
			return 0;
		}
	}
        cout << "no" << endl;
	return 0;
}

Compiler output:
a.cc:2:11: error: missing terminating > character
    2 | #include <
      |           ^
a.cc:2:10: error: empty filename in #include
    2 | #include <
      |          ^
Language: C++

#include<iostream>
#include<string>
#include<map>
#include<set>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
string s;
int n,flag,x;
char c;
map<char,int>m;
int make_tree(int l,int r,int depth){
  if((r-l)==3){
    if(m[s[l+1]]&&m[s[r-1]])flag++;
    return max(m[s[l+1]],m[s[r-1]])-1;
  }
  else{
    int f=0,le=0,ri=0i;
    for(int i=l+1;i<=r;i++){
      if(s[i]=='[')f++;
      if(s[i]==']')f--;
      if(f==0){
	le=make_tree(l+1,i,depth+1);
	ri=make_tree(i+1,r-1,depth+1);
	break;
      }
    }
    if(le&&ri)flag++;
    if(!le&&ri-1!=depth)flag++;
    if(le-1!=depth&&!ri)flag++;
    return max(le,ri)-1;
  }
}
int main(){
  cin>>s;
  set<char>st;
  r(i,s.size())if(isalpha(s[i]))st.insert(s[i]);
  r(i,(int)s.size())if(s[i]=='-')s.erase(s.begin()+i),i--;
  n=st.size();
  r(i,n){
    cin>>c>>x;
    m[c]=x;
  }
  make_tree(0,s.size()-1,0);
  cout<<(flag?"NO":"YES")<<endl;
}

Compiler output:
a.cc: In function 'int make_tree(int, int, int)':
a.cc:17:21: error: cannot convert '__complex__ int' to 'int' in initialization
   17 |     int f=0,le=0,ri=0i;
      |                     ^~
Language: C++

#include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
string s;
int n,flag,x;
char c;
map<char,int>m;
int make_tree(int l,int r,int depth){
  if((r-l)==3){
    if(m[s[l+1]]&&m[s[r-1]])flag++;
    return max(m[s[l+1]],m[s[r-1]])-1;
  }
  else{
    int f=0,le=0,ri=0i;
    for(int i=l+1;i<=r;i++){
      if(s[i]=='[')f++;
      if(s[i]==']')f--;
      if(f==0){
	le=make_tree(l+1,i,depth+1);
	ri=make_tree(i+1,r-1,depth+1);
	break;
      }
    }
    if(le&&ri)flag++;
    if(!le&&ri-1!=depth)flag++;
    if(le-1!=depth&&!ri)flag++;
    return max(le,ri)-1;
  }
}
int main(){
  cin>>s;
  set<char>st;
  r(i,s.size())if(isalpha(s[i]))st.insert(s[i]);
  r(i,(int)s.size())if(s[i]=='-')s.erase(s.begin()+i),i--;
  n=st.size();
  r(i,n){
    cin>>c>>x;
    m[c]=x;
  }
  make_tree(0,s.size()-1,0);
  cout<<(flag?"NO":"YES")<<endl;
}

Compiler output:
a.cc: In function 'int make_tree(int, int, int)':
a.cc:14:21: error: cannot convert 'std::complex<double>' to 'int' in initialization
   14 |     int f=0,le=0,ri=0i;
      |                     ^~
      |                     |
      |                     std::complex<double>
Language: Java

package s;

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

public class BrokenDoor 
{

	public static void main(String[] args) 
	{
		new DataSet();
	}

	static class DataSet
	{
		Scanner scan = new Scanner(System.in);
		int cityNum;
		int roadNum;
		int start;
		int finish;
		ArrayList<Integer>[] cities;
		
		public DataSet()
		{
			cityNum = scan.nextInt();
			roadNum = scan.nextInt();
			start = scan.nextInt();
			finish = scan.nextInt();
			
			cities = new ArrayList[cityNum];
			for(int i = 0; i < cityNum; i++)
			{
				cities[i] = new ArrayList<Integer>();
			}
			
			
			for(int i = 0; i < roadNum; i++)
			{
				
			}
		}
	}
}


Compiler output:
Main.java:7: error: class BrokenDoor is public, should be declared in a file named BrokenDoor.java
public class BrokenDoor 
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java


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

public class BrokenDoor 
{

	public static void main(String[] args) 
	{
		new DataSet();
	}

	static class DataSet
	{
		Scanner scan = new Scanner(System.in);
		int cityNum;
		int roadNum;
		int start;
		int finish;
		ArrayList<Integer>[] cities;
		
		public DataSet()
		{
			cityNum = scan.nextInt();
			roadNum = scan.nextInt();
			start = scan.nextInt();
			finish = scan.nextInt();
			
			cities = new ArrayList[cityNum];
			for(int i = 0; i < cityNum; i++)
			{
				cities[i] = new ArrayList<Integer>();
			}
			
			
			for(int i = 0; i < roadNum; i++)
			{
				
			}
		}
	}
}


Compiler output:
Main.java:6: error: class BrokenDoor is public, should be declared in a file named BrokenDoor.java
public class BrokenDoor 
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java


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

public class BrokenDoor 
{

	public static void main(String[] args) 
	{
		new DataSet();
	}

	static class DataSet
	{
		Scanner scan = new Scanner(System.in);
		int cityNum;
		int roadNum;
		int start;
		int finish;
		ArrayList<Integer>[] cities;
		
		@SuppressWarnings("unchecked")
		public DataSet()
		{
			cityNum = scan.nextInt();
			roadNum = scan.nextInt();
			start = scan.nextInt();
			finish = scan.nextInt();
			
			cities = new ArrayList[cityNum];
			for(int i = 0; i < cityNum; i++)
			{
				cities[i] = new ArrayList<Integer>();
			}
			
			
			for(int i = 0; i < roadNum; i++)
			{
				
			}
		}
	}
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

import static java.lang.Integer.parseInt;

/**
 * Many Kinds of Apples
 */
public class P2867 {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		int N = parseInt(br.readLine());
		int[] c = new int[N + 1];
		int[] a = new int[N + 1];

		StringTokenizer st = new StringTokenizer(br.readLine());

		for (int i = 1; i <= N; i++) {
			c[i] = parseInt(st.nextToken());
		}

		int Q = parseInt(br.readLine());
		int ans = 0;
		for (int i = 0; i < Q; i++) {
			st = new StringTokenizer(br.readLine());

			int t = parseInt(st.nextToken());
			int x = parseInt(st.nextToken());
			int d = parseInt(st.nextToken());

			if (t == 1) {
				a[x] += d;
			} else {
				a[x] -= d;
			}

			if (a[x] < 0 || a[x] > c[x]) {
				ans = x;
				break;
			}
		}

		System.out.println(ans);
	}
}



Compiler output:
Main.java:11: error: class P2867 is public, should be declared in a file named P2867.java
public class P2867 {
       ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define all(c) (c).begin(), (c).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

constexpr int Q_MAX = 1000006;
bool is_prime[Q_MAX];
void init() {
    rep(i, Q_MAX) is_prime[i] = true;
    is_prime[0] = is_prime[1] = false;
    rep(i, Q_MAX) if (i >= 2) {
        if (is_prime[i]) {
            for (int j = i * 2; j < Q_MAX; j += i) is_prime[j] = false;
        }
    }
}
int main() {
    init();
    cout << cnt << endl;
    int N;
    cin >> N;
    vector<int> q(N);
    rep(i, N) cin >> q[i];

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   24 |     cout << cnt << endl;
      |             ^~~
      |             int
Language: C++

struct FordFulkerson{
    struct Edge { 
        int to,cap,rev; 
        Edge(int to=0,int cap=0,int rev=0) :
            to(to),cap(cap),rev(rev){}
    };

    int V;
    vector<vector<Edge> > G;
    vector<bool> used;

    FordFulkerson(int V) : V(V) {
        G.resize(V);
        used.assign(V,false);
    }

    void add_edge(int from,int to,int cap) {
        G[from].pb(Edge(to,cap,G[to].size()));
        G[to].pb(Edge(from,0,G[from].size()-1));
    }

    int dfs(int v,int t,int f) {
        if(v==t) return f;
        used[v]=true;
        for(int i=0;i<G[v].size();i++) {
            Edge &e=G[v][i];

            if(!used[e.to] && e.cap>0) {
                int d=dfs(e.to,t,min(f,e.cap));
                if(d>0) {
                    e.cap-=d;
                    G[e.to][e.rev].cap+=d;
                    return d;
                }
            }
        }
        return 0;
    }

    int max_flow(int s,int t) {
        int flow=0;
        while(1) {
            used.assign(V,false);
            int f=dfs(s,t,INF);
            if(f==0) break;
            flow+=f;
        }

        return flow;
    }
};


Compiler output:
a.cc:9:5: error: 'vector' does not name a type
    9 |     vector<vector<Edge> > G;
      |     ^~~~~~
a.cc:10:5: error: 'vector' does not name a type
   10 |     vector<bool> used;
      |     ^~~~~~
a.cc: In constructor 'FordFulkerson::FordFulkerson(int)':
a.cc:13:9: error: 'G' was not declared in this scope
   13 |         G.resize(V);
      |         ^
a.cc:14:9: error: 'used' was not declared in this scope
   14 |         used.assign(V,false);
      |         ^~~~
a.cc: In member function 'void FordFulkerson::add_edge(int, int, int)':
a.cc:18:9: error: 'G' was not declared in this scope
   18 |         G[from].pb(Edge(to,cap,G[to].size()));
      |         ^
a.cc: In member function 'int FordFulkerson::dfs(int, int, int)':
a.cc:24:9: error: 'used' was not declared in this scope
   24 |         used[v]=true;
      |         ^~~~
a.cc:25:23: error: 'G' was not declared in this scope
   25 |         for(int i=0;i<G[v].size();i++) {
      |                       ^
a.cc:29:34: error: 'min' was not declared in this scope
   29 |                 int d=dfs(e.to,t,min(f,e.cap));
      |                                  ^~~
a.cc: In member function 'int FordFulkerson::max_flow(int, int)':
a.cc:43:13: error: 'used' was not declared in this scope
   43 |             used.assign(V,false);
      |             ^~~~
a.cc:44:27: error: 'INF' was not declared in this scope
   44 |             int f=dfs(s,t,INF);
      |                           ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,c,q,t,x,d;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>c[i];
    }
    int q,t,x,d;
    cin>>q;
    for(int j=0;j<q;j++){
        cin>>t>>x>>d;
        if(t==1){
            if(c[x]<d)cout<<d-c[x];break;
        }else{
            if(c[x]>d)cout<<c[x]-d;break;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid types 'int[int]' for array subscript
    7 |         cin>>c[i];
      |               ^
a.cc:9:9: error: redeclaration of 'int q'
    9 |     int q,t,x,d;
      |         ^
a.cc:4:13: note: 'int q' previously declared here
    4 |     int n,c,q,t,x,d;
      |             ^
a.cc:9:11: error: redeclaration of 'int t'
    9 |     int q,t,x,d;
      |           ^
a.cc:4:15: note: 'int t' previously declared here
    4 |     int n,c,q,t,x,d;
      |               ^
a.cc:9:13: error: redeclaration of 'int x'
    9 |     int q,t,x,d;
      |             ^
a.cc:4:17: note: 'int x' previously declared here
    4 |     int n,c,q,t,x,d;
      |                 ^
a.cc:9:15: error: redeclaration of 'int d'
    9 |     int q,t,x,d;
      |               ^
a.cc:4:19: note: 'int d' previously declared here
    4 |     int n,c,q,t,x,d;
      |                   ^
a.cc:14:17: error: invalid types 'int[int]' for array subscript
   14 |             if(c[x]<d)cout<<d-c[x];break;
      |                 ^
a.cc:14:32: error: invalid types 'int[int]' for array subscript
   14 |             if(c[x]<d)cout<<d-c[x];break;
      |                                ^
a.cc:16:17: error: invalid types 'int[int]' for array subscript
   16 |             if(c[x]>d)cout<<c[x]-d;break;
      |                 ^
a.cc:16:30: error: invalid types 'int[int]' for array subscript
   16 |             if(c[x]>d)cout<<c[x]-d;break;
      |                              ^
Language: C++

テストケース23ってなーんだ？


Compiler output:
a.cc:1:1: error: '\U000030c6\U000030b9\U000030c8\U000030b1\U000030fc\U000030b923\U00003063\U00003066\U0000306a\U000030fc\U00003093\U00003060\U0000ff1f' does not name a type
    1 | テストケース23ってなーんだ？
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define all(v) (v).begin(), (v).end()
#define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__)
#define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) reps(i, 0, n)

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

using Pi = pair<int, int>;
using Tapris = tuple<int, int, int>;
using vint = vector<int>;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

void enum_prime(int N, vector<bool>& is_p)
{
    is_p.resize(N, true);
    is_p[0] = is_p[1] = false;
    for(int i = 2; i*i <= N; i++) {
        if(!is_p[i]) continue;
        for(int j = i+i; j <= N; j+=i) is_p[j] = false;
    }
}

signed main() {
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    cout << fixed << setprecision(12);
    
    const int MAX_Q = 1000000;
    
    vector<bool> is_p;
    enum_prime(MAX_Q, is_p);
    
    int n;
    cin >> n;
    vint q(n);
    rep(i, n) cin >> q[i];
    sort(all(q));
    if(!is_p[q[0]]) {
        cout << 0 << endl;
        return 0;
    } else {
        bool flag = true;
        rep(i, n-1) {
            if(!is_p[q[i]] && !is_p[q[i+1]]) flag = false;a
        }
        if(!flag) {
            cout << 0 << endl;
            return 0;
        }
    }
    
    vector<vint> dp(2, vint(n+1, -1));
    dp[0][1] = 1;
    dp[1][1] = 0;
    reps(i, 1, n) {
        if(is_p[q[i]]) {
            if(i > 1 && is_p[q[i-1]] && is_p[q[i-2]]) {
                if(q[i-1] == q[i] && q[i-2] >= q[i]) {
                    cout << 0 << endl;
                    return 0;
                }
            }
            if(is_p[q[i-1]] && q[i-1] > q[i]) {
                dp[0][i+1] = 0;
                dp[1][i+1] = dp[0][i];
            } else if(is_p[q[i-1]] && q[i-1] == q[i]) {
                dp[0][i+1] = dp[1][i];
                dp[1][i+1] = dp[0][i];
            } else {
                dp[0][i+1] = (dp[0][i]+dp[1][i])%mod;
                dp[1][i+1] = dp[0][i];
            }
        } else {
            dp[0][i+1] = 0;
            dp[1][i+1] = dp[0][i];
        }
    }
    cout << (dp[0][n]+dp[1][n])%mod << endl;
    
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:52:59: error: 'a' was not declared in this scope
   52 |             if(!is_p[q[i]] && !is_p[q[i+1]]) flag = false;a
      |                                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

void eratosthenes(int N, int* arr){
  for(int i=0; i < N; i++){
    arr[i] = 1;
  }
  for(int i=2; i < sqrt(N); i++){
    if(arr[i]){
      for(int j=0; i * (j + 2) < N; j++){
        arr[i*(j+2)] = 0;
      }
    }
  }
}

int main(void){
  const int NMAX = 100002;
  const int QMAX = 1000001;
  const int MOD = 1e9+7;
  int dp[NMAX][2]; // dp[idx][自分が素因数(0)か肩(1)か]
  int isprime[QMAX];
  for(int i = 0; i < NMAX; i++) for(int j = 0; j < 2; j++) dp[i][j] = 0;
  eratosthenes(QMAX, isprime);



  int N; cin >> N;
  vector<int> q(N);
  for(int i = 0; i < N; i++) cin >> q[i];
  q.push_back(0);

  if(isprime[q[0]])
    dp[0][0] = 1;

  for(int i = 0; i < N-1; i++){
    for(int j = 0; j < 2; j++){
      if(j == 0){
        dp[i+1][1] = (dp[i+1][1] + dp[i][j]) % MOD;
        if(q[i+1] > q[i] && isprime[q[i+1]]){
          dp[i+1][0] = (dp[i+1][0] + dp[i][j]) % MOD;
        }
      }else{
        if((i == 0 || q[i+1] > q[i-1]) && isprime[q[i+1]]){
          dp[i+1][0] = (dp[i+1][0] + dp[i][j]) % MOD;
        }
      }
    }
  }
  cout << (dp[N-1][0] + dp[N-1][1]) % MOD << endl;
  return 0;
}
 


Compiler output:
a.cc:53:1: error: extended character   is not valid in an identifier
   53 |  
      | ^
a.cc:53:1: error: '\U00002028' does not name a type
   53 |  
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF 1e16
#define mod 1000000007

struct StarrySkyTree {
  vector<ll> seg, sum, lazy;
  int size;
  StarrySkyTree() {}
  StarrySkyTree(int n) {
    init(n);
  }
  void init(int n) {
    size = 1;
    while (size < n) size *= 2;
    seg.resize(size * 2);
    lazy.resize(size * 2);
    sum.resize(size * 2);
    for(int i = 0; i < size*2; i++){
      seg[i]=0;
      sum[i]=0;
    }
  }
  void update(int k,ll v){
    k += size-1;
    sum[k] = v;
    while(k > 0){
      k = (k - 1)/2;
      sum[k] = sum[k * 2 + 1] + sum[k * 2 + 2];
    }
  }
  void push(int k, int l, int r) {
    seg[k] += lazy[k];
    if(lazy[k]%2==1){
      int num=(min(n*2,r)-l)/2;
      sum[k]=num-sum[k];
    }
    if (r - l > 1) {
      lazy[k * 2 + 1] += lazy[k];
      lazy[k * 2 + 2] += lazy[k];
    }
    lazy[k] = 0;
  }
  void add(int a, int b, ll v, int k, int l, int r) {
    push(k, l, r);
    if (r <= a || b <= l) return;
    if (a <= l && r <= b) {
      lazy[k] += v;
      push(k, l, r);
    } else {
      add(a, b, v, k * 2 + 1, l, (l + r) / 2);
      add(a, b, v, k * 2 + 2, (l + r) / 2, r);
      sum[k] = sum[k * 2 + 1]+sum[k * 2 + 2];
    }
  }
  void add(int a, int b, ll v) {
    add(a, b, v, 0, 0, size);
  }
  ll query(int a, int b, int k, int l, int r) {
    push(k, l, r);
    if (r <= a || b <= l) return 0; // caution
    if (a <= l && r <= b) return sum[k];
    ll vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
    ll vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
    return vl+vr;
  }
  ll query(int a, int b) {
    return query(a, b, 0, 0, size);
  }
};

int n,q;
vector<int> g[101011];
vector<int> a;
int idx[2][100001];

int cnt=0;

void dfs(ll v,ll pre){
  a.push_back(v);
  idx[0][v]=cnt++;
  for(ll nv : g[v]){
    if(nv==pre)continue;
    dfs(nv,v);
  }
  a.push_back(v);
  idx[1][v]=cnt++;
}

int main(){
  cin>>n>>q;
  rep(i,n-1){
    int a;
    cin>>a;
    a--;
    g[i+1].push_back(a);
    g[a].push_back(i+1);
  }
  dfs(0,-1);

  StarrySkyTree sgt;
  sgt.init(n*2);

  rep(i,n){
    char c;
    cin>>c;
    if(c=='G'){
      sgt.update(idx[0][i],1);
    }
  }

  while(q--){
    ll v;
    cin>>v;
    v--;
    sgt.add(idx[0][v],idx[1][v]+1,1);
    dbg(sgt.query(0,2*n));
    if(sgt.query(0,2*n)>=(n+1)/2)cout<<"broccoli"<<endl;
    else cout<<"cauliflower"<<endl;
  }

  return 0;
}



Compiler output:
a.cc: In member function 'void StarrySkyTree::push(int, int, int)':
a.cc:54:20: error: 'n' was not declared in this scope; did you mean 'yn'?
   54 |       int num=(min(n*2,r)-l)/2;
      |                    ^
      |                    yn
Language: C++

#include<algorithm>
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)

using namespace std;

#define all(a) (a).begin(), (a).end()


// http://algoogle.hadrori.jp/algorithm/aho-corasick.html
struct PMA {
    PMA* next[256];
    vector<int> matched;
    PMA() { memset(next, 0, sizeof(next)); }
    ~PMA() { for(int i = 0; i < 256; i++) if(next[i]) delete next[i]; }
};

vector<int> set_union(const vector<int> &a,const vector<int> &b) {
    vector<int> res;
    set_union(all(a), all(b), back_inserter(res));
    return res;
}

PMA *buildPMA(vector<string> pattern) {
    PMA *root = new PMA, *now;
    root->next[0] = root;
    for(int i = 0; i < pattern.size(); i++) {
        now = root;
        for(int j = 0; j < pattern[i].size(); j++) {
            if(now->next[(int)pattern[i][j]] == 0)
                now->next[(int)pattern[i][j]] = new PMA;
            now = now->next[(int)pattern[i][j]];
        }
        now->matched.push_back(i);
    }

    queue<PMA*> que;
    for(int i = 1; i < 256; i++) {
        if(!root->next[i]) root->next[i] = root;
        else {
            root->next[i]->next[0] = root;
            que.push(root->next[i]);
        }
    }
    while(!que.empty()) {
        now = que.front(); que.pop();
        for(int i = 1; i < 256; i++) {
            if(now->next[i]){
                PMA *nxt = now->next[0];
                while(!nxt->next[i]) nxt = nxt->next[0];
                now->next[i]->next[0] = nxt->next[i];
                now->next[i]->matched = set_union(now->next[i]->matched, nxt->next[i]->matched);
                que.push(now->next[i]);
            }
        }
    }
    return root;
}

int match(PMA* &pma, const string &s) {
  PMA*root=pma;
  int cnt=0;
    for(int i = 0; i < s.size(); i++){
        int c = s[i];
        while(!pma->next[c])
            pma = pma->next[0];
        pma = pma->next[c];
	if(pma->matched.size()>0){
	  cnt++;
	  pma=root;
	}
    }
    return cnt;
}

int main(){
  string s;
  int n;
  cin>>s>>n;
  vector<string>p(n);
  rep(i,n)cin>>p[i];
  PMA*pma=buildPMA(p);
  cout<<match(pma,s)<<endl;
}



Compiler output:
a.cc: In constructor 'PMA::PMA()':
a.cc:20:13: error: 'memset' was not declared in this scope
   20 |     PMA() { memset(next, 0, sizeof(next)); }
      |             ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<queue>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);

  for (autp &i : a) cin >> i;

  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (abs(a[i] - a[j]) % (n - 1) == 0) {
        cout << a[i] << " " << a[j] << endl;
        return 0;
      }
    }
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'autp' was not declared in this scope; did you mean 'auto'?
    9 |   for (autp &i : a) cin >> i;
      |        ^~~~
      |        auto
a.cc:9:16: error: found ':' in nested-name-specifier, expected '::'
    9 |   for (autp &i : a) cin >> i;
      |                ^
      |                ::
a.cc:9:14: error: 'i' has not been declared
    9 |   for (autp &i : a) cin >> i;
      |              ^
a.cc:11:3: error: expected primary-expression before 'for'
   11 |   for (int i = 0; i < n; ++i) {
      |   ^~~
a.cc:9:30: error: expected ';' before 'for'
    9 |   for (autp &i : a) cin >> i;
      |                              ^
      |                              ;
   10 | 
   11 |   for (int i = 0; i < n; ++i) {
      |   ~~~                         
a.cc:11:3: error: expected primary-expression before 'for'
   11 |   for (int i = 0; i < n; ++i) {
      |   ^~~
a.cc:9:30: error: expected ')' before 'for'
    9 |   for (autp &i : a) cin >> i;
      |       ~                      ^
      |                              )
   10 | 
   11 |   for (int i = 0; i < n; ++i) {
      |   ~~~
Language: C++

#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
int W,H;
bool inrange(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
#define MP make_pair
signed main(){
    int n;cin>>n;
    vector<int>vvataarneisAORIkaiwainotourist(n);
    vector<int>vvataarne(n);
    rep(i,n)cin>>vvataarne[i];
    rep(i,n)cin>>vvataarneisAORIkaiwainotourist[i];
    set<int>vvataarneiskitikuyarou;
    rep(i,n){
        vvataarneiskitikuyarou.insert(vvataarneisAORIkaiwainotourist[i]);
    }
    if(vvataarneiskitikuyarou.size()==n)return puts("Yes")*0;
    int cnt=INF;
    rep(i,n){
        if(vvataarneiskitikuyarou.count(vvataarne[i]))continue;
        cnt=i;
    }
    int safe;
    for(auto itr:vvataarneiskitikuyarou)safe= *itr;
    cout<<"No"<<endl;
    rep(i,n){if(i)cout<<" ";cout<<vvataarneisAORIkaiwainotourist[i];}
    cout<<endl;
    rep(i,n){
        if(i)cout<<" ";
        if(i==cnt){
            cout<<safe<<endl;
        }else cout<<vvataarneisAORIkaiwainotourist[i];
    }
    cout<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:45:47: error: invalid type argument of unary '*' (have 'long long int')
   45 |     for(auto itr:vvataarneiskitikuyarou)safe= *itr;
      |                                               ^~~~
Language: C++

#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
int W,H;
bool inrange(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
#define MP make_pair
signed main(){
    int n; cin>>n;
    vector<int>vvataarne(n); rep(i,n)cin>>vvataarne[i];
    vector<int>kitikuyarou(n); rep(i,n)cin>>kitikuyarou[i];
    set<int>vvhaAORIkaiwanotourist;
    rep(i,n)vvhaAORIkaiwanotourist.insert(kitikuyarou[i]);
    if(vvhaAORIkaiwanotourist.size()==n)return puts("Yes")*0;
    map<int,int>vvhasinntyokukaiwainotourist;
    rep(i,n)vvhasinntyokukaiwainotourist[kitikuyarou[i]]++;
    int safe=INF;
    puts("No");
    rep(i,n){
        if(i)cout<<" ";
        cout<<kitikuyarou[i];
    }
    cout<<endl;
    assert(safe!=INF);
    rep(i,n){
        if(i)cout<<" ";
        if(vvhasinntyokukaiwainotourist[vvataarne[i]])cout<<kitikuyarou[i]_;
        else cout<<vvataarne[i];
    }
    cout<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:75: error: expected ';' before '_'
   47 |         if(vvhasinntyokukaiwainotourist[vvataarne[i]])cout<<kitikuyarou[i]_;
      |                                                                           ^
      |                                                                           ;
Language: C++

n = int(input())
a = list(map(int, input().split()))
ans = ''
t1, t2 = [], []

for i in range(n):
    t1.append(a[i])
    t2.append(a[n-1-i])
    if sorted(t1) == sorted(t2):
        ans += str(i+1) + ' '
print(ans[:-1])



Compiler output:
a.cc:3:7: error: empty character constant
    3 | ans = ''
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

//座標圧縮して数えるだけ
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

void compress(vector<int> &a) {
	vector<int> sa; int i;
	for (i = 0; i < a.size(); i++) sa.push_back(a[i]);
	sort(sa.begin(), sa.end());
	sa.erase(unique(sa.begin(), sa.end()), sa.end());
	for (i = 0; i < a.size(); i++) a[i] = lower_bound(sa.begin(), sa.end(), a[i]);
}

int n;
vector<int> a;
int cnt[100000];

int main() {
	int i;
	
	cin >> n;
	a.resize(n);
	for (i = 0; i < n; i++) cin >> a[i];
	compress(a);
	
	int nozeroCnt = 0;
	vector<int> ans;
	for (i = 0; i < n; i++) {
		if (cnt[a[i]] == -1) nozeroCnt--; if (cnt[a[i]] == 0) nozeroCnt++;
		cnt[a[i]]++;
		if (cnt[a[n - 1 - i]] == 1) nozeroCnt--; if (cnt[a[n - 1 - i]] == 0) nozeroCnt++;
		cnt[a[n - 1 - i]]--;
		if (nozeroCnt == 0) {
			ans.push_back(i + 1);
		}
	}
	
	for (i = 0; i < ans.size(); i++) {
		cout << ans[i];
		if (i + 1 < ans.size()) cout << " ";
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void compress(std::vector<int>&)':
a.cc:12:58: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment
   12 |         for (i = 0; i < a.size(); i++) a[i] = lower_bound(sa.begin(), sa.end(), a[i]);
      |                                               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                          |
      |                                                          __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

#include<bits/stdc++.h>
#define int long long
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef pair<int,int>P;
int d[100009];
int main(){
	r(i,100009)d[i]=1e17;
	int n,m,s,t;
	cin>>n>>m>>s>>t;
	s--;t--;
	vector<P>v[100009];
	r(i,m){
		int a,b,c,w;
		cin>>a>>b>>c>>w;a--;b--;c--;
		v[a].push_back(P(b,w));
		v[b].push_back(P(a,w));
		v[c].push_back(P(b,w));
		v[b].push_back(P(c,w));
		v[a].push_back(P(c,w));
		v[c].push_back(P(a,w));
	}
	priority_queue<P,vector<P>,greater<P> >q;
	q.push(P(0,s));
	d[s]=0;
	while(!q.empty()){
		P p=q.top();q.pop();
		int now=p.second;
		int cost=p.first;
		if(d[now]<cost)continue;
		r(i,v[now].size()){
			int nex=v[now][i].first;
			int ncos=v[now][i].second+cost;
			if(d[nex]>ncos){
				d[nex]=ncos;
				q.push(P(ncos,nex));
			}
		}
	}
	cout<<d[t]<<endl;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: Java

HEISEI 1 1 8
HEISEI 31 4 30
HEISEI 31 5 1
HEISEI 99 12 31
HEISEI 38 8 30
HEISEI 98 2 22
HEISEI 2 3 26
HEISEI 28 4 23
#


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
HEISEI 1 1 8
^
Main.java:9: error: illegal character: '#'
#
^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){

    while(1){
        string s; cin >> s;
        if(s == "#") break;
        int y, m, d; cin >> y >> m >> d;
        string ans;
        if(y <= 30) ans = "HEISEI";
        else if(y >= 32){
            ans = "?";
            y -= 30
        }
        else{
            if(m <= 4) ans = "HEISEI";
            else{
                ans = "?";
                y -= 30;
            }
        }

        cout << ans << " " << y << " " << m << " " << d << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
   14 |             y -= 30
      |                    ^
      |                    ;
   15 |         }
      |         ~
Language: C++


Beta

  paiza.IO
 
Enter a title here
Main.cpp 
Success  
  
        
出力
入力
コメント 0
(0.00 sec)
 
HEISEI 1 1 8
HEISEI 31 4 30
? 1 5 1
? 69 12 31
? 8 8 30
? 68 2 22
HEISEI 2 3 26
HEISEI 28 4 23
 


Compiler output:
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |   
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
a.cc:2:1: error: 'Beta' does not name a type
    2 | Beta
      | ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T>& V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> >& Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T>& mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }
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);}
/*
 <url:>
 問題文============================================================
 =================================================================
 解説=============================================================
 ================================================================
 */

template<class Type>
Type solve(Type res = Type()){
    string g; int y,m,d;
    while(true){
        cin >> g;
        if(g == "#") break;
        cin >> y >> m >> d;
        if(y <= 30 || (y == 31 && m <= 4){
            cout << "HEISEI " << y << " " << m << " " << d << endl;
        }else{
            cout << "? " << y-30 << " " << m << " " << d << endl;
        }
    }
    
    return res;
}
int main(void) {
    cin.tie(0); ios_base::sync_with_stdio(false);
    solve(0);
    //cout << fixed << setprecision(15) << solve<ll>() << endl;
    return 0;
}



Compiler output:
a.cc: In function 'Type solve(Type)':
a.cc:31:42: error: expected ')' before '{' token
   31 |         if(y <= 30 || (y == 31 && m <= 4){
      |           ~                              ^
      |                                          )
a.cc:36:5: error: expected primary-expression before '}' token
   36 |     }
      |     ^
Language: Java

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

class Main{
	public static void main(String[] args)throws IOException{
	    
	    Scanner sc=new Sccanner(System.in);
		
		String line="";
		int[] abya;
		int s=0,g=0;
		int kosu=0;
		int Uryu=0;
		String[] pp;
		
		while(true){
			line=sc.next();
			if(line.equals("0 0 0")){
				break;
			}
			pp=line.split(" ");
			kosu=Integer.parseInt(pp[0]);
			abya=new int[kosu+1];
			s=Integer.parseInt(pp[1]);
			g=Integer.parseInt(pp[2]);
			Uryu=0;
			abya[kosu]=1;
			
			for(int i=0; i<kosu; i++){
				abya[i]=Integer.parseInt(bfr.readLine());
			}
			
			for(int i=s; i<=g; i++){
				for(int j=0; j<=kosu; j++){	//それぞれの条件のループを回す
					if(j%2==0){
						if(i%abya[j]==0){
							Uryu++;
							break;
						}
					}
					else if(j%2==1){
						if(i%abya[j]==0){
							break;
						}
					}
				}
			}
			System.out.println(Uryu);
		}
	}
}


Compiler output:
Main.java:12: error: cannot find symbol
	    Scanner sc=new Sccanner(System.in);
	    ^
  symbol:   class Scanner
  location: class Main
Main.java:12: error: cannot find symbol
	    Scanner sc=new Sccanner(System.in);
	                   ^
  symbol:   class Sccanner
  location: class Main
Main.java:35: error: cannot find symbol
				abya[i]=Integer.parseInt(bfr.readLine());
				                         ^
  symbol:   variable bfr
  location: class Main
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

class Main{
	public static void main(String[] args)throws IOException{
	    
	    Scanner sc=new Scanner(System.in);
		
		String line="";
		int[] abya;
		int s=0,g=0;
		int kosu=0;
		int Uryu=0;
		String[] pp;
		
		while(true){
			line=sc.next();
			if(line.equals("0 0 0")){
				break;
			}
			pp=line.split(" ");
			kosu=Integer.parseInt(pp[0]);
			abya=new int[kosu+1];
			s=Integer.parseInt(pp[1]);
			g=Integer.parseInt(pp[2]);
			Uryu=0;
			abya[kosu]=1;
			
			for(int i=0; i<kosu; i++){
				abya[i]=Integer.parseInt(bfr.readLine());
			}
			
			for(int i=s; i<=g; i++){
				for(int j=0; j<=kosu; j++){	//それぞれの条件のループを回す
					if(j%2==0){
						if(i%abya[j]==0){
							Uryu++;
							break;
						}
					}
					else if(j%2==1){
						if(i%abya[j]==0){
							break;
						}
					}
				}
			}
			System.out.println(Uryu);
		}
	}
}


Compiler output:
Main.java:36: error: cannot find symbol
				abya[i]=Integer.parseInt(bfr.readLine());
				                         ^
  symbol:   variable bfr
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)

int enzan(int num1,int num2,int clc){
  int numa[4];
  int numb[4];
  int ans[4];
  lp(i,4){
    numa[i]=0;
    numb[i]=0;
  }
  if(num1>=8){
    numa[0]=1;
    num1-=8;
  }
  if(num1>=4){
    numa[1]=1;
    num1-=4;
  }
  if(num1>=2){
    numa[2]=1;
    num1-=2;
  }
  if(num1>=1){
    numa[3]=1;
    num1-=1;
  }
  if(num2>=8){
    numb[0]=1;
    num2-=8;
  }
  if(num2>=4){
    numb[1]=1;
    num2-=4;
  }
  if(num2>=2){
    numb[2]=1;
    num2-=2;
  }
  if(num2>=1){
    numb[3]=1;
    num2-=1;
  }
  //  lp(i,4){
  //  cout<<numa[i];
  //}
  //cout<<endl;
  //lp(i,4){
  //  cout<<numb[i];
  //}
  //cout<<endl;

  lp(i,4){
    if(clc==1){
      if(numa[i]==1&&numb[i]==1) ans[i]=1;
      else ans[i]=0;
    }
    if(clc==2){
      if(numa[i]==numb[i]) ans[i]=0;
      else ans[i]=1;
    }
    if(clc==3){
      if(numa[i]==0&&numb[i]==0) ans[i]=0;
      else ans[i]=1;
    }
  }
  return ans[0]*8+ans[1]*4+ans[2]*2+ans[3]*1;
}


int change(string calc){
  while(1){
    int num=0,ca=0;
    int memo[2];
    //int hoge;
    //cout<<calc<<endl;
    //cin>>hoge;
    if(calc.size()==1) break;
    for(int i=0;i<calc.size();i++){
      if(calc[i]=='['){
	num=0;
	ca=0;
      }
      if(calc[i]=='*') ca=1;
      if(calc[i]=='^') ca=2;
      if(calc[i]=='+') ca=3;
      if('0'<=calc[i]&&calc[i]<='9'){
	memo[num]=calc[i]-'0';
	num++;
      }
      if('a'<=calc[i]&&calc[i]<='z'){
	memo[num]=calc[i]-'a'+10;
	num++;
      }
      if(calc[i]==']'){
	if(num==1){
	  calc.erase(i,1);
	  calc.erase(i-2,1);
	  break;
	}
	else if(num==2){
	  int memori=enzan(memo[0],memo[1],ca);
	  if(memori<=9){
	    calc[i-1]=memori+'0';
	    calc.erase(i-2,1);
	    calc.erase(i-3,1);
	  }
	  else{
	    calc[i-1]=memori-10+'a';
	    calc.erase(i-2,1);
	    calc.erase(i-3,1);
	  }
	  break;
	}
      }
    }
  }
  if('a'<=calc[0]&&calc[0]<='z') return calc[0]-'a'+10;
  return calc[0]-'0';
      if(mems==0) cout<<i<<endl;
}


int main(){
  while(1){
    string cast;
    cin>>cast;
    if(cast==".") break;
    int mez;
    cin>>mez;
    int xx[20];
    lp(i,20) xx[i]=0;
    int ansmemo;
    for(int i=0;i<10000;i++){
      string calc=cast;
      char a,b,c,d;
      a='0'+i/1000;
      b='0'+i%1000/100;
      c='0'+i%100/10;
      d='0'+i%10;
      lp(j,calc.size()){
	if(calc[j]=='a'){
	  calc[j]=a;
	}
	if(calc[j]=='b'){
	  calc[j]=b;
	}
	if(calc[j]=='c'){
	  calc[j]=c;
	}
	if(calc[j]=='d'){
	  calc[j]=d;
	}
      }
      int mems=change(calc);
      if(mez==i) ansmemo=mems;
      xx[mems]++;
    }
    cout<<ansmemo<<" "<<xx[ansmemo]<<endl;
  }
  return 0;
}
	 


Compiler output:
a.cc: In function 'int change(std::string)':
a.cc:121:10: error: 'mems' was not declared in this scope; did you mean 'memset'?
  121 |       if(mems==0) cout<<i<<endl;
      |          ^~~~
      |          memset
a.cc:121:25: error: 'i' was not declared in this scope
  121 |       if(mems==0) cout<<i<<endl;
      |                         ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>

using namespace std;
#define int long long int
const int INF = 1001001001001001LL;

int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};

string s;

int f(char a, char b, char c, char d, int l, int r){
    //cout << l << " " << r << endl;
    if(r == l){

        if(s[l] == 'a') return a - '0';
        if(s[l] == 'b') return b - '0';
        if(s[l] == 'c') return c - '0';
        if(s[l] == 'd') return d - '0';
    }
    
    char op = s[l + 1];
    //cerr << op << endl;
    int x, y;
    l += 2;
    if(s[l] != '['){
        x = f(a, b, c, d, l, l);
        l++;
    }else{
        int nr = l;
        while(s[nr] != ']'){
            nr++;
        }
        x = f(a, b, c, d, l, nr);
        l = nr + 1;
    }

    
    if(s[l] != '['){
        y = f(a, b, c, d, l, l);
        l++;
    }else{
        int nr = l;
        while(s[nr] != ']'){
            nr++;
        }
        y = f(a, b, c, d, l, nr);
        l = nr + 1;
    }

    int ret;
    if(op == '+') ret = x | y;
    else if(op == '*') ret = x & y;
    else(op == '^') return x ^ y;
    

    //cerr << op << " " << x << " " << y << " " << ret << endl;
    return ret;

}

signed main(){
    
    //cin >> s;
    //cout << f('0', '4', '0', '4', 0, s.size()) << endl;
    
    while(1){
        cin >> s;
        if(s == ".") break;
        string p; cin >> p;
        int n = s.size();

        int val = f(p[0], p[1], p[2], p[3], 0, n - 1);
        int ans = 0;
        
        for(char a = '0'; a <= '9'; a++){
            for(char b = '0'; b <= '9'; b++){
                for(char c = '0'; c <= '9'; c++){
                    for(char d = '0'; d <= '9'; d++){
                        if(val == f(a, b, c, d, 0, n - 1)) ans++;
                    }
                }
            }
        }

        cout << val << " " << ans << endl;
    }

    return 0;
}



Compiler output:
a.cc: In function 'long long int f(char, char, char, char, long long int, long long int)':
a.cc:78:20: error: expected ';' before 'return'
   78 |     else(op == '^') return x ^ y;
      |                    ^~~~~~~
      |                    ;