摘要:
"ZROI 962" 看起来很数据结构的一道题,其实就是很数据结构... $\Theta(nmq)$的暴力很无脑,是个人应该都会. $Code:$ cpp include include include include include include include include include 阅读全文
摘要:
"ZROI 961" 很诡异地一道题,你看他问的是是否存在距离$d\in [dist,1.1dist]$的路径. 你想一下这个$1.1$是个啥.好像不知道,先考虑暴力叭. 暴力你就$bfs$,让点重复入队就好了,每个点维护一个$set$,查询直接$lower\_bound$即可. $Code:$ 阅读全文
摘要:
"ZROI 960" 先说$\Theta(n^2)$暴力叭. 显然的想法就是枚举答案中相邻两个$1$之间的$0$的个数. 然后贪心匹配,注意判断最后一段是否满足限制. cpp include include include include include include include includ 阅读全文
摘要:
"CodeForces1209B" 水题,枚举就好了,我枚举到了129个周期. 别忘了一个灯如果亮了就会一直亮着除非到下次改变状态. cpp include include include include include include include include include include 阅读全文