题解列表

筛选

新手写水仙花数判断(c++已过)

摘要:解题思路:由于确定为三位数,所以直接求各位数字即可注意事项:参考代码:#include<iostream>using namespace std;int main(){    for(int i=10……

新手写求和问题(c++)

摘要:解题思路:利用三个循环来控制三种类型求和注意事项:利用fixed<<setprecision(2)来设置精度参考代码:#include<iostream>#include<iomanip>using ……

2937: 短信计费

摘要:解题思路:注意事项:注意刚好能被70除的情况就行参考代码:#include <iostream>#include <cmath>using namespace std;int main(){    i……

汽水瓶,简单递归法

摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量,用于记录最终结果,及换了多少汽水喝 int c=0; v……

T1267-01背包问题

摘要:解题思路:滚动数组—— 一维dp数组遍历:for(      )  物品    for( 逆序) 背包递推公式: dp[ j ] = max( dp[ j ] , dp[ j -w[ i ] ] + ……

小白,看看就行,不动脑袋

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

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int L,M;    cin>>L>>M;    ……