Algorithm Notebook 2(2.1.2026~2.28.2026)
本文最后更新于 2026年2月1日 下午
CF 266B - Queue at the School (800)
题意:队伍只含 B/G,进行 秒;每秒同时把所有 “BG” 变成 “GB”。输出最终队形。
思路:模拟 轮;每轮从左到右扫描,遇到 BG 交换,并 i += 2 跳过下一位,避免本秒重复参与。
1 | |
Algorithm Notebook 2(2.1.2026~2.28.2026)
https://www.mirstar.net/2026/02/01/alogorithm-notebook-2/