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

Submission #12110699

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:14:11+0900 C - management hoget157 C++ (GCC 9.2.1) 0 1148 Byte WA 307 ms 5184 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
 AC × 3
 AC × 7 WA × 8
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 WA 301 ms 4240 KB
binary_02 WA 304 ms 4404 KB
line_01 WA 303 ms 5184 KB
line_02 WA 307 ms 5124 KB
random_01 WA 303 ms 5152 KB
random_02 AC 252 ms 4908 KB
random_03 AC 262 ms 4928 KB
random_04 AC 109 ms 4128 KB
sample_01 AC 2 ms 3460 KB
sample_02 AC 2 ms 3588 KB
sample_03 AC 2 ms 3628 KB
small_01 AC 2 ms 3632 KB
star_01 WA 285 ms 3592 KB
star_02 WA 287 ms 3396 KB
star_03 WA 294 ms 3576 KB