Submission #12136907


Source Code Expand

Copy
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<ll, int> P;

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

Submission Info

Submission Time
Task C - management
User chocorusk
Language C++ (GCC 9.2.1)
Score 300
Code Size 769 Byte
Status AC
Exec Time 310 ms
Memory 4416 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample_01, sample_02, sample_03
All binary_01, binary_02, line_01, line_02, random_01, random_02, random_03, random_04, sample_01, sample_02, sample_03, small_01, star_01, star_02, star_03
Case Name Status Exec Time Memory
binary_01 AC 310 ms 4216 KB
binary_02 AC 309 ms 4236 KB
line_01 AC 310 ms 4188 KB
line_02 AC 309 ms 4352 KB
random_01 AC 306 ms 4308 KB
random_02 AC 255 ms 4308 KB
random_03 AC 267 ms 4304 KB
random_04 AC 109 ms 4416 KB
sample_01 AC 5 ms 4172 KB
sample_02 AC 2 ms 4336 KB
sample_03 AC 3 ms 4220 KB
small_01 AC 2 ms 4336 KB
star_01 AC 290 ms 4348 KB
star_02 AC 286 ms 4364 KB
star_03 AC 301 ms 4372 KB