摘要: ## [D. Plus Minus Permutation](https://codeforces.com/contest/1872/problem/D) 这道题要使$(p_{1 \cdot x} + p_{2 \cdot x} + \ldots + p_{\lfloor \frac{n}{x} \ 阅读全文
posted @ 2023-09-08 12:47 铜锣骚 阅读(32) 评论(0) 推荐(0)
摘要: ## [C. Non-coprime Split](https://codeforces.com/contest/1872/problem/C) 这道题可以先进行分类讨论。 - 当$r #define endl '\n' using namespace std; typedef long long 阅读全文
posted @ 2023-09-08 12:29 铜锣骚 阅读(46) 评论(0) 推荐(0)
摘要: ## [B. The Corridor or There and Back Again](https://codeforces.com/contest/1872/problem/B) 由题意可知,对于每一个***d~i~***和***s~i~***,必须要在进入房间***d~i~***的***s~i 阅读全文
posted @ 2023-09-08 09:31 铜锣骚 阅读(25) 评论(0) 推荐(0)
摘要: ## [A. Two Vessels](https://codeforces.com/contest/1872/problem/A) 简单题。先计算杯子a和杯子b里水的差值,在计算需要用c杯子舀几次水就行 $$Ans=ceil(|a-b|/2c)$$ #### 代码 ```cpp #include 阅读全文
posted @ 2023-09-08 09:16 铜锣骚 阅读(42) 评论(0) 推荐(0)
摘要: ## [C. Game on Permutation](https://codeforces.com/contest/1860/problem/C) 这道题需要求出**先手必胜**点 通过分析可知,每个位置结尾的最大上升子序列长度为**2**的点为先手必胜点,**≥3**的点为先手必败点。即只需要求 阅读全文
posted @ 2023-09-07 19:04 铜锣骚 阅读(35) 评论(0) 推荐(0)
摘要: ## [Fancy Coins](https://codeforces.com/contest/1860/problem/B) 这道题使用贪心。 先使用***a1***个常规硬币,补足**m%k**的金额,不够的使用花色硬币补上,并最大化***a1***硬币的价值。再计算剩余需要价值为**k**的硬 阅读全文
posted @ 2023-09-07 18:48 铜锣骚 阅读(32) 评论(0) 推荐(0)
摘要: ## [A. Not a Substring](https://codeforces.com/contest/1860/problem/A) 这道题为简单构造题 只需要考虑给出的字符串***s***是否为“**()**”的必要组成成分 * 若是则无法生成,输出NO。 * 不然就判断给出的字符串*** 阅读全文
posted @ 2023-09-07 18:31 铜锣骚 阅读(40) 评论(0) 推荐(1)