- 2024-09-24F - Takahashi in Narrow Road
F-TakahashiinNarrowRoadProblemStatementThereisaroadextendingeastandwest,and$N$personsareontheroad.Theroadextendsinfinitelylongtotheeastandwestfromapointcalledtheorigin.The$i$-thperson$(1\leqi\leqN)$isinitial
- 2024-09-22[ABC371F] Takahashi in Narrow Road 题解
洛谷题目链接Atcoder题目链接前言这道题我赛时想到了正解并打了出来,然后因为把\(l\)打成了\(1\)导致WA\(\times23\),然后又没场切六道题(悲。然后赛后有人说正解是珂朵莉树/线段树,然而我是珂朵莉树\(+\)线段树,呵。题意数轴上有\(n\)个人,第\(i\)个人初始在\(X_i\)处,每一次操作
- 2024-08-15Make Them Narrow
题目大意:给你一个\(n\)和\(k\),再给你一个长度为\(N\)的序列\(A\),从\(A\)中任意选择\(K\)个元素并将其删除,然后按原来的顺序将剩余的元素连接起来,形成一个新的序列\(B\),然后求这个序列的极差。解题思路错误解法一开始我想到了贪心:把\(A\)数组排个序,然后把开头