Rank | Solved | A | B | C | D | E | F | G | H | I | J | K |
---|---|---|---|---|---|---|---|---|---|---|---|---|
16/160 | 27/130 | O | O | O | . | O | O | ? | . | O | . | ? |
O
: 当场通过
?
: 赛后通过
.
: 尚未通过
A Secret of Chocolate Poles
solved by chelly
chelly‘s solution
B Parallel Lines
solved by ch
ch‘s solution
C Medical Checkup
solved by chelly
chelly‘s solution
D Digital Clock
unsolved
E Black or White
solved by chelly&ch
chelly‘s solution
F Pizza Delivery
solved by chelly&ch
chelly‘s solution
G Rendezvous on a Tetrahedron
upsolved by feynman
feynman‘s solution
H Homework
unsolved
I Starting a Scenic Railroad Service
solved by chelly
chelly‘s solution
J String Puzzle
unsolved
K Counting Cycles
upsolved by chelly
chelly‘s solution
先求出一棵生成树,那么非树边顶多16条,二进制枚举所有的组合,算经过某几条非树边是否存在一个环(如果存在则一定是唯一的)
对于如何判断,只需要将一个非树边对应的树上的链全部异或一下,那么对于这组选择,选出边权为1的边组成一个图,判断这个图是不是一个简单环即可
注意原树会很大,\(2^16\)次遍历原树是会TLE,我们只需要在虚树上做即可
Dirt Replay
F -1
双连通分量的板子抄错了
E -3
一发是dp式子写错了,还有两发是因为单调队列优化时候的单调队列方向写反了
原文地址:https://www.cnblogs.com/Amadeus/p/10115436.html
时间: 2024-10-31 15:18:05