随笔分类 -  思维--杂项

摘要:传送门 题意:给定一张不保证联通的简单图,问是否存在染色方案,使得每一个连通块为三分图。 分析:不考虑其他约束,只考虑三分图每一个子集内部没有边相连的约束,先染出一张图。做法为首先对于一个连通块,先选定一个起点u,将u染成1,然后将与u直接相连的点,全部染成2,然后选择一个染成2的点为v,然后将所有 阅读全文
posted @ 2019-09-30 00:07 千摆渡Qbd 阅读(468) 评论(0) 推荐(0)
摘要:传送门 A 2048 题意:multiset里面有许多2的幂,每次可以从multiset取出两个一样的数字,放回去两数之和,问能否出现2048. 分析:优先队列模拟操作 B knights 题意:棋子可以走日字,将n*n的棋盘用W与B填满,代表两个阵营的棋子,使得可以互相攻击的点对数量最大。 分析: 阅读全文
posted @ 2019-09-20 22:18 千摆渡Qbd 阅读(315) 评论(0) 推荐(0)
摘要:Watchmen CodeForces - 650A Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible 阅读全文
posted @ 2019-01-27 17:48 千摆渡Qbd 阅读(192) 评论(0) 推荐(0)
摘要:Cowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is N, it is cut by the plane 阅读全文
posted @ 2019-01-27 17:45 千摆渡Qbd 阅读(132) 评论(0) 推荐(0)
摘要:Sonya and Robots time limit per test 1 second memory limit per test 256 megabytes input: standard input output: standard output Sonya and Robots time 阅读全文
posted @ 2018-11-04 22:18 千摆渡Qbd 阅读(241) 评论(0) 推荐(0)
摘要:B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Sonya and Exhi 阅读全文
posted @ 2018-11-02 16:02 千摆渡Qbd 阅读(206) 评论(0) 推荐(0)