Contest Duration: - (local time) (100 minutes) Back to Home

Submission #12114063

Source Code Expand

Copy
```#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n",(x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define isYes(x) printf("%s\n",(x) ? "Yes" : "No")
#define isIn(x,y,h,w) (x >= 0 && x < h && y >= 0 && y < w)

#define int long long
//using ll = long long;
using P = pair<int,int>;

ostream &operator<<(ostream &os,const P &p){ return os << "(" << p.first << "," << p.second << ")"; }
template<class T>
ostream &operator<<(ostream &os,const vector<T> &v){
for(int i = 0;i < v.size();i++) os << (i ? "," : "[") << v[i];
os << "]";
return os;
}

template<class T> T &chmin(T &a,const T &b){ return a = min(a,b); }
template<class T> T &chmax(T &a,const T &b){ return a = max(a,b); }

const int INF=1e+18;
const double EPS=1e-9;
const int MOD=1000000007;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

signed main(){
int n,b[200010] = {};
cin >> n;
for(int i = 1;i < n;i++){
int a;
cin >> a;
b[a - 1]++;
}
for(int i = 0;i < n;i++) cout << b[i] << endl;
}
```

#### Submission Info

Submission Time 2020-04-19 21:16:16+0900 C - management hoget157 C++ (GCC 9.2.1) 300 1155 Byte AC 317 ms 5184 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 305 ms 5128 KB
binary_02 AC 307 ms 5168 KB
line_01 AC 305 ms 5144 KB
line_02 AC 317 ms 5148 KB
random_01 AC 305 ms 4956 KB
random_02 AC 253 ms 4956 KB
random_03 AC 263 ms 5128 KB
random_04 AC 111 ms 4952 KB
sample_01 AC 3 ms 5116 KB
sample_02 AC 3 ms 4956 KB
sample_03 AC 3 ms 4956 KB
small_01 AC 3 ms 5184 KB
star_01 AC 287 ms 5016 KB
star_02 AC 289 ms 5008 KB
star_03 AC 291 ms 5184 KB