Rank | Solved | A | B | C | D | E | F | G | H | I | J |
---|---|---|---|---|---|---|---|---|---|---|---|
59/242 | 4/10 | O | O | Ø | Ø | . | Ø | . | O | . | O |
O
: 当场通过
Ø
: 赛后通过
.
: 尚未通过
A Decoding Baby Boos
solved by chelly
chelly's solution
签到
B And Or
solved by chelly
chelly's solution
签到
C A game for kids
upsolved by chelly
chelly's solution
算法一:
直接树形DP,\(dp[u][i]\)表示以u为根的子树中,以u为一条链的端点的情况下,gcd=i的方案数有多少,对于每条路径在它们的lca处统计
时间复杂度\(O(n \times 50^2)\)算法二:
考虑计算gcd是g的倍数情况下的方案有多少,求出来之后,容斥/莫比乌斯反演即可
实际上我们只需要对于每个点,统计它有多少个权值是g的倍数,然后直接树dp一次即可 时间复杂度\(O(50 \times n)\)D Flood in Gridland
upsolved by chelly
LP对偶费用流
至于方案的输出可以利用互补松弛性来将原来的一些不等号变成等号,然后差分约束E Refraction
unsolved
F Reverse Polish Notation
upsolved by chelly
chelly's solution
G Just Some Permutations
unsolved
H Load Balancing
solved by chelly
chelly's solution
I Volume of Revolution
unsolved
J Maximum Score
solved by chelly
chelly's solution
Replay
本场由chelly单挑2小时