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

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

#define ASC(vec) vec.begin(), vec.end()    // 昇順ソート 例：sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例：sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define REP(i, vec) for (auto i = vec.begin(); i != vec.end(); ++i)

const int       mod = 1000000007;
const int       inf = (1 << 21);
const long long INF = 1LL << 60;

using ii = pair<int, int>;
using ll = long long;
using vi = vector<int>;
using vd = vector<double>;
using vb = vector<bool>;
using vl = vector<ll>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vii = vector<pair<int, int>>;
using vll = vector<pair<ll, ll>>;

template<class T>
inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T>
inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T>
T GCD(T a, T b) {if (b == 0) return a; else return GCD(b, a % b); }
template<class T>
T LCM(T a, T b) { return a / GCD(a, b) * b; }
template<class T>
inline T upper(T a, T b) {return (a + (b - 1)) / b; }

constexpr array<int, 9> dx = { 0, 1, 0, -1, -1, 1, 1, -1, 0 };
constexpr array<int, 9> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0 };

// ──────────────────────────────────────────────────────────────────

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

	vi a(n - 1);
	map<int, int> mp;
	rep(i, n - 1) {
		cin >> a[i];
		mp[a[i]]++;
	}

	for (int i = 1; i <= n; i++) {
		cout << mp[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 <stdio.h>

int main(void) {
  int i;
  int N;
  int A[200010];
  int B[200010];
  
  scanf("%d",&N);
  for(i = 0; i < N; i++){
      B[i] = 0;
  }
  for(i = 2; i <= N ; i++){
      scanf("%d",&A[i]);
      B[A[i]]　+= 1;
  }
  for(i = 1; i <= N; i++){
      printf("%d\n",B[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: stray '\343' in program
   15 |       B[A[i]]<U+3000>+= 1;
      |              ^~~~~~~~
Language: C

#include <iostream>
#include <vector>
using namespace std;
int main(void){
    // Your code here!
    int N,i,j,count;
   scanf("%d",&N);
   int A[N-1];
    for(i=0; i<N-1; i++)
        scanf("%d",&A[i]);
    
    for(i=1; i<=N; i++){
        count = 0;
        for(j=0; j<N-1; j++){
            if(i==A[j]) count++;
        }
        printf("%d\n",count);
    }
    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,b[n+1];
  for(int i=0;i<=n;i++){
    b[i]=0;}
  for(int i=1;i<n;i++){
    cin>>a;
    b[a]++;}
  for(int i=1;i<=n;i++){
    cout<<b[i]<<" ";}
  return 0;
    
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>n;
      | ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<b[i]<<" ";}
      |     ^~~~
Language: C++

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

}
   return 0;
}

Compiler output:
a.cc:18:4: error: expected unqualified-id before 'return'
   18 |    return 0;
      |    ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: Java

import java.util.*;
public class main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for(int i = 0;i<n;i++)
		{
			arr[i] = 0;
		}
		for(int i = 0;i<n-1;i++)
		{
			int input = sc.nextInt()-1;
			arr[input]++;
		}
		for(int i = 0;i<n;i++)
		{
			System.out.println(arr[i]);
		}
	}
}

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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <random>
#include <cstdio>
#include <cmath>
#include <climits>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int) n; i++)
#define rep1(i, n) for(int i = 1; i <= (int) n; i++)
#define all(v) v.begin(),v.end()

int main() {
    int n;
    cin >> n;
    vector<int> a(n);
    vector<int> b(n);
    rep(i,n-1) {
        cin >> a[i];
        a[i]--;
        b[a[i]]++;
    }
    rep(i,n) {
        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

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef tree<ii,null_type,less<ii>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;

int main() {
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	int n; cin>>n;
	map <int,int> ct;
	for (int i=0; i<n-1; i++) {
	int x; cin>>x;
		ct[x]++;
	}
	for (int i=1; i<=n; i++)
		cout<<ct[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 <algorithm>
#include <iostream>
#include <string>
using namespace std;
#define PI 3.14159265359
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))

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

  int A[N - 1];
  rep(i, N - 1) cin >> A[i];

  int count[N];
  rep(i, N) count[i] = 0;

  rep(i, N - 1) { count[A[i] - 1]++; }
  rep(i, N) cout << count[i] << endl;

  return 0;
}


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

#include <iostream>
#include <vector>
using namespace std;
int main()
{
	int N;
	cin >> N;
	vector<int>A(N);
	vector<int>cnt(N);
	for(int i = 2;i<=N;i++){
		cin >> A[i]; 
	}
	
	for(int i = 2;i<=N;i++){
		cnt[A[i]]++;
	}
	
	for(int i = 1;i<=N;i++){
		cout << cnt[i] <<  std::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 <bits/stdc++.h>
#include <string>
#include <array>



using namespace std;

int main(){
	
	int n, k = 0;
	array<int, 100> a;
	
	
	a[0] = 1;
	
	for(int i = 1; i < n; i++){
		cin >> a[i];
	}
	
	for(int i = 0; i < n; i++){
		for(int l = 0; l < n, l++){
			if(a[l] > a[l+1]){
				k++;
			}
		}
		a[i] = k;
		cout << a[i];
		k = 0;
	}
	
	
}	



Compiler output:
a.cc: In function 'int main()':
a.cc:22:42: error: expected ';' before ')' token
   22 |                 for(int l = 0; l < n, l++){
      |                                          ^
      |                                          ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a[n];
    int i;
    map<int,int>m;
    for(i=0;i<n-1;i++){
    cin>>a[i];
    m[a[i]]++;
    }
   
    
        for(auto &it:m)
        cout<<it.second<<endl;
        
   
    while(k--)
    cout<<"0"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: 'k' was not declared in this scope
   20 |     while(k--)
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin>>N;
      |  ^~~
a.cc:4:1: error: 'vector' was not declared in this scope
    4 | vector<int>vec(N-1);
      | ^~~~~~
a.cc:4:8: error: expected primary-expression before 'int'
    4 | vector<int>vec(N-1);
      |        ^~~
a.cc:5:8: error: expected primary-expression before 'int'
    5 | vector<int>answer(N);
      |        ^~~
a.cc:7:1: error: 'answer' was not declared in this scope
    7 | answer.at(i)=0;
      | ^~~~~~
a.cc:10:6: error: 'vec' was not declared in this scope
   10 | cin>>vec.at(i);
      |      ^~~
a.cc:13:7: error: 'vec' was not declared in this scope
   13 | int b=vec.at(i);
      |       ^~~
a.cc:14:1: error: 'answer' was not declared in this scope
   14 | answer.at(b-1)++;
      | ^~~~~~
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout<<answer.at(i)<<endl;
      | ^~~~
a.cc:17:7: error: 'answer' was not declared in this scope
   17 | cout<<answer.at(i)<<endl;
      |       ^~~~~~
a.cc:17:21: error: 'endl' was not declared in this scope
   17 | cout<<answer.at(i)<<endl;
      |                     ^~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define mod 1000000007
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
ll power(ll a,int n){
  if(n==0)
    return 1;
  if((n%2)==0)
    return power(a*a,n/2);
  else
    return a*power(a*a,n/2);    
}
int main(){
FASTIO  
int n;
cin>>n;
vector<int> a(n);
for(int i=1;i<n;i++){
  int b;
  cin>>b;
  a[b-1]++;
}
for(int i=0;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.
Language: C

#include<iostream>
using namespace std;

int main(){
	int N, i;
	cin >> N;
	int A[N+1];
	for(i=2; i<=N; i++){
		cin >> A[i];
	}
	
	int count[N+1]={0};
	for(i=2; i<=N; i++){
		count[A[i]]++;
	}
	for(i=1; i<=N; i++){
		cout << count[i] << 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>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define REP1(i, n) for(int i = 1; i <= (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef vector<string> vs;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<int, int> Pi;
typedef queue<Pi> QPi;
typedef pair<ll, ll> Pll;
typedef queue<Pll> QPll;
typedef vector<vi> Graph;
const int mod = 1000000007;
// 小数点　<< fixed << setprecision(0) <<
// sort降順　sort(ALL(),greater<int>());
// 円周率　M_PI
// 文字判定　isupper islower
// 順列　do {} while(next_permutation(ALL(X)));
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
struct edge {
    int from; //出発点
    int to;   //到達点
    int cost; //移動コスト
};
typedef struct edge se;
typedef vector<edge> ve;
unsigned euclidean_gcd(unsigned a, unsigned b) {
  if(a < b) return euclidean_gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

int main() {
  int n,a;
  cin >> n;
  vi ans(n,0);
  REP(i,n-1) {
    cin >> a;
    ans[a-1]++;
  }
  REP(i,n) {
    cout << ans[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

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	
	n = n+1
	emp := make([]int,n)
	
	num := 0
	for i := 2; i < n; i++ {
		fmt.Scan(&num)
		emp[num]++
	}

	for i := 1; i < n; i++ {
		fmt.Println(emp[i])
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package main
      | ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import (
      | ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:14: error: variable-sized object may not be initialized except with an empty initializer
    6 |   int b[n] = 0;
      |              ^
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int K = 0;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
  cin >> A.at(i);
    for (int i = 0; i < N; i++) {
    K++;
    int count = 0;
      for (int i = 0; i < N; i++) {
        if (A.at(i) == K) {
        count++;
        cout << count << 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,m;cin>>n;
	int a[n+1]={0};
	for(int i=0;i<n;i++)
	{
		cin>>m;
		a[m-1]++;
	}
	for(i=0;i<n;i++)
	{
		cout<<a[i]<<endl;
	}
	return 0;
}

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

#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

const int  mod = 1e9 + 7;
const int e = 2e5 + 69;
const int base = 311;

ll child[e];

int main()
{
    ll n;
    cin >> n;
    for(int i=2; i<=n; i++)
    {
        ll par;
        cin >> par;
        child[par] ++;
    }
    for(int i=1; i<=n; i++) cout << child[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<iostream>
using namespace std;

int main() {
	int N;
	cin >> N;
	int a[2000];
	int b[2000] = { 0 };//a[N - 1]
	for (int i = 0; i < N - 1; i++)
		cin >> a[i];

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

	}
	for (int i = 0; i < N; i++)
		cout << b[i] << 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 <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 <tuple>
#include <numeric>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = (1ll << 60);

int main(void)
{
    int n;

    cin >> n;

    vector<int> a(n + 1, 0);

    for (int i = 0; i < n - 1; i++)
    {
        int x;
        cin >> x;

        a[x]++;
    }

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


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

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<vector>

using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> vec(n,0);
  
  for(int i = 0; i < n; i++)
  {
    cin >> a;
    vec[--a]++;
  }
  
  for(int i = 0; i < n; i++)
  	cout << vec[i] << ' ';
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'a' was not declared in this scope
   16 |     cin >> a;
      |            ^
Language: C

#include <iostream>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

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

	for (int i = 0; i < n; i++) {
		cout << a[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 <bits/stdc++.h>
using namespace std;

int main()
{
  int N;
  vector<int> A(N);
  cin >> N;
  for (i = 0; i < N;i++) {
    cin >> A.at(i);
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i = 0; i < N;i++) {
      |        ^
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
    int N, idx ;
    cin >> N ;
    vector <int> A(N);
    rep(i,N-1){
        cin >> idx ;
        A[idx-1]++ ;
    }
    rep(i,N) cout << A[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector <int> A(N);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:13: error: expected primary-expression before 'int'
    8 |     vector <int> A(N);
      |             ^~~
a.cc:11:9: error: 'A' was not declared in this scope
   11 |         A[idx-1]++ ;
      |         ^
a.cc:13:22: error: 'A' was not declared in this scope
   13 |     rep(i,N) cout << A[i] << endl;
      |                      ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
 
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	int arr[n];
	fill(arr, arr + n, 0);
	
	for (int i = 1; i < n; i++) {
		cin >> arr[i];
		arr[i]--;
	}
	
	int ret[n];s
	fill(ret, ret + n, 0);
	
	for (int i = 1; i < n; i++) ret[arr[i]]++;
	
	for (int x : ret) cout << x << '\n';
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 's' was not declared in this scope
   22 |         int ret[n];s
      |                    ^
Language: C

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	
	int arr[n];
	fill(arr, arr + n, 0);
	
	for (int i = 1; i < n; i++) {
		cin >> arr[i];
		arr[i]--;
	}
	
	int ret[n];s
	fill(ret, ret + n, 0);
	
	for (int i = 1; i < n; i++) ret[arr[i]]++;
	
	for (int x : ret) cout << x << '\n';
	
	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 ll long long 
#define pb push_back
#define endl '\n'
#define ff first
#define ss second
#define pi pair<ll,ll>
using namespace std;
const int max_n = 1e5 + 3 ;
vector<int>adj[max_n] ;
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    int n ;
    cin>> n;
    adj[1].pb(1) ;
    for(int i =2;i <= n; ++i){
		int x ;
		cin>> x ;
		adj[i].pb(x) ;
		adj[x].pb(i) ;
	}
	for(int i =1 ;i <=  n; ++i){
		
		cout<< adj[i].size() - 1<<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[n-1];
    for(int i=2;i<=n1;i++)
        cin>>a[i];
    
    int b[n];
    for(int i=0;i<=n;i++)
        b[i]=0;
    for(int i=2;i<=n;i++)
    {b[a[i]]++;

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

    }

}


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>;
      |                    ^
a.cc: In function 'int main()':
a.cc:8:20: error: 'n1' was not declared in this scope; did you mean 'n'?
    8 |     for(int i=2;i<=n1;i++)
      |                    ^~
      |                    n
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
  int n;
  scanf("%d", &n);
  int i;
  int k;
  int b[n];
  memset(b, 0, sizeof(int) * n);
  b[n] = 0;
  for (i = 2; i <= n; i++)
  {
    scanf("%d", &ak);
    b[k]++;
  }
  
  for (i = 1; i <= n; i++)
    printf("%d\n", b[i]);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:18: error: 'ak' undeclared (first use in this function); did you mean 'k'?
   16 |     scanf("%d", &ak);
      |                  ^~
      |                  k
main.c:16:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> N;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:1: error: 'vector' was not declared in this scope
    6 | vector<int> A(N-1);
      | ^~~~~~
a.cc:6:1: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:8: error: expected primary-expression before 'int'
    6 | vector<int> A(N-1);
      |        ^~~
a.cc:10:1: error: 'A' was not declared in this scope
   10 | A[a-1]++;
      | ^
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout << A[i] << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:9: error: 'A' was not declared in this scope
   13 | cout << A[i] << endl;
      |         ^
a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout << A[i] << endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
  int n;
  scanf("%d", &n);
  int i, a[n], b[n];
  memset(b, 0, sizeof(int) * (n + 1));
  for (i = 2; i <= n; i++)
  {
    scanf("%d", &a[i]);
    b[a[i]]++;
  }
  for (i = 1; i <= n; i++)
    printf("%d\n", b[i]);
  return 0;
}@tsasaki#7478 

Compiler output:
main.c:17:2: error: stray '@' in program
   17 | }@tsasaki#7478
      |  ^
main.c:17:10: error: stray '#' in program
   17 | }@tsasaki#7478
      |          ^
main.c:17:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
   17 | }@tsasaki#7478
      |           ^~~~
Language: C++

//Lannisters Don't Act Like Fools

#include <iostream>
#include<string.h>
#include<math.h>
#include<bits/stdc++.h>

using namespace std;

int main() {
	// your code goes here
	int n;
  map<int,int>mp;
  scanf("%d",&n);
  int a[n],i;
  for(i=0;i<n;i++)
  {
    scanf("%d",&a[i]);
    map[a[i]]++;
  }
  for(i=1;i<=n;i++)
  {
    printf("%d\n",mp[i]);
  }

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected ']' before '[' token
   19 |     map[a[i]]++;
      |          ^
      |          ]
a.cc:19:14: error: expected initializer before '++' token
   19 |     map[a[i]]++;
      |              ^~
a.cc:19:14: error: expected ';' before '++' token
Language: C++

// AC.cpp : 定义控制台应用程序的入口点。
//

#pragma once



#include <stdio.h>
#include <tchar.h>
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n, m;
	cin >> n >> m;
	vector<int> a(m);
	for (auto &x : a)cin >> x;
	int ans = n - accumulate(a.begin(),a.end(), 0);
	cout << (ans >= 0 ? ans : -1);
    return 0;
}



Compiler output:
a.cc:4:9: warning: #pragma once in main file
    4 | #pragma once
      |         ^~~~
a.cc:9:10: fatal error: tchar.h: No such file or directory
    9 | #include <tchar.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

// AC.cpp : 定义控制台应用程序的入口点。
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n, m;
	cin >> n >> m;
	vector<int> a(m);
	for (auto &x : a)cin >> x;
	int ans = n - accumulate(a.begin(),a.end(), 0);
	cout << (ans >= 0 ? ans : -1);
    return 0;
}



Compiler output:
a.cc:4:9: warning: #pragma once in main file
    4 | #pragma once
      |         ^~~~
a.cc:6:10: fatal error: targetver.h: No such file or directory
    6 | #include "targetver.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
void test()
{
    int n;
    cin >> n;
    vector<vector<int>> buka;
    buka.resize(n);
    for (int i = 0; i < n - 1; ++i)
    {
        int a;
        cin >> a;
        buka.at(a - 1).push_back(1);
    }
    for (int i = 0; i < buka.size(); ++i)
    {
        cout << buka.at(i).size() << endl;
    }
}

int main()
{
    test();
}

Compiler output:
a.cc: In function 'void test()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'vector' was not declared in this scope
    6 |     vector<vector<int>> buka;
      |     ^~~~~~
a.cc:6:5: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:19: error: expected primary-expression before 'int'
    6 |     vector<vector<int>> buka;
      |                   ^~~
a.cc:7:5: error: 'buka' was not declared in this scope
    7 |     buka.resize(n);
      |     ^~~~
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         cout << buka.at(i).size() << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |         cout << buka.at(i).size() << endl;
      |                                      ^~~~
      |                                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

// AC.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n, m;
	cin >> n >> m;
	vector<int> a(m);
	for (auto &x : a)cin >> x;
	int ans = n - accumulate(a.begin(),a.end(), 0);
	cout << (ans >= 0 ? ans : -1);
    return 0;
}



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

#include<stdio.h>
#include<stdlib.h>

int main(void){
  int N;
  int *p,*q;
  scanf("%d",&N);
  p=calloc(N+1,sizeof(int));
  int i;
  q=calloc(N+1,sizeof(int));
  for(i=2; i<=N; i++)
    scanf("%d",&p[i]);
  
  for(i=2; i<=N; i++){
    q[p[i]]++;
  }
  for(i=1; i<=N; i+#include<stdio.h>
#include<stdlib.h>

int main(void){
  int N;
  int *p,*q;
  scanf("%d",&N);
  p=calloc(N+1,sizeof(int));
  int i;
  q=calloc(N+1,sizeof(int));
  for(i=2; i<=N; i++)
    scanf("%d",&p[i]);
  
  for(i=2; i<=N; i++){
    q[p[i]]++;
  }
  for(i=1; i<=N; i++)
    printf("%d\n",q[i]);
  free(q);
  free(p);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:20: error: stray '#' in program
   17 |   for(i=1; i<=N; i+#include<stdio.h>
      |                    ^
main.c:17:21: error: 'include' undeclared (first use in this function)
   17 |   for(i=1; i<=N; i+#include<stdio.h>
      |                     ^~~~~~~
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:29: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   17 |   for(i=1; i<=N; i+#include<stdio.h>
      |                             ^~~~~
      |                             stdin
main.c:20:1: error: expected expression before 'int'
   20 | int main(void){
      | ^~~
main.c:38:1: error: expected declaration or statement at end of input
   38 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(void){
  int N;
  int *p,*q;
  scanf("%d",&N);
  p=calloc(N+1,sizeof(int));
  q=calloc(N+1,sizeof(int));
  for(i=2; i<=N; i++)
    scanf("%d",&p[i]);
  int i;
  for(i=2; i<=N; i++){
    q[p[i]]++;
  }
  for(i=1; i<=N; i++)
    printf("%d\n",i);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: 'i' undeclared (first use in this function)
   10 |   for(i=2; i<=N; i++)
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
#include<vector>
using namespace std ;

int main()
{
  int N ;
  cin>>N ;
  vector<int>A(N,0) ;
  for(int i=0;i<N-1;i++){
    int tmp ;
    cin>>tmp ;
    A.at(tmp-1)++ ;
  }
 
  for(int i=0;i<N;i++) cout<<A.at(i)<<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 <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
  int n;
  scanf("%d", &n);
  int i;
  int a[n];
  int b[n];
  b[n] = {0};
  for (i = 2; i <= n; i++)
  {
    scanf("%d", &a[i]);
    b[a[i]]++;
  }
  
  for (i = 1; i <= n; i++)
    printf("%d\n", b[i]);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:10: error: expected expression before '{' token
   12 |   b[n] = {0};
      |          ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
  int n;
  scanf("%d", &n);
  int i;
  int a[n];
  int b[n] = {0};
  for (i = 2; i <= n; i++)
  {
    scanf("%d", &a[i]);
    b[a[i]]++;
  }
  
  for (i = 1; i <= n; i++)
    printf("%d\n", b[i]);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:14: error: variable-sized object may not be initialized except with an empty initializer
   11 |   int b[n] = {0};
      |              ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(),x.end()

int const N = 200001;
int n;
vector<int> g[N];

int main(){
    scanf("%d", &n);
    for(int i = 0, x; i<n-1; ++i){
        scanf("%d", &x);
        g[x].push_back(i+1);
    }
    for(int i = 1; i<=n; ++i)printf("%d\n", g[i].size());
}

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++

///HELLO THERE~!
///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE-SWE^19)

#include <bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define read freopen("blue.txt","r",stdin);
#define write freopen("red.txt","w",stdout);


typedef long long ll;

using namespace std;


int main()

{

    fastio;
    int n,a,x[N];
    cin>>n;


    for(int i=2; i<=n; i++)
        cin>>a,x[a]++;


    for(int i=1; i<=n; i++)
        cout<<x[i]<<endl;






    return 0;
}












return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'N' was not declared in this scope
   21 |     int n,a,x[N];
      |               ^
a.cc:26:16: error: 'x' was not declared in this scope
   26 |         cin>>a,x[a]++;
      |                ^
a.cc:30:15: error: 'x' was not declared in this scope
   30 |         cout<<x[i]<<endl;
      |               ^
a.cc: At global scope:
a.cc:51:1: error: expected unqualified-id before 'return'
   51 | return 0;
      | ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
Language: C

N=int(input())
A=list(map(int,input().split()))
dic={}
for i in range(1,N+1):
  dic[i]=0
for a in A:
  dic[a]=+1
for i in range(1,N+1):
  print(dic[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:3: error: expected expression before 'int'
    1 | N=int(input())
      |   ^~~
main.c:4:1: error: expected identifier or '(' before 'for'
    4 | for i in range(1,N+1):
      | ^~~
Language: C

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm>
#include<queue>
#include<map>
#include<set>
typedef long long ll;
const ll longinf=1LL<<60;
using namespace std;


int n,ai;
int a[210000];
int main()
{
    cin>>n;
    for (int i=1; i<=n-1; ++i)
    {
        cin>>ai;
        a[ai]++;
    }
    for (int i=1; i<=n; ++i)
        cout<<a[i]<<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 <iostream>
#include <bits/stdc++.h>
#include <string>
#include <numeric>
#include <vector>
#include <cmath>
#include <map>
#include <ctype.h>
using namespace std;

int main(){
    int n; cin >> n;
    int count[n-1] = {0};
    for(int x=0; x<n-1; x++){
        int num; cin >> num;
        count[num-1]++;
    }
    for(int x=0; x<n-1; x++){
        cout << count[x] << endl;
    }
    cout << "0" << endl;




}


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>
using namespace std;
int main() {
  int n; cin >> n;
  int var; vector<int> count(n+1, 0);
  for (int i = 1; i < n; i++) {
    cin >> var;
    count[var]++;
  }
  for (int i = 1; i < count.size(); i++) {
    cout << count[i] << "\n";
  }
}

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(void){
    int N;
    int A[N-2];
    int count=1;
    int count2=0;
    
    for(int j=0;j<N-2;j++){
        for(int i=0;i<N-2;i++){
            if(count==A[i]){
                count2=count2+1;
           }
        }
        count1=count1+1;
        cout<<count2;
        count2-=0;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'count1' was not declared in this scope; did you mean 'count2'?
   16 |         count1=count1+1;
      |         ^~~~~~
      |         count2
Language: C

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

int main(){
  int N;cin >> N;
  vector<int> B(N,0);
  for(int i=1;i<N;i++){
    int x;cin >> x;
    B[x-1] += 1;
  }
  for(int i=0;i<N;i++){
    cout << B[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 ;
	cin >> N;

	vector<int> ans(N,0);

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

	for (int a : ans)
	{
		cout << a << endl;
	}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: declaration does not declare anything [-fpermissive]
    7 |         int ;
      |         ^~~
a.cc:8:16: error: 'N' was not declared in this scope
    8 |         cin >> N;
      |                ^
Language: C

#include <cstdio>
#include <algorithm>
using namespace std;

int n,a[200005];

inline int read(){
	int s=0,t=1;
	char c=getchar();
	while((c<'0'||c>'9')&&c!='-')c=getchar(),t=-1;
	if(c=='-')c=getchar(),t=-1;
	while(c>='0'&&c<='9')s=(s<<1)+(s<<3)+(c^48),c=getchar();
	return s*t;
}

int main(void){
	n=read();
	for(int i=1;i<n;i++){
		int x=read();
		a[x]++;
	}
	for(int i=1;i<=n;i++)
	printf("%d\n",a[i]);
} 

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

#include <iostream>
#include <math.h>
#include <numeric>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <queue>
#include <queue>
#include <stack> 
#include <sstream>
#include <set>

typedef  long long ll;
const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};
const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = { 0, 1, 0,-1};
const int INF = 1e9;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
int guki (int a){
    if(a%2==0) return 0;
    else return 1;
}
int gcd(int a, int b){
    if(a%b==0){
        return b;
    }else{
        return (gcd(b,a%b));
    }
}
int lcm(int a, int b){
    int x = gcd(a,b);
    return (a*b/x);
}

using namespace std;
// now

struct UnionFind {
    vector<int> d;
    UnionFind(int n=0) : d(n,-1){}
    int Find (int x){//根の番号を探す
        if(d[x] < 0) return x;
        return d[x] = Find(d[x]);
    }
    bool unite (int x, int y){
        x = Find(x); y = Find(y);
        if(x == y ) return false;
        if(d[x] < d[y]){
            swap(x,y);
        }
        d[x] += d[y];
        d[y] = x;
        return true;
    } 

    bool same(int x, int y){
        return Find(x) == Find(y);
    }
    int size(int x) {
        return (-d[Find(x)]);
    }
};


ll nCr (ll n, ll r){
    ll ans = 1;
    for(ll i = n ; i > n-r ; i --){
        ans *= i;
    }
    for(ll i = 1 ; i<= r; i ++){
        ans /= i;
    }
    return ans ;
}

int nPr (int n,int r){
    int ans = 1;
    for(int i = n ; i > n-r ; i --){
        ans *= i;
    }
    return ans ;
}
int ke (int n){
    n--;
    if(n == 1 )return 0;
    int ans = 1;
    while (0 < n){
        ans *= n;
        n--;
    }
    return ans ;

}

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

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

    REP(i,n){
        cout << vec[i] <<endl;
    }
}





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

#include<cstdio>
#include<iostream>
#include<cstring>
#include<string>
#include<utility>
#include<vector>
using namespace std;


int main(){
    int n;
    cin >> n;
    vector<int> boss(n);
    for(int i=0;i<n-1; i++){
        int x;
        cin >> x;
        boss.at(x-1) +=1;
    }

    for(int i=0; i<n; i++){
        cout << boss.at(i) << endl;
    }
}

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

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

Compiler output:
main.c: In function 'main':
main.c:11:19: error: subscripted value is neither array nor pointer nor vector
   11 |     scanf("%d", &m[i]);
      |                   ^
main.c:12:11: error: subscripted value is neither array nor pointer nor vector
   12 |     boss[m[i]]++;
      |           ^
Language: C

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
#include <map>
#include <string.h>
#include <cstring>
 
using namespace std;
int main() {
    long long n;
    cin >> n;
    
    long long a[200010];
    long long ans[200010];
    
    for(long long i=2;i<=n;i++){
        cin >> a[i];
    }
    for(long long i=2;i<=n;i++){
        ans[a[i]]++;
    }
    
    for(long long i=1;i<=n;i++){
        cout << ans[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<bits/stdc++.h>
#define pi acos(-1)
using namespace std;

int cunt[1000000];

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


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

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

    //int n;

    //cin>>n;
    //cout<<2*n*pi<<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>
using namespace std;
int cunt[1000000];
int main ()
{
   int tc;
    cin>>tc;
    for(int i=0; i<tc-1; i++)
    {
        int n;
        cin>>n;
        cunt[n]++;
    }

    for(int i=1; i<=tc; i++)
    {
        cout<<cunt[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 = gets.chomp.to_i
hash = Hash.new(0)
ary = gets.chomp.split.each { |i| hash[i.to_i] += 1 }
1.step(N) do |i|
  puts hash[i]
end

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = gets.chomp.to_i
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: 'gets' undeclared here (not in a function)
    1 | N = gets.chomp.to_i
      |     ^~~~
main.c:2:1: error: expected ',' or ';' before 'hash'
    2 | hash = Hash.new(0)
      | ^~~~
main.c:4:1: error: invalid suffix "step" on floating constant
    4 | 1.step(N) do |i|
      | ^~~~~~
main.c:4:1: error: expected identifier or '(' before numeric constant
Language: C

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

#pragma GCC optimize("Ofast")
#define rep(i,a,n) for(int i=a; i<n; i++)
typedef long long ll;
typedef pair<int,int> P;
const ll MOD = (int)1e9+7;
const ll INF = MOD*MOD;
const ll powll = 1LL<<1;

int main(){
	int n; cin >> n;
    int a[n]; rep(i,0,n-1) cin >> a[i];

     int ans[n] ={};
     rep(i,0,n-1){
         ans[a[i]-1]++; 
     }
     rep(i,0,n){
         cout << ans[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;

int main() {
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++){
    a[i]=0;
  }
  for(int i=0;i<n;i++){
    int l;
    cin>>l;
    a[l-1]++;
  }
  for(int i=0;i<n;i++){
    cout<<a[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 i, j, n;
  int a[2*100000] = { 0 };
  int buka[2*100000] = { 0 };

  cin >> n;
  
  for(i = 2; i <= n; i++)
    cin >> a[i];
  
  for(i = 2; i <= n; i++)
      buka[a[i]]++;
  
  for(i = 1; i <= n; i++)
    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;
  cin>>N;
  vector<int> vec(N-1);
  for(int i=0;i<N-1;i++){

  cin>>vec[i];
  }
vector<int> veC(N-1);
for(int i=0;i<N-1;i++){
for(int j=0;j<N-1;j++){
  if(vec[i]==j+1){
veC[j]++;
  }
}
}


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

  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
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+1);
   vector<int> result(N+1, 0);

   for (int i=2; i<N+1; i++){
      cin >> A.at(i);
   }

   for (int i=2; i<N+1; i++)
      result.at(A.at(i))++;

   for (int i=1; i<N+1; i++)
      cout << result.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<stdio.h>
int main(void){
  int n;
  scanf("%d",&n);
  for(int i=2;i<=n;i++){
    scanf("%d",&a[i]);
  }
  for(int i=2;i<=n;i++){
    ans[a[i]]++;
  }
  for(int i=2;i<=n;i++){
    printf("%d\n",ans[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d",&a[i]);
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:5: error: 'ans' undeclared (first use in this function)
    9 |     ans[a[i]]++;
      |     ^~~
Language: C

//inlclude前用define 
#define _USE_MATH_DEFINES

//include
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<type_traits>
#include<numeric>
//#include<deque>
#include<iomanip>
#include<set>
#include<tuple>
#include<map>
#include<limits>

using namespace std;

//typedef
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<char> VC;
typedef long long int ll;

//define
#define INF 1e9 
#define NUM 1000000007
#define all(x) begin(x), end(x)
#define rep(i,n) for(int i=0;i<(int)(n);i++)

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

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


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