string容器操作真好用 摘要:#include<bits/stdc++.h>using namespace std;string s, temp, ans;int main() { cin >> s; for (int i = 0…… 题解列表 2023年04月01日 0 点赞 0 评论 235 浏览 评分:9.9
c++string自带的函数挺好用的 摘要:#include using namespace std; string s,ans; int main() { cin>>s; for(int i=0;i<s.size();i++…… 题解列表 2023年04月01日 0 点赞 0 评论 217 浏览 评分:9.9
简洁暴力的dfs就可以了 摘要:方向只要向下和向右,不需要开数组保存走过的路,数据量这么小,直接暴力就行#include<bits/stdc++.h>using namespace std;int n,m;long long ans…… 题解列表 2023年04月01日 1 点赞 1 评论 234 浏览 评分:0.0
贡献值解法 摘要:以cabcdec为例讨论中间的c的贡献值含中间c的子串有abc abcdabcdebcbcdbcdeccdcde假设前面的c为l,中间的c为p,后面的c为r,中间的c的贡献值就为 (…… 题解列表 2023年04月01日 0 点赞 0 评论 374 浏览 评分:9.9
饮料换购 简单易懂 摘要: ## 解题思路 迭代m (瓶盖数)实现 ## 代码实现 ```cpp #include using namespace std; int main() { int …… 题解列表 2023年04月01日 0 点赞 0 评论 245 浏览 评分:0.0
一维迭代解法 摘要:解题思路:与一楼的思路一致,但因为用set会超时,所以采用了以下方法优化参考代码:#include<bits/stdc++.h>using namespace std;int n;int g[1000…… 题解列表 2023年04月01日 0 点赞 0 评论 222 浏览 评分:0.0
#C++2591—— 蓝桥杯2020年第十一届省赛真题-成绩统计(四舍五入) 摘要:解题思路:**************正常模拟即可**************//first:double对于当前最低位(精度位)的下一位会进行四舍五入 //second:也可以在转化int的时候加…… 题解列表 2023年03月31日 0 点赞 0 评论 336 浏览 评分:0.0
随便写写,哈哈哈哈哈哈哈哈哈 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int n;string f(char ch[], int i) { //一个retu…… 题解列表 2023年03月31日 0 点赞 0 评论 206 浏览 评分:0.0
无脑暴力搜索,因为数据范围很小 摘要:解题思路:直接深搜,每个结点最多两个子结点(要么加要么减,不可能既加又减),最多18层,所以最多有1+2+4+8+....+2^18=2^19-1<一百万个结点,这么小的数据范围,直接暴力搜索就行。D…… 题解列表 2023年03月31日 0 点赞 0 评论 665 浏览 评分:8.7
蓝桥杯2022年第十三届省赛真题-推导部分和 摘要:### 我看这道题还没有题解,搬运过来的,给大家参考一下: ```cpp #import using namespace std; #define int long long const …… 题解列表 2023年03月31日 0 点赞 0 评论 838 浏览 评分:9.3