题解列表

筛选

字符串距离:一种典型动态规划

摘要:解题思路:在这个题目中,要求求两个字符串之间的最小距离,在初始化字符串的时候先分别考虑两个字符串为空的情况,当其中一个为空时,另外一个字符串对应的每一个字符的位置上都是加k(空字符与任意字符的距离),……

温度转换Python

摘要:解题思路:注意事项:参考代码:F=float(input())c=5*(F-32)/9print("c=%.2f"%c)……

1997: 日期换算

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> #include<cmath> using namespace std; int mai……

1989: 奇数个数

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> #include<cmath> using namespace std; int mai……

1988: 求总时间-----递归

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> #include<cmath> using namespace std; double ……

1987: 考试评级

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; int main() {     int sco……

发工资咯 (一往直前!贪心法)

摘要:###贪心法就是遵循某种规则,不断贪心地选取当前最优策略 解题思路: 题目问最少需要多少张人民币,每次都先选面值最大的,当剩余的钱不够一张最大的面值时再用次大的人民币 依次类推就找到了最优解。 ……

1986: 鸡兔同笼

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; int main() {     int n; ……