思路: 自己想的是 记忆化搜索 题解 是 在合法点建图连边 本来有仙人掌 就边权为0, 不然为1, 从左端到达有段的最短路径 由于边权是1 或者0 , 直接双端bfs 即可, deque, 0放前面, 1放后面, deque<> q; 本栏目推荐文章CF414B - Mashmokh and ACMCF-613-DCF1201C - Maximum MedianCF1876D LexichromatographyAT_cf17_final_j 题解CF1900E 题解CF1896E 题解CF713D 题解CF1900E 题解CF1284E New Year and Castle ConstructionCactus Wall CFcactus wall cf cactus 231e cf cactus wall counting contest cactus 300 codeforces cactus 1268e happy standard wall case 解码器 方法smart wall hamiltonian wall 题解competition 102759b cactus