International Master 计划试题乱做 part1

1. CF1327G Letters and Question Marks

2. CF1363F Rotating Substrings

3. CF1383E Strange Operation

4. CF1394D Boboniu and Jianghu

5. CF1442D Sum

6. CF1408G Clusterization Counting

7. CF1430G Yet Another DAG Problem

8. CF903G Yet Another Maxflow Problem

9. CF1085G Beautiful Matrix

10. CF1525F Goblins And Gnomes

11. CF983E NN country

12. CF1118F2 Tree Cutting (Hard Version)

题目传送门

瞎扯:由于最终的 \(k\) 个块每个正好对应一个颜色,所以一开始就将同色块缩起来,有交即无解。

此时将缩点后的树的某些挂的没有颜色的链去掉,然后随意 \(\text{dp}\) 即可。

正解:确实如此。这题评 \(2700\) 纯粹是代码难度吧。代码鸽了。

13. CF1205D Almost All

14. CF1207G Indie Album

15. CF1260F Colored Tree

16. CF1389G Directing Edges

17. CF1416D Graph and Queries

18. CF1413F Roads and Ramen

19. CF1452G Game On Tree

20. CF1555F Good Graph

题目传送门

瞎扯:考虑一个简单环中间加一个边就一定不合法,所以一定是个仙人掌。

每次加边判断并暴力把环缩为一个点,这样做好像就没什么问题了。

正解:差不多。这个东西可以离线先把树建出来,然后用一个树状数组维护。

posted @ 2022-01-23 17:28  syzf2222  阅读(109)  评论(2编辑  收藏  举报