criyle/codenet-compile-errors huggingface dataset:
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;
  cin>>n;
  mll mp;
  rep(i,0,n){
  	cin>>a;
    mp[a]++;
  }
  
  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:77:1: error: unterminated argument list invoking macro "rep"
   77 | 
      | ^
a.cc: In function 'int main()':
a.cc:68:9: error: 'rep' was not declared in this scope
   68 |         rep(i,0,(n-mp.size()) cout<<"0\n";
      |         ^~~
a.cc:68:12: error: expected '}' at end of input
   68 |         rep(i,0,(n-mp.size()) cout<<"0\n";
      |            ^
a.cc:67:18: note: to match this '{'
   67 |   if(mp.size()<n){
      |                  ^
a.cc:68:12: error: expected '}' at end of input
   68 |         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<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define rep(i,n)for(int i=0;i<n;i++)
#define int long long
#define ggr getchar();getchar();return 0;
#define prique priority_queue
constexpr auto mod = 1000000007;
#define inf 1e15
#define key 1e9
using namespace std;
typedef pair<int, int>P;
void yes() { cout << "Yay!" << endl; }
void no() { cout << ":(" << endl; }
template<class T> inline void chmax(T& a, T b) {
	a = std::max(a, b);
}
template<class T> inline void chmin(T& a, T b) {
	a = std::min(a, b);
}

//combination(Nが小さい時はこれを使う)
const int MAX = 300000;
int fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % mod;
		inv[i] = mod - inv[mod % i] * (mod / i) % mod;
		finv[i] = finv[i - 1] * inv[i] % mod;
	}
}
int COMB(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}

bool prime(int n) {
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n % i == 0)cnt++;
	}
	if (cnt != 1)return false;
	else return n != 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x % y);
}
int lcm(int x, int y) {
	return x / gcd(x, y) * y;
}

//繰り返し二乗法（Nが大きい時の場合のcombination)
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}
int kai(int x, int y) {
	int res = 1;
	for (int i = x - y + 1; i <= x; i++) {
		res *= (i % mod); res %= mod;
	}
	return res;
}
int comb(int x, int y) {
	if (y > x)return 0;
	return kai(x, y) * mod_pow(kai(y, y), mod - 2, mod) % mod;
}
//UnionFind
class UnionFind {
protected:
	int* par, * rank, * size;
public:
	UnionFind(unsigned int size) {
		par = new int[size];
		rank = new int[size];
		this->size = new int[size];
		rep(i, size) {
			par[i] = i;
			rank[i] = 0;
			this->size[i] = 1;
		}
	}
	int find(int n) {
		if (par[n] == n)return n;
		return par[n] = find(par[n]);
	}
	void unite(int n, int m) {
		n = find(n);
		m = find(m);
		if (n == m)return;
		if (rank[n] < rank[m]) {
			par[n] = m;
			size[m] += size[n];
		}
		else {
			par[m] = n;
			size[n] += size[m];
			if (rank[n] == rank[m])rank[n]++;
		}
	}
	bool same(int n, int m) {
		return find(n) == find(m);
	}
	int getsize(int n) {
		return size[find(n)];
	}
};
int dight_sum(int n) {
	int sum = 0;
	rep(i, 20)sum += (n % (int)pow(10, i + 1)) / (pow(10, i));
	return sum;
}
int n;
int a[214514], b[224514];
signed main() {
	cin >> n;
	rep(i, n)cin >> a[i];
	rep(i, n)b[a[i] - 1]++;
	rep(i, n)cout << b[i] << endl;
	ggr
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'll' was not declared in this scope
    7 |   vector<ll> a(n, 0);
      |          ^~
a.cc:7:12: error: template argument 1 is invalid
    7 |   vector<ll> a(n, 0);
      |            ^
a.cc:7:12: error: template argument 2 is invalid
a.cc:7:20: error: expression list treated as compound expression in initializer [-fpermissive]
    7 |   vector<ll> a(n, 0);
      |                    ^
a.cc:8:7: error: expected ';' before 'i'
    8 |   rep(i, 0, n-1) {
      |       ^
a.cc:3:27: note: in definition of macro 'rep'
    3 | #define rep(i,s,n) for(ll i = (s); i < (n); i++)
      |                           ^
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i, 0, n-1) {
      |       ^
a.cc:3:36: note: in definition of macro 'rep'
    3 | #define rep(i,s,n) for(ll i = (s); i < (n); i++)
      |                                    ^
a.cc:10:6: error: invalid types 'int[int]' for array subscript
   10 |     a[m-1]++;
      |      ^
a.cc:12:7: error: expected ';' before 'i'
   12 |   rep(i, 0, n)  cout << a[i] << endl;
      |       ^
a.cc:3:27: note: in definition of macro 'rep'
    3 | #define rep(i,s,n) for(ll i = (s); i < (n); i++)
      |                           ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   rep(i, 0, n)  cout << a[i] << endl;
      |       ^
a.cc:3:36: note: in definition of macro 'rep'
    3 | #define rep(i,s,n) for(ll i = (s); i < (n); i++)
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
int arr[t] ans[t+1];
for(int i=1; i<=t; i++) ans[i]=0;
for(int i=1; i<t; i++) cin >> arr[i];
for(int i=1; i<t; i++) ans[arr[i]]++;
for(int i=1; i<=t; i++) cout << ans[i] << "\n";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected initializer before 'ans'
    6 | int arr[t] ans[t+1];
      |            ^~~
a.cc:7:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 | for(int i=1; i<=t; i++) ans[i]=0;
      |                         ^~~
      |                         abs
a.cc:8:31: error: 'arr' was not declared in this scope
    8 | for(int i=1; i<t; i++) cin >> arr[i];
      |                               ^~~
a.cc:9:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 | for(int i=1; i<t; i++) ans[arr[i]]++;
      |                        ^~~
      |                        abs
a.cc:9:28: error: 'arr' was not declared in this scope
    9 | for(int i=1; i<t; i++) ans[arr[i]]++;
      |                            ^~~
a.cc:10:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 | for(int i=1; i<=t; i++) cout << ans[i] << "\n";
      |                                 ^~~
      |                                 abs
Language: C

/*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include<algorithm>
#include <bits/stdc++.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<ctype.h>
using namespace std;
#define pb push_back
#define S second
#define F first
#define f(i,n) for(ll i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define vi vector<int>
#define pii pair<int,int>
#define CASES  ll t;cin>>t;while(t--)
typedef long long ll;
typedef unsigned long long ull;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
int main()
{
fast;
ll n;
cin>>n;
ll a[n];
map<ll,ll>m;
for(ll i=1;i<n;i++)
{
    cin>>a[i];
    m[a[i]]++;
}
for(ll i=0;i<n;i++)
    cout<<m[i+1]<<' ';
return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int mod=1000000007;
#define PI 3.1415926535
#define pb  push_back
#define FOR(i,n) for(int i=0;i<(n);i++)
#define FORA(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);
#define count_1(n)  __builtin_popcountll(n)
#define parity(n)   __builtin_parityll(n)   //Even parity 0 as output
void show    (int a[], int arraysize) { for (int i = 0; i < arraysize; ++i)  {cout << a[i] << " ";}	cout<<endl;}
int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b);}
void sieve(int n)
{
    bool prime[n+1];
    memset(prime, true, sizeof(prime));

    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for (int p=2; p<=n; p++)
       if (prime[p])
          cout << p << " ";
}
int main()
{FAST
int n;
cin>>n;
int a[n-1],b[200002]={0};
FOR(i,n-1)
{
	cin>>a[i];
	b[a[i]]++;
}
FORA(i,1,n)
{
	cout<<b[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<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define vi vector<ll>
#define vvi vector<vi >
#define pi pair<ll,ll>
#define vvpi vector<vector<pi > >
#define vpi vector<pi >
#define vppi vector<pair<ll,pi > >
#define vs vector<string>
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define eb emplace_back
#define mkp make_pair
#define fs first
#define se second
#define fast ios_base::sync_with_stdio(false)
#define cintie cin.tie(NULL)
int main()
{
	ll n,i,x;
   cin>>n;
   vvi v(200010);
   for(i=2;i<=n;i++)
   {
   	  cin>>x;
   	  v[i].pb(x);
   	  v[x].pb(i);
   }
   for(i=1;i<=n;i++)
   {
   	  if(i==1)
   	  cout<<v[i].size()<<endl;
   	  else
   	  {
   	  	cout<<v[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>
#include<cstdlib>
#include<cstdio>
#include<string>
#include<iomanip>
#include<algorithm>
#include<vector>
using namespace std;

int N, M;
string S;
long double R;


int main(){


    cin >> N;
    vector<int> A(N);
    vector<int> num(N); 

    for(int i=0;i<N-1;i++){

        cin >> A[i];
        num[i] = 0;
    }

    for(int i=1\0;i<N-1;i++){
        num[A[i]-1]++;
    }
    for(int i=0;i<N;i++){
        cout << num[i] << endl;
    }
}

Compiler output:
a.cc:28:16: error: stray '\' in program
   28 |     for(int i=1\0;i<N-1;i++){
      |                ^
a.cc: In function 'int main()':
a.cc:28:16: error: expected ';' before numeric constant
   28 |     for(int i=1\0;i<N-1;i++){
      |                ^~
      |                ;
a.cc:28:24: error: expected ')' before ';' token
   28 |     for(int i=1\0;i<N-1;i++){
      |        ~               ^
      |                        )
a.cc:28:25: error: 'i' was not declared in this scope
   28 |     for(int i=1\0;i<N-1;i++){
      |                         ^
Language: C

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

int main () {
    int n;
    cin >> n;
    map<int, int> m; 
    for (int i = 0; i < n; i++) {
        int x;
        cin >> x;
        x--;
        m[x]++;
    }

    for (int i = 0; i < n; i++) cout << m[i] << "\n";
}



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

//#define _GLIBCXX_DEBUG
#include <iostream>
#include <bits/stdc++.h>
    
    
using namespace std;
#define ll long long
#define ld long double
#define  P pair<ll,ll>
#define FOR(i,n,m) for(ll i=n; i<(ll)m;i++)
#define FORr(i,m,n) for(ll i=n; i>=(ll)m; i--)
#define FORm(i,m) for(auto i=m.begin();i!=m.end();i++)
#define REV(v) reverse(v.begin(),v.end())
#define sortAl(v) sort(v.begin(),v.end())
#define sortAlr(v) sort(v.begin(),v.end()); reverse(v.begin(),v.end())
#define cout(n) cout<<fixed<<setprecision(n)
#define dout(n) cout<<# n<<" = "<<n<<endl;
#define v1out(v) FOR(j,0,v.size()){cout<<v[j]; if(j!=(ll)v.size()-1)cout<<" ";else cout<<endl; }
#define v2out(v) FOR(i,0,v.size())v1out(v[i]);

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin>>n;
    vector<ll> v(n+1);
    FOR(i,0,n-1){
        ll in;
        cin>>in;
        v[in]++;
    }
    FOR(i,1,n+1){
        cout<<v[i]<<endl;
    }
}

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

//
// Created by yamunaku on 2020/04/19.
//

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repl(i, l, r) for(int i = (l); i < (r); i++)
#define per(i, n) for(int i = ((n)-1); i >= 0; i--)
#define perl(i, l, r) for(int i = ((r)-1); i >= (l); i--)
#define all(x) (x).begin(),(x).end()
#define MOD9 998244353
#define MOD1 1000000007
#define IINF 1000000000
#define LINF 1000000000000000000
#define SP <<" "<<
#define CYES cout<<"Yes"<<endl
#define CNO cout<<"No"<<endl
#define CFS cin.tie(0);ios::sync_with_stdio(false)
#define CST(x) cout<<fixed<<setprecision(x)

using ll = long long;
using ld = long double;
using vi = vector<int>;
using mti = vector<vector<int>>;
using vl = vector<ll>;
using mtl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
template<typename T>
using heap = priority_queue<T, vector<T>, function<bool(const T, const T)>>;

int main(){
    //CFS;
    int n;
    cin >> n;
    vi a(n);
    repl(i, 1, n){
        cin >> a[i];
        a[i]--;
    }
    vi ans(n, 0);
    perl(i, 1, n){
        ans[a[i]] += 1;
    }
    rep(i, n){
        cout << ans[i] << endl;
    }
    return 0;
}

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

import collections
N = int(input())
A = list(map(int,input().split()))
B = collections.Counter(A)
C = []
for i in B.keys():
  C.append((i,B[i]))
C.sort()
#print(C)
a = 0
for j in range(len(C)):
    print(C[j][1])
    a += 1
for l in range(N-a):
  print(0)




Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import collections
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'N'
    2 | N = int(input())
      | ^
main.c:9:2: error: invalid preprocessing directive #print
    9 | #print(C)
      |  ^~~~~
Language: C

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

typedef unsigned long long  ULL;
typedef long long LL;

#define pb push_back
#define mp make_pair
#define reset(a, b) memset(a, b, sizeof(a))
#define rep(i,b) for(int i=0; i<b; i++)
#define F first 
#define S second

 
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    int T;
//    cin>>T;
    T=1;
    while(T--){
       
       int n;
       cin>>n;
       
       map<int,int> m;
       
       rep(i,n-1){
           int x;
           cin>>x;
           m[x]++;
           
           
       }
       
       rep(i,n){
           cout<<m[i+1]<<"\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>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

	 
int main()
{
	fastio;
	
	int n,a;
	cin>>n;
	int A[n+1]={0};
	for(int i=2;i<=n;i++)
	{
		cin>>a;
		A[a]++;
	}
	for(int i=1;i<=n;i++)
	cout<<A[i]<<"\n";
	
	
	return 0;
	
	
}

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

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

using namespace std;
//using namespace __gnu_pbds;

#define LL       long long
#define PR       pair<LL, LL>
#define READ(f)  freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)

const int N = 3e5 + 5;
const int MOD = 1e9 + 7;
const double PI = 2 * acos(0.0);
//template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

LL sub[N], vis[N];
vector<int> g[N];

void dfs(int u) {
    vis[u] = 1;
    LL cnt = 0;
    for (auto v : g[u]) {
        if (!vis[v]) {
            dfs(v);
            cnt += sub[v];
            cnt++;
        }
    }
    sub[u] = cnt;
}

int main() {
//    ios::sync_with_stdio(false);
//    cin.tie(0);
    int n;
    cin >> n;
    for (int i = 2; i <= n; i++) {
        int u;
        cin >> u;
        g[u].push_back(i);
    }
//    for (int i = 1; i <= n; i++) {
//        if (!vis[i]) {
//            dfs(1);
//        }
//    }
    for (int i = 1; i <= n; i++) {
        cout << (int)g[i].size() << '\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<iostream>
#define loop(i,start,end) for(int i=start;i<end;i++)
using namespace std;
int main(){
   int n;
   cin>>n;
   vector<int> v(n);
   loop(i,0,n-1){
   		int l;
   		cin>>l;
   		v[l-1]++;
   }
   loop(i,0,n){
   		cout<<v[i]<<"\n";
   }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: 'vector' was not declared in this scope
    7 |    vector<int> v(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 | #define loop(i,start,end) for(int i=start;i<end;i++)
a.cc:7:11: error: expected primary-expression before 'int'
    7 |    vector<int> v(n);
      |           ^~~
a.cc:11:17: error: 'v' was not declared in this scope
   11 |                 v[l-1]++;
      |                 ^
a.cc:14:23: error: 'v' was not declared in this scope
   14 |                 cout<<v[i]<<"\n";
      |                       ^
Language: C

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

int cnt[200200];

int main(){
	int n;
	scanf("%d", &n);
	rep(i, n-1){
		int p;
		scanf("%d", &p);
		p--;
		cnt[p]++;
	}
	rep(i, n) printf("%d\n", cnt[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 <iostream>
#include <vector>
#include <array>
#include <algorithm>
#include <cstring>
#include <queue>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <cstdlib>
#include <sstream>
#include <bitset>

using namespace std;

//#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

typedef long long ll;
//typedef pair<ll, ll> P;

//static const ll MOD = 1000000007;
//static const ll INF = 100000000;
//#define PI 3.14159265359

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

    // process
    ll ans[N];
    memset(ans, 0, sizeof(ans));

    for (ll i = 0; i < N - 1; ++i) {
        ans[A[i] - 1]++;
    }

    for (ll j = 0; j < N; ++j) {
        cout << ans[j] << 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;
  cin>>N;
  vector<int> S(N-1,0);
  vector<int> T(N,0);
  for(int i=0; i<N-1; i++){
    cin>>S.at(i);
    T.at(S.at(i)-1)++;
  }
 
  for(int i=0; i<N; i++){
    cout<< T.at(i)<<endl;
  }



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

/*
 * written by Yaqi Zhang
 * University of Wisconsin-Madison
 * 2020
 */

#include<algorithm>
#include<cstring>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stdio.h>
#include<vector>

#define INF 0x3f3f3f3f

using namespace std;

vector<int> tree[200005];

int main(int argc, char *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int N;
    cin >> N;
    for(int i = 2; i <= N; ++i) {
        int p;
        cin >> p;
        tree[p].push_back(i);
    }
    for(int i = 1; i <= N; ++i) {
        cout << tree[i].size() << endl;
    }
    return 0;

}



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

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

#define ll long long
vector<int> players 
int main() {
    int n;
    cin >> n;

    map<int, int> m;
    m[1] = 0;
    for (int i=2; i<=n; i++) {
        int boss;
        cin >> boss;
        m[boss] += 1;
    }

    for (int i=1; i<=n; i++) {
        if (m.count(i)) {
            cout << m[i] << endl;
        } else {
            cout << 0 << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main() {
      | ^~~
Language: C

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

int main() {
	ll i, j, k, l, test, n;
	cin >> n;
	map<ll, ll> m;
	for (i = 0; i < n-1; i++) {
		cin >> k;
		m[k]++;
	}
	for (i = 1; i <= n; i++) {
		//cout << "car";
		cout << m[i] << "\n";
	}
}

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

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

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

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

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld          long long int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<lld>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>; 
//change null_type to get ordered_map
#define N  100005
#define DEC(N)	cout << std::fixed; cout << setprecision(N);
void solve()
{
	lld n;
	cin >> n;
	lld cnt[n+2]; 
	rep(i,0,n+2){
		cnt[i]=0;
	}
	rep(i,2,n+1){
		lld x;
		cin >> x;
		cnt[x]++;
	}
	rep(i,1,n+1){
		cout << cnt[i] << endl;
	}
}
signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}

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

#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define N 200001

using namespace std;
vector<vector<ll>> a;

int main(void){
  ll n;
  cin >> n;
  
  a = vector<vector<ll>>(n, vector<ll>(0));
  for (int i = 0; i < n-1; i++){
    ll b;
    cin >> b;
    
    b--;
    a[b].emplace_back(i);
  }

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

  return 0;
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: no matching function for call to 'sort(std::vector<int>::iterator, <unresolved overloaded function type>)'
   13 |         sort(buka.begin(),buka.end);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:63: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C

#include <iostream>
#include <iomanip>
#include <cstdint>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <numeric>
#include <limits>

int main() {

    int64_t N;
    std::cin >> N;

    std::vector<int64_t> employees(N);

    for (int64_t i = 1; i < N; ++i) {
        int64_t A;
        std::cin >> A;
        employees.at(A-1)++;
    }

    for (auto employee : employees) {
        std::cout << employee << 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 <iostream>

int main() {
  int n;
  int a[200001] = [0];
  std::cin >> n;
  for(int i=0; i<n; i++) {
    int b;
    std::cin >> b;
    a[b] += 1;
  }
  for(int i=1; i<n; i++) {
    std::cout << a[i] << " ";
  }
  std::cout << a[n] << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: expected identifier before numeric constant
    5 |   int a[200001] = [0];
      |                    ^
a.cc: In lambda function:
a.cc:5:22: error: expected '{' before ';' token
    5 |   int a[200001] = [0];
      |                      ^
a.cc: In function 'int main()':
a.cc:5:19: error: array must be initialized with a brace-enclosed initializer
    5 |   int a[200001] = [0];
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pi 3.14159
#define long long int ll
int main()
{
	ll n;
	cin>>n;
	map<ll,ll>m;
	m[1]=0;
	for(ll i=2;i<n+1;i++)
	{
		ll x;
		cin>>x;
		m[x]++;
	}
	for(ll i=1;i<=n;i++)
	{
		cout<<m[i]<<endl;
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'll' was not declared in this scope
    7 |         ll n;
      |         ^~
a.cc:8:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |         cin>>n;
      |              ^
      |              yn
a.cc:9:18: error: template argument 3 is invalid
    9 |         map<ll,ll>m;
      |                  ^
a.cc:9:18: error: template argument 4 is invalid
a.cc:10:10: error: invalid types 'int[int]' for array subscript
   10 |         m[1]=0;
      |          ^
a.cc:11:15: error: expected ';' before 'i'
   11 |         for(ll i=2;i<n+1;i++)
      |               ^~
      |               ;
a.cc:11:20: error: 'i' was not declared in this scope
   11 |         for(ll i=2;i<n+1;i++)
      |                    ^
a.cc:13:19: error: expected ';' before 'x'
   13 |                 ll x;
      |                   ^~
      |                   ;
a.cc:14:22: error: 'x' was not declared in this scope
   14 |                 cin>>x;
      |                      ^
a.cc:17:15: error: expected ';' before 'i'
   17 |         for(ll i=1;i<=n;i++)
      |               ^~
      |               ;
a.cc:17:20: error: 'i' was not declared in this scope
   17 |         for(ll i=1;i<=n;i++)
      |                    ^
Language: C++

//
// Created by kinok on 2020/04/19.
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iomanip>

using namespace std;


#define ll long long
#define rep(t) for(int i=0;i<t;i++)
#define deb(a) cout<<#a<<" : "<<a<<endl
#define debv(v) do{cout<<#v<<" : ";for(auto a:v){cout << a <<" ";} cout<<endl;}while(0);
#define PI 3.141592653589793



void a(){
    int a;
    cin>>a;
    cout<<fixed<<setprecision(8)<<a*2*PI<<endl;
}

void b(){
    ll n,m,total=0,k;
    cin>>n>>m;
    rep(m){
        cin>>k;
        total+=k;
    }
    cout<<(n<total?-1:n-total)<<endl;
}
void c(){
ll n;
    cin>>n;
    vector<ll> a(n);
    vector<ll> ans(n,0);
    rep(n-1){
        cin>>a.at(i);
        ans.at(a.at(i)-1)+=1;
    }
    rep(n){
        cout<<ans.at(i)<<endl;
    }
}

void d(){

}

void e(){

}

void f(){

}


int main(){
    c);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:6: error: expected ';' before ')' token
   66 |     c);
      |      ^
      |      ;
Language: C

    #include<bits/stdc++.h>
    #define ll long long
    #define pb push_back
    #define fi first
    #define se second
    ll sieve[1000001]={0},i,j;
    ll m=1e9+7;
    ll lev=0;
    ll n,k;
    ll power(ll p, ll k)
    {
    ll a=1;
    while(k)
    {
    if(k&1)
    a=(a*p)%m;
    p=(p*p)%m;
    k>>=1;
    }
    return a;
    }
    using namespace std;
    vector<ll> v[1000000+1];
    ll vis[1000000+1]={0};
    void dfs(ll u,ll p,ll lev)
    {
        vis[u]=lev;
    for(auto x: v[u])
    {
    if(x!=p)
    {
    dfs(x,u,lev+1);
    }
    }
    }
    int main()
    {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
     int tc=1;
    //cin>>tc;
    ll cas=1;
     while(tc--)
     {
      
    ll n;
    cin>>n;
    ll a[n+1];
    map<ll,ll> m;
    for(i=2;i<=n;i++)
    {
    cin>>a[i];
    m[a[i]]++;
    }
    for(i=1;i<=n;i++)
    {
    cout<<m[i];
         cout<<"\n";
     } 
     } 
    }

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fi first
#define se second
ll sieve[1000001]={0},i,j;
ll m=1e9+7;
ll lev=0;
ll n,k;
ll power(ll p, ll k)
{
ll a=1;
while(k)
{
if(k&1)
a=(a*p)%m;
p=(p*p)%m;
k>>=1;
}
return a;
}
using namespace std;
vector<ll> v[1000000+1];
ll vis[1000000+1]={0};
void dfs(ll u,ll p,ll lev)
{
    vis[u]=lev;
for(auto x: v[u])
{
if(x!=p)
{
dfs(x,u,lev+1);
}
}
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 int tc=1;
//cin>>tc;
ll cas=1;
 while(tc--)
 {
  
ll n;
cin>>n;
ll a[n+1];
map<ll,ll> m;
for(i=2;i<=n;i++)
{
cin>>a[i];
m[a[i]]++;
}
for(i=1;i<=n;i++)
{
cout<<m[i];
     cout<<"\n";
 } 
 } 
}

Compiler output:
main.c:1:13: 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() {
	long long n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a.at(n);
	}
	
	vector<int> b(n);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (a.at(j) == i) {
				b.at(i)++;
			}
		}
		cout << b.at(j) << endl;
	}
}

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

#include <iostream>
typedef long long ll; 
const ll mod = 1e9+7;
#define fo(i, n) for (int i = 0; i < n; i++)
#define sc(n) scanf("%d", &n) 
using namespace std;

int n;

void solve() {
    sc(n);
    int ans[200005] = {0};
    int x;
    fo(i, n-1) {
        sc(x);
        ans[x]++;       
    }
    fo(i, n) {
        printf("%d\n", ans[i+1]);
    }

}

int main() {
    int t = 1;
    //scanf("%d", &t);
    while (t--) {
        solve();
    }
    return 0;
}

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

#include <stdio.h>


int main(){
    int n;
    cin >> n;
    int boss[n];
    int nums[n];
    for(int i = 0; i < n; i++)
        nums[i] = 0;
    for(int i = 0; i < n-1; i++)
        scanf("%d", &boss[i]);
    
    for(int i = 0; i < n; i++)
        for(int j = 0; j < n-1; j++){
            if(boss[j] == i+1){
                nums[i] ++;
            }
        }
    
    for(int i = 0; i < n; i++)
        cout << nums[i] << "\n";

    
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'cin' undeclared (first use in this function)
    6 |     cin >> n;
      |     ^~~
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:9: error: 'cout' undeclared (first use in this function)
   22 |         cout << nums[i] << "\n";
      |         ^~~~
Language: C++

#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<string>
#include<iomanip>
#include<algorithm>
#include<vector>
using namespace std;

int N, M;
string S;
long double R;


int main(){


    cin >> N;
    vector<int> A(N);
    vector<int> num(N); 

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

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

   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: no match for 'operator=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
   27 |         cin >> num[i] = 0;
      |                         ^
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:718:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator=(std::basic_istream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
  718 |       operator=(basic_istream&& __rhs)
      |       ^~~~~~~~
/usr/include/c++/14/istream:718:33: note:   no known conversion for argument 1 from 'int' to 'std::basic_istream<char>&&'
  718 |       operator=(basic_istream&& __rhs)
      |                 ~~~~~~~~~~~~~~~~^~~~~
Language: C++



#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define F first
#define S second
#define db double
#define pb push_back
#define rep(i,a,b)  for(ll i=a;i<=b;i++)
#define all(a) a.begin(),a.end()
using namespace std;

 ll mod=1e9 ;

ll expo(ll base,ll exponent,ll mod){
    ll ans=1;
    while(exponent!=0){
        if(exponent&1) ans=(1LL*ans*base)%mod;
        base=(1LL*base*base)%mod;
        exponent>>=1;
    }
    return ans%mod;
}
 
vector<bool>  prime(90000002,true);
void Sieve() 
{ 
   
    for (int p=2; p*p<=90000001; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=90000001; i += p) 
                prime[i] = false; 
        } 
    } 
}

ll vis[100001]={0};
void dfs(ll node,vector<vector<ll>>&g)
{
  vis[node]=1;
  for(auto x:g[node])
  {
    if(!vis[x]) dfs(x,g);
  }
  return ;
}


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //   #ifndef ONLINE_JUDGE
    // // for getting input from input.txt
    // freopen("input.txt", "r", stdin);
    // // for writing output to output.txt
    // freopen("output.txt", "w", stdout);
    // #endif
    //compute();
    //Sieve();
    
   ll tests=1;
 // cin>>tests;
  ll t=1;
    while(tests--)
    {
      ll n,i,j;
      cin>>n;
      vector<vector<ll>>tree(n+1);
      vector<ll>cnt(n+1,0)
      for(i=2;i<=n;i++)
      {
        cin>>j;
        cnt[j]++;
        
      }
      //vector<ll>val(n+1,0)
      for(i=1;i<=n;i++) cout<<cnt[i]<<"\n";


        t++;
    }
    return 0;
   }

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

#pragma GCC optimze("Ofast")
#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;
#define mod 1000000007
#define md 998244353
#define trace(...)
#define ll long long int
#define ld long double
#define fi first
#define se second
#define fr(i,a,b) for(ll i=a;i<=b;i++)
#define frr(i,b,a) for(ll i=b;i>=a;i--)
#define mem(a) memset(a, 0, sizeof(a))
#define vpi std::vector<pair<int,int>>
#define pii pair<int,int>
#define pb push_back
#define sall(v) sort(v.begin(),v.end())
#define all(v) (v.begin(),v.end())
#define minf -10000000
const ll infl=0x3f3f3f3f3f3f3f3fLL;
const int infi=0x3f3f3f3f;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> oset;
auto clk=clock();
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
    uniform_int_distribution<int> uid(0,lim-1);
    return uid(rang);
}
ll power(ll x, ll y,ll p) { 
    ll res = 1;      // Initialize result 
    x = x % p;  // Update x if it is more than or equal to p 
    while (y > 0) {  
        if (y & 1) // If y is odd, multiply x with result
            res = (res*x) % p;  
        y = y>>1; // y = y/2 // y must be even now
        x = (x*x) % p;   
    } 
    return res; 
}
ll power(ll x, ll y) { 
    ll res = 1;      // Initialize result 
    while (y > 0) {    
        if (y & 1)// If y is odd, multiply x with result 
            res = (res*x) ;  
        y = y>>1; // y = y/2 // y must be even now 
        x = (x*x);   
    } 
    return res; 
}
 
ll max3(ll a,ll b,ll c){
    return max(a,max(b,c));
}
ll min3(ll a,ll b,ll c){
    return min(a,min(b,c));
}
bool isPrime(ll n) { // Corner cases 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
    for (ll i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
    return true; 
}
vector<int> A[200010];
void solve() {
    int n;cin>>n;
    int temp;
    fr(i,2,n){
        cin>>temp;
        A[temp].pb(i);
    }
    fr(i,1,n)cout<<A[i].size()<<endl;
    return ;
}

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
    
    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>
typedef long long ll;
typedef long double ld;
using namespace std;
const int mod = 1e9 + 7;

int main() {
    int N;
    cin >> N;
    int A[N];
    for(int i = 0; i < N; ++i) cin >> A[i];
    
    map<int,int> m;
    int max = 0;
    
    for(int i = 0; i < N; ++i){
        //key add
        if(m.count(A[i]) == 0) m.insert(make_pair(A[i],1));
        //value++
        else m[A[i]] = ++m[A[i]];
        //max count
        mx = max(mx, m[A[i]]);
    }

    for(int i = 1; i < N; ++i){
        if(m.count(A[i]) == 0) cout << 0 << endl;
        else cout << m[i] << endl;
    }
    cout << 0 << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'mx' was not declared in this scope; did you mean 'max'?
   22 |         mx = max(mx, m[A[i]]);
      |         ^~
      |         max
a.cc:22:17: error: 'max' cannot be used as a function
   22 |         mx = max(mx, m[A[i]]);
      |              ~~~^~~~~~~~~~~~~
Language: C

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fi first
#define se second
ll sieve[1000001]={0},i,j;
ll m=1e9+7;
ll lev=0;
ll n,k;
ll power(ll p, ll k)
{
ll a=1;
while(k)
{
if(k&1)
a=(a*p)%m;
p=(p*p)%m;
k>>=1;
}
return a;
}
using namespace std;
vector<ll> v[1000000+1];
ll vis[1000000+1]={0};
void dfs(ll u,ll p,ll lev)
{
    vis[u]=lev;
for(auto x: v[u])
{
if(x!=p)
{
dfs(x,u,lev+1);
}
}
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 int tc=1;
//cin>>tc;
ll cas=1;
 while(tc--)
 {
  
ll n;
cin>>n;
ll a[n+1];
map<ll,ll> m;
for(i=2;i<=n;i++)
{
cin>>a[i];
m[a[i]]++;
}
for(i=1;i<=n;i++)
{
cout<<m[i];
     cout<<"\n";
 } 
 } 
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vetor' was not declared in this scope
    7 |   vetor<int> vec;
      |   ^~~~~
a.cc:7:9: error: expected primary-expression before 'int'
    7 |   vetor<int> vec;
      |         ^~~
a.cc:9:10: error: 'vec' was not declared in this scope
    9 |     cin>>vec.at(i);
      |          ^~~
a.cc:14:10: error: 'vec' was not declared in this scope
   14 |       if(vec.at(i)==a.at(j)){
      |          ^~~