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

#include<bits/stdc++.h>
using namespace std;
long long mod = 1e9+7;
#define pb push_back


int main() 
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n ;
    int arr[n],brr[n+1]={0};
    arr[0]=-1;
    for(int i=1;i<n;i++)
    {
        cin>>arr[i];
        brr[arr[i]]++;
    for(int i=1;i<=n;i++)
        cout << brr[i] <<"\n";
    
    return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
  int N;
  cin>>N;
  vector<int> data(N);
  data.at(0)=-1;
  for(int i=1;i<N;i++){
    cin>>data.at(i);
  }
  for(int n=1;n<N+1;n++){//社員番号
    int sum=0;
    for(int i=n;i<N;i++){
      if(data.at(i)==n){sum++;}
    }
    cout<<sum<<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;
	cin>>n;
	int a[n],b[n];
	for(int i=1;i<n;i++){
		cin>>a[i];
		b[i]=a[i];
	}
	sort(b+1,b+n);
	for(int i=1;i<=n;i++){
		int x;
		int l=0,r=n;
		while(l+1<r){
			int mid=(l+r)/2;
			if(a[mid]<i){
				l=mid;
			}else{
				r=mid;
			}
		}
		if(a[1]>=i){
			x=1;
		}
		x=l;
		l=0,r=n;
		while(l+1<r){
			int mid=(l+r)/2;
			if(a[mid]>i){
				r=mid;
			}else{
				l=mid;
			}
		}
		cout<<r-x-1<<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;
const double PI = 3.141592653589793238463;
int main()
{
    long long int n,;
    cin >> n;
    int a[n - 1];
    for (int i = 0; i < n - 1; i++)
    {
        cin >> a[i];
    }

    for (int i = 0; i < n; i++)
    {
        int count = 0;
        for (int j = 0; j < n - 1; j++)
        {
            if (a[j] == i + 1)
            {
                count++;
            }
        }

        cout << count << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected unqualified-id before ';' token
    6 |     long long int n,;
      |                     ^
Language: C

#include <iostream>
#include <vector>
#include <bitset>
#include <utility>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
typedef long long ll;
 
int main(){
  int N;
  cin >> N;
  vector<int> r(N,0);
  for(int i=1;i<N;i++){
    int a;
    cin >> a;
    r[a-1]++;
  }

  for(int i=0;i<N;i++){
    cout << r[i] << 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>
#include<string>
#include<algorithm>
#include<vector>

using namespace std;

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

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

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

int main(){
long long n,k;
cin>>n;
vector<long long> vec(n-1);
for(int i=0;i<n-1;i++){
cin>>vec.at(i);
}
vector<long long> ans(n);
for(int i=0;i<n-1;i++){
if(vec.at(i)=k){
ans.at(k)++;
}
}
for(int i=0;i<n;i++){
cout<<ans.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>
#define ll long long
using namespace std;
inline int D()
{
	int t;
	scanf("%d",&t);
	return t;
}
inline ll llD(){
	ll t;
	scanf("%lld",&t);
	return t;
}
const int N=2e5+9;

int arr[N],frq[N];
int main(){
    int n =D();
    for(int i=1; i<n;i++)
    {
        int a=D();
        frq[a]++;
    }
    for(int i=1; i<=n;i++)
        printf("%d\n",frq[i]);
}
/**
bool ok(int val){
  int cntm=0,cntp=0;
  for(int i=0;i<n-val;i++)
  {
      cntm=0;cntp=0;
      for(int j=i;j<val;j++)
      {
      (arr[j]==1)?cntp++:cntm++;
      }
      if(cntp==cntm)
        break;
  }
  return cntp==cntm;
}
int binarySearch(){
  int low = 0, med, hi =n;
  while(low<hi){
    med = (low+hi+1)>>1;
    cout<<med<<" "<<hi<<" "<<low<<endl;
    if(ok(med))  low = med;
    else  hi = med-1;
  }
  return low;
}*/



/**
  int power1(int b, int p){               //O(p)
    if(!p)  return 1;
    return b*power1(b, p-1);
  }
  int power2(int b, int p){               //O(Log(p))
    if(!p)  return 1;
    int ret = power2(b, p/2);
    return (p&1 ? ret*ret*b : ret*ret);
  }
   int mul(int a, int b, int m){
      return (a%m * b%m) % m;
  }

*/


/**
void seive()
{
    bitset<N>iscomp;
    iscomp[0]=iscomp[1]=1;
    for(long long i=2; i<=N; ++i)
    {
        if(!iscomp[i])
        {
            a.push_back(i);
            for(long long j=i*i; j<=N; j+=i)
                iscomp[j]=1;
        }
    }
}
3
abc
abc
*/

    /**


    */


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;
  cin >> N;
  vector<int> a(N,0);
  for(int i=0;i<N;i++){
    int A;
    cin >> A;
    a.at(A-1)++;
  }
  for(int i=0;i<N;i++){
    cout << a.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() {
      int n;
      cin>>n;
      int a[n];
      int cnt[n+1]={0};
      for(int i=0;i<(n-1);i++){
          cin>>a[i];
          cnt[a[i]]++;
      }
      
      for(int i=1;i<=n;i++){
          cout<<cnt[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 <iostream>
using namespace std;

int main(){
  map<int, int> m;
	int n;
  cin >> n;
  int t = n;
  t--;
  while(t--){
    int temp;
    cin >> temp;
    m[temp] += 1;
  }

  for(auto x : m) cout << x.second << ' ';
  
  for(int i = 0; i < n - m.size(); i++){
    cout << 0 << ' ';
  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'map' was not declared in this scope
    5 |   map<int, int> m;
      |   ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:5:7: error: expected primary-expression before 'int'
    5 |   map<int, int> m;
      |       ^~~
a.cc:13:5: error: 'm' was not declared in this scope
   13 |     m[temp] += 1;
      |     ^
a.cc:16:16: error: 'm' was not declared in this scope
   16 |   for(auto x : m) cout << x.second << ' ';
      |                ^
a.cc:18:26: error: 'm' was not declared in this scope
   18 |   for(int i = 0; i < n - m.size(); i++){
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long mod = 1e9+7;
#define pb push_back


int main() 
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n ;
    int arr[n],brr[n+1]={0};
    arr[0]=-1;
    for(int i=1;i<n;i++)
    {
        cin>>arr[i];
        brr[arr[i]]++;
    for(int i=1;i<=n;i++)
        cout << brr[i] <<"\n";
    
    return 0;
                                                     

  
}

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

//
//AtCoder Beginner Contest 163
//C - management
//

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

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define reAll(x) (x).rbegin(),(x).rend()
#define zero(a) memset(a, 0, sizeof(a))

using ll = long long;

int main()
{
    int n;

    cin >> n;

    int a[n];
    int ans[n];

    zero(ans);

    rep(i,n-1){
        cin >> a[i];
        ans[a[i]-1]++;
    }
    rep(i, n){
        cout << ans[i] << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
   15 | #define zero(a) memset(a, 0, sizeof(a))
      |                 ^~~~~~
a.cc:28:5: note: in expansion of macro 'zero'
   28 |     zero(ans);
      |     ^~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <vector>
  +++ |+#include <cstring>
    9 |
Language: C++

#include <stdio.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    int count;
    int nums[n + 1];
    for(int i = 0; i <= n; i++)
        nums[i] = 0;
    for(int i = 0; i < n-1; i++){
        cin >> count;
        nums[count] ++;
    }
    
    
    
    for(int i = 1; i <= n; i++)
        cout << nums[i] << "\n";

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> n;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << nums[i] << "\n";
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include <iostream>

using namespace std;

int main()
{
    int n;
    int a[210000];
    int b[210000];
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        a[i] = 0;
        b[i] = 0;
    }
    for (int i = 0; i < n-1; i++)
    {
        cin >> a[i+1];
    }
    for (int i = 0; i < n; i++)
    {
        b[a[i]-1]++;
    }
    for (int i = 0; i < n; i++)
    {
        cout << b[i] << endl;
    }
    return 0;
}

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

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

int main(){
    int n;
    cin >> n;
    int a[n+1];
    a[0]=0;
    a[1]=0;
    for(int i=2; i<n+1; i++){
        cin >> a[i];
    }
    int b[n+1];
    for(int i=0; i<n+1; i++){
        b[i]=0;
    }
    for(int i=1; i<n+1; i++){
        b[a[i]]++;
    }
    for(int i=1; i<n+1; i++){
        cout << b[i] << endl;
    }
    return 0;
}

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

#include<iostream>
using namespace std;

int main(){
	int m,n;
	cin>>m>>n;
	
	if(m>n)  cout<<-1<<endl;
	else   cout<<m-n<<endl;
	
	return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: 'class std::vector<int>' has no member named 'count'
   15 |                 cout << a.count(i + 1);
      |                           ^~~~~
Language: C++

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

int main(){
    int n;
    cin >> n;
    int count;
    int nums[n + 1];
    for(int i = 0; i <= n; i++)
        nums[i] = 0;
    for(int i = 0; i < n-1; i++){
        cin >> count;
        nums[count] ++;
    }
    
    
    
    for(int i = 1; i <= n; i++)
        cout << nums[i] << "\n";

}

Compiler output:
a.cc:2:10: fatal error: stdc++.h: No such file or directory
    2 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

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

int main()
{
    int t;
    scanf("%d",&t);
    vector<int>v(t),a;
    for(int i = 0;i<t;i++)cin>>v[i];
    for(int i = 0;i<t-1;i++){
        int ans = 0,j = i;
        if(v[i]==v[i+1] ||v[i+1]>v[i]){
            ans = 1;
            //v[i]+=(v[i+1]-v[i]);
            while(v[i]==v[i+1]){
                ans++;
                i++;
                if(i==t)break;
            }
        }
        //for(int k = j;k<i;k++)a.push_back(0);
        a.push_back(ans);
    }
    for(auto i:a)cout<<i<<endl;
    for(int i = 0;i<t-(int)a.size();i++)cout<<0<<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>
#include <stdio.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    int count;
    int nums[n + 1];
    for(int i = 0; i <= n; i++)
        nums[i] = 0;
    for(int i = 0; i < n-1; i++){
        cin >> count;
        nums[count] ++;
    }
    
    
    
    for(int i = 1; i <= n; i++)
        cout << nums[i] << "\n";

    

Compiler output:
a.cc: In function 'int main()':
a.cc:20:33: error: expected '}' at end of input
   20 |         cout << nums[i] << "\n";
      |                                 ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int N;
    cin >> N;
    // スペース区切りの整数の入力
    int A[N-1];

    for (int i = 0; i < N-1; i++){
        cin >> A[i];
    }
    

    for (int i = 1; i < N+1; i++){
        int cnt = 0;
        for (int j = 0; j < N-1; j++){
            if (A[j] == i){
                cun += 1;
            }
        cout << cnt << endl;
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'cun' was not declared in this scope
   20 |                 cun += 1;
      |                 ^~~
Language: C

#include <cstdio>
#include <cstring>
#include <cmath>
#include <utility>
#include <iostream>
#include <functional>
#include <bitset>
#include <algorithm>
#include <vector>
#include <forward_list>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <numeric>
#define ll long long int
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int mx4[] = {0,1,0,-1};
int my4[] = {1,0,-1,0};


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

int main(){
    int n; cin >> n;
    vector<int> a(n-1);
    rep(i,n-1){
        cin >> a[i];
        a[i]--;
    }
    vector<int> s(2e5,0);
    rep(i,n-1){
        s[a[i]]++;
    }
    rep(i,n){
        cout << s[i] << endl;
    }
}

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

#include<bits/stdc++.h>

using namespace std;
int main{
    int n;
    cin >> n;
    vector<int> a(n);
    vector<int> b(n);   
    a[0] = 0;

    for(int i = 1;i < n;i++){
    cin >> a[i];
    b[i] = 0;
        }
    for(int i = 1;i < n;i++){
    b[a[i]]++;
        }
    for(int i = 0;i < n;i++){
    cout << b[i] << endl;
        }
	return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int n;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> n;
      |     ^~~
a.cc:7:19: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     vector<int> a(n);
      |                   ^
      |                   yn
a.cc:8:19: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     vector<int> b(n);
      |                   ^
      |                   yn
a.cc:9:5: error: 'a' does not name a type
    9 |     a[0] = 0;
      |     ^
a.cc:11:5: error: expected unqualified-id before 'for'
   11 |     for(int i = 1;i < n;i++){
      |     ^~~
a.cc:11:19: error: 'i' does not name a type
   11 |     for(int i = 1;i < n;i++){
      |                   ^
a.cc:11:25: error: 'i' does not name a type
   11 |     for(int i = 1;i < n;i++){
      |                         ^
a.cc:15:5: error: expected unqualified-id before 'for'
   15 |     for(int i = 1;i < n;i++){
      |     ^~~
a.cc:15:19: error: 'i' does not name a type
   15 |     for(int i = 1;i < n;i++){
      |                   ^
a.cc:15:25: error: 'i' does not name a type
   15 |     for(int i = 1;i < n;i++){
      |                         ^
a.cc:18:5: error: expected unqualified-id before 'for'
   18 |     for(int i = 0;i < n;i++){
      |     ^~~
a.cc:18:19: error: 'i' does not name a type
   18 |     for(int i = 0;i < n;i++){
      |                   ^
a.cc:18:25: error: 'i' does not name a type
   18 |     for(int i = 0;i < n;i++){
      |                         ^
a.cc:21:9: error: expected unqualified-id before 'return'
   21 |         return 0;
      |         ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstring>
#include<numeric>
#include<vector>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<cmath>
using namespace std;
typedef long long ll;
typedef pair<int,int>PII;
typedef pair<ll,ll>PLL;
typedef long double ld;

int main(){
	map<int,vector<int> >mp;
	int n;
	cin>>n;
	for(int i=2;i<=n;i++){
		int num;
		cin>>num;
		mp[num].push_back(i);
	}
	for(int i=1;i<=n;i++){
		cout<<mp[i].size()<<endl;
	}


	return 0;
}

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

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
#define MAX 200000

int main() {
    int n, k;
    int a[MAX];
    int b[MAX];
    cin >> n;
    for (int i=0;i<n-1;i++) {
      cin >> a[i];
    }
    for (int i=0;i<n-1;i++) {
        b[a[i]-1]++;
    }
    for (int i=0;i<n;i++) {
        cout << b[i] << endl;
    }
    return 0;
}

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

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

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;
#define REP(i, n) for(int i = 0; i < n; i++)
#define COUT(x) cout<<(x)<<endl
#define dump(x)  cout << #x << " = " << (x) << endl;
using ll = long long;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
using M = map<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int, vector<int>, greater<int>>;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int main() {
  int n; cin >> n;
  int a[n];
  M m;
  REP(i,n-1) {
    cin >> a[i+1];
    a[i+1]--;
    if (m[a[i+1]]) m[a[i+1]]++;
    else m[a[i+1]]=1;
  }

  REP(i,n) {
    cout << m[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>
#define endl '\n'
using namespace std;

int N, A[200001], tmp;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> N;
    int *res = new int[N];
    for (int i = 1; i < N; i++) cin >> tmp, A[i] = tmp, res[tmp - 1]++;
    for (int i = 0; i < N; i++) cout << res[i] << " ";

    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<iostream>
#include<string>

using namespace std;
#define pi 3.141592
int main() {
	int n, x, a[200001] = {};
	cin >> n;

	for (int i = 0; i < n-1; i++) {
		cin >> x;
		a[x]++;
	}
	for (int i = 1; i <= n; i++) {
		cout << a[i] << endl;
	}
}

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

#include <iostream>
using namespace std;

int main(void) {
  long long int N;
  cin >> N;
  long long int A[N] = 0,d;
  for(int i=0;i<N;i++) {
    cin >> d;
    A[d]++;
  }
  for(int i=0;i<N;i++) {
    cout << A[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: array must be initialized with a brace-enclosed initializer
    7 |   long long int A[N] = 0,d;
      |                        ^
Language: C

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define print(x)cout<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;

int main() {
  int n;
  cin>>n;
  vi a(n),S(n);
  int mx = 0;
  rep(i,n-1){
    cin>>a[i];
    a[i]--;
  }
  rep(i,n-1){
    S[a[i]]++;
  }
  S[n-1] = 0;
  rep(i,n){
    cout<<S[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;
using Graph = vector<vector<int>>;
#define ll long long
#define _GLIBCXX_DEBUG
const ll MOD = 1000000007;
const int MAX = 510000;

int main() {
  int N;
  cin >> N;
  vector<int> A(N-1);
  for (int i=0; i<N-1; i++) cin >> A[i];
  map<int, int> memo;
  for (int i=0; i<N-1; i++) {
    if (memo.count(A[i]) memo[A[i]]++;
    else memo[A[i]] = 1;
  }
  for (int i=0; i<N; i++) cout << memo[i+1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before 'memo'
   16 |     if (memo.count(A[i]) memo[A[i]]++;
      |                         ^~~~~
      |                         ;
a.cc:17:5: error: expected primary-expression before 'else'
   17 |     else memo[A[i]] = 1;
      |     ^~~~
a.cc:16:39: error: expected ')' before 'else'
   16 |     if (memo.count(A[i]) memo[A[i]]++;
      |        ~                              ^
      |                                       )
   17 |     else memo[A[i]] = 1;
      |     ~~~~
Language: C

#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define fi first
#define se second
#define pb push_back
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define all(x) x.begin(),x.end()
#define y1 omg
#define INF 987654321
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<ll> vl;

int n, t, arr[200010];

int main() {
	fastio;
	cin >> n;
	for (int i = 1; i < n; i++) {
		cin >> t;
		arr[t]++;
	}
	for (int i = 1; i <= n; i++) {
		cout << arr[i] << endl;
	}
}

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

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i=2;i<=n;i++){
    int x;
    cin >> x;
    a(x-1)++;
  }
  for(int i=1;i<=n;i++){
    cout << a(i-1) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: no match for call to '(std::vector<int>) (int)'
   11 |     a(x-1)++;
      |     ~^~~~~
a.cc:14:14: error: no match for call to '(std::vector<int>) (int)'
   14 |     cout << a(i-1) << endl;
      |             ~^~~~~
Language: C++

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

for(int i = 1;i < n;i++){
    cin >> a[i];
    b[i] = 0;
}
for(int i = 1;i < n;i++){
    b[a[i]]++;
}
for(int i = 0;i < n;i++){
    cout << b[i] << endl;
}
return 0;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:1: error: expected primary-expression before 'int'
    4 | int n;
      | ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> n;
      | ^~~
a.cc:6:15: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 | vector<int> a(n);
      |               ^
      |               yn
a.cc:7:15: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | vector<int> b(n);
      |               ^
      |               yn
a.cc:8:1: error: 'a' does not name a type
    8 | a[0] = 0;
      | ^
a.cc:10:1: error: expected unqualified-id before 'for'
   10 | for(int i = 1;i < n;i++){
      | ^~~
a.cc:10:15: error: 'i' does not name a type
   10 | for(int i = 1;i < n;i++){
      |               ^
a.cc:10:21: error: 'i' does not name a type
   10 | for(int i = 1;i < n;i++){
      |                     ^
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for(int i = 1;i < n;i++){
      | ^~~
a.cc:14:15: error: 'i' does not name a type
   14 | for(int i = 1;i < n;i++){
      |               ^
a.cc:14:21: error: 'i' does not name a type
   14 | for(int i = 1;i < n;i++){
      |                     ^
a.cc:17:1: error: expected unqualified-id before 'for'
   17 | for(int i = 0;i < n;i++){
      | ^~~
a.cc:17:15: error: 'i' does not name a type
   17 | for(int i = 0;i < n;i++){
      |               ^
a.cc:17:21: error: 'i' does not name a type
   17 | for(int i = 0;i < n;i++){
      |                     ^
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

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



int main()
{	
	int n;
	cin>>n;
	int arr[n+1] = {};

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

	for(int i =1;i<n+1;i++){
		cout<<arr[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 n,a[20010]={0};
int main()
{
	scanf("%d",&n);
	for(int i=2;i=<n;i++)
	{
		int t;
		scanf("%d",&t);
		a[t]++;
	}
	for(int i=1;i<=n;i++)
	{
		printf("%d\n",a[i]);
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '<' token
    7 |         for(int i=2;i=<n;i++)
      |                       ^
Language: C

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

int main()
{
    ll n;
    cin>>n;
    ll b[200001]={0},x;
    for (ll i=1;i<n;i++){
        cin>>x;
        b[x]++;
    }
    for (ll i=1;i<=n;i++){
        cout <<b[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 <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;

    int a[n];

    rep(i,n) {
        a[i] = 0;
    }

    rep(i,n-1) {
        int temp;
        cin >> temp;
        a[temp-1]++;
    }

    rep(i,n) {
        cout << a[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 <iostream>
using namespace std;
 
int main(){
  int n;
  cin>>n;
  int a;
  map<int,int> b(n);
  for(int i=0;i<=n-1;i++){
    b[i]=0;
  }
  for(int i=2;i<=n;i++){
    cin>>a;
    b[a]++;
  }
  for(int i=0;i<=n-1;i++){
    cout<<b[i]<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<int,int> b(n);
      |   ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:8:7: error: expected primary-expression before 'int'
    8 |   map<int,int> b(n);
      |       ^~~
a.cc:10:5: error: 'b' was not declared in this scope
   10 |     b[i]=0;
      |     ^
a.cc:14:5: error: 'b' was not declared in this scope
   14 |     b[a]++;
      |     ^
a.cc:17:11: error: 'b' was not declared in this scope
   17 |     cout<<b[i]<<endl;
      |           ^
Language: C

import java.util.*;
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		for (int i = 0; i < N-1; i++) {
			a[sc.nextInt()]++;
		}		
		for (int i = 1; i < N; i++) {
			System.out.println(a[i]);
		}
		System.out.println(0);
	}
}

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

#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define ll long long
#define _GLIBCXX_DEBUG
const ll MOD = 1000000007;
const int MAX = 510000;

int main() {
  int N;
  cin >> N;
  vector<int> A(N-1);
  for (int i=0; i<N-1; i++) cin >> A[i];
  map<int, int> memo; // Aに登場する数字と、その登場回数
  for (int i=0; i<N-1; i++) {
    if (memo.count(A[i]) memo[A[i]]++;
    else memo[A[i]] = 1;
  }
  for (int i=0; i<N; i++) cout << memo[i+1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before 'memo'
   16 |     if (memo.count(A[i]) memo[A[i]]++;
      |                         ^~~~~
      |                         ;
a.cc:17:5: error: expected primary-expression before 'else'
   17 |     else memo[A[i]] = 1;
      |     ^~~~
a.cc:16:39: error: expected ')' before 'else'
   16 |     if (memo.count(A[i]) memo[A[i]]++;
      |        ~                              ^
      |                                       )
   17 |     else memo[A[i]] = 1;
      |     ~~~~
Language: C

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

int main() {
  int N;
  cin >> N;
 
  vector<int> p(N);
  p.at(0) = -1;
  for (int i = 1; i < N; i++) {
    cin >> p.at(i);
  }
 
  vector<vector<int>> children(N);
  for (int i = 1; i < N; i++) {
    int parent = p.at(i) - 1;
    children.at(parent).push_back(i);
  }
 
  for (int i = 0; i < N; i++) {
    cout << children.at(i).size() << 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;

int main() {
  int N;
  cin >> N;
 
  vector<int> p(N);
  p.at(0) = -1;
  for (int i = 1; i < N; i++) {
    cin >> p.at(i);
  }
 
  vector<vector<int>> children(N);
  for (int i = 1; i < N; i++) {
    int parent = p.at(i) - 1;
    children.at(parent).push_back(i);
  }
 
  for (int i = 0; i < N; i++) {
    cout << children.at(i).size() << 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;
	cin>>n;
	vector<int>v(2e5+1);

	vector<int>ans(n+1);
	for(int i=1;i<=n-1;++i){
		int a; cin>>a;
		ans[a]++;
	}
	for(int i=1;i<=n;++i)
		printf("%d\n",ans[i]);
}


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;
    cin >> n;
    map<int, int> m; 
    for (int i = 0; i < n - 1; i++) {
        int x;
        cin >> x;
        x--;
        m[x]++;
    }

    for (int i = 0; i < n; i++) cout << m[i] << "\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<bits/stdc++.h>
using namespace std;
#define f(i,a,b) for(register int i=a;i<=b;++i)
typedef long long ll;
const int N = 2e5+50;
int size[N];
signed main() {
	int n,a;
	scanf("%d",&n);
	f(i,2,n) {
		scanf("%d",&a);
		++size[a];
	} 
	f(i,1,n) printf("%d\n",size[i]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   10 |         f(i,2,n) {
      |           ^
a.cc:3:35: note: in definition of macro 'f'
    3 | #define f(i,a,b) for(register int i=a;i<=b;++i)
      |                                   ^
a.cc:12:19: error: reference to 'size' is ambiguous
   12 |                 ++size[a];
      |                   ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:5: note:                 'int size [200050]'
    6 | int size[N];
      |     ^~~~
a.cc:14:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   14 |         f(i,1,n) printf("%d\n",size[i]);
      |           ^
a.cc:3:35: note: in definition of macro 'f'
    3 | #define f(i,a,b) for(register int i=a;i<=b;++i)
      |                                   ^
a.cc:14:32: error: reference to 'size' is ambiguous
   14 |         f(i,1,n) printf("%d\n",size[i]);
      |                                ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:5: note:                 'int size [200050]'
    6 | int size[N];
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  int a;
  map<int,vector<int> > b(n);
  for(int i=0;i<=n-1){
    b[i]=0;
  }
  for(int i=2;i<=n;i++){
    cin>>a;
    b[a].push_back(i);
  }
  for(int i=0;i<=n-1;i++){
    cout<<b[i].size()<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<int,vector<int> > b(n);
      |   ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:8:7: error: expected primary-expression before 'int'
    8 |   map<int,vector<int> > b(n);
      |       ^~~
a.cc:9:21: error: expected ';' before ')' token
    9 |   for(int i=0;i<=n-1){
      |                     ^
      |                     ;
a.cc:10:5: error: 'b' was not declared in this scope
   10 |     b[i]=0;
      |     ^
a.cc:14:5: error: 'b' was not declared in this scope
   14 |     b[a].push_back(i);
      |     ^
a.cc:17:11: error: 'b' was not declared in this scope
   17 |     cout<<b[i].size()<<endl;
      |           ^
Language: C++

#include <iostream>
#include <vector> 
#include <set>
#include <map>
#include <math.h>

using namespace std;

#define loop(i,a,b) for(int i = a; i<b; i++)
#define square(a) (a)*(a)

typedef long long ll;
typedef string str;


int main ()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	vector<int> arr(n);
	loop(i, 0 , n-1 )
	{
		cin >> arr[i];
	}
	
	loop(i, 1 , n+1 )
	{
		cout << count(arr.begin(), arr.end(), i) << "\n";
	}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: 'count' was not declared in this scope
   32 |                 cout << count(arr.begin(), arr.end(), i) << "\n";
      |                         ^~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int n,data[200002],temp;

int main()

{

    scanf("%d",&n);

    for(int i=2;i<=n;i++)

    {

        scanf("%d",&temp);

        data[temp]++;

    }

    for(int i=1;i<=n;i++)

        printf("%d\n",data[i]);

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: reference to 'data' is ambiguous
   19 |         data[temp]++;
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:5:7: note:                 'int data [200002]'
    5 | int n,data[200002],temp;
      |       ^~~~
a.cc:25:23: error: reference to 'data' is ambiguous
   25 |         printf("%d\n",data[i]);
      |                       ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:5:7: note:                 'int data [200002]'
    5 | int n,data[200002],temp;
      |       ^~~~
Language: C++

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

int main (){
    int N;
    cin >> N;
    int A[N];

    for(int i=1; i<N; i++){
        cin >> A[i];
    }

    for(int i=0; i<N; i++){
        int B[i] = 0;
    }

    int v;

    for(int i=1; i<N; i++){
        v = A[i];
        B[v-1] = A[i];
    }

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: array must be initialized with a brace-enclosed initializer
   14 |         int B[i] = 0;
      |                    ^
a.cc:21:9: error: 'B' was not declared in this scope
   21 |         B[v-1] = A[i];
      |         ^
a.cc:25:17: error: 'B' was not declared in this scope
   25 |         cout << B[i] << endl;
      |                 ^
Language: C

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
#define REPi(i, a, b) for(int i=int(a); i<int(b); i++)
#define MEMS(a,b) memset(a,b,sizeof(a))
#define mp make_pair
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll MOD = 1e9+7;

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N);
    REPi(i,1,N){
        ll a;
        cin >> a;
        a--;
        A[a]++;
    }

    REP(i,N){
        cout << A[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 <iostream>
#include <vector> 


using namespace std;

#define loop(i,a,b) for(int i = a; i<b; i++)
int main ()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	vector<int> arr(n);
	loop(i, 0 , n-1 )
	{
		cin >> arr[i];
	}
	
	loop(i, 1 , n+1 )
	{
		cout << count(arr.begin(), arr.end(), i) << "\n";
	}
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>
#include <vector>
#include <map>
using namespace std;
int main(void){
    // Your code here!
    int N;
    cin >> N;
    map<int, int> ans;
    
    for(int i = 0; i < N; i++){
        ans[i] = 0;
    }

    for(int i = 0; i < N-1; i++){
        int A;
        cin >> A;
        A--;
        ans[A]++;
    }
    
    for(auto A : ans){
        auto value = A.second;
        cout << value << endl;
    }
    
    
    
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define repr(i,x,n) for(int i=x; i<(n); i++)
#define ALL(x) (x).begin(),(x).end()
#define INF 1e9
typedef long long ll;
using VI = vector<int>;
using VS = vector<string>;
using graph = vector<vector<int>>;
int main()
{
int n;
cin>>n;
VI num(n,0);
for (int i = 0; i < n-1; i++)
{ int a;
    cin>>a;
    num.at(a-1)+=1;
}
for (int i = 0; i < n; i++)
{
    cout<<num.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

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    map<int,int> m;
    for(int i=1;i<=n;i++)
    {
        m.insert(pair<int,int>(i,0));
    }
    int f;
    for(int i=1;i<n;i++)
    {
        cin>>f;
        auto itr=m.find(f);
        itr->second++;
    }
    
    for(auto it=m.begin();it!=m.end();it++)
    {
        cout<<it->second<<endl;
    }

    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

	 
int main()
{
	fastio;
	
	int n,a;
	cin>>n;
	int A[n+1];
     for(int i=0;i<=n;i++)
	A[i]=0;
	for(int i=2;i<=n;i++)
	{
		cin>>a;
		A[a]++;
	}
	for(int i=1;i<=n;i++)
	cout<<A[i]<<"\n";
	
	
	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.