摘要:
题解 遇到map时,sum++;遇到pie时,sum++。 特殊情况遇到mapie时,sum--(因为map,pie分别加了一次,但是该子串只需要去掉p即可) code #include<bits/stdc++.h> using namespace std; const int N=2e5+5; i 阅读全文
posted @ 2024-03-16 16:38
黑屿白
阅读(27)
评论(0)
推荐(0)
摘要:
题解 由于a1的值只能通过对a2的操作进行消除,所以我们可以先根据a1的值迭代出a2,a3的值,然后此时的a2,只能通过a3的操作进行消除.....以此类推,如果其中发现有ai的值<0就输出NO。 code #include<bits/stdc++.h> using namespace std; c 阅读全文
posted @ 2024-03-16 16:33
黑屿白
阅读(54)
评论(0)
推荐(0)
摘要:
题解 简单的二分应用,对于每个bi我们只需找到最大的ci使得bi+ci<=target即可 code #include<bits/stdc++.h> using namespace std; int a[105],b[105]; int main(){ // freopen("input.txt", 阅读全文
posted @ 2024-03-16 16:25
黑屿白
阅读(20)
评论(0)
推荐(0)
浙公网安备 33010602011771号