[递归]母牛的故事(动态规划,递归) 摘要:解题思路:写出数学表达式 F(x){ x<=3 f(x)=x;// 前三年只有一头母牛生孩子 &nbs 题解列表 2024年04月27日 0 点赞 0 评论 615 浏览 评分:6.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年04月27日 0 点赞 0 评论 404 浏览 评分:2.0
2821: 开关灯 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年04月27日 1 点赞 0 评论 481 浏览 评分:2.0
1738-排序(由小到大*多数据排序) 摘要:解题思路:用数组储存数据,两个for循环遍历数据,比较大小交换位置注意事项:会用到new获取数组大小参考代码:#include <iostream>using namespace std;void s…… 题解列表 2024年04月26日 0 点赞 2 评论 677 浏览 评分:9.9
2136: 信息学奥赛一本通T1272-分组背包 摘要:解题思路:分组背包注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; const int N = 40; …… 题解列表 2024年04月26日 0 点赞 0 评论 494 浏览 评分:9.9
2135: 信息学奥赛一本通 T1271-潜水员 摘要:解题思路: 01 背包,f[i][j] 表示i氧j氮气瓶所需要的最小重量,(W) 重量维度优化省略, 因此以倒序遍历i,j 注意事项:当i - x 为负数时注意越界,因此取max(0,i-x)参考代码…… 题解列表 2024年04月26日 0 点赞 0 评论 579 浏览 评分:9.9
高精度乘法-结构体实现 摘要:解题思路:小学乘法运用到编程。。。注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;struct bign{ int d…… 题解列表 2024年04月25日 0 点赞 0 评论 766 浏览 评分:9.9
耗费一天时间,搞明白。最简化了 摘要:解题思路:基本搜索,注意事项:一定注意细节,字典序最小。参考代码:#include<bits/stdc++.h>using namespace std;const int N=20;int dx[]=…… 题解列表 2024年04月25日 4 点赞 10 评论 2515 浏览 评分:7.5
不知道为什么没有满分,来人看看吧,救救孩子 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=20;int mp[N][N];bool f[N][N];i…… 题解列表 2024年04月25日 0 点赞 1 评论 991 浏览 评分:0.0
互质?公因数! ```cpp#includeusingnamespacestd;#defineendl'\n'constintN=20;vectorg[N];//g[0~i]表示分成了几组,每组的数都互为质数intn,a[N],ans=0x3f3f3f3f;//默认解决方案最大intg_size;//每当开辟新的组时 题解列表 2024年04月25日 0 点赞 0 评论 601 浏览 评分:9.9