Codeforces 1084E - The Fair Nut and Strings - 思维
Codeforces 1084E - The Fair Nut and Strings - 思维题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/E题意 给你一个区间 $[s, t]$,其中 $s$ 和 $t$ 都是字符串,且长度为 $n$,只包含 ab 两种字符,问从这个区间内...
Codeforces 1084E - The Fair Nut and Strings - 思维题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/E题意 给你一个区间 $[s, t]$,其中 $s$ 和 $t$ 都是字符串,且长度为 $n$,只包含 ab 两种字符,问从这个区间内...
Codeforces 1084A - The Fair Nut and the Best Path - 树形DP题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/D题意 给你一棵树,数上的每个点都有一个正权值,每条边都有一个负权值,让你在树中找一条简单路径,使得权值和最大。思路&e...
Codeforces 1084C - The Fair Nut and String题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/C题意 给你一串字符串,问你能选出多少个形如 aba 这样的子序列(任意两个 a 之间至少包含一个 b),a 也算,aba 与 abba 与 ab*...
Codeforces 1084B - Kvass and the Fair Nut - 二分题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/B题意 你有 $n$ 桶水,第 $i$ 桶水里初始时有 $v_i$ 升水,你需要从这 $n$ 桶水中取出 $s$ 升水,问是否能取 $s$ ...
Codeforces 1084A - The Fair Nut and Elevator题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/A题意 有一个电梯,它初始时会停留在第 $k$ 层楼,每当有一个人要从第 $a$ 楼去第 $b$ 楼,电梯就会始终按照 $k \rightarr...