摘要: # A. Treasure Hunt ```cpp #include using namespace std; int read() { int x = 0, f = 1, ch = getchar(); while ((ch '9') && ch != '-') ch = getchar(); i 阅读全文
posted @ 2023-07-11 15:49 PHarr 阅读(9) 评论(0) 推荐(0) 编辑
摘要: # Saruman's Army 首先对序列排序,然后逐个考虑覆盖,如果要覆盖当前的点,则标记点越靠后越好,所有向后找$R$,选择最靠后的标记,然后从标记点开始在向后找$R$也是被标记过的,直接跳过 ```cpp #include #include using namespace std; int 阅读全文
posted @ 2023-07-11 10:49 PHarr 阅读(7) 评论(0) 推荐(0) 编辑