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

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using boost::multiprecision::cpp_int;

typedef long long ll;
typedef pair<ll, ll> pll;

const ll INF = 1e17;
const ll MOD = 1e9+7;

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

    // resolve
    map<int, int> mp;
    for (int i=1; i<=N; i++) mp[i] = 0;
    for (auto a: A) mp[a]++;

    // output
    for (auto m: mp) {
      cout << m.second << endl;
    }


    return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> cnt(n + 1, 0);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> cnt(n + 1, 0);
      |          ^~~
a.cc:10:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |     cnt[a]++;
      |     ^~~
      |     int
a.cc:13:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   13 |     cout << cnt[i] << endl;
      |             ^~~
      |             int
Language: C

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, c) for (int i = 0; i < (int)c; i++)
#define debug(x) cout << #x << " = " << x << endl
#define print(x) cout << x << endl;
const ll MOD = 1000000007;

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

    map<int, int> A;
    for (int i = 0; i < N - 1; i++)
    {
        int temp;
        cin >> temp;
        if (!A.count(temp - 1))
        {
            A[temp - 1] = 0;
        }
        A[temp - 1]++;
    }

    rep(i, N)
    {

        if (!A.count(i))
        {
            cout << 0 << endl;
        }
        else
        {
            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 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:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

using System;
using System.Linq;
using System.Collections.Generic;

using E = System.Linq.Enumerable;

public class Program
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine());
        var seqA = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();

        var s = new int[seqA.Length + 1];
        for (int i = 0; i < seqA.Length; ++i)
        {
            ++s[seqA[i] - 1];
        }

        Console.WriteLine(string.Join(Environment.NewLine, s));
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Linq;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Linq;
      |             ^
main.c:3:1: error: unknown type name 'using'
    3 | using System.Collections.Generic;
      | ^~~~~
main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | using System.Collections.Generic;
      |             ^
main.c:5:1: error: unknown type name 'using'
    5 | using E = System.Linq.Enumerable;
      | ^~~~~
main.c:5:17: error: request for member 'Linq' in something not a structure or union
    5 | using E = System.Linq.Enumerable;
      |                 ^
main.c:7:1: error: unknown type name 'public'
    7 | public class Program
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Program'
    7 | public class Program
      |              ^~~~~~~
Language: C

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

#define int           long long
#define S             second
#define F             first
#define pb            push_back
#define all(c)        (c).begin(),(c).end()
#define rall(c)       (c).rbegin(),(c).rend() 
#define lb            lower_bound
#define si(c)         (int)((c).size())
#define lcm(a, b)      (a * (b / __gcd(a,b)))  
#define inf           (long long)(1e15)
#define endl          '\n'
#define mp            make_pair
#define time(s)       (double(clock()-s)/double(CLOCKS_PER_SEC))
#define debug(args...)    _F(#args, args)
#define vi            std::vector<int>
#define pii           pair<int, int> 
#define vpi           vector<pii>

clock_t start;
mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count());

template<typename T> void _F(const char *name, T arg1){
    cerr << name << " = " << arg1 << endl;
}template<typename T, typename... Args> void _F(const char *names, T arg1, Args... args){
    const char *name = strchr(names, ',');
    cerr.write(names, name-names) << " = " << arg1 << endl;
    _F(name+2, args...);
}
template<typename T1, typename T2> istream& operator>>(istream& in, pair<T1, T2> &q){
    in >> q.F >> q.S; return in;
}template<typename T1, typename T2> ostream& operator<<(ostream& out, pair<T1, T2> &q){
    out << q.F << " " << q.S; return out;
}template< typename T1, typename T2> pair<T1, T2> operator+(pair<T1, T2> p1, pair<T1, T2> p2){
    return {p1.F+p2.F, p1.S+p2.S};
}template< typename T1, typename T2> pair<T1, T2> operator-(pair<T1, T2> p1, pair<T1, T2> p2){
    return {p1.F-p2.F, p1.S-p2.S};
}


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

signed main(){

    ios_base::sync_with_stdio(0); 
    cin.tie(0); cout.tie(0);   

    int t = 1;
    start = clock(); 

    cout << fixed << setprecision(12);

    // #ifndef ONLINE_JUDGE
    // freopen("input.txt", "r", stdin); 
    // freopen("output.txt", "w", stdout);
    // freopen("error.txt", "w", stderr);
    // #endif

    //cin >> t;

    for(int i = 1; i <= t; ++i){
        solve();
        //cout << endl;
    }
    //cerr << time(start);
    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 fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define fir first 
#define sec second
#define int long long
#define endl "\n"
using namespace std;
const int nax=1e5+5;
vector<int>adj[nax];
const int mod=1e9+7;
const int inf=1e18+7;
int cnt[nax];
signed main(){
	int n;
	cin>>n;
	for(int i=2;i<=n; i++){#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define fir first 
#define sec second
#define int long long
#define endl "\n"
using namespace std;
const int nax=2e5+5;
vector<int>adj[nax];
const int mod=1e9+7;
const int inf=1e18+7;
int cnt[nax];
signed main(){
	int n;
	cin>>n;
	for(int i=2;i<=n; i++){
		int a;
		cin>>a;
		cnt[a]++;
	}
	for(int i=1; i<=n; i++){
		cout<<cnt[i]<<endl;
	}
	return 0;
}


		int a;
		cin>>a;
		cnt[a]++;
	}
	for(int i=1; i<=n; i++){
		cout<<cnt[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 INS(x) (x).begin(),(x).end()
#define gcd(x,y) __gcd((x),(y))

int a[200005];
int t[200005];

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n;
    cin>>n;

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

    for (int i=1;i<=n;i++)
    {
        if (t[a[i]+1])
        {
            cout<<t[a[i]+1]<<'\n';
            t[a[i]+1]=0;
        }
        else cout<<"0\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>
//#pragma GCC optimize("Ofast","no-stack-protector","unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx")
//#include<bits/extc++.h>
//using namespace __gnu_pbds;
using namespace std;
#define F(i,L,R) for(int i=L;i<R;++i)
#define FE(i,L,R) for(int i=L;i<=R;++i)
#define getI(a) scanf("%d", &a)
#define getII(a,b) scanf("%d%d", &a, &b)
#define getIII(a,b,c) scanf("%d%d%d", &a, &b, &c)
#define VgetI(n) int (n); scanf("%d",&(n))
#define VgetII(n,m) int (n),(m); scanf("%d %d",&(n),&(m))
#define VgetIII(n,m,k) int (n),(m),(k); scanf("%d %d %d",&(n),&(m),&(k))
#define debug(x) cout<<(#x)<<"="<<x<<"\n";
#define qq cout<<"QQ\n";
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define f first
#define s second
#define ll long long
#define INF 2000000000
int cnt[200005];
int main(){
	int n;
	while(~getI(n)){
		FE(i,0,n) cnt[i]=0;
		FE(i,2,n){
			VgetI(u);
			cnt[u]++;
		}
		FE(i,1,n) printf("%d\n",cnt[i]);
	}
}


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

unittest
{
	assert( [ "5", "1 1 2 2" ].parse.expand.solve == "2\n2\n0\n0\n0" );
	assert( [ "10", "1 1 1 1 1 1 1 1 1" ].parse.expand.solve == "9\n0\n0\n0\n0\n0\n0\n0\n0\n0" );
	assert( [ "7", "1 2 3 4 5 6" ].parse.expand.solve == "1\n1\n1\n1\n1\n1\n0" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	input.popFront;
	auto as = input.front.split.to!( long[] );
	as[] -= 1;
	return tuple( as );
}

auto solve( long[] as )
{
	auto anss = new long[ 1 + as.length ];
	foreach( a; as )
	{
		anss[ a ]++;
	}
	return anss.to!( string[] ).join( "\n" );
}


Compiler output:
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | {
      | ^
main.c:10:1: error: unknown type name 'import'
   10 | import std.conv;
      | ^~~~~~
main.c:10:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   10 | import std.conv;
      |           ^
main.c:11:1: error: unknown type name 'import'
   11 | import std.range;
      | ^~~~~~
main.c:11:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   11 | import std.range;
      |           ^
main.c:12:1: error: unknown type name 'import'
   12 | import std.stdio;
      | ^~~~~~
main.c:12:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   12 | import std.stdio;
      |           ^
main.c:13:1: error: unknown type name 'import'
   13 | import std.typecons;
      | ^~~~~~
main.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   13 | import std.typecons;
      |           ^
main.c: In function 'main':
main.c:17:9: error: 'stdin' undeclared (first use in this function)
   17 |         stdin.byLineCopy.parse.expand.solve.writeln;
      |         ^~~~~
main.c:1:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | unittest
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
   17 |         stdin.byLineCopy.parse.expand.solve.writeln;
      |         ^~~~~
main.c: At top level:
main.c:20:22: error: unknown type name 'Range'
   20 | auto parse( Range )( Range input )
      |                      ^~~~~
main.c:29:20: error: expected ';', ',' or ')' before 'as'
   29 | auto solve( long[] as )
      |                    ^~
Language: C

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

#define rep(i,z) for(int i = 0; i<(int)(z); i++)
#define rep1(i,z) for(int i = 1; i<=(int)(z); i++)
 
using namespace std;

typedef long long ll;
const ll MOD=1e9+7;
using pear = pair<int,int>;

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

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

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() { 
  ios::sync_with_stdio(false); cin.tie(0);
  //c
  int n;
  cin >> n;
  vector<int> cnt(n + 1);
  for (int i = 1; i < n; i++) {
    int a;
    cin >> a;
    cnt[a]++;
  }
  for (int i = 1; i <= n; i++) {
    cout << cnt[i] << '\n';
  }
  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;
   
int main() {
    int n;
    cin>>n;
    vector<int> a(n);
    for(int i=0;i<n-1;i++) cin>>a.at(i);
    map<int,int> num;
    for(int i=0;i<n-1;i++){
        if(num.count(a.at(i))) num.at(a.at(i))++;
        else num[a.at(i)]=1;
    }
    for(int i=1;i<=n;i++){
        if(num.count(i)) cout<<num.at(i)<<endl;
        else cout<<"0"<<endl;
    }
   

    
    

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define All(V) V.begin(), V.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1e9+7, INF = 1e9;

int main()
{
  int n; cin >> n;
  vector<int> ans(n, 0);
  for(int i = 0; i < n-1; i++){
    int a; cin >> a;
    ans[a-1]++;
  }
  rep(i, n)cout << ans[i] << endl;
  cout << endl;
  system("pause");
}


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 <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++)
#define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--)
#define sort_vec(v) sort((v).begin(),(v).end())
typedef int64_t lint;
// lint mod = 998244353;

string app() {
  int n;
  cin>>n;

  vector<int> a(n);
  rep_range(i,1,n){
    cin>>a[i];
  }

  vector<int> c(n);
  rep(i,n){
    c[i]=0;
  }
  rep_range(i,1,n){
    c[a[i]]+=1;
  }

  rep(i,n){
    cout<<c[i]<<endl;
  }
  return "";
}

int main(){cout<<app()<<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;
using LL = long long;

constexpr int N = 1e5 + 5;

int main() {
	ios::sync_with_stdio(false); cin.tie(nullptr);
	
	int n;
	cin >> n;

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

	for (int x : ans) cout << x << "\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 lli long long int
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define fr(i,n) for(i=0;i<n;i++)
#define F first
#define S second
#define fast std::ios_base::sync_with_stdio(false)
#define mod 1000000007
#define pi 3.14159265
int main() {
	fast;
	lli n;
	cin>>n;
	lli a[n-1],i;
	lli count[n+1]={0};
	fr(i,n-1)
	{
		cin>>a[i];
		count[a[i]]++;
	}
	for(i=1;i<=n;i++)
	{
		cout<<count[i]<<"\n";
	}

	
	return 0;
}

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

/*ANKON GHOSH
  KUET,ECE 2K16*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 1e18
#define MAX 4003
#define mod 1000000007
#define sf(a) scanf("%lld",&a)
#define sff(a,b) scanf("%lld %lld",&a,&b)
#define sfff(a,b,c) scanf("%lld %lld %lld",&a,&b,&c)
#define Case(i) cout<<"Case #"<<i<<": "
#define pf(a) printf("%lld\n",a)
#define pfsn printf("NO\n")
#define pfs  printf("YES\n")
#define pff(a,b) printf("%lld %lld\n",a,b)
#define pfff(a,b,c) printf("%lld %lld %lld\n",a,b,c)
#define pffff(a,b,c,d) printf("%lld %lld %lld %lld\n",a,b,c,d)
#define FOR(i,n) for(ll i=0;i<n;i++)
#define FOR1(i,n) for(ll i=1;i<=n;i++)
#define LOOP(x,y) for(ll r=x;r<=y;r++)
#define RFOR(i,n) for(ll i=n-1;i>=0;i--)
#define RFOR1(i,n) for(ll i=n;i>0;i--)
#define RLOOP(x,y) for(ll i=y;i>=x;i--)
#define m_p(a,b) make_pair(a,b)
#define p_b(a) push_back(a)
#define ff first
#define ss second
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
map<ll,ll>mp1,mp;
vector<pair<ll,pair<ll,ll> > >vpp,vpp1;
vector<pair<ll,ll> >vp,fin;
vector<ll>v,v1,v2,dummy;
map<pair<ll,ll>,bool>mbb;
map<ll,bool>mb;
ll n,k,a,b,c,d,ta,sum=0,cnt=0,m,l,req,sz,maxi;
bool sortbysec(const pair<pair<ll,ll>,ll> &a,const pair<pair<ll,ll>,ll> &b)
{
    return (a.second < b.second);
}
vector<ll>power;
int main()
{
    ll q;
    ll x;
    cin>>n;
    ll arr[n+10];
    memset(arr,0,sizeof arr);
    FOR(i,n-1)
    {
        cin>>a;
        arr[a]++;
    }
    FOR1(i,n)
    {
        cout<<arr[i]<<endl;
    }
    return 0;
}


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

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

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'vec' was not declared in this scope
   15 |     cout << vec[i] << endl;
      |             ^~~
Language: C

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

// template {{{  0 
// using {{{ 1
using ll = long long int;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;
// }}} 1
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x,y) scanf("%d%d", &x, &y)
#define Scd3(x,y,z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%lld", &x)
#define Scll2(x,y) scanf("%lld%lld", &x, &y)
#define Scll3(x,y,z) scanf("%lld%lld%lld", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (2e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Repe(x,y,z) for(ll x = z; x < y; x++)
#define Rep(x,y) Repe(x,y,0)
#define RRepe(x,y,z) for(ll x = y-z-1; x >= 0; x--)
#define RRep(x,y) RRepe(x,y,0)
// }}} 2
// output {{{ 2
#define YesNo(a) (a)?printf("Yes\n"):printf("No\n")
#define YESNO(a) (a)?printf("YES\n"):printf("NO\n")
// }}} 2
// }}} 1
// input {{{ 1
// }}} 1
// }}} 0

int main() {

    int N;
    Scd(N);
    vi a(N);
    vi cnt(N);
    Repe(i,N,1){
        Scd(a[i]), a[i]--;
        cnt[a[i]]++;
    }

    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<bits/stdc++.h>
#define N 200050
#define ll long long
#define pb push_back
#define x first
#define y second
using namespace std;
int ar[N];
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n; cin>>n;
    for(int i=0;i<n-1;i++){
        int b; cin>>b;
        ar[b]++;
    }
    for(int i=0;i<n;i++)
    cout<<ar[i+1]<<"\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 int long long int

void fileioe(){
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout); 
	freopen("error.txt","w",stderr);
}
#define GO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#ifndef ONLINE_JUDGE
#define fioe() fileioe()
#else
#define fioe() 1
#endif
//!

int32_t main()
{
	GO
	//fioe();
	int n;
	cin>>n;
	int arr[n+2];
	map<int,int> m;
	for(int i=0;i<n-1;i++){
		cin>>arr[i];
		m[arr[i]]++;
	}	
	int ans[n+3];
	memset(ans,0,sizeof(ans));
	for(auto x:m){
		ans[x.first] = x.second;
	}
	for(int i=1;i<=n;i++)
		cout<<ans[i]<<endl;
	return 0;
}

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

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


		


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

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>
#include <array>
#include <iomanip>

using namespace std;
using ll = long long;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

#define REP(i,m,n) for(int i=(m); i<(n); i++)
#define RREP(i,n,m) for(int i=(n);i>=(m); i--)
#define pb push_back
#define mp make_pair
#define debug(x) cerr << #x << ": " << x << endl
// #define int long long 

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = ((1<<30)-1);
const ll linf = (1LL<<60);
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    map<int, int> mp;
    REP(i,1,n+1) mp[i] = 0;
    REP(i,0,n-1)
    {
      int tmp;
      cin >> tmp;
      mp[tmp]++;
    }
    REP(i,1,n+1)
    {
      cout << mp[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

/**********************
 * Author: Cloud_     *
 * Date:   19.04.2020 * 
 * Time:   17.53.32   *
 *                    *
***********************/
#include <bits/stdc++.h>
using namespace std;

#define gap " "
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ok cout<<"ok"<<endl
#define dbg(x) cout<<(#x)<<" is "<<x<<endl
#define fastio {ios_base::sync_with_stdio(false);cin.tie(NULL);}

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int N=100009;
int ar[N];
int main()
{
  fastio; 
  int n,i,r;
  cin>>n;
  for(i=2; i<=n; i++)
  {
  	 cin>>r;
  	 ar[r]++;
  }
  for(i=1; i<=n; i++)
  {
  	cout<<ar[i]<<endl;
  }
  return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

#define pii pair<int,int>
#define ll long long
#define s second
#define f first

const int MAX_N=2*10e5+5;
ll n,m,s,a[MAX_N],cnt[MAX_N];

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


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

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n + 1); ++i)
using namespace std;
using ll = long long;
const int INF = +100100100;
// typedef pair<int,int> P;
const int MAX = 1000000;

int main(){
    int n;
    cin >> n;
    vector<vector<int>> p(n);
    rep(i,n-1){
        int x;
        cin >> x;
        --x;
        p[x].push_back(1); 
    }
    rep(i,n){
        cout<<p[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>


int main(){
	int n;
	std::cin >> n;
	std::map<int, int> ans;

	int arr[n+1];
	for(int i = 2;i <= n;i++){
		std::cin >> arr[i];
		ans[arr[i]]++;
	}

	for(int i = 1;i <= n;i++){
		std::cout << ans[i] << '\n';
	}

}


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

#include <cstdio>
using namespace std;
int n,a,sum[1000005];
int main(){
	scanf("%d",&n);
	for(int i=1;i<n;++i){
		scanf("%d",&a);
		sum[a]++;
	}
	for(int i=1;i<=n;++i){
		printf("%d\n",sum[i]);
	}
	return 0;
}


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

#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
#define MOD 1000000007
#define INF 1000000000
#define mp make_pair
#define pb push_back
#define ss second
#define ff first
#define endl '\n'
#define pl cout<<endl;
void fast() { ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); }
const long long INFll=1ll*INF*INF;
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define debug(x) cout << x << endl;
#define sz(a) int((a).size())
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
    //unordered_map<long long, int, custom_hash>
    //gp_hash_table<long long, int, custom_hash>
};
long long genrand(long long L,long long R)
{
	return uniform_int_distribution<long long>(L, R)(rng);
}
int mul(int a, int b,int mod = MOD) {
	return int(a * 1ll * b % mod);
}
int norm(int a,int mod = MOD) {
	while(a >= mod) a -= mod;
	while(a < 0) a += mod;
	return a;
}
int powmod(int x,int y,int mod = MOD){
	int res = 1;
	while(y>0)
	{
		if(y&1)
			res = mul(res,x,mod);
		x = mul(x,x,mod);
		y=y>>1;
	}
	return res;
}
int inv(int a,int mod = MOD) {
	return powmod(a, mod - 2);
}
int main() {
	
	int n; scanf("%d", &n);
	int a[n], cnt[n] = {0};
	for(int i = 1; i<n; i++){
		int j; cin>>j; j--;
		cnt[j]++;
	}
	for(int i = 0; i<n; i++){
		cout<<cnt[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>
using namespace std;
int main(){
    long long n, a[200100], i, cnt[200100]={0};
    cin >> n;
    for(i=0;i<n-1;i++){
        cin >> a[i];
        a[i]--;
        cnt[a[i]]++;
    }
    for(i=0;i<n;i++){
        cout << cnt[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

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func newScanner() *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return scanner
}

func scanInt() int {
	sc.Scan()
	v, _ := strconv.Atoi(sc.Text())
	return v
}

func scanInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = scanInt()
	}
	return a
}

func scanString() string {
	if sc.Scan() {
		return sc.Text()
	}
	panic(sc.Err())
}

var sc = newScanner()

func main() {
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()
	n := scanInt()
	a := scanInts(n-1)
	c := make([]int, n)
	for i := 0; i < n-1; i++ {
		c[a[i]-1]++
	}
	for i := 0; i < n; i++ {
		fmt.Fprintln(w, c[i])
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package main
      | ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import (
      | ^~~~~~
main.c:16:1: error: unknown type name 'func'
   16 | func scanInt() int {
      | ^~~~
main.c: In function 'scanInt':
main.c:16:20: error: expected identifier or '(' before '{' token
   16 | func scanInt() int {
      |                    ^
main.c:22:1: error: unknown type name 'func'
   22 | func scanInts(n int) []int {
      | ^~~~
main.c:22:15: error: unknown type name 'n'
   22 | func scanInts(n int) []int {
      |               ^
main.c:30:1: error: unknown type name 'func'
   30 | func scanString() string {
      | ^~~~
main.c:30:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'string'
   30 | func scanString() string {
      |                   ^~~~~~
main.c:37:1: error: unknown type name 'var'
   37 | var sc = newScanner()
      | ^~~
main.c:37:1: error: parameter 'sc' is initialized
main.c:37:10: error: implicit declaration of function 'newScanner' [-Wimplicit-function-declaration]
   37 | var sc = newScanner()
      |          ^~~~~~~~~~
main.c:39:1: error: expected ',' or ';' before 'func'
   39 | func main() {
      | ^~~~
main.c:37:5: error: declaration for parameter 'sc' but no such parameter
   37 | var sc = newScanner()
      |     ^~
main.c:52: error: expected '{' at end of input
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N,M;
    int i;
    cin >> N >> M;
    long int a;
    long int sum =0;
    for(i=0;i<M;i++){
        cin >> a;
        sum += a;
    }
    if(sum>N)cout << -1 << endl;
    else cout << N-sum << endl;
}
#include<bits/stdc++.h>
using namespace std;
int a[200005];
int main(){
    int N;
    cin >> N;
    int c;
    int i;
    for(i=2;i<N+1;i++){
        cin >> c;
        a[c]++;
    }
    for(i=1;i<N+1;i++)cout << a[i] << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxx = 1e5 + 7;
const int Inf = 1 << 30;
const LL INF = 1LL << 60;
int n;
int a[maxx];
vector <int> vec[maxx];

int main() {
	cin >> n;
	for(int i = 2; i <= n; i++) {
		cin >> a[i];
		vec[a[i]].push_back(i);
	}
	for(int i = 1; i <= n; i++) printf("%d\n", vec[i].size());
	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 n;
int a;
int ch[200010];

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

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

/*!enjoy karo yaar!*/

//CF,CC,AtC,SPOJ: hp1999
//HE: hemant269
//HR: hemant2132

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

#define     int             long long int
#define     fast()          ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define     all(x)          (x).begin(),(x).end()
#define     rz(x)           resize(x)
#define     mem(a,b)        memset(a,b,sizeof(a))
#define     sz(x)           ((int)(x.size()))
#define     pb              push_back
#define     pf              push_front
#define     pob             pop_back
#define     pof             pop_front
#define     ins             insert
#define     vi              vector<int>
#define     pii             pair<int,int>
#define     mii             map<int,int>
#define     F               first
#define     S               second
#define     makep           make_pair
#define     maket           make_tuple
#define     remax(a,b)      a=max(a,b)
#define     remin(a,b)      a=min(a,b)
#define     bitcount(x)     __builtin_popcountll(x)
#define     iceil(n,x)      (((n)+(x)-1)/(x))
#define     gcd(a,b)        (__gcd((a),(b)))
#define     lcm(a,b)        (((a)*(b))/gcd((a),(b)))
#define     dbug(x)         cout<<#x<<": "<<(x)<<"\n"
#define     flush           fflush(stdout)
#define     show(x)         for(auto zz:x)cout<<zz<<" ";cout<<"\n";
#define     show2(x)        for(auto zz:x)cout<<zz.F<<" "<<zz.S<<"\n";

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

const ld pi=acos(-1);
const ll inf=1e18,M=1e9+7;
const int N=1;

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

    vi v(n-1);
    for(int i=0;i<n-1;++i)
        cin>>v[i];

    sort(all(v));

    int cur=1,cnt=0;
    for(int i=0;i<n-1;++i)
    {
        if(cur!=v[i])
        {
            cout<<cnt<<"\n";
            ++cur;
            while(cur<v[i])
                cout<<"0\n",++cur;
            cnt=1;
        }
        else
            ++cnt;
    }

    cout<<cnt<<"\n";
    ++cur;
    while(cur<=n)
        cout<<"0\n",++cur;
}

int32_t main()
{
    fast();

    int t=1;
    //cin>>t;
    for(int z=1;z<=t;++z)
    {
        //cout<<"Case #"<<z<<": ";
        solve();
        //cout<<"\n";
    }

    return 0;
}



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

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>

using namespace std;
using ll =long long;
using vi = vector<int>; 
using vvi = vector<vi>; 
using vl = vector<ll>; 
using vvl = vector<vl>; 
using vs = vector<string>;
using vvs = vector<vs>; 
using vc = vector<char>;
using vvc = vector<vc>; 
using vb = vector<bool>;
using vvb = vector<vb>; 

#define rep(i,n) ;for( int i =0; i < n ; i ++)
#define all(a) a.begin(),a.end()
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define f(i,a,b) for(int i=a;i<b;i++)
#define pri(a)  printf("%.14lf\n",a);
#define sz(a) ((int)a.size())
#define MOD 1000000007
bool is_int_lround(double x){
  return std::lround(x)==x;
}
ll keta(ll x){
  ll n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}

ll conbi(int n,int m){
  
  cin>>n>>m;
  vector<ll> a(100);
  a[0] =1;
  for(int i=0;i<14;i++){
    a[i+1]=a[i]*(i+1);
  }
  return a[n] /(a[m] *a[n-m]);
}

long long modpow(long long a, long long n, long long mod) {
    long long res = 1;//繰り返し二乗法
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
ll kaijoMOD(ll x){
  ll z=1;
  if(x==0){
    return 1;
  }
  while(x>0){
    z *=x;
    z %=MOD;
    x--;
  }
  return z;
}
ll yakusu_num(ll n){
  vl yakusu(n+1,1);
  for(ll i=2;i*i<=n;i++){ 
    while(n%i==0){
      n /=i;
      yakusu[i]++;
    }
  }
  if(n!=1)yakusu[n]++;
  ll num=1;
  for(ll i=0;i<=n;i++){
    num*=yakusu[i];
  }
  return num;
}

int H,W;
vs s(50);
vi dv ={-1,0,1,0};vi du={0,-1,0,1};
int cnt=1;
int dfs(int u,int v){
  s[u][v]='.';
  
  rep(i,4){
   
      int nu =u +du[i],nv=v+dv[i];
      if(nu<0||nu>=H||nv<0||nv>=W)continue;
      if(s[nu][nv]=='.')continue;
      cnt ++;
      dfs(nu,nv);
    
  }
  return cnt;

}
int keta_wa(int x){
  int tot=0;
  while(x>0){
    tot +=x%10;
    x/=10;
  }
  return tot;
}

//vc alp ={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
//vc Alp ={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
//cout<<""<<endl;
int main(){
  int N;cin>>N;vi A(N-1);rep(i,N-1)cin>>A[i];
  vi num(N+1);
  rep(i,N-1){
    num[A[i]]++;
  }
  for(int i=1;i<=N;i++){
   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 <iostream>
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
const int MODU = 1e9+7;
const int N = 1e5+10;


void solve() {
	
}

int main() {
	int n;
	cin >> n;
	vector<int> subord(n+1);
	int temp;
	for(int i=2; i<=n; i++) {
		cin >> temp;
		subord[temp]++;
	}
	for(int i=1; i<=n; i++) {
		cout << subord[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

/*
 * atcoder/abc163/c.cpp
 */

// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> bool chmin(T &a, T b) { if (a > b) {a = b; return true; } return false; }
template <class T> bool chmax(T &a, T b) { if (a < b) {a = b; return true; } return false; }

/*
 * N = 2の時
 * 必ず、1 0
 * N = 3の時
 * 1
 * 1 1 0 or 2 0 0
 */
const int MAX = 200010;
int N;
vector<int> A;
int counter[MAX] = {0};

void solve() {
  cin >> N;
  int a;
  loop(n,2,N+1) {
    cin >> a;
    counter[--a]++;
  }
  loop(n, 0, N) {
    cout << counter[n] << endl;
  }
}
int main() {
  // cout.precision(15);
  // cout << fixed << double

  solve();

  return 0;
}


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

/*
Author : N_o_o_B
Created : April 19 2020 17:39:15 
*/
#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 TRACE
#ifdef TRACE
#define trace(...) { cerr<<"[ "; __trace__(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.first<<","<<x.second<<")";
}
 
template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1>
void __trace__(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}
 
template <typename Arg1, typename... Args>
void __trace__(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    __trace__(names.substr(1+(int)name.size()), args...);
}
#else
    #define trace(args...)
#endif
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pair<int,int>> vii;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<pair<ll,ll>> vll;
typedef vector<vl> vvl;
//typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> oset;
#define fori(i,n) for(int i=0;i<n;i++)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;i--)
#define ford(i,n)  for(int i=n-1;i>=0;i--)
#define trav(x,a) for(auto& x:a)
#define all(x) x.begin(),x.end()
#define pb push_back
#define endl '\n'
#define sz(a) (int)a.size()
#define fi first
#define se second
clock_t time_p=clock();
void time_taken()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
//const ll mod=998244353;
const ll mod=1e9+7;
const ll INF=1e18;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    cout.precision(12);cout << fixed;

    int n;
    cin >> n;
    vi cnt(n);
    fori(i,n-1){
        int x;
        cin >> x;
        x--;
        cnt[x]++;
    }
    fori(i,n){
        cout << cnt[i] << endl;
    }



    time_taken();
    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

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <numeric>
#include <map>
#include <iomanip>
#include <limits.h>

using namespace std;    
typedef long long ll;
typedef pair<ll, ll> pll;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const bool DEBUG = true;


int main(){

    int n;
    cin >> n;

    vector<int> v(n);
    for(int i = 0; i < n - 1; i++){
        int num;
        cin >> num;
        v[num - 1] ++;
    }

    for(int i = 0; i < n; i++){
        cout << v[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

/*
AuThOr GaRyMr
*/
#include<bits/stdc++.h>
#define rb(a,b,c) for(int a=b;a<=c;++a)
#define rl(a,b,c) for(int a=b;a>=c;--a)
#define LL long long
#define IT iterator
#define PB push_back
#define II(a,b) make_pair(a,b)
#define FIR first
#define SEC second
#define FREO freopen("check.out","w",stdout)
#define rep(a,b) for(int a=0;a<b;++a)
#define KEEP while(1)
#define SRAND mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define random(a) rng()%a
#define ALL(a) a.begin(),a.end()
#define POB pop_back
#define ff fflush(stdout)
#define fastio ios::sync_with_stdio(false)
#define debug_pair(A) cerr<<A.FIR<<" "<<A.SEC<<endl;
using namespace std;
const int INF=0x3f3f3f3f;
typedef pair<int,int> mp;
typedef pair<mp,mp> superpair;
int n;
int res[200000+20];
int main(){
	fastio;
	cin>>n;
	rb(i,1,n-1)
	{
		int a;
		cin>>a;
		res[a]++;
	 } 
	rb(i,1,n)
		cout<<res[i]<<endl;
	return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int f[200005];
int main() {
	int n;
	cin>>n;
	for(int i=1;i<n;i++){
		int k;
		cin>>k;
		f[k]++;
	}
	for(int i=1;i<=n;i++){
		cout<<f[k]<<endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'k' was not declared in this scope
   13 |                 cout<<f[k]<<endl;
      |                         ^
Language: C

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

// in-short-use macros

#define all(c) (c).begin(),(c).end()
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mod 1000000007
#define PI 3.14159265
#define sizes 1000010



//main function here

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int n;
    cin>>n;
    int a[n],cnt[n+10];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        cnt[i+1]=0;
    }
    for(int i=0;i<n;i++)
        cnt[a[i]]++;
    for(int i=1;i<n;i++)
        cout<<cnt[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>
using namespace std;
typedef long long int ll;

#define rep( i, n, m ) for(int i = ( n ); i < ( m ); i++)
#define rep_d( i, n, m ) for(int i = ( n ) - 1; i >= ( m ); i--)
#define sort_asc( X ) sort(( X ).begin(), ( X ).end())
#define sort_desc( X ) sort(( X ).begin(), ( X ).end(), greater <>())
#define endl "\n"

template <class T> bool chmax( T& a, T b );
template <class T> bool chmin( T& a, T b );
int* eratosthenes( int N );
bool bit_search( int pattern, int N );
void initialize( void );

const ll INF = 1LL << 60;
const int k_mod = 1e9 + 7;
template <typename T, typename K> struct P {
	T a; K b;
};
typedef struct {
	vector <int> to;
	int cost;
} edge;


int main( void ){
	// initialize();
	int N;
	cin >> N;
	vector <edge> tree( N );
	rep( i, 1, N ){
		int input; cin >> input;
		input--;
		tree[ input ].to.push_back( i );
	}
	rep( i, 0, N ){
		cout << tree[i].to.size() << endl;
	}
}

template <class T> bool chmax( T& a, T b ) {
	if (a < b){
		a = b; return true;
	}
	return false;
}
template <class T> bool chmin( T& a, T b ) {
	if (a > b){
		a = b; return true;
	}
	return false;
}
int* eratosthenes( int N ){
	int* prime_array = new int[ N + 1 ];
	int lim = N;
	prime_array[ 0 ] = 0;
	prime_array[ 1 ] = 0;
	rep( i, 2, N + 1 ){
		prime_array[ i ] = 1;
	}
	rep( i, 2, lim ){
		if (prime_array[ i ] == 0)
			continue;
		lim = N / i;
		for(int j = i * 2; j < N + 1; j += i){
			prime_array[ j ] = 0;
		}
	}
	return prime_array;
}
bool bit_search( int pattern, int N ){
	int cnt = 0;
	rep( bit, 0, N ){
		if (pattern & ( 1 << bit )){
			cnt++;
		}
	}
	return true;
}
void initialize( void ){
	cout << fixed << setprecision( 10 );
}


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 rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)


int main() {
  long n,k;
  cin >> n>>k;
  long ans=n%k;
  long u=k-ans;
  
 
    cout<<min(ans,u)<<endl;
  
  
}






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