2020 CCPC wannafly 冬令营 Day3 游记+解题报告 | Bill Yang's Blog

# 路终会有尽头，但视野总能看到更远的地方。

0%

## A. Alternative Accounts

### 题目描述

Everybody knows that jiry_2 = Syloviaely.
There are $n$ different accounts on the website, and some of them competed in the recent $k$ contests. However, Mike suspects that there are lots of alternative accounts.
There are axioms believed by everyone that nobody can use two different in one contest simultaneously and each account can be owned by only one person. So different accounts without overlapping contest participation can be owned by the same person.
Mike wants to know the minimum possible number of different people behind these accounts.

## B. Bitset Master

### 题目描述

It’s well known in China that $O(n^2)$ algorithms can pass the problem with $n=10^6$ easily.
You are given a tree with $n$ vertices and $n-1$ edges $(u_1, v_1), (u_2, v_2), \dots, (u_{n-1},v_{n-1})$
For each vertex $u$,there is a set $S_u=\{u\}$ initially.
You need to perform $m$ operations. For the $i$-th operation, you are given an edge $p_i$ and let $S_{u_{p_i}}$ and $S_{v_{p_i}}$ be the union of them.
Finally, you need to find the number of sets $S(v)$ contains $u$ for each vertex $u$.