[NOIP2001]装箱问题 dfs超时的看这里 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int v,n,kkk[35]; int a[35]; bool vis…… 题解列表 2024年12月14日 0 点赞 0 评论 194 浏览 评分:0.0
1282: 公交汽车 dp和dfs 还是dfs更好用 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int a[11],n,kkk[110]; void dfs(int x,…… 题解列表 2024年12月14日 0 点赞 0 评论 233 浏览 评分:0.0
找啊找啊找GF 题目描述有点东西 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量 int n, m, r; // n表示物品MM数量,m…… 题解列表 2024年12月14日 1 点赞 0 评论 220 浏览 评分:0.0
三角形 简单dp练习 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和t,分别表示测试用例的数…… 题解列表 2024年12月14日 2 点赞 0 评论 453 浏览 评分:0.0
最长上升子序列 入门dp练习题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和x,用于存储输入的整数数…… 题解列表 2024年12月14日 0 点赞 0 评论 211 浏览 评分:0.0
分成互质组 为了这题开了张月卡 哈哈哈哈哈 呃 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int f(int b, int c) { if (c == 0)…… 题解列表 2024年12月13日 0 点赞 0 评论 184 浏览 评分:0.0
蓝桥杯算法训练VIP-单词接龙 就离谱 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义字符串数组,用于存储输入的字符串 string s[30]; …… 题解列表 2024年12月13日 0 点赞 0 评论 183 浏览 评分:0.0
3038: 马走日 dfs 入门必写 摘要:解题思路:注意事项:参考代码:#include "bits/stdc++.h" using namespace std; // 全局变量声明 int n, m, x, y, kkk = 0; /…… 题解列表 2024年12月12日 0 点赞 0 评论 218 浏览 评分:0.0
统计回文数的操作次数 摘要:解题思路:利用回文数的对称性 使用双循环对称判断 再寻找特殊性(即奇数个需要移动到中间,偶数个不需要移动,以及连个单出来的char构不成回文数)统计次数得出结果注意事项:第二个for循环的“移动”循…… 题解列表 2024年12月12日 0 点赞 0 评论 214 浏览 评分:0.0
阶乘数列 C++解题 摘要:解题思路:注意事项: 精度只到两位小数,double类型应该也可以吧。参考代码:#include<iostream>using namespace std;int main(){ int n; …… 题解列表 2024年12月12日 0 点赞 0 评论 433 浏览 评分:0.0