差分+前缀和 摘要:解题思路:初始商品库存均为0,执行完全部操作后分为2种情况:商品库存<=1 //表示被0或1个区间包含商品库存>1 //表示被1个以上的区间包含因为每次只能撤回一次操作,等价于求[l,r]<=1的…… 题解列表 2024年04月24日 0 点赞 4 评论 1425 浏览 评分:7.5
封闭图形个数 ##方法1```#include#defineintlonglongusingnamespacestd;constintN=2e5+10,mod=998244353;//intf[N];//inta[N][N],b[N];intp[N];//intf[N];structs{intx, 题解列表 2024年04月24日 0 点赞 0 评论 709 浏览 评分:0.0
好好学string及相关方法~ ***阅读须知:s.substr(x)的意思是从字符串s的第x个开始截取到s的末尾,那substr(0,x)不必多说了吧...为方便大家更容易理解,我将解决字符串之间的拼接的部分单独放入一个check函数来解释。***样例为attouchcheatchoosetact龙头为a要进行拼接, 题解列表 2024年04月24日 0 点赞 0 评论 683 浏览 评分:9.9
3210: 蓝桥杯2024年第十五届省赛真题-R 格式 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int n=1,a[10000]; void mul(int p[] …… 题解列表 2024年04月24日 1 点赞 0 评论 1461 浏览 评分:0.0
最简单的做法 摘要:解题思路:使用set容器注意事项:参考代码:#include <bits/stdc++.h> using namespace std; const int N=10100; stri…… 题解列表 2024年04月24日 0 点赞 0 评论 517 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-数字诗意 最优雅写法 ```cpp#include#defineintlonglongusingnamespacestd;signedmain(){intn=1,m,res=0;cin>>n;while(n--){cin>>m;res+=((m&(m-1))==0);}cout 题解列表 2024年04月23日 4 点赞 3 评论 2022 浏览 评分:10.0
2821: 开关灯 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;const int N=1e5;ll a[N];using namespace s…… 题解列表 2024年04月23日 0 点赞 0 评论 571 浏览 评分:0.0
STL deque优雅方案 摘要:解题思路:使用STL队列维护m个连续奇数注意事项:参考代码:#include<iostream> #include<cmath> #include<deque> using namespace …… 题解列表 2024年04月23日 0 点赞 0 评论 476 浏览 评分:0.0
最匹配矩阵 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>#include<utility>using namespace std;int Difference…… 题解列表 2024年04月23日 0 点赞 0 评论 640 浏览 评分:0.0
dfs经典马走日 摘要: ```cpp #include using namespace std; #define int long long #define endl "\n" const int N…… 题解列表 2024年04月23日 0 点赞 0 评论 552 浏览 评分:9.9