最长上升子序列 入门dp练习题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和x,用于存储输入的整数数…… 题解列表 2024年12月14日 0 点赞 0 评论 183 浏览 评分:0.0
分成互质组 为了这题开了张月卡 哈哈哈哈哈 呃 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int f(int b, int c) { if (c == 0)…… 题解列表 2024年12月13日 0 点赞 0 评论 150 浏览 评分:0.0
蓝桥杯算法训练VIP-单词接龙 就离谱 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义字符串数组,用于存储输入的字符串 string s[30]; …… 题解列表 2024年12月13日 0 点赞 0 评论 154 浏览 评分:0.0
3038: 马走日 dfs 入门必写 摘要:解题思路:注意事项:参考代码:#include "bits/stdc++.h" using namespace std; // 全局变量声明 int n, m, x, y, kkk = 0; /…… 题解列表 2024年12月12日 0 点赞 0 评论 180 浏览 评分:0.0
统计回文数的操作次数 摘要:解题思路:利用回文数的对称性 使用双循环对称判断 再寻找特殊性(即奇数个需要移动到中间,偶数个不需要移动,以及连个单出来的char构不成回文数)统计次数得出结果注意事项:第二个for循环的“移动”循…… 题解列表 2024年12月12日 0 点赞 0 评论 166 浏览 评分:0.0
阶乘数列 C++解题 摘要:解题思路:注意事项: 精度只到两位小数,double类型应该也可以吧。参考代码:#include<iostream>using namespace std;int main(){ int n; …… 题解列表 2024年12月12日 0 点赞 0 评论 372 浏览 评分:0.0
取石子游戏 威佐夫博弈 摘要:解题思路: 威佐夫博弈: 有两堆各若干个物品,两个人轮流从任一堆取至少一个或同时从两堆中取同样多的物品,规定每次至少取一个,多者不限,最后取光者得胜。 若两堆物品的初始值…… 题解列表 2024年12月12日 0 点赞 0 评论 304 浏览 评分:0.0
3037: 棋盘问题 简单 DFS 入门题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; #define ll long long int n,k; // 定义全局…… 题解列表 2024年12月12日 0 点赞 0 评论 219 浏览 评分:0.0
信息学奥赛一本通T1441-生日蛋糕 写完之后不想吃蛋糕了 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 初始化一个较大的常量值,用于后续比较和更新最小值 int kkk=9…… 题解列表 2024年12月11日 0 点赞 0 评论 251 浏览 评分:9.9
数据结构-n阶Hanoi塔问题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量k,用于记录移动步骤的编号 int k; void f(i…… 题解列表 2024年12月11日 0 点赞 0 评论 142 浏览 评分:0.0