criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.lang.*;
import java.util.*;
class Solution {
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		int[] count=new int[t+1];
		for (int i=0;i<t;i++) {
			temp=sc.nextInt();
			count[temp]++;
		}
		for (int i=1;i<=t ;i++ ) {
			System.out.print(count[i]+" ");
		}
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
			temp=sc.nextInt();
			^
  symbol:   variable temp
  location: class Solution
Main.java:10: error: cannot find symbol
			count[temp]++;
			      ^
  symbol:   variable temp
  location: class Solution
2 errors
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include <cmath>
#include<queue>
#include<cstdio>
//#include <bits/stdc++.h>
using namespace std;

int main(){
    long int N;
    cin>>N;
    long int A[N-1];
    for (long int i=0;i<N-1;i++){
        cin>>A[i];
    }
    sort(A,A+N-1);
    long int j=1,k=0;
    for (long int i=0;i<N-1;i++){
        if (A[i]!=j){
            cout<<i-k<<endl;
            k=i;
            j+=1;
            while (j!=A[i]){
                if (A[i]!=j){
                    j+=1;
                    cout<<0<<endl;
                    break;
                }
                if (j>N) break;
            }
        }
    }
    cout<<N-1-k<<endl;
    //cout<<j<<"qqq"<<endl;
    for (long int i=j+1;i<=N;i++){
        cout<<0<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   18 |     sort(A,A+N-1);
      |     ^~~~
      |     sqrt
Language: C++

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

int main() {
  int N;
  vec<int> vec(N - 1)
  for (int = 0; i < N - 1; i++) {
    cin >> vec.at(i);
}
    
  int count = 0;
  
  for (int i = 1; i <= N ; i++) {
    for (int j = 0; j < N - 1; j++) {
      if (vector.at(j) == i) {
        count++;
      }
    }
    cout << count <<endl;
  }
}
    
    
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vec' was not declared in this scope
    6 |   vec<int> vec(N - 1)
      |   ^~~
a.cc:6:7: error: expected primary-expression before 'int'
    6 |   vec<int> vec(N - 1)
      |       ^~~
a.cc:7:17: error: 'i' was not declared in this scope
    7 |   for (int = 0; i < N - 1; i++) {
      |                 ^
a.cc:15:17: error: expected unqualified-id before '.' token
   15 |       if (vector.at(j) == i) {
      |                 ^
Language: Java

import java.lang.*;
importjava.util.*;
class Solution {
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		int[] count=new int[t+1];
		for (int i=0;i<t;i++) {
			count[sc.nextInt()]++;
		}
		for (int i=1;i<=t ;i++ ) {
			System.out.print(count[i]+" ");
		}
	}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
importjava.util.*;
^
1 error
Language: Java

class Solution {
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		int[] count=new int[t+1];
		for (int i=0;i<t;i++) {
			count[sc.nextInt()]++;
		}
		for (int i=1;i<=t ;i++ ) {
			System.out.println(count[i]);
		}
	}
}

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

int main() {
    int N;
    cin >> N;
    vector<int> S(N), a(N);
    //S.at(0) = 0;
    //for(int i = 1; i<N; ++i) cin >> S.at(i);
    rep(i, N-1) cin >> S.at(i);
    S.insert(S.begin(), 0);
    //rep(i, N) cout << S.at(i);
    int cnt;
    rep(i, N){
        cnt = 0;
        rep(j, N) if (S.at(j) == i+1) cnt++;
        a.at(i) = cnt;
    }
    
    rep(i, N) cout << a.at(i) << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<int> S(N), a(N);
      |     ^~~~~~
a.cc:4:12: error: expected primary-expression before 'int'
    4 |     vector<int> S(N), a(N);
      |            ^~~
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     rep(i, N-1) cin >> S.at(i);
      |         ^
a.cc:7:5: error: 'rep' was not declared in this scope
    7 |     rep(i, N-1) cin >> S.at(i);
      |     ^~~
a.cc:8:5: error: 'S' was not declared in this scope
    8 |     S.insert(S.begin(), 0);
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N;
    cin >> N;
    int A[N], B[N];
    for (int i = 1; i < N; ++i){
        B[i] = 0;
        cin >> A[i+1];
    }
    B[N] = 0;
    for (int j=1; j<N; ++j){
        ++B[A[j+1]];
    }
    for (int k=1; k<N+1; ++k){
        cout << B[j] << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'j' was not declared in this scope
   17 |         cout << B[j] << endl;
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,count=0;
    cin>>n;
    int arr[n-1];
    for (int i = 0; i < n-1; i++)
    {
        cin>>arr[i];
    }
    for (int i = 1; i <= n;)
    {
        count=0;
       for (int j = 0; j < n-1; j++)
       {
           if(arr[j]==i)
           {count++;i++}
           else
           break;
       }
        cout<<count<<endl;  
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before '}' token
   18 |            {count++;i++}
      |                        ^
      |                        ;
Language: C

#include<bits/stdc++.h>
using namespace std;
int a,c;
int main(){
  cin>>a;
  vector<int> b(a);
  for(int i=0;i<a-1;i++)cin>>c;b[c-1]++;
  for(int i=0;i<a;i++)cout<<b[i]<<endl;
} 

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, x, Si, i;
  x = 1;
  Si = 0;
  cin >> N;
  for (i = 1; i < N) {
    int A;
    cin >> A;
  if (A == x){
    Si++;
  }
  else {
    x++;
    cout << Si << endl;
  }
    i++;
  }
}
    
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before ')' token
    9 |   for (i = 1; i < N) {
      |                    ^
      |                    ;
Language: Java


import java.util.Scanner;

public class C {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int []arr=new int [N];
		for(int k=1;k<=N-1;k++) {
			int c=sc.nextInt();
			arr[c]++;
		}
		for (int i=1 ;i<arr.length ;i++) {
			System.out.println(arr[i]);
		}
	}
}


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

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

public class Main1 {
	public static void main (String[] args) {
		int x;
		int y;
		int z;
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
//		String num = scan.nextLine();
//		String[] numbers = num.split(" ");
//		x = Integer.parseInt(numbers[0]);
//		y = Integer.parseInt(numbers[1]);
//		z = Integer.parseInt(numbers[2]);
		Scanner sca = new Scanner(System.in);
		String A = sca.nextLine();
//		System.out.println(A);
		String[] a = A.split(" ");
		ArrayList<Integer> number = new ArrayList<>();
		for(int i = 0; i<a.length+1; i++) {
			number.add(0);
		}
//		int[] num =  new int[a.length+1];
		for(int i = 0; i<a.length; i++) {
			number.set(Integer.parseInt(a[i])-1,number.get(Integer.parseInt(a[i])-1)+1);
		}

		for(int ans : number) {
			System.out.println(ans);
		}
	}
}

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

#include<bits/stdc++.h>
#include<math.h>
using namespace std;
#define int long long int
int i,j;
 main()
{
  int n;
  cin>>n;
  int a[n+1];
  a[0]=0; int b[n]={0};
  for(i=1;i<n;i++) { cin>>a[i];}

  a[n]=-1; int no=0;
  int k=0,m=0;
k=1;
  for(i=0;i<n;i++)
  {

         if(a[i]==a[i+1]) k++;

5
1 1 2 2
    else  { b[no++]=k; k=1; }
  }
  for(i=1;i<n;i++) cout<<b[i]<<endl;
  cout<<0<<endl;
  }



Compiler output:
a.cc:6:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 |  main()
      |  ^~~~
a.cc: In function 'int main()':
a.cc:22:2: error: expected ';' before numeric constant
   22 | 5
      |  ^
      |  ;
   23 | 1 1 2 2
      | ~
Language: C

#include<stdio.h>
int main(void){
	int N,i,j;
	scanf("%d",&N);
	int A[N-1];
	int num[N],ans[N];
	for(i=0;i<N-1;i++){
		scanf("%d",&A[i]);
		ans[i]=0;
		num[i]=i+1;
		}
	ans[i]=0;
	num[i]=i+1;
	for(i=0;i<N-1;i++){
		for(j=0;j<N;j++){
			if(A[i]==num[j])
				ans[num[j]-1]++;
		}
	}
	for(i=0;i<N;i++)
		printf("%d\n",ans[i]);
	return 0;

Compiler output:
main.c: In function 'main':
main.c:22:9: error: expected declaration or statement at end of input
   22 |         return 0;
      |         ^~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  ll N;
  ll count=1;
  cin>>N;
  vector<ll> vec(N-1);
  for(ll i=1;i<N;i++){
    cin>>vec.at(i-1);
  }
  for(ll j=1;j<=N-2;j++){
    if(vec.at(j)==vec.at(j-1)){count++;}
    if(vec.at(j)!=vec.at(j-1)){cout<<count<<endl;count=1;}
    if(vec.at(j)!=vec.at(j-1)+1 && vec.at(j)!=vec.at(j-1)){for(ll a=1;a<vec.at(j)-vec.at(j-1);a++)cout<<0<<endl;}
  }
  cout<<count<<endl;
  for(ll k=1;k<=N-vec.at(N-2);k++){
  cout<<0<<endl;
  }
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i = 0; i<(ll)(n); i++)
#define REPS(i,n) for (ll i = 1; i<=(ll)(n); i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353

int main(){
	ll n;
	ll a;
	vector<ll> buka(220000);
	vector<ll> joshi(220000);
	cin >> n;
	FOR(i,2,n){
		cin >> a;
		joshi[i]++;
		buka[a]++;
	}
	FOR(i,1,n){
		cout << buka[i] << endl;
	}
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  vector<int> A(N);
  vector<int>date(N);
  int count=0;
  for(int i=0;i<N-1;i++){
  cin>>A.at(i);
  }
  for(int i=0;i<N-1;i++){
  for(int j=1;j<=N;j++){
   
     
    
    if(A.at(i)==j){
  if(A.at(i+1)!=A.at(i)){
 
    date.push_back(count);
    
  }
   
      count++;
      
    
      if(A.at(i)!=j){
      date.push_back(0);
      
      }
    
    
  }
    
  
    
  }
  }
 for(int k=0;k<N;k++){
 cout<<date.at(k)<<endl;
 }
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  cin>>N;
  int A;
  for(int i=1;i<N;i++){
    int ans=0;
  for(int a=0;a<;a++){
    if(A[a]==i){
      ans++;
    }
    cout<<ans<<endl;
  }
  }
    
   


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before ';' token
   10 |   for(int a=0;a<;a++){
      |                 ^
a.cc:11:9: error: invalid types 'int[int]' for array subscript
   11 |     if(A[a]==i){
      |         ^
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

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


int main() {
  int N;
  cin >> N;

  vector<int> A(N), vec(N);

  for(int i=0;i<N-1;i++){
    cin >> A.at(i);
    vec.at(A.at(i)-1) ++;
  }
/*
  for(int i=0;i<N-1;i++){
      for(int j=0;j<N-1;j++){
        if(i == A.at(j)-1){
          vec.at(i)++;
        }
      }
  }
*/
  for(int i=0;i<N;i++){
    cout << vec.at(i) << endl;
  }

/*
  map<char, int> A(N);
  for(int i=0;i<N;i++){
    A()
  }
*/
}

  


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  vector<int> A(N);
  int count=0;
  for(int i=0;i<N-1;i++){
  cin>>A.at(i);
  }
  for(int i=0;i<N-1;i++){
  for(int j=1;j<=N;j++){
   vector<int>date(N);
     
    
    if(A.at(i)==j){
  if(A.at(i+1)!=A.at(i)){
 
    date.push_back(count);
    
  }
   
      count++;
      
    
      if(A.at(i)!=j){
      date.push_back(0);
      
      }
    
    
  }
    
  
    
  }
  }
 for(int k=0;k<N;k++){
 cout<<date.at(k)<<endl;
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:8: error: 'date' was not declared in this scope
   38 |  cout<<date.at(k)<<endl;
      |        ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  cin>>N;
  int A;
  for(int i=1;i<N;i++){
    int ans=0;
  for(int a=0;a<N,a++){
    if(A[a]==i){
      ans++;
    }
    cout<<ans<<endl;
  }
  }
   


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before ')' token
   10 |   for(int a=0;a<N,a++){
      |                      ^
      |                      ;
a.cc:11:9: error: invalid types 'int[int]' for array subscript
   11 |     if(A[a]==i){
      |         ^
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include<cstdio>
#include<cstring>
#include<string>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<queue>
#include<map>
#include<ctime>

using namespace std;

template <typename T>

inline T read()
{
	T x=0,f=1;char c=getchar();
	while(!isdigit(c))
	{if(c=='-') f=-f;c=getchar();}
	while(isdigit(c))
	{x=(x<<3)+(x<<1)+(c-48);c=getchar();}
	return x*f;
}

#define lint long long int
#define ulint unsigned lint

const int inf=1e9+1e7;
const int MAXN=1e6+1e1;

int a[MAXN];

int n;

int main(void)
{

	// freopen("testdata.in","r",stdin);
	// freopen("testdata.out","w",stdout);

	scanf("%d",&n);

	for(int i=1;i<n;i++) ++a[read<int>()];

	for(int i=1;i<=n;i++) printf("%d\n",a[i]);

	return 0;

}


Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

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

int main() {
  int n;
  cin >> n;
  vector<int> a(n,0);
  vector<int> b(n,0);
  for(int i=1;i<n;i++){
    cin >> a.at(i);
    b.at(a.at(i)-1)++;
  }
  
  for(int i=0;i<n;i++){
    cout << b.at(i) << endl;
  }
  return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, x, Si, i;
  x = 1;
  Si = 1;
  cin >> N;
  for (i = 1; i < N; i++) {
    int A;
    cin >> A;
  if (A == x){
    Si++;
  }
  else {
    x++;
    cout << Si << endl;
  }
}
    
    
  


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

#include <bits/stdc++.h>
#include <algorithm>

using namespace std;
int main()
{
  int N;
  cin>>N;
  int A[N-1];
  int i;long x=0;
  for(i=0;i<N-1;i++)
    cin>>A[i];
  for(i=0;i<N-1;i++)
  {
      x=count(A+x,A+(N-1),i+1)<<endl;
    cout<<x<<endl;
  }
  cout<<0<<endl;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: invalid operands of types 'std::iterator_traits<int*>::difference_type' {aka 'long int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |       x=count(A+x,A+(N-1),i+1)<<endl;
      |         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C

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

int main() {
    int N , M ;
    cin >> N ;
    vector<int> vec(N-1);
    vector<int> vec2(N);
    for (int i = 0; i < N-1; i++) {
        cin >> vec.at(i);
        for (int j = 0; j < N; j++) {
            if(j+1 == vec[i]) vec2[j] ++;  
        }

    }
    for (int j = 0; j < N; j++) { 
            cout << vec2[j] << endl ;
        }
   
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,i,j;
    cin>>a;
    int s[a],ss=0,d=0;
    for(i=0; i<a-1; i++)
    {
        cin>>s[i];

    }
    for(i=0; i<a-1; i++)
    {
        if(s[i]!=s[i+1])
            d++;
        if(s[i]==1)
            ss++;
    }
    for(i=0; i<d; i++)
    {
        cout<<ss<<endl;
    }
    for(i=0; i<a-d; i++)
        cout<<"0"<<endl;
    return 0;
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main()
{
    long n;
    cin >> n;

    long a[n];
    long sub[n];
    sub[o] = 0;

    for (long i = 1; i < n; i++)
    {
        cin >> a[i];
        sub[i] = 0;
    }

    for (long i = 1; i < n; i++)
    {
        sub[a[i] - 1]++;
    }

    for (long i = 0; i < n; i++)
    {
        cout << sub[i] << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'o' was not declared in this scope
   11 |     sub[o] = 0;
      |         ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
int main() {
  int n,k;
  cin >> n;
  vector<int> a(n);
  vector<int> b(n);
  rep(i,n-1) {
    cin >> a.at(i);
    }
  rep(i,n-1) {
      b.at(a.at(i)-1)++;
  }
  rep(i,n) {
    cout << b.at(i) <<endl;
  }
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <algorithm>

using namespace std;
int main()
{
  int N;
  cin>>N;
  int A[N-1];
  int i,x=0;
  for(i=0;i<N-1;i++)
    cin>>A[i];
  for(i=0;i<N-1;i++)
  {
    long  x=count(A+x,A+(N-1),i+1)<<endl;
    cout<<x<<endl;
  }
  cout<<0<<endl;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: invalid operands of types 'std::iterator_traits<int*>::difference_type' {aka 'long int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |     long  x=count(A+x,A+(N-1),i+1)<<endl;
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C

#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int N;
	vector<int> A;

	cin >> N;

	A.resize(N-1);

	for (int i = 0; i < N-1; i++)
	{
		cin >> A[i];
	}
	
	sort(A.begin(), A.end());
	int buf=1, count=0, couc = 0;

	for (int i = 0; i < N - 1; i++)
	{
		if (buf != A[i]) 
		{
			cout << count << endl;
			count = 1;
			couc++;
		}
		else
			count ++ ;

		if (i == N-2)
		{
			cout << count << endl;
			couc++;
		}

		buf = A[i];
	}
	for (int i = 0; i < N-couc; i++)
	{
		cout << 0 << endl;
	}

	return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  cin>>N;
  int A;
  for(int i=1;i<N;i++){
    int ans=0
    if(A[i]==i){
      ans++;
    }
    cout<<ans<<endl;
  }
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'if'
   10 |     if(A[i]==i){
      |     ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
 	long long int n,i;
 	cin>>n;
 	long long int a[n],b[n]={0};
 	for(i=1;i<n;i++)
 	{
 		cin>>a[i];11
	 }
 	for(i=0;i<n;i++)
 	{
 		for(int j=1;j<n;j++)
 		{
 			if(a[j]==i+1)
 			b[i]++;
		 }
	}
	for(i=0;i<n;i++)
	{
		cout<<b[i]<<"\n";
	}
  
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before '}' token
   10 |                 cin>>a[i];11
      |                             ^
      |                             ;
   11 |          }
      |          ~
Language: C++

#include<stdio.h>
int main()
{
	int N,i,j,cnt;
	scanf("%d",&N);
	int a[N],b[N];
	
	for(i=0;i<N;i++)
	{
		b[i] = 0;
	}
	
	
	
	for(i=1;i<N;i++)
	{
		scanf("%d",&a[i]);
		for(j=1;j<=N;j++)
		{
			if(a[i]==j) b[j]++;
		}
	}
	
	for(i=1;i<N;i++)
	{
		printf("%d\n",ba[i]);
	}
	
	printf("0");
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:31: error: 'ba' was not declared in this scope; did you mean 'b'?
   26 |                 printf("%d\n",ba[i]);
      |                               ^~
      |                               b
Language: C

#include <bits/stdc++.h>

#define st              first
#define nd              second
#define pb              push_back
#define lwb             lower_bound
#define upb             upper_bound
#define all(a)          (a).begin(), (a).end()
#define Reset(s, n)     memset(s, n, sizeof(s))
#define Sz(a)           int((a).size())
#define Max(a, b, c)    max(max((ll)(a), (ll)(b)), (ll)(c))
#define Min(a, b, c)    min(min((ll)(a), (ll)(b)), (ll)(c))
#define Unique(a)       (a).resize(unique(all(a)) - (a).begin())
#define bit(n, i)       (((n) >> (i)) & 1)
#define cntbit(n)       __builtin_popcountll(n)

using namespace std;

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;

const int MOD = 1e9 + 7;
const ll INF = 1e9;
const ld PI = acos((ld) -1);
const ld EPS = 1e-12;
inline bool isPrime (ll x){ if(x <= 1) return 0; if(x <= 3) return 1; if (!(x % 2) || !(x % 3)) return 0; ll s = sqrt(1.0 * x) + EPS; for(ll i = 5; i <= s; i += 6){if (!(x % i) || !(x % (i + 2))) return 0;}return 1;}
inline ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
inline int inv(int a, ll p = MOD) {return fpow(a, p - 2, p);}
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline void onbit(ll &a, int i){a |= 1LL << i;}
inline void offbit(ll &a, int i){onbit(a, i), a -= (1LL << i);}

const int N = 2e5 + 5;

int n, m, k;


void solve(){
   cin >> n;
   std::vector<int> v(n + 1, 0);
   for(int i = 1; i < n; i++){
    int x;
    cin >> x;
    v[x]++;
   }
   for(int i = 1; i <= n; i++) cout << v[i] << "\n";
}

int main(){
   ios_base::sync_with_stdio(0);
   cin.tie(0); cout.tie(0);
   cout << fixed << setprecision(10);
   //    freopen("input.txt", "r", stdin);
   //    freopen("output.txt", "w", stdout);
   int query = 1;
   // cin >> query;
   int start = 1000 * clock() / CLOCKS_PER_SEC;
   while(query--) solve();
   cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC  - start << "ms\n";
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(){
  int N;
  scanf("%d\n",&N);
  int i,j;
  int a[200000];
  for(i = 2; i < 200000 ; i++){
    scanf("%d",&a[i]);
  }
  
  int count[200000] = 0;
  for(i = 1; i < 200000 ; i++){
    
    for(j = 2; j < 200000 ; j++){
      if(i == a[j])
        count[i] = count[i] + i;
    }
    printf("%d\n",count[i]);
  }
}

Compiler output:
main.c: In function 'main':
main.c:12:23: error: invalid initializer
   12 |   int count[200000] = 0;
      |                       ^
Language: C

import numpy as np
import collections

n =  int(input())
a = list(map(int,input().split()))

all = np.zeros(n+1)

c = collections.Counter(a)

for ans in c.values():
    print(ans)
o = len(c)

for i in range(n-o):
    print(0)

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import numpy as np
      | ^~~~~~
main.c:1:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'as'
    1 | import numpy as np
      |              ^~
main.c:1:14: error: unknown type name 'as'
Language: C


import java.util.*;
class  Main{
      public static void main(String[] args) {
          Scanner scan = new Scanner(System.in);
         
          int N= scan.nextInt();
          int arr[] =  new int[N];
          for(int i=1;i<N;i++)
               arr[i]= scan.nextInt();

          int count=1;
          int prevval=0;
          int val = arr[1];
          int num=0;
          for(int i=1;i<N-1;i++){
              
              if(prevval<val&&val==arr[i+1]){
                  count++;
                  
              }
              else{
                  val = arr[i+1];
                  if(prevval>val){
                      System.out.println(0);

                  }
                  else{
                    System.out.println(count);
                  }
                 
                  count=1;
                  prevval=arr[i];
                  num++;
              }

          } 
          if(prevval>val){
            count=0;
        }
          while(num!=N){
              num++;
             
            System.out.println(count);
            
            count=0;
            
          }     
          
   }
}

Compiler output:
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.*;
      |            ^
main.c:3:1: error: unknown type name 'class'
    3 | class  Main{
      | ^~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class  Main{
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N;
  cin>>N;
  int A[N-1];
  int i;
  for(i=0;i<N-1;i++)
    cin>>A[i];
  for(i=0;i<N-1;i++)
  {
    cout<<count(A,A+(N-1),i+1)<<endl;
  }
  cout<<0<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'count' was not declared in this scope
   13 |     cout<<count(A,A+(N-1),i+1)<<endl;
      |           ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N;
  cin>>N;
  int A[]=new int [N-1];
  int i;
  for(i=0;i<N-1;i++)
    cin>>A[i];
  for(i=0;i<N-1;i++)
  {
    cout<<count(A,A+(N-1),i+1)<<endl;
  }
  cout<<0<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: initializer fails to determine size of 'A'
    7 |   int A[]=new int [N-1];
      |           ^~~~~~~~~~~~~
a.cc:7:11: error: array must be initialized with a brace-enclosed initializer
a.cc:13:11: error: 'count' was not declared in this scope
   13 |     cout<<count(A,A+(N-1),i+1)<<endl;
      |           ^~~~~
Language: C

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

int main() {
    int N, i;
    cin >> N;
    vector<int> emp(N - 1);
    vector<int> boss(N);
    for (i = 0; i < N - 1; i++) {
        cin >> emp.at(i);
        boss.at(emp.at(i) - 1)++;
    }
    
    for (i = 0; i < N; i++) {
        cout << boss.at(i) << endl;
    }
    
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

#define ll long long
#define INF 99999999
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()



int main()
{
   int N;

   cin >> N;

   vector<int> s(N);
   vector<int> res(N);


   for( int i = 2; i <= N; i++ )
   {
       cin >> s[i];

       res[s[i]] += 1;

   }


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

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

N = int(input())
array = list(map(int, input().strip().split()))
array.sort
ansarray = []
ansnum = 1
ans = 0
ansindex = 0
for i in range (1,N+1):
    for j in range(ansindex,N-1):
        if (array[j] == i):
            ans += 1
            ansindex += 1
        else:
            ansarray.append(ans)
            ans = 0
            break
        if(j == N-2):
            ansarray.append(ans)
for i in range(N-len(ansarray)):
    ansarray.append("0")
for i in range(N):
    print(ansarray[i])

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | N = int(input())
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  
  vector<int> a(n-1);
  for(int = 0; i < n-1; i++) cin >> a[i];
  
  vector<int> b(n-1);
  
  for(int i = 0; i < n-1; i++) b[a[i]] += 1;
  
  for(int i = 0; i < n-1; i++) cout << b[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected unqualified-id before '=' token
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |           ^
a.cc:9:10: error: expected ';' before '=' token
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |          ^~
      |          ;
a.cc:9:11: error: expected primary-expression before '=' token
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |           ^
a.cc:9:16: error: 'i' was not declared in this scope
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |                ^
a.cc:9:23: error: expected ')' before ';' token
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |      ~                ^
      |                       )
a.cc:9:25: error: 'i' was not declared in this scope
    9 |   for(int = 0; i < n-1; i++) cin >> a[i];
      |                         ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include <cmath>
#include<queue>
#include<cstdio>
//#include <bits/stdc++.h>
using namespace std;

int main(){
    long int N;
    cin>>N;
    long int A[N-1];
    for (long int i=0;i<N-1;i++){
        cin>>A[i];
    }
    sort(A,A+N-1);
    long int j=1,k=0;
    for (long int i=0;i<N-1;i++){
        if (A[i]!=j){
            cout<<i-k<<endl;
            k=i;
            j+=1;
        }
    }
    cout<<N-1-k<<endl;
    for (long int i=j+2;j<=N-1;j++){
        cout<<0<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   18 |     sort(A,A+N-1);
      |     ^~~~
      |     sqrt
Language: C++

#include <iostream>
using namespace std;

int main() {
	int N;
	int i, j, k;
	int A[200000];
	int c;
	cin >> N;
	cout << '\n';
	for (i = 2; i <= N; i++) {
		cin >> A[i];
	}
	for (j = 1; j <= N; j++) {
		c = 0;
		for (k = 2; k <= N; k++) {
			if (j == A[k]) c += 1;
		}
		cout << c << '\n';
	}

	return 0;
}


#include <iostream>
using namespace std;

int main() {
	int c100 = 1;
	int c9 = 1;
	int i, j;
	int N, K;

	for (i = 1; i <= 100; i++) {
		c100 *= 10;
	}
	for (j = 1; j <= 9; j++) {
		c9 *= 10;
	}
	cin >> N >> K;
	cout << '\n';



	return 0;
}

Compiler output:
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

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

int main() {
 int N;
 cin >> N;
 vector<int> vec(N-1);
 vector<int> No(N,0);
 for (int i=1; i <= (N-1); i++) {
 cin >> vec.at(i);
 }
 for (int j=0; j<=N; j++) {
   No.at(j)= count(vec.begin(), vec.end(), j);
   cout << No.at(j) << endl;
}


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

#include <iostream>
using namespace std;

int main(){
  int N;
  
  cin >> N;
 
  int A[N-1];
  int B[N];
  
  for(int i = 0; i < N-1; i++){
    cin >> A[i];
  }
  
  for(i = 0; i < N; i++){
    B[i] = 0;
    for(int j = 0; j < N-1; j++){
      if(A[j] == i + 1){
        B[i]++;
      }
    }
    cout << B[i] << endl;
  }
}
  
    
    
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   for(i = 0; i < N; i++){
      |       ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  int A[200005];
  int B[200005];
  cin >> N;
  for(int i = 1; i <= N; ++i)B[i] = 0;
for( int i = 2; i <= N; ++i){
  cin >> A[i];
  int p = A[i];
  B[p] += 1;
}
for( int i = 1; i <= N; ++i)cout << B[i] ¥n << endl;
}


Compiler output:
a.cc:14:42: error: extended character ¥ is not valid in an identifier
   14 | for( int i = 1; i <= N; ++i)cout << B[i] ¥n << endl;
      |                                          ^
a.cc: In function 'int main()':
a.cc:14:41: error: expected ';' before '\U000000a5n'
   14 | for( int i = 1; i <= N; ++i)cout << B[i] ¥n << endl;
      |                                         ^~~
      |                                         ;
Language: C

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

int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for(int i = 0; i < n - 1; i++) {
    int a;
    cin >> a;
    vec.at(a - 1)++;
  }
  for(int i = 0; i < n; i++) {
    cout << vec.at(i) << endl;
  }
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

#define ALL(obj) (obj).begin(),(obj).end()
#define SPEED cin.tie(0);ios::sync_with_stdio(false);

template<class T> using PQ = priority_queue<T>;
template<class T> using PQR = priority_queue<T,vector<T>,greater<T>>;

constexpr long long MOD = (long long)1e9 + 7;
constexpr long long MOD2 = 998244353;
constexpr long long HIGHINF = (long long)1e18;
constexpr long long LOWINF = (long long)1e15;
constexpr long double PI = 3.1415926535897932384626433L;

template <class T> vector<T> multivector(size_t N,T init){return vector<T>(N,init);}
template <class... T> auto multivector(size_t N,T... t){return vector<decltype(multivector(t...))>(N,multivector(t...));}
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) {o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o;}
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const multiset<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) {o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o;}
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) {o << "{" << obj.first << ", " << obj.second << "}"; return o;}
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
void print(void) {cout << endl;}
template <class Head> void print(Head&& head) {cout << head;print();}
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) {cout << head << " ";print(forward<Tail>(tail)...);}
template <class T> void chmax(T& a, const T b){a=max(a,b);}
template <class T> void chmin(T& a, const T b){a=min(a,b);}
void YN(bool flg) {cout << (flg ? "YES" : "NO") << endl;}
void Yn(bool flg) {cout << (flg ? "Yes" : "No") << endl;}
void yn(bool flg) {cout << (flg ? "yes" : "no") << endl;}

int main() {
    int N; cin >> N;
    vector<int> par(N,0);
    for(int i = 1; i < N; ++i) {
        int a; cin >> a;
        a--;
        par[a]++;
    }
    for(int i = 0; i < N; ++i) cout << par[i] << endl;



    return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public static void main(String args[]){
  Scanner scan = new Scanner(System.in);
  
  int n = scan.nextInt();
  int sup[] = new int[n];
  int ans[] = new int[n];
  for(int i = 0; i<n; i++){ //初期化
    sup[i] = scan.nextInt();
    ans[i] = 0;
  }
  for(int i = 0; i< n; i++){
    ans[sup[i]]++;
  }
  for(int i = 0; i< n; i++){
    System.out.println(ans[i]);
  }
}


Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String args[]){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

from sys import stdin

def main():

    input = stdin.readline

    N = int(input())
    A = list(map(int,input().split()))
    ans = [0] * N

    for i in range(N-1):
        ans[A[i]-1] += 1

    for i in ans:
        print(i)
    

if __name__ == "__main__":
    main()

Compiler output:
main.c:1:1: error: unknown type name 'from'
    1 | from sys import stdin
      | ^~~~
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    1 | from sys import stdin
      |          ^~~~~~
main.c:1:10: error: unknown type name 'import'
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>

int main() {
	int N;
	std::cin >> N;  
  	std::vector<int> data(N-1);
  
  	for(int i = 0; i < N-1; ++i) {
		std::cin >> data[i];
    }

	auto ret = data;
	for(int i = 0; i < data.size()-1; ++i)
		ret[i] = std::countif(data.begin()+i,data.end(),[](int n, int cn){return n-1==cn;});
  	ret[ret.size()-1] = 0;
  
	for(auto&& e : ret)
      std::cout << e << std::endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'countif' is not a member of 'std'; did you mean 'count_if'?
   16 |                 ret[i] = std::countif(data.begin()+i,data.end(),[](int n, int cn){return n-1==cn;});
      |                               ^~~~~~~
      |                               count_if
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(void){
  int i,m=0,s=2;
  cin>>i;
  string a[i];
  cin>>a[i];
  for(s>1;s<i;s++)
  {
  	if(s+1>s)
  	  m++;
  }
  cout<<a[i]<<endl; 
  return 0;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int main
{
   long int a; cin >> a;
   const int b = a + 1;
   int c[b]; int d[b] = {0};
   for (int i = 2; i < a; i++) {
     cin >> c[i]; }
     for (int i = 2; i < a; i++) {
     d[c[i]] += 1; }
     for (int i = 1; i < a; i++) {
       cout << d[i] << '\n'; }
       }
       
       
       

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main
      |     ^~~~
a.cc:7:4: error: expected primary-expression before 'long'
    7 |    long int a; cin >> a;
      |    ^~~~
a.cc:7:4: error: expected '}' before 'long'
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
a.cc:7:16: error: 'cin' does not name a type
    7 |    long int a; cin >> a;
      |                ^~~
a.cc:8:18: error: 'a' was not declared in this scope
    8 |    const int b = a + 1;
      |                  ^
a.cc:9:10: error: size of array 'c' is not an integral constant-expression
    9 |    int c[b]; int d[b] = {0};
      |          ^
a.cc:9:20: error: size of array 'd' is not an integral constant-expression
    9 |    int c[b]; int d[b] = {0};
      |                    ^
a.cc:10:4: error: expected unqualified-id before 'for'
   10 |    for (int i = 2; i < a; i++) {
      |    ^~~
a.cc:10:20: error: 'i' does not name a type
   10 |    for (int i = 2; i < a; i++) {
      |                    ^
a.cc:10:27: error: 'i' does not name a type
   10 |    for (int i = 2; i < a; i++) {
      |                           ^
a.cc:12:6: error: expected unqualified-id before 'for'
   12 |      for (int i = 2; i < a; i++) {
      |      ^~~
a.cc:12:22: error: 'i' does not name a type
   12 |      for (int i = 2; i < a; i++) {
      |                      ^
a.cc:12:29: error: 'i' does not name a type
   12 |      for (int i = 2; i < a; i++) {
      |                             ^
a.cc:14:6: error: expected unqualified-id before 'for'
   14 |      for (int i = 1; i < a; i++) {
      |      ^~~
a.cc:14:22: error: 'i' does not name a type
   14 |      for (int i = 1; i < a; i++) {
      |                      ^
a.cc:14:29: error: 'i' does not name a type
   14 |      for (int i = 1; i < a; i++) {
      |                             ^
a.cc:16:8: error: expected declaration before '}' token
   16 |        }
      |        ^
Language: C++

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

int main() {
    int N;
    cin >> N;

    vector<int> vec(N-1);
    for(int i=0;i<N-1;i++){
        cin >> vec.at(i);
    }
    
    int count=0;
  
  for(int j=1;i<N;j++){
    for(int i=0;i<N-1){
      if(vec.at(i)==j){
        count++;
      }
      cout << count << endl;
    }
  }
       
}
       

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'i' was not declared in this scope
   16 |   for(int j=1;i<N;j++){
      |               ^
a.cc:17:22: error: expected ';' before ')' token
   17 |     for(int i=0;i<N-1){
      |                      ^
      |                      ;
Language: C++

#include<iostream>

using namespace std;

int main()
{
 long long int a,b,s=0;
cin>>a;
  long long int c[a],b[a];
  for(int i=0;i<a-1;i++)
  {
    cin>>c[i];
    b[i]=0;
  }
  b[a-1]=0;
  int k=0;
  for(int i=0;i<a;i++)
  {
  for(int j=i+1;j<a;j++)
  {
   if(c[i]==c[j])
   {
   b[k]=b[k]+1;
   }else
   {
     k=k+1;
   break;
   }
  }
    k=0;
    for(int i=0;i<a;i++)
    {
    if(i==0)
    {
      cout<<b[k++]<<endl;
    }else
    {
    cout<<b[k-1]<<endl;
      k=k+1;
    }
     
    }
  }
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: conflicting declaration 'long long int b [a]'
    9 |   long long int c[a],b[a];
      |                      ^
a.cc:7:18: note: previous declaration as 'long long int b'
    7 |  long long int a,b,s=0;
      |                  ^
a.cc:13:6: error: invalid types 'long long int[int]' for array subscript
   13 |     b[i]=0;
      |      ^
a.cc:15:4: error: invalid types 'long long int[long long int]' for array subscript
   15 |   b[a-1]=0;
      |    ^
a.cc:23:5: error: invalid types 'long long int[int]' for array subscript
   23 |    b[k]=b[k]+1;
      |     ^
a.cc:23:10: error: invalid types 'long long int[int]' for array subscript
   23 |    b[k]=b[k]+1;
      |          ^
a.cc:35:14: error: invalid types 'long long int[int]' for array subscript
   35 |       cout<<b[k++]<<endl;
      |              ^
a.cc:38:12: error: invalid types 'long long int[int]' for array subscript
   38 |     cout<<b[k-1]<<endl;
      |            ^
Language: C

#include<stdio.h>
int main(){
  int shain, i, tmp;
  scanf("%d",&shain);
  int buka[shain] = {0};
  for(i = 0; i<shain-1; i++){
    tmp = 0;
    scanf("%d",&tmp);
    buka[tmp] += 1;
  }
 
  for(i=0;i<shain;++i){
    printf("%d\n", buka[i]);
  }
 
  return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:5:21: error: variable-sized object may not be initialized except with an empty initializer
    5 |   int buka[shain] = {0};
      |                     ^
Language: C++

#include <iostrteam>
#include <algorithm>
#include <vector>

int main() {
	int N;
	std::cin >> N;  
  	std::vector<int> data(N-1);
  
  	for(int i = 0; i < N-1; ++i) {
		std::cin >> data[i];
    }

	auto ret = data;
	for(int i = 0; i < data.size()-1; ++i)
		ret[i] = std::countif(data.begin()+i,data.end(),[](int n, int cn){return n-1==cn;});
  	ret[ret.size()-1] = 0;
  
	for(auto&& e : ret)
      std::cout << e << std::endl;
  
}


Compiler output:
a.cc:1:10: fatal error: iostrteam: No such file or directory
    1 | #include <iostrteam>
      |          ^~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
  
  int n = scan.nextInt();
  int sup[] = new int[n];
  int ans[] = new int[n];
  for(int i = 0; i<n; i++){ //初期化
    sup[i] = scan.nextInt();
    ans[i] = 0;
  }
  for(int i = 0; i< n; i++){
    ans[sup[i]]++;
  }
  for(int i = 0; i< n; i++){
    System.out.println(ans[i]);
  }
}


Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int>A(N,0);
  vector<int>count(N,0);
  for(int i=0; i<N-1; i++){
    cin >> A.at(i);
    count.at(A.at(i-1))+=1;
  }
  for(int i=0; i<N; i++){
    cout << count.at(i) << endl;
  }
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() 
{
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);  
    int n , count = 0;
    cin >> n;
    int arr[n];
    int arr1[n-1];
    for (int i = 0; i < n-1; i++) {
        /* code */
        cin >> arr1[i];
    }
    for(int i = 0; i < n; i++)
    {
        for (int j = 0; j < n-1; j++) {
            /* code */
            if(arr1[j] == i+1)
            {
                count++;
            }
            else    
                continue;
        }
        arr[i] = count;
        count = 0;
    }
    for (int i = 0; i < n i++) {
        /* code */
        cout << arr[i] << endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:26: error: expected ';' before 'i'
   29 |     for (int i = 0; i < n i++) {
      |                          ^~
      |                          ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int>A(N,0);
  vector<int>count(N,0);
  for(int i=0; i<N-1; i++){
    cin >> A.at(i);
    count.at(A.at(i-1))+=1
  }
  for(int i=0; i<N; i++){
    cout << count.at(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before '}' token
   11 |     count.at(A.at(i-1))+=1
      |                           ^
      |                           ;
   12 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, x, Si;
  x = 1;
  Si = 1;
  cin >> N;
  for (i = 1; i < N; i++) {
    int A;
    cin >> A;
  
  if (A == x){
    Si++;
  }
  else {
    Si = Si;
  }
    while (i < N) {
  cout << Si << endl;
  x++;
    }
  }
}
    
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope; did you mean 'Si'?
    9 |   for (i = 1; i < N; i++) {
      |        ^
      |        Si