Submission #12083752


Source Code Expand

Copy
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr long double EPS = 1e-8;

long long int N, M, K, L, R, H, W;
//int N, M, K, L, R, H, W;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	vector<int>v(N + 1);
	for (int i = 1; i < N; i++) {
		cin >> L;
		v[L]++;
	}
	for (int i = 1; i <= N; i++) {
		cout << v[i] << endl;
	}
}

Submission Info

Submission Time
Task C - management
User olphe
Language C++ (GCC 9.2.1)
Score 300
Code Size 901 Byte
Status AC
Exec Time 283 ms
Memory 3964 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 273 ms 3832 KB
binary_02 AC 278 ms 3824 KB
line_01 AC 283 ms 3888 KB
line_02 AC 277 ms 3812 KB
random_01 AC 276 ms 3960 KB
random_02 AC 229 ms 3964 KB
random_03 AC 237 ms 3832 KB
random_04 AC 103 ms 3568 KB
sample_01 AC 3 ms 3572 KB
sample_02 AC 2 ms 3612 KB
sample_03 AC 2 ms 3504 KB
small_01 AC 2 ms 3504 KB
star_01 AC 273 ms 3896 KB
star_02 AC 271 ms 3872 KB
star_03 AC 273 ms 3812 KB