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

int a[200010];
2 int ans[200010];
3 int main(){
 4
5
6
7
8 9}
int n;
scanf("%d",&n);
for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
for(int i=1;i<=n;i++)printf("%d\n",ans[i]);

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 int ans[200010];
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 int main(){
      | ^
a.cc:10:6: error: expected constructor, destructor, or type conversion before '(' token
   10 | scanf("%d",&n);
      |      ^
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      | ^~~
a.cc:11:13: error: 'i' does not name a type
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      |             ^
a.cc:11:18: error: 'i' does not name a type
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      |                  ^
a.cc:11:41: error: expected unqualified-id before 'for'
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      |                                         ^~~
a.cc:11:53: error: 'i' does not name a type
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      |                                                     ^
a.cc:11:58: error: 'i' does not name a type
   11 | for(int i=2;i<=n;i++)scanf("%d",&a[i]); for(int i=2;i<=n;i++)ans[a[i]]++;
      |                                                          ^
a.cc:12:1: error: expected unqualified-id before 'for'
   12 | for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      | ^~~
a.cc:12:13: error: 'i' does not name a type
   12 | for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      |             ^
a.cc:12:18: error: 'i' does not name a type
   12 | for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      |                  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%d",&n);
      |   ^~~~~
a.cc:8:24: error: 'printf' was not declared in this scope
    8 |   for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      |                        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int a[200010];
Language: C

#include <iostream>
#include <vector>
#include <string>
#include <sstream>

using namespace std;


int main()
{
	// Input
	string str;
	int N;
	getline(cin, str);
	N = stoi(str);
	vector<int> subordinates = vector<int>(N + 1, 0);
	getline(cin, str);

	// Parse
	int len = str.length();
	int idx = 0;
	int start = 0;
	while (start < len)
	{
		int size = 1;
		while (idx < len && !isspace(str.at(idx++))) ++size;
		int boss = stoi(str.substr(start, size));
		subordinates[boss] += 1;
		start = idx;
	}

	// Print
	stringstream ss;
	for (int i = 1; i <= N; ++i)
	{
		ss << subordinates[i] << endl;
	}
	cout << ss.str();
}

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;

	scanf("%d", &N);

	int tmp;
	int* sum;
	sum = new int[N - 1];

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

	for (int i = 0; i < N - 1;i++) {
		scanf("%d", &tmp);
		sum[tmp - 1] += 1;
	}

	for (int i = 0;i < N - 1;i++) {
		printf("%d\n", sum[i]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:15: error: 'new' undeclared (first use in this function)
   10 |         sum = new int[N - 1];
      |               ^~~
main.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:18: error: expected ';' before 'int'
   10 |         sum = new int[N - 1];
      |                  ^~~~
      |                  ;
Language: C

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

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

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

import java.util.*;
 
class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      List<Integer> list = new ArrayList<Integer>();
      List<Integer> listAns = new ArrayList<Integer>();
      for(int i=1; i<N; i++){
        list.add(sc.nextInt());
      }
      for(int i=0; i<N; i++){
        listAns.add(0);
      }
      for(int i=1; i<N; i++){
        listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);
      }
      for(Integer ans : listAns){
        System.out.println(ans); 
      }
    }
}

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

import collections

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

C = collections.Counter(A_list)

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



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

#pragma region Include
//#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#pragma endregion

using namespace std;

#pragma region Macros
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define all(c) (c).begin(), (c).end()
#define newl "\n"
#define out(x) cout << (x) << newl
#define dump(x) \
  cout << "Line " << __LINE__ << " : " << #x << " = " << (x) << newl
template <class T>
using VV = vector<vector<T>>;
#define Uni(v) (v).erase(unique((v).begin(), (v).end()), (v).end());

template <typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
  os << "[";
  rep(i, vec.size()) os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
  os << "]";
  return os;
}

template <typename T>
ostream& operator<<(ostream& os, vector<vector<T>>& mat) {
  os << "[";
  rep(i, mat.size()) os << mat[i] << (i + 1 == mat.size() ? "" : ",\n ");
  os << "]";
  return os;
}

template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (T& x : vec) is >> x;
  return is;
}

template <typename V, typename H>
void resize(vector<V>& vec, const H head) {
  vec.resize(head);
}

template <typename V, typename H, typename... T>
void resize(vector<V>& vec, const H& head, const T... tail) {
  vec.resize(head);
  for (auto& v : vec) resize(v, tail...);
}
constexpr double EPS = 1e-10;
const int INF = 0x3f3f3f3f;

string tostring(int i, int digit) {
  auto cur = cout.flags();
  stringstream ss;
  ss << setw(digit) << setfill('0') << i;
  string ret = ss.str();
  cout.flags(cur);
  return ret;
}

template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}

#pragma endregion

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

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

#pragma region Include
#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#pragma endregion

using namespace std;

#pragma region Macros
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define all(c) (c).begin(), (c).end()
#define newl "\n"
#define out(x) cout << (x) << newl
#define dump(x) \
  cout << "Line " << __LINE__ << " : " << #x << " = " << (x) << newl
template <class T>
using VV = vector<vector<T>>;
#define Uni(v) (v).erase(unique((v).begin(), (v).end()), (v).end());

template <typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
  os << "[";
  rep(i, vec.size()) os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
  os << "]";
  return os;
}

template <typename T>
ostream& operator<<(ostream& os, vector<vector<T>>& mat) {
  os << "[";
  rep(i, mat.size()) os << mat[i] << (i + 1 == mat.size() ? "" : ",\n ");
  os << "]";
  return os;
}

template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (T& x : vec) is >> x;
  return is;
}

template <typename V, typename H>
void resize(vector<V>& vec, const H head) {
  vec.resize(head);
}

template <typename V, typename H, typename... T>
void resize(vector<V>& vec, const H& head, const T... tail) {
  vec.resize(head);
  for (auto& v : vec) resize(v, tail...);
}
constexpr double EPS = 1e-10;
const int INF = 0x3f3f3f3f;

string tostring(int i, int digit) {
  auto cur = cout.flags();
  stringstream ss;
  ss << setw(digit) << setfill('0') << i;
  string ret = ss.str();
  cout.flags(cur);
  return ret;
}

template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}

#pragma endregion

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

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

#pragma region Include
#include <bits/stdc++.h>
#pragma endregion

using namespace std;

#pragma region Macros
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define all(c) (c).begin(), (c).end()
#define newl "\n"
#define out(x) cout << (x) << newl
#define dump(x) \
  cout << "Line " << __LINE__ << " : " << #x << " = " << (x) << newl
template <class T>
using VV = vector<vector<T>>;
#define Uni(v) (v).erase(unique((v).begin(), (v).end()), (v).end());

template <typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
  os << "[";
  rep(i, vec.size()) os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
  os << "]";
  return os;
}

template <typename T>
ostream& operator<<(ostream& os, vector<vector<T>>& mat) {
  os << "[";
  rep(i, mat.size()) os << mat[i] << (i + 1 == mat.size() ? "" : ",\n ");
  os << "]";
  return os;
}

template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (T& x : vec) is >> x;
  return is;
}

template <typename V, typename H>
void resize(vector<V>& vec, const H head) {
  vec.resize(head);
}

template <typename V, typename H, typename... T>
void resize(vector<V>& vec, const H& head, const T... tail) {
  vec.resize(head);
  for (auto& v : vec) resize(v, tail...);
}
constexpr double EPS = 1e-10;
const int INF = 0x3f3f3f3f;

string tostring(int i, int digit) {
  auto cur = cout.flags();
  stringstream ss;
  ss << setw(digit) << setfill('0') << i;
  string ret = ss.str();
  cout.flags(cur);
  return ret;
}

template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}

#pragma endregion

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

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

	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second
	#define rf freopen("inputf.in" ,"r", stdin)
	#define wf freopen("outputf.in" ,"w", stdout)
	#define  w(data) while(data--)
	#define in(input1) cin>>input1 
	#define out(input2) std::cout<<input2<<endl
	#define start int main(void) 
	#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
	#define it int a,b,temp,c,d,e,f,g,h,l,m,n,o,p,min1,max1,temp_min1,temp_max1,min_index,max_index
	#define st string s1,s2,s3;
	#define ma 1000000
	int arr[ma],arr1[ma];
	using namespace std;
	start{//rf;wf;
	fast;it;st;
	in(a);d=a;
	for (int i = 0; i < ma; ++i)
	{arr[i]=0;arr1[i]=0;
		/* code */
	}for (int i = 0; i < a-1; ++i)
	{in(arr1[i]);
		/* code */
	}
	sort(arr1,arr1+a-1);
	for (int i = 0; i < a-1; ++i)
	{temp=arr1[i];
		arr[temp]+=1;//out(arr[temp]);
	}
	for(int i=1;i<ma;i++){
		if(arr[i]==0){
			c=i;break;
		}
	}
	for (int i = 1; i <c ; ++i)
	{out(arr[i]);d--;
		/* code */
	}

	for (int i = 0; i <d; ++i)
	{out("0");
		/* code */
	}
	}


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

#include <bits/stdc++.h>
#define PI 3.141592653
#define rep(i,a,n) for(int i=a;i<(int)n;++i)
#define SZ(x) ((int)(x).size())	//size() unsigned -> int
#define descSort(a) sort(a.begin(),a.end(),std::greater<int>())
using namespace std;
typedef long long ll;
const ll INF = 1e9 + 7;
ll gcd(ll x,ll y){
    if(x%y==0)return y;
    return gcd(y,x%y);
}

int main(void){
    int n;
    cin>>n;
    vector<int> a(n);
    rep(i,1,n){
        int in;
        cin>>in;
        a[in-1]++;
    }
    for(auto i:a) cout<<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 <string>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <math.h>
 
using namespace std;
int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
 
	int x,y;
	cin >> x;
    vector<int> vec(x);
    for(int i=0; i<x-1;i++){
      cin >> y;
      vec.at(y)++;
    }
  
    for(int j=1;j=<x;j++){
      cout << vec.at(j) << "\n";
    }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: expected primary-expression before '<' token
   22 |     for(int j=1;j=<x;j++){
      |                   ^
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <math.h>
 
using namespace std;
int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
 
	int x,y;
	cin >> x;
    vector<int> vec(x);
    for(int i=0; i<x-1;i++){
      cin >> y;
      vec.at(y)++
    }
  
    for(int i=1;i=<x;i++){
      cout << vec.at(i) << "\n";
    }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before '}' token
   19 |       vec.at(y)++
      |                  ^
      |                  ;
   20 |     }
      |     ~             
a.cc:22:19: error: expected primary-expression before '<' token
   22 |     for(int i=1;i=<x;i++){
      |                   ^
Language: C

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int mod=998244353;
#define mp make_pair
#define pb push_back
int main(){ 
	long long int t,n,m,b,c=0,d;
	cin>>n;
	int a[n];
	int mp[n+1]={0};
	for(int i=0;i<n-1;i++){
		cin>>a[i];
		mp[a[i]]++;
		}
		for(int i=1;i<=n;i++){
			cout<<mp[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++

/*
Miles Morales : When will I know I'm ready?
Peter B. Parker : You won't. It's a leap of faith. That's all it is, Miles. A leap of faith.
*/
//KEEP IT SIMPLE STUPID
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define print(o) for(auto it=(o).begin();it!=(o).end();it++) cout<<*it<<" ";
#define vll vector<ll>
#define pb push_back
#define FOR(n) for(ll i=0;i<=n;i++)
#define FORd(n) for(ll i=n;i>=0;i--)
#define FORrd(a,b) for(ll i=a;i>=b;i--)
#define FORr(a,b) for(ll i=a;i<=b;i++)
#define all(x) (x).begin(),(x).end()
#define FIO ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define mp make_pair
#define ff first
#define ss second
#define w(t) ll t;cin>>t;while(t--)

int main()
{
    ll n;
    cin>>n;
    vll a(n);
    for(ll i=0;i<n-1;i++)
    {
        ll x;
        cin>>x;
        x--;
        a[x]++;
    }
    for(ll i=0;i<n;i++)
    {
        cout<<a[i]<<'\n';
    }
    return 0;
}
/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
*/


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:11:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<long long int, std::allocator<long long int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long long int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main ()
{
    ll n,temp;
    cin>>n;
    ll a[n+1]={0};
    for(int i=2;i<=n;i++)
    {
        cin>>temp;
        a[temp]++;
    }
    for(int i=1;i<=n;i++) cout<<a[i]<<endl;
    return 0;
}


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

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	int N;
	cin >> N;
	int *a = new int[N];
	memset(a, N * sizeof(int), 0);
	for (int i = 1; i < N; i++)
		cin >> a[i];
	for (int i = 0; i < N; i++) {
		int cnt = 0;
		for (int j = i + 1; j < N; j++) {
			if (a[j] == i+1)
				cnt++;
		}
		cout << cnt << endl;
	}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(a, N * sizeof(int), 0);
      |         ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf("%d",&n);
      | ^~~~~
a.cc:7:22: error: 'printf' was not declared in this scope
    7 | for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      |                      ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int a[200010];
Language: C++

#include<bits/stdc++.h>
using namespcae std;
typedef long long Long;

int main(){
   Long n;
  cin >> n;
  	Long arr[n+1];
  memset( arr, 0, (n+1) * sizeof(Long) );
  for(Long i = 0 ; i<n-1 ; ++i){
    Long x;
    cin >> x;
    arr[x]++;
  }
  
  for(Long i=1 ; i<=n ; ++i) cout << arr[i] <<'\n';
  return 0;
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcae'
    2 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   for(Long i=1 ; i<=n ; ++i) cout << arr[i] <<'\n';
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> bukas(N, 0);
  int jyoushi;
  for (int i = 0; i < N - 1; i++) {
    cin >> jyoushi;
    bukas(jyoushi)++;
  }
  for (int i = 0; i < N; i++) {
    cout << bukas(i) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: no match for call to '(std::vector<int>) (int&)'
   10 |     bukas(jyoushi)++;
      |     ~~~~~^~~~~~~~~
a.cc:13:18: error: no match for call to '(std::vector<int>) (int&)'
   13 |     cout << bukas(i) << endl;
      |             ~~~~~^~~
Language: C

N = input()
S = input().replace(" ","")
 
for A in range (int(N)):
    print(S.count(str(A+1),A,int(N)-1))


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | N = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'S'
    2 | S = input().replace(" ","")
      | ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	int n; cin >> n;
	vector<int> a(n + 1);
	for (int i = 2; i <= n; ++i) {
		int x; cin >> x;
		a[x]++;
	}
	for (int i = 1; i <= n; ++i) cout << a[i] << '\n';
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:6:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C

#include <stdio.h>

int main(void) {
  int num;
  scanf("%d",&num);
  int work[num] = {0};
  int i;
  for(i = 0;i < num;++i) {
    int ptr;
    scanf("%d",&ptr);
    work[ptr-1] = work[ptr-1]+1;
  }
  for(i = 0;i < num;++i) {
    if(i < num -1) {
    	printf("%d\n",work[ptr]);
    }
    else {
      printf("%d",work[ptr]);
    }
  }
return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:6:19: error: variable-sized object may not be initialized except with an empty initializer
    6 |   int work[num] = {0};
      |                   ^
main.c:15:28: error: 'ptr' undeclared (first use in this function)
   15 |         printf("%d\n",work[ptr]);
      |                            ^~~
main.c:15:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int>> vvi;

int main() {
	int N;
	cin>>N;
	vvi tree(N);
	for (int i = 1; i < N; i++){
		int a;
		cin>>a;
		tree[a-1].push_back(i);
	}
	for (int i = 0; i < N; i++){
		cout<<tree[i].size()<<endl;
	}
}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected primary-expression before ']' token
   13 |         B[A[i] -= ]++;
      |                   ^
Language: C++

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected unqualified-id before '>' token
    9 |     vector<int>> relate(n);
      |               ^~
a.cc:11:9: error: 'relate' was not declared in this scope; did you mean 'rename'?
   11 |         relate[i] = 0;
      |         ^~~~~~
      |         rename
a.cc:15:9: error: 'relate' was not declared in this scope; did you mean 'rename'?
   15 |         relate[a-1]++;
      |         ^~~~~~
      |         rename
a.cc:18:17: error: 'relate' was not declared in this scope; did you mean 'rename'?
   18 |         cout << relate[i] << endl;
      |                 ^~~~~~
      |                 rename
Language: C

#include <iostream>
using namespace std;

int N, A[200001];

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


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

#include<bits/stdc++.h>

using namespace std;

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

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

const double PI = acos(-1);
#define MOD 1000000007

#define pb push_back
#define F first
#define S second
#define test int tc; cin>>tc; while(tc--)
#define forn(i,n) for(i=0;i<n;i++)
#define rforn(i,n) for(i=n-1;i>=0;i--)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) x.size()
#define el <<'\n'
#define sp <<' '

#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (abs(a*b)/gcd(a,b))
#define sqr(a) (a*a)

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
int a[100001];
main()
{
    ///optimize();
    int n,i,b;
    cin>>n;
    forn(i,n-1) cin>>b,a[b]++;
    for(i=1;i<=n;i++) cout<<a[i] el;






}





///Brainless people are gonna understand this code.




///Brainless_Loco Terminates Here!


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

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  int n;
  cin>>n;
  vector<ll> v1[n+1];
  for(int i=2;i<n;i++)
  {
    cin>>x;
    if(i!=x)
    v1[x].push_back(i);
  }
  for(int i=1;i<=n;i++)
  {
    cout<<v1[i].size()<<"\n";
  }
  return 0;
}

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:5:6: error: redefinition of 'int a [200010]'
    5 |  int a[200010];
      |      ^
a.cc:4:7: note: 'int a [200010]' previously declared here
    4 |   int a[200010];
      |       ^
a.cc: In function 'int main()':
a.cc:11:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   for(int i=2;i<=n;i++)ans[a[i]]++;
      |                        ^~~
      |                        abs
a.cc:12:38: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   for(int i=1;i<=n;i++)printf("%d\n",ans[i]);
      |                                      ^~~
      |                                      abs
Language: C++

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

int main(void){
    // Your code here!
    int n;
    int a;
    int b[200010]={};
    
    scanf("%d", &n);
    226732710
    
    for(int i=0; i<n-1; i++){
        scanf("%d", &a);
        b[a-1]++;
    }
    
    for(int i=0; i<n; i++){
        printf("%d\n", b[i]);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before 'for'
   12 |     226732710
      |              ^
      |              ;
   13 | 
   14 |     for(int i=0; i<n-1; i++){
      |     ~~~       
a.cc:14:18: error: 'i' was not declared in this scope
   14 |     for(int i=0; i<n-1; i++){
      |                  ^
Language: C

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

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

//phoenix




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


#define spdio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define pp pop_back
#define mp make_pair
#define fr(i,j,n) for(ll i=j; i<n; i++)
#define rfr(i,j,n) for(ll i=n-1; i>=0; i--)
#define vsort(v) sort(v.begin(),v.end())
#define asort(a) sort(a,a+n);


typedef long double ld;
typedef long long int ll;


//getline(cin,string);
const ll inf = (ll) 1e18 + 19;



/*
ll solveDp(ll i,ll w[],ll v[],ll n,ll wt,map <ll,map <ll,ll> > &dp) {
    if(i>=n || wt<0)
        return 0;
    if(dp[wt][i])
        return dp[wt][i];
    else if(wt<w[i])
        return dp.insert(mp([wt][i]=solveDp(i+1,w,v,n,wt,dp);
    else
        return dp[wt][i]=max(solveDp(i+1,w,v,n,wt,dp),v[i]+solveDp(i+1,w,v,n,wt-w[i],dp));
}
*/


/*
void bfs(ll k,bool vis[],ll n,vector <ll> v[]) {
    queue <ll> q;
    q.push(k);
    while(!q.empty()) {
        ll node=q.front();
        q.pop();
        cout<<node<<" ";
        vis[node-1]=true;
        fr(j,0,v[node-1].size()) {
            if(vis[v[node-1][j]-1]!=true)
                q.push(v[node-1][j]),vis[v[node-1][j]-1]=true;
        }
    }
}




void dfs(ll k,bool vis[],ll n,vector <ll> v[]) {
    cout<<k<<" ";
    vis[k-1]=true;
    fr(i,0,v[k-1].size()) {
        if(!vis[v[k-1][i]-1])
            dfs(v[k-1][i],vis,n,v);
    }
}




ll solveDp(ll i,ll a[],ll n,vector <ll> &dp) {
    if(i>=n)
        return 0;
    if(dp[i]!=-1)
        return dp[i];
    else {
        ll mx=-inf;
        fr(j,0,n) {
            mx=max(mx,a[i]+solveDp(i+j+2,a,n,dp));
        }
        return dp[i]=mx;
    }
}
*/



void cazz() {
    ll n,i,j,k,ans=0,f=0,b=0,wt,m=0;
    cin>>n;
    ll a[n-1],b[n]={};
    fr(i,0,n-1) {
        cin>>a[i];
        b[a[i]-1]++;
    }
    fr(i,0,n)
        cout<<b[i]<<"\n";
    /*cin>>n>>m;
    vector <ll> v[n];
    fr(i,0,m) {
        cin>>j>>k;
        v[j-1].pb(k);
        v[k-1].pb(j);
    }
    cout<<"\n";
    fr(i,0,n) {
        cout<<i+1<<"\t";
        fr(j,0,v[i].size()) {
            cout<<v[i][j]<<" ";
        }cout<<"\n";
    }
    cout<<"\n";
    cin>>k;
    bool vis[n]={};
    bfs(k,vis,n,v);
    cout<<"\n";
    bool vi[n]={};
    dfs(k,vi,n,v);*/
}




int main() {
    spdio;
	cazz();
	return 0;
}




Compiler output:
a.cc: In function 'void cazz()':
a.cc:94:15: error: conflicting declaration 'll b [n]'
   94 |     ll a[n-1],b[n]={};
      |               ^
a.cc:92:26: note: previous declaration as 'll b'
   92 |     ll n,i,j,k,ans=0,f=0,b=0,wt,m=0;
      |                          ^
a.cc:97:10: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   97 |         b[a[i]-1]++;
      |          ^
a.cc:100:16: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
  100 |         cout<<b[i]<<"\n";
      |                ^
Language: C

from collections import Counter
n = int(input())
a = tuple(map(int, input().split()))
All = Counter(a)
for i in range(1,n+1):
    try:
        print(All[i])
    except:
        print(0)


Compiler output:
main.c:1:1: error: unknown type name 'from'
    1 | from collections import Counter
      | ^~~~
main.c:1:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    1 | from collections import Counter
      |                  ^~~~~~
main.c:1:18: error: unknown type name 'import'
Language: C

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

using namespace std;

int main()
{
    int n;
    cin >> n;
    
    vector<int> a(n, 0);

    for (int i = 1; i < n; i++) {
        cin >> a.at(i);
    }

    vector<int> ans(n, 0);
    for (int i = 1; i < n; i++) {
        ans.at(a.at(i) - 1)++;
    }
    for (int i = 0; i < n; i++) {
        cout << ans.at(i) << endl;
    }
}



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

N=int(input())
A=list(map(int, input().split()))
b=[0]*N
for i in A:
    b[i-1]+=1
for i in b:
    print(b)

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

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

int main() {
  int n;
  cin >>n;
  vector<int>vec(n-1);
  for(int i=0;i<n;i++){
    cin >> vec.at(i-1);
  }
 vector<int> ans(n);
  for(int i=0;i<n-1;i++){
    ans.at(a.at(i)-1)++;
  }
  for(int i=0;i<n;i++){
    cout<<ans.at(i)<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'a' was not declared in this scope
   13 |     ans.at(a.at(i)-1)++;
      |            ^
Language: C++

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

int main() {
  int a;
  cin >>a;
  vector<int>vec(n-1);
  for(int i=0;i<a;i++){
    cin >> vec.at(i-1);
  }
 vector<int> ans(n);
  for(int i=0;i<n-1;i++){
    ans.at(a.at(i)-1)++;
  }
  for(int i=0;i<n;i++){
    cout<<ans.at(i)<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'n' was not declared in this scope
    7 |   vector<int>vec(n-1);
      |                  ^
a.cc:13:14: error: request for member 'at' in 'a', which is of non-class type 'int'
   13 |     ans.at(a.at(i)-1)++;
      |              ^~
Language: C

////基本の者ども
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int INF =2000000000;
//////forども//////////////////////////////////////////
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPR(i,n) for(int i = int(n); i >= 0; i--)
#define FOR(i,m,n) for(int i = int(m); i < int(n); i++)
#define FOREACH(x,a) for(auto& (x) : (a) )
////////////////////////////////////////////////////////////////
//cinおよびcout拡張
#define COUT(x) cout<<(x)<<endl
void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail){
    cin>>head;
    CINT(move(tail)...);
}
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)
/////////////////////////////////////////////////////////////////
//////あまった
#define MP make_pair
#define ALL(v) v.begin(), v.end()
#define pb(a) push_back(a)
///////////////////////////////////////////////////////////
//あまり
ll gcd(ll a, ll b){
   if (a%b == 0) return b;
   else return gcd(b, a%b);
}
ll lcm(ll a, ll b){	
   return a*b/gcd(a, b);
}
int pow_kai(int a, int n){//aのn乗を計算します。
  int x = 1;
  while(n > 0){//全てのbitが捨てられるまで。
    if(n&1){//1番右のbitが1のとき。
      x = x*a;
    }
    a = a*a;
    n >>= 1;//bit全体を右に1つシフトして一番右を捨てる。
  }
  return x;
}


//メモ
	//vector<vector<要素の型>> 変数名(要素数1, vector<要素の型>(要素数2, 初期値))
	//vector<intなど> 変数名(要素数,初期値)
	//dfsではvector<vector<int>> g(n);で◎
void Main(){//本処理はココ
	//入力パート
 	//string ;
 	ll  b[200010],n;
 	cin>>n;
 	REP(i,n-1){
 	    ll a;
 	    cin>>a;
 	    b[a]++;
 	}
 	for(ll idx=1;idx<=n;idx++)cout<<b[idx]<<endl;
 //答え出力パート
    //  cout<<r*2*M_PI;
    //  cout<<endl;
 }
int main(){//ここは前処理のゾーン
    //COMinit();//nCrするならON
    //Prime();//素数ならコレをon//PRIME_MAXとかisPrimeもいじろう
    //string a,b;
    //ll n,a;
    std::cout << std::fixed << std::setprecision(15);//浮動小数点絶対殺すマン
  	Main();
}


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;
const int N=2e5+10;
#define ll long long int
//#define d double
#define F first
#define S second
#define FastIO ios_base::sync_with_stdio(false),cin.tie(0)
#define fix std::fixed<<setprecision(10)
const int M=1e9+7;
#define f(n) for(int i=0;i<n;i++)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define vi vector<int>
#define pb push_back
#define si set<int>
#define cl(n,m) (ceil(double(n)/double(m)))
#define T() int t; cin>>t; while(t--)
#define pi pair<ll,ll>
//const int MOD=998244353;
const int MOD=1e9+7;
#define endl "\n"
const double PI = 3.141592653589793238460;
#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)
//bitset<N>bs;
//bitset<512>bb[512];
//vector<vector<int>>arr;

ll power(ll a,ll b)
{
    ll res=1;
    if(a==0)return 0;
    if(a==1)return 1;
    for(;b>0;b>>=1)
    {
        if(b&1)res=(res*a);
        if(res>MOD)res%=MOD;
        a=(a*a);
        if(a>MOD)a=a%MOD;
    }
    return res;
}

bool isPrime[1000001];
vector<ll>prime;

void seive(int limit)
{
    isPrime[0]=isPrime[1]=1;

    for(int i=2;i*i<=limit;i++)
    {
        if(!isPrime[i])
        for(int j=i*i;j<=limit;j+=i)
        {
            isPrime[j]=1;
        }
    }
    for(int i=2;i<=limit;i++)if(!isPrime[i])prime.pb(i);
}

int main()
{
    int n;
    cin>>n;
    ll arr[n];
    f(n-1)cin>>arr[i];

    ll cnt[n+1];
    memset(cnt,0,sizeof cnt);

    f(n-1)cnt[arr[i]]++;

    f(n)cout<<cnt[i+1]<<"\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 <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <iomanip>
#include <queue>
#include <deque>
#include <unordered_map>
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
using namespace std;
typedef long long ll;

int N;
int A[200005];
int ans[200005];

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

    for(int i=2;i<=N;i++) ans[A[i]]++;

    repn(i,N) cout<<ans[i]<<endl;
}

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

#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;
#define ll long long int
//#define d double
#define F first
#define S second
#define FastIO ios_base::sync_with_stdio(false),cin.tie(0)
#define fix std::fixed<<setprecision(10)
const int M=1e9+7;
#define f(n) for(int i=0;i<n;i++)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define vi vector<int>
#define pb push_back
#define si set<int>
#define cl(n,m) (ceil(double(n)/double(m)))
#define T() int t; cin>>t; while(t--)
#define pi pair<ll,ll>
//const int MOD=998244353;
const int MOD=1e9+7;
#define endl "\n"
const double PI = 3.141592653589793238460;
#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)
//bitset<N>bs;
//bitset<512>bb[512];
//vector<vector<int>>arr;

ll power(ll a,ll b)
{
    ll res=1;
    if(a==0)return 0;
    if(a==1)return 1;
    for(;b>0;b>>=1)
    {
        if(b&1)res=(res*a);
        if(res>MOD)res%=MOD;
        a=(a*a);
        if(a>MOD)a=a%MOD;
    }
    return res;
}

bool isPrime[1000001];
vector<ll>prime;

void seive(int limit)
{
    isPrime[0]=isPrime[1]=1;

    for(int i=2;i*i<=limit;i++)
    {
        if(!isPrime[i])
        for(int j=i*i;j<=limit;j+=i)
        {
            isPrime[j]=1;
        }
    }
    for(int i=2;i<=limit;i++)if(!isPrime[i])prime.pb(i);
}

int main()
{
    int n;
    cin>>n;
    int arr[n-1];
    f(n-1)cin>>arr[i];

    int cnt[n+1];
    memset(cnt,0,sizeof cnt);

    f(n-1)cnt[arr[i]]++;

    f(n)cout<<cnt[i+1]<<'\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: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      List<Integer> list = new ArrayList<Integer>();
      List<Integer> listAns = new ArrayList<Integer>();
      for(int i=1; i<=N; i++){
        list = list.add(sc.nextInt());
      }
      int count = 0;
      for(int k=1; k<=N; k++){
        for(int j=0; j<N; j++){
         if(list.get(j) == k){
           count++;
         }
        }
        System.out.println(count); 
      }
    }
}

Compiler output:
Main.java:10: error: incompatible types: boolean cannot be converted to List<Integer>
        list = list.add(sc.nextInt());
                       ^
1 error
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      List<Integer> list = new ArrayList<Integer>();
      List<Integer> listAns = new ArrayList<Integer>();
      for(int i=1; i<=N; i++){
        int Ai = sc.nextInt();
        list = list.add(Ai);
      }
      int count = 0;
      for(int k=1; k<=N; k++){
        for(int j=0; j<N; j++){
         if(list.get(j) == k){
           count++;
         }
        }
        System.out.println(count); 
      }
    }
}

Compiler output:
Main.java:11: error: incompatible types: boolean cannot be converted to List<Integer>
        list = list.add(Ai);
                       ^
1 error
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      List<Integer> list = new ArrayList<Integer>();
      List<String> listAns = new ArrayList<String>();
      for(int i=1; i<=N; i++){
        int Ai = sc.nextInt();
        list = list.add(Ai);
      }
      int count = 0;
      for(int k=1; k<=N; k++){
        for(int j=0; j<N; j++){
         if(list.get(j) == k){
           count++;
         }
        }
        System.out.println(count); 
      }
    }
}

Compiler output:
Main.java:11: error: incompatible types: boolean cannot be converted to List<Integer>
        list = list.add(Ai);
                       ^
1 error
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      List<Integer> list = new ArrayList<Integer>();
      List<String> listAns = new ArrayList<String>();
      Map<int,int> map = new HashMap<>();
      for(int i=1; i<=N; i++){
        int Ai = sc.nextInt();
        list = list.add(Ai);
      }
      int count = 0;
      for(int k=1; k<=N; k++){
        for(int j=0; j<N; j++){
         if(list.get(j) == k){
           count++;
         }
         System.out.println(count); 
      }
    }
}

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