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

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;++i)
#define ocut cout
#define ouct cout
#define itn int

struct Union{
  vector<ll> par;
  Union(ll a){
  par=vector<ll>(a,-1);
  }
  ll find(ll a){
    if(par[a]<0){
      return a;
    }
    else{
      return par[a]=find(par[a]);
    }
  }
  bool same(ll a,ll b){
    return (find(a)==find(b));
  }
  ll size(ll a){
    return -par[find(a)];
  }
  void unite(ll a,ll b){
    ll c=find(a),d=find(b);
    if(c==d)
      return;
    if(size(c)<size(d)){
      swap(c,d);
    }
    par[c]+=par[d];
    par[d]=c;
  }
};

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 | #define rep(i,n) for(ll i=0;i<n;++i)
      |                              ^
a.cc:45:3: note: in expansion of macro 'rep'
   45 |   rep(i,b+1)b[i]=0;
      |   ^~~
Language: C

n = int(input())
arr = map(int, input().split())
d = {}
for i in arr:
    i -= 1
    if i not in d:
        d[i] = 1
    else:
        d[i] += 1

for i in range(n):
    if i in d:
        print(d[i])
    else:
        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())
      |     ^~~
main.c:4:1: error: expected identifier or '(' before 'for'
    4 | for i in arr:
      | ^~~
Language: C

#include <bits/stdc++.h>
#define rep(i,a) for(int i=0;i<a;i++)
using namespace std;
using ll = long long;
int main(void){
    int n;
    cin>>n;
    int m;
    int a[1000000]={};
    for(int i=1;i<n;i++){
        cin>>m;
        a[m-1]++;
    }
    rep(i,n)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;
const double pi = acos(-1);

int32_t main () {
	int n;
	cin >> n;
	vector<int> arr(n+1, 0);
	for(int i = 1; i < n; i ++) {
		int x; cin >> x;
		arr[x] ++;
	}
	for(int i = 1; i <= n; i ++) {
		cout << arr[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 ll long long;
#define dbg(x) cout<<#x<<"--------------"<<x<<endl;
#define dl cout<<"LINE"<<__LINE__<<endl;
using namespace std;
int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    int n;int a[9999];
    cin>>n;
    for(int i=2;i<=n;i++){
        int x;
        cin>>x;
        a[x]++;
    }
    for(int i=1;i<=n;i++){
        cout<<a[i]<<endl;
    }





    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#include <map>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
typedef long long 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;
}




int main() {
    ll n;
    cin >> n;
    vector<ll> a(n);
    FOR(i, 1, n) {
        cin >> a[i];
    }
    vector<ll> num(n);
    FOR(i, 1, n) {
        ll boss = a[i]-1;
        num[boss] += 1;
    }
    REP(i, n) {
        cout << num[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;

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 

typedef long long int ll;
typedef long int li;

const ll mod = 1000000007;
const ll inf = 1000000000000000000;

typedef vector<int> vi;
typedef vector<li> vli;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<vli> vvli;
typedef vector<vll> vvll;
typedef vector<vs> vvs;
typedef map<ll, ll> mll;
typedef map<ll, string> mls;
typedef map<string, ll> msl;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#pragma GCC optimize ("-O3")
#define FAST ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 
#define PI 3.14159265358979323846
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define tol(s) transform(s.begin(), s.end(), s.begin(), ::tolower);
#define tou(s) transform(s.begin(), s.end(), s.begin(), ::toupper);
#define all(v) v.begin(), v.end()
#define FOR(i, j, k, in) for(li i=j; i<k; i+=in)
#define RFOR(i, j, k, de) for(li i=j; i>=k; i-=de)
#define rep(i,j,k) FOR(i, j, k, 1)
#define rrep(i,j,k) RFOR(i, j, k, 1)
#define repc(v) for(auto it=v.begin(); it!=v.end(); it++)
#define T ll t; cin>>t; while(t--)

ll gen(){
    ll temp;
    cin>>temp;
    return temp;
}

int main(){
  FAST

  ll n,a;
  mll mp;
  rep(i,0,n){
  	cin>>a;
    mp[i+1]++;
  }
  
  repc(mp)
    cout<<(it->ss)<<"\n";
  
  if(mp.size()<n){
  	rep(i,0,(n-mp.size()) cout<<"0\n";
  }
  
  return 0;
}







Compiler output:
a.cc:76:1: error: unterminated argument list invoking macro "rep"
   76 | 
      | ^
a.cc: In function 'int main()':
a.cc:67:9: error: 'rep' was not declared in this scope
   67 |         rep(i,0,(n-mp.size()) cout<<"0\n";
      |         ^~~
a.cc:67:12: error: expected '}' at end of input
   67 |         rep(i,0,(n-mp.size()) cout<<"0\n";
      |            ^
a.cc:66:18: note: to match this '{'
   66 |   if(mp.size()<n){
      |                  ^
a.cc:67:12: error: expected '}' at end of input
   67 |         rep(i,0,(n-mp.size()) cout<<"0\n";
      |            ^
a.cc:53:11: note: to match this '{'
   53 | int main(){
      |           ^
Language: C

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;


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

	cin >> N;

	for(int i=0; i<N+1; i++){
		A.push_back(0);
	}

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

	for(int i=1; i<N+1; 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 <iostream>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int a=[200000];
  for(int i=0;i<n-1;i++)
  {
    cin>>a[i];
  }
  for(int i=1;i<n+1;i++)
  {
    int s=0;
    for(int j=0;j<n;j++)
    {
      if(a[j]==i)
      {
        s=s+1;
      }
    }
    cout<<s<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected identifier before numeric constant
    7 |   int a=[200000];
      |          ^~~~~~
a.cc: In lambda function:
a.cc:7:17: error: expected '{' before ';' token
    7 |   int a=[200000];
      |                 ^
a.cc: In function 'int main()':
a.cc:7:9: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive]
    7 |   int a=[200000];
      |         ^~~~~~~~
a.cc:7:9: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
    7 |   int a=[200000];
      |         ^
a.cc:7:9: note:   no known conversion from 'void (*)()' to 'int'
a.cc:10:11: error: invalid types 'int[int]' for array subscript
   10 |     cin>>a[i];
      |           ^
a.cc:17:11: error: invalid types 'int[int]' for array subscript
   17 |       if(a[j]==i)
      |           ^
Language: C

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

# define C continue;
# define R return

# define D double
# define I insert
# define ll long long
# define ld long double

# define ull unsigned long long
# define ui unsigned int

# define pb push_back
# define pf push_front

# define vi vector < int >
# define vc vector < char >
# define vs vector < string >
# define vb vector < bool >
# define vd vector < D >
# define vll vector < ll >
# define vull vector < ull >
# define vld vector < ld >
# define PQ priority_queue

# define vvi vector < vector < int > >
# define vvb vector < vector < bool > >
# define vvc vector < vector < char > >
# define vvs vector < vs >
# define vvll vector < vector < ll > >
# define vvd vector < vector < D > >
# define vvld vector < vector < ld > >

# define all(v) (v).begin() , (v).end()
# define allrev(v) (v).rbegin() , (v).rend()
# define allcomp(v) v.begin() , v.end() , comp
# define allrevcomp(v) v.rbegin() , v.rend() , comp

# define pii pair < int , int >
# define pll pair < ll , ll >
# define pld pair < ld , ld >
# define pDD pair < D , D >

# define vpld vector < pld >
# define vpii vector < pii >
# define vpll vector < pll >
# define vpDD vector < pDD >

# define vvpii vector < vector < pii > >
# define F first
# define S second
# define mp make_pair

# define dist(a,b,p,q) sqrt((p-a)*(p-a) + (q-b)*(q-b))

# define pp(n) printf("%.10Lf",n);
# define line cout<<"\n";
# define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0);

string vow = "aeiou";
int month[] = {-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

const int dxhorse[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyhorse[] = {1, -1, 2, -2, 2, -2, 1, -1};

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

const ld pie = 3.1415926535897932384626 ;
const ll mod = 1e9 + 7 ;

/// Tip : If a and b are positive integers ; we may say - ceil (a/b) = 1 + floor ( (a-1)/b ) .

void solve ( int test_case )
{
    int n ;
    cin >> n ;

    vi deg ( n + 5 ) ;
    for ( int i = 2 ; i <= n ; i ++ )
    {
        int par ;
        cin >> par ;

        deg[par] ++ ;
    }

    for ( int i = 1 ; i <= n ; i ++ )
        cout << deg[i] , line ;


}

int main()
{
    int t = 1;
    // cin >> t;

    for ( int i=1 ; i <= t ; i ++ ) solve ( i ) ;
    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 main(void){
    int n,i,num;
    cin >> n;
    int a[n];
    for(i=0; i<n; i++){
        a[i]=0;
    }
    for(i=1; i<n; i++){
        cin >> num;
        a[num-1]+=1;
    }
    for(i=0; i<n; i++){
        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

/*input
7
1 2 3 4 5 6
*/
 
 
 
#include <bits/stdc++.h>
using namespace std;
 
 
 
#define int long long int
#define rep(i,n) \
    for(int i = 0; i < n; i++)
#define rep2(i, a, b) \
    for(int i = a; i < b; i++)
#define all(c) \
    c.begin(), c.end()
#define init(arr, num) \
    memset(arr, num, sizeof(arr))
#define fast\
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define inputFile \
    freopen("input.txt", "r", stdin); 
#define outputFile \
    freopen("output.txt", "w", stdout);
#define modM 1000000007
#define PI 3.1415926535897932
#define F first
#define S second 
#define pb push_back   
 
#ifdef gaviria
#define TRACE
#endif
#ifdef TRACE
#define trace(...) _f(#VA_ARGS, __VA_ARGS_)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
    cout << name << " : " << arg1 << std::endl;
 
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
    const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}
#else
#define trace(...)
#endif
 
 
typedef long long ll;
typedef vector<int> vi;
typedef vector< vi > vvi;
typedef pair< int, int > ii;
typedef unordered_set<int> usi;
 
ll i,j,k,c=0,m;
ll n;

void solve() 
{

cin>>n;
ll a[n];
vector <int> v[n+1];

for(i=1;i<n;i++)
{
    cin>>a[i];
    v[a[i]].pb(i);

}
for(i=1;i<=n;i++)
{
cout<<v[i].size()<<endl;

}

}










            












     
 
 
 
 
signed main()
{
 
    // inputFile;
    fast;
    int T = 1;
//cin >> T;

    while(T--){

      
        solve();

        cout << endl;
        
        
 
    }
    
    
    return 0;
 
}

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

//author : raghav_0901
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
//#define int long long int
#define f(i,s,e) for(i=s;i<e;++i)
#define fr(i,s,e) for(i=s;i>=e;i--)
#define all(x) (x).begin(),(x).end()
#define all_r(x) (x).rbegin(),(x).rend()
#define _in(v) for(auto &x:v) cin>>x;
#define ffr(i,s,e,f) for(i=s;i>=e && f;i--)
#define ff(i,s,e,f) for(i=s;i<e && f;++i)
#define mem(arr,val) memset(arr, val, sizeof(arr));
#define _out(v) for(auto x:v) cout<<x<<' '; cout<<'\n';
#define ARENA ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
 
const int lim = 1000000;
const int mod = 1e9;

typedef vector<double> vec;
typedef pair<int,int> pr;

//-----------------------------------------functions---------------------------------------------------------------------------------
int gcd(int a,int b) { return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a*b/gcd(a,b);}
inline int n_sum(int n){return (n*(n+1))/2;}
int power(int a,int b){int res=1;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a;a=a*a;}return res;}
int powmod(int a,int b){int res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
int gcdExtended(int a,int b,int &x,int &y){if(a==0){x=0;y=1;return b;}int x1,y1,gcd=gcdExtended(b%a,a,x1,y1);x=y1-((b/a)*x1);y=x1;return gcd;}
int modInv(int a,int m){int x,y;gcdExtended(a,m,x,y);return (x%m + m)%m;}
int divM(int a,int b){return (modInv(b,mod)*(a%mod))%mod;}
//------------------------------------------------------------------------------------------------------------------------------------


void _main(void)
{
    int i,num,n,m;cin>>n>>m;
    f(i,0,m)
    {
        cin>>num;n-=num;
    }
    cout<<max(-1,n)<<endl;
    return;
} 

signed main(void)
{
    ARENA
    int t=1,i;//cin>>t;
    f(i,1,t+1)
    {
        //cout<<"Case #"<<i<<": ";
        _main();
    }
    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 <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (i=a;i<n;i++)
#define per(i,a,n) for (i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define SIZE 1000001
#define ONLINE_JUDGE
#define rd
#define PI acos(-1)
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
auto clk=clock(); 
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
const ll infl=0x3f3f3f3f3f3f3f3fLL;
const int infi=0x3f3f3f3f;

int main(){

	int i,n,freq[200005];
	memset(freq,0,sizeof(freq));
	cin>>n;
	rep(i,1,n){
		int x;
		cin>>x;
		freq[x-1]++;
	}
	rep(i,0,n) cout<<freq[i]<<"\n";ndl<<endl<<endl<<endl<<"Time elapsed: "<<(double)(clock()-clk)/CLOCKS_PER_SEC<<endl;
	#endif
	return 0;
}

Compiler output:
a.cc:39:10: error: #endif without #if
   39 |         #endif
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:38:40: error: 'ndl' was not declared in this scope
   38 |         rep(i,0,n) cout<<freq[i]<<"\n";ndl<<endl<<endl<<endl<<"Time elapsed: "<<(double)(clock()-clk)/CLOCKS_PER_SEC<<endl;
      |                                        ^~~
Language: C

#include <bits/stdc++.h>
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define sz(v) (int)(v).size()
using namespace std;
typedef long long ll;
int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);

	ll N;
	cin >> N;
	vector<ll> mem(N, 0);

	rep2 (i, 2, N + 1)
	{
		ll buka;
		cin >> buka;
		mem[buka - 1] += 1;
	}

	rep(i, N)
	{
		cout << mem[i] << '\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

/*input
7
1 2 3 4 5 6
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 

#define rep(i,j,n) for(i=j;i<n;i++)
#define repi(i,j,n) for(i=j;i>n;i--)
#define inf 100001
#define M 1000000007
#define ll long long
#define ld long double
#define vll vector<long long>
#define vi vector<int>
#define pll pair<long long,long long>
#define pii pair<int,int>
#define vpii vector<pair<int,int> >
#define vpll vector<pair<long long,long long> >
#define pb push_back
#define pf pop_front
#define F first
#define S second
#define endl '\n'

using namespace std;
using namespace __gnu_pbds; 

template<typename T>
using ordered_set=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;


ll power(ll a,ll m,ll mod){
	ll ans=1;
	while(m){
		if(m%2){
			ans*=a;
			ans%=(mod);
		}
		a=(a*a)%(mod);
		m>>=1;
	}
	return ans;
}


void init(ll* a,ll n,ll val){
	for(ll i=0;i<n;i++)
		a[i]=val;
}



int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);	
	ll t=1,i,j;
	ll n;
	cin>>n;
	ll x;
	ll a[n]={0};
	rep(i,0,n-1)cin>>x,--x,a[x]++;
	rep(i,0,n)cout<<a[i]<<endl;
	return 0;
}




Compiler output:
main.c:6:10: fatal error: bits/stdc++.h: No such file or directory
    6 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
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()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

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;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<int> vec(n);
    rep(i, n-1) {
        int tmp; cin >> tmp;
        tmp--;
        vec[tmp]++;
    }
    rep(i, n) cout << vec[i] << endl;
    return 0;
}

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
		int syaink = sc.nextInt();
      int[] buka=new int[syaink];
      for(int i=0;i<buka.length;i++){
        buka[i]=0;
      }
      for(int i=0;i<syaink-2;i++){
        int a=sc.nextInt();
        buka[a]+=1;
      }
      for(int i=0;i<buka.length;i++){
      System.out.println(buka[i]);
	}
}

Compiler output:
Main.java:18: error: reached end of file while parsing
}
 ^
1 error
Language: C

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


using namespace std;

const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;


#define DEBUG

#ifdef DEBUG
#define PRINT(A) std::cout << (#A) << ":" << (A) << std::endl;
#else
#define PRINT(A)
#endif

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;
}


int A, B;
int a[10010][10010], b[1000];
int dp[10010][3];
 
int main()
{
    int N; cin >> N;
    int A[2*100000];
    rep(i,N-1){
        int B;
        cin >> B;
        A[B] += 1;
    }

    rep(i,N){
        cout << A[i+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>
#define pii pair<int,int>
#define F first
#define S second
#define maxn 100005
using namespace std;
typedef long long ll;

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n;cin>>n;
    vector<int> c(n+1,0);
    for(int i=2;i<=n;++i)
    {
        int a; cin>>a;
        c[a]++;
    }
    for(int i=1;i<=n;++i)
    {
        cout<<c[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;

typedef long long ll;
typedef int64_t i6;

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 1; i <= n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define Sort(x) sort(ALL(x))
#define Sort_rev(x) Sort(x);reverse(ALL(x))

template<typename V,typename T>
T find_num(V v, T num) {
    if ( find(ALL(v), num) == v.end() ) {
        return false;
    } else {
        return true;
    }
}

// π M_PI
// deg = rad*180/M_PI

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

#include <iostream>
using namespace std;
int main(){
	int n;
	int a[200000];
	int a2;
	cin >> n;
	for(int i = 0;i < n;i++){
		a[i] = 0;
	}
	for(int i = 0;i < n - 1;i++){
		cin >> a2;
		a[a2 - 1]++;
	}
	for(int i = 0;i < n;i++){
		cout << a[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;
using ll = long long;

const int MOD = 1e9+7;
int add(int a, int b){return ((ll)a + (ll)b)%MOD;}
int mul(int a, int b){return ((ll)a * (ll)b)%MOD;}

void solve(){
  int n; cin >> n;
  vector<int> freq(n);
  for(int i = 1; i < n; i++){
    int a; cin >> a;
    freq[a-1]++;
  }

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

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
		int syaink = sc.nextInt();
      int[] buka=new int[syaink];
      for(int i=0;i<buka.length;i++){
        buka[i]=0;
      }
      for(int i=0;i<syaink-2;i++){
        int a=sc.nextInt();
        buka[a]+=1;
      }
      for(int i=0;i<buka.length;i++){
        println(buka[i]);
      }
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
        println(buka[i]);
        ^
  symbol:   method println(int)
  location: class Main
1 error
Language: C

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

#define F first
#define S second
#define eb emplace_back
#define PI 3.14159265
#define sz(c) (int)c.size()
#define len(c) (int)c.length()
#define hcf(a, b) __gcd(a, b)
#define all(c) c.begin(), c.end()
#define vint vector<int>
#define vll vector<ll>
#define vpint vector<pair<int, int>>
#define vpll vector<pair<ll, ll>>
#define tr(container, it) \
    for (typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define fr(it, a, b) \
    for (int it = (a); it < (b); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element) (find(all(container), element) != container.end())
#define maximum(a, b, c) (a > b ? (a > c ? a : c) : (b > c ? b : c))
#define minimum(a, b, c) (a < b ? (a < c ? a : c) : (b < c ? b : c))
typedef long long ll;
typedef long double ld;
typedef unsigned long long lu;
const ll mod = 1e9 + 7;
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    vint a(n + 1);
    fr(i,0,n-1)
    {
        int x;
        cin>>x;
        a[x]++;
    }
    fr(i,1,n+1)
    {
        cout<<a[i]<<"\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 rep(i, x, N) for (int i = x; i < (N); i++)
using namespace std;
typedef long long ll;

int main()
{
    int N;
    cin >> N;
    vector<int> ans(N);
    rep(i, 0, N - 1)
    {
        int x;
        cin >> x;
        ans[x - 1] += 1;
    }
    rep(i, 0, N)
    {
        cout << ans[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;
// type alias
typedef long long LL;
typedef pair<int,int> II;
typedef tuple<int,int,int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int,int> MAPII;
typedef unordered_set<int> SETI;
template<class T> using VV=vector<vector<T>>;
// minmax
template<class T> inline T SMIN(T& a, const T b) { return a=(a>b)?b:a; }
template<class T> inline T SMAX(T& a, const T b) { return a=(a<b)?b:a; }
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// collection
#define ALL(c) (c).begin(),(c).end()
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// stdout
#define println(args...) fprintf(stdout, ##args),putchar('\n');
// debug cerr
template<class Iter> void __kumaerrc(Iter begin, Iter end) { for(; begin!=end; ++begin) { cerr<<*begin<<','; } cerr<<endl; }
void __kumaerr(istream_iterator<string> it) { (void)it; cerr<<endl; }
template<typename T, typename... Args> void __kumaerr(istream_iterator<string> it, T a, Args... args) { cerr<<*it<<"="<<a<<", ",__kumaerr(++it, args...); }
template<typename S, typename T> std::ostream& operator<<(std::ostream& _os, const std::pair<S,T>& _p) { return _os<<"{"<<_p.first<<','<<_p.second<<"}"; }
#define __KUMATRACE__ true
#ifdef __KUMATRACE__
#define dump(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); __kumaerr(_it, args); }
#define dumpc(ar) { cerr<<#ar<<": "; FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }
#define dumpC(beg,end) { cerr<<"~"<<#end<<": "; __kumaerrc(beg,end); }
#else
#define dump(args...)
#define dumpc(ar)
#define dumpC(beg,end)
#endif

// $ cp-batch Management | diff Management.out -
// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG -fsanitize=address Management.cpp && ./a.out

/*
 
 4/19/2020
 
 5:15-
 
 */

const int MAX_N=1e6+1;
int A[MAX_N];
int N;

void solve() {
  VI cnt(N,0);
  REP(i,N-1)cnt[A[i]-1]++;
  REP(i,N) cout<<cnt[i]<<endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout<<setprecision(12)<<fixed;
  
  cin>>N;
  REP(i,N-1) cin>>A[i];
  solve();
  
  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;

#define ll long long int
#define FIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define loop(i,x,n) for(int i=x;i<n;i++)
#define arr 1000005
#define F first
#define S second
#define pii pair<int,int>

const int modu=1e9+7;
ll mod(ll n){
    return (n%modu);
}

bool cmp(ll a,ll b){
    return a>b;
}

int main() {
    FIO
    map<ll,ll> m;
    ll n;
    cin>>n;
    loop(i,1,n){
        ll x;
        cin>>x;
        m[x]++;
    }
    loop(i,1,n+1){
        cout<<m[i]<<"\n";
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'map' was not declared in this scope
   23 |     map<ll,ll> 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:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long int
      |            ^~~~
a.cc:23:9: note: in expansion of macro 'll'
   23 |     map<ll,ll> m;
      |         ^~
a.cc:29:9: error: 'm' was not declared in this scope
   29 |         m[x]++;
      |         ^
a.cc:32:15: error: 'm' was not declared in this scope
   32 |         cout<<m[i]<<"\n";
      |               ^
Language: C


// Problem : C - management
// Contest : AtCoder - AtCoder Beginner Contest 163
// URL : https://atcoder.jp/contests/abc163/tasks/abc163_c
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)


/**         srijan_de
 _____      _ _              ______     
/  ___|    (_|_)             |  _  \    
\ `--. _ __ _ _  __ _ _ __   | | | |___ 
 `--. \ '__| | |/ _` | '_ \  | | | / _ \
/\__/ / |  | | | (_| | | | | | |/ /  __/
\____/|_|  |_| |\__,_|_| |_| |___/ \___|
            _/ |                         
           |__/           23.02.2001     **/
///.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.
#include    <bits/stdc++.h>  
using       namespace       std;
using       lli=            long long  int;
using       ulli=           unsigned long long int;
using       ld=             long double;
#define     mem(a,val)      memset( a,  val,  sizeof(a) )
#define     b_s             binary_search
#define     u_b             upper_bound
#define     l_b             lower_bound
#define     nl              cout<<endl
#define     pb              push_back
#define     pf              push_front
#define     ppb             pop_back
#define     ppf             pop_front
#define     in              insert
#define     fi              first
#define     se              second
#define 	pqueue			priority_queue
const lli   MOD=            (int)1e9 + 7;
const lli   MOD1=           (int)1e9 + 9;
const lli   MOD2=           998244353;
const ld    pi=             atan2(0, -1);
const ld    eps=            1e-9;
lli         tests=          1;
template<class x,class y>x max(x a,y b){return (a>b)?a:b;}
template<class x,class y>x min(x a,y b){return (a<b)?a:b;}
template<class x,class y>x log(x n,y r){return (n>r-1)?1+log(n/r,r):0;}

///.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.
int32_t main() 
{
	auto start = clock();
ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);	

//	cout<<fixed;
//	cout<<scientific;
//	cout<<fixed<<setprecision(12);
	// cin>>tests;
	for(lli test=1;test<=tests;test++) 
	{
//		cout<<"Case #"<<test<<": ";
///.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.
		
		
		
		
		lli n;
		cin>>n;
		lli a[n]={0};
		
		for(lli i=1;i<n;i++)
		{
		    lli x;
		    cin>>x;
		    a[x-1]++;
		}
		for(lli i=0;i<n;i++)
		cout<<a[i]<<endl;
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
///.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.
	}
	cerr<<endl<<endl<<endl<< "Time : " << double(clock() - start) / CLOCKS_PER_SEC <<endl;
	return 0;
}
///.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.


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

#include <iostream>
#include <cmath>
using namespace std;
int num[200010],q[200010];
int main(){
   int n;
   cin>>n;
   int x;
   for(int i=1;i<n;i++){
       cin>>x;
       q[i]=x;
       num[x]++;
   }
   for(int i=0;i<n;i++){
        cout<<num[q[i]+1]<<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 <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define _GLIBCXX_DEBUG
#define INF 100000010
using namespace std;
const int mod = 1000000007;


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

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>
#include <algorithm>
#include <cmath>
#include <queue>
#include <iomanip>
#include <map>
#include <set>
#include <tuple>
#include <unordered_map>
#include <iterator>
#include <string>
#include <limits>

using namespace std;

using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = 1000000007;
int int_max = 2147483647;
int max_n = 1e5;


int main(int argc, char **argv) {
    int n;
    cin >> n;

    std::vector<int> as(n+1,0);
    std::vector<int> sub(n+1, 0);
    for (int i=2; i<n+1; ++i) {
        cin >> as[i];
        ++sub[as[i]];
    }

    for (int i=1; i<n+1; ++i) {
        cout << sub[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 t[200005];
int main()
{
	int n;
	for(cin>>n,i=1; i<=n; i++)
	{
		int x;
		cin>>x;
		t[x]++;
	}
	for(int i=1; i<=n; i++)cout<<t[i]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'i' was not declared in this scope
    7 |         for(cin>>n,i=1; i<=n; i++)
      |                    ^
Language: C++

//#pragma GCC optimize("O3")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds; 

#define int long long
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define f first
#define s second
#define sz(x) (int)x.size()
#define endl '\n'
#define forn(i,n) for(int i=0;i<n;++i)
#define fore(i,l,r) for(int i=int(l);i<=int(r);++i)
#define rep(i,begin,end) for(__typeof(end) i=(begin);i!=(end);i++)
#define fill(a,value) memset(a,value,sizeof(a));
#define gcd(a,b) __gcd((a),(b))
#define watch1(x) cout << (x) << endl
#define watch2(x,y) cout << (x) << " " << (y) << endl
#define watch3(x,y,z) cout << (x) << " " << (y) << " " << (z) << endl
#define fastio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.14159265358979323846

typedef long long ll;
typedef long double ld; 
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef tree<pii,null_type,less<pii>,rb_tree_tag,tree_order_statistics_node_update> oset;

// find_by_order(k) returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

const int mod = 998244353;
const int inf = 9e18;
const int N = 2e5 + 5;

int i,n,a[N],freq[N];

void solve(){
    cin>>n;
    for(i=2;i<=n;++i){
        cin>>a[i];
        fre[a[i]]++;
    }
    for(i=1;i<=n;++i){
        cout<<freq[i]<<endl;
    }
}

signed main(){
    fastio;
    int t;
    //cin>>t;
    t=1;
    while(t--){
        solve();
    }
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:54:9: error: 'fre' was not declared in this scope; did you mean 'freq'?
   54 |         fre[a[i]]++;
      |         ^~~
      |         freq
Language: C

///mAAria...
#include<bits/stdc++.h>
 
using namespace std;
 
#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define pii pair<int,int>
#define pi 3.1415926535897932384626433832
#define mod 1000000000
//#define mod 998244353
#define inf 1000000000
#define pr1(a) cout << a << "\n"
#define pr2(a,b)cout << a <<  " " <<b<< "\n"
#define pr3(a,b,c) cout << a <<" " << b << " " << c << "\n"

const long double PI = acos(-1);

int powm(int a, int b) {
    int res=1;
    while(b) {
        if(b&1)
            res=(res*a)%mod;
        a=(a*a)%mod;
        b>>=1;
    }
    return res;
}

int gcd(int a, int b){
    if(b==0)return a;
    return gcd(b,a%b);
}
const int maxn = 2*1e5 + 10;

int a[maxn];

void solve(){
    int n;
    cin >> n;
    

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

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

} 

signed main() 
{   
    IOS;
    int t = 1;
    // cin >> t;

    for(int i = 1;i<=t;i++){
        solve();
    }
    return 0;
} 

 

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

#include<bits/stdc++.h>
#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod = 1000000007;

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

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

  rep(i, n) {
    cout << cnt[i + 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

N = int(input())
A = list(map(int, input().split()))

from collections import Counter

cnter = Counter(A)

for i in range(1, N +1):
    print(cnter[i])



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

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define VECV(a,n,m) vector<vector<int>> a(n, vector<int>(m));
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}


int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin>>N;
  int A[N-1];
  int B[N];
  rep(i,N-1){
    cin>>A[i];
  }
  rep(i,N){
    B[i]=0;
  }
  rep(i,N-1){
    B[A[i]-1]+=1;
  }
  rep(i,N){
    cout<<B[i]<<endl;
  }
  

}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using namespace std;
      | ^~~~~
main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    1 | using namespace std;
      |                 ^~~
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 n, a, cnt[200005];

int main() {
    cin >> n;
    for (int i = 2; i <= n; i++){
        cin >> a;
        cnt[a]++;
    }
    for (int i = 1; i <= n; i++){
        cout << cnt[i] << "\n";
    }
}


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 < (int)(n); i++)

int main (){
  int N;
  cin>>N;
  vector<int>a(N,0);
  rep(i,N-1){
    int x;
    cin>>x;
    x--;
    a[x]++;
  }
  rep(i,N){
    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 n; cin >>n;
    vector<long> ans(n,0);
    int tmp;
    for(int i=1;i<n;i++){
    	cin>>tmp;
        ans[tmp-1]++;
    }
    for (int i=0;i<n;i++) cout <<ans[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 int long long
#define f first
#define s second
using namespace std;
int32_t main(){
    if(fopen("input.txt", "r"))
    freopen("input.txt", "r", stdin),
    freopen("output.txt", "w", stdout);
    ios::sync_with_stdio(0),cin.tie(0);
    int n;
    cin >> n;
    int a[n+1]={0};
    for(int i=1;i<n;i++){
        int x;
        cin >> x;
        a[x]++;
    }
    for(int i=1;i<=n;i++)
        cout << a[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 int long long 
#define alpha_size 26

const int N = 2e5 + 10;
int par[N];
int a[N];

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);    

    int n;
    cin >> n;
    for (int i = 2; i <= n; i++){
      int x;
      cin >> x;
      par[x]++;
    }
    for (int i = 1; i <= n; i++)
      cout << par[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 <iostream>
#include <cstdint>

using namespace std;

uint32_t a[200001];

int main(int argc, char const* argv[]) {
	uint32_t N;

	cin >> N;

	for (uint32_t i = 2; i <= N; i++) {
		uint32_t tmp;
		cin >> tmp;

		a[tmp]++;
	}

	for (uint32_t i = 1; 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>

#define MAXN 200010
using namespace std;
int sub[MAX];
int N;
int main()
{
	cin>>N;
    for(int i = 1; i <= N; ++i)
    	sub[i] = 0;
    for(int i =2; i <= N; ++i)
    {
    	int tmp;
        cin>>tmp;
        sub[tmp]++;
    }
    for(int i = 1; i <= N; ++i)
    	cout<<sub[i]<<endl;
    return 0;

}

Compiler output:
a.cc:5:9: error: 'MAX' was not declared in this scope; did you mean 'MAXN'?
    5 | int sub[MAX];
      |         ^~~
      |         MAXN
a.cc: In function 'int main()':
a.cc:11:9: error: 'sub' was not declared in this scope; did you mean 'fsub'?
   11 |         sub[i] = 0;
      |         ^~~
      |         fsub
a.cc:16:9: error: 'sub' was not declared in this scope; did you mean 'fsub'?
   16 |         sub[tmp]++;
      |         ^~~
      |         fsub
a.cc:19:15: error: 'sub' was not declared in this scope; did you mean 'fsub'?
   19 |         cout<<sub[i]<<endl;
      |               ^~~
      |               fsub
Language: C

#pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
#define IO std::ios::sync_with_stdio(false)
#define ll long long
#define rep(i, l, r) for (int i = l; i <= r; i++)
#define per(i, l, r) for (int i = l; i >= r; i--)
#define mset(s, _) memset(s, _, sizeof(s))
#define pb push_back
#define pii pair <int, int>
#define mp(a, b) make_pair(a, b)
#define INF 0x3f3f3f3f

inline int read() {
  int x = 0, neg = 1; char op = getchar();
  while (!isdigit(op)) { if (op == '-') neg = -1; op = getchar(); }
  while (isdigit(op)) { x = 10 * x + op - '0'; op = getchar(); }
  return neg * x;
}
inline void print(int x) {
  if (x < 0) { putchar('-'); x = -x; }
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
const int maxn = 2e5 + 10;
int n,a[maxn];
map<int,int> memo;
signed main() {
  IO;
  cin >> n;
  rep(i,2,n) cin >> a[i];
  rep(i,1,n){
  	memo[a[i]]++;
  }
  rep(i,1,n){
  	cout << memo[i] << '\n';
  }
  return 0;
}

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

#include <iostream>
#include <map>

using namespace std;

int main() {
    int N;
    cin >> N;
    map<int, int> mp;
    for(int n=1; n<N; n++) {
        int A;
        cin >> A;
        mp[A]++;
    }
    for(auto itr=mp.begin(); itr!=mp.end(); itr++) {
        cout << itr->second << endl;
    }
    

    return 0;
    
}

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