题解列表

筛选

与2无关的数

摘要:解题思路:注意事项:n的取值范围为1000以内参考代码:#include<iostream>using namespace std;int main(){    int n,sum=0;    cin……

搜索dfs+暴力

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int len;string ans = "";int jaa(int x, in……

贷款计算。。。

摘要:解题思路:注意事项:注意单位的换算,本金以万元为单位,但输出是以元为单位。还有是计算第一个月的还款金额,已归还的金额数为零参考代码:#include<iostream>using namespace ……

求平均工资

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

输出M到N的数

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a,b;    cin>>a>>b;    if(a>=……

玉龙学长买雪糕

摘要:解题思路:sum是购买总数,x为第几家店要买的雪糕数量注意事项:参考代码:#include<iostream>using namespace std;int main(){    int n,x=0,……

#C++1052——[编程入门]链表合并(STL)

摘要:解题思路:结构体链表,函数参数传对象,排序的时候指明排序规则;注意事项:STL链表下的sort,以及merge函数(归并前,先排序)的使用方法;参考代码:#include <iostream> #i……

1221: 数列问题(动态规划算法)

摘要:# 动态规划思想 > 题目已经给了我们递推公式`f[n] = f[n-1]+f[n-2]+f[n-3]`,所以只需要初始化前三项即可。 ```c++ #include using namesp……

LIS二分优化 + 倒序输出方案 (C++)

摘要:## 思路 找出一个子序列,并且是严格从小到大的子序列,结果需要尽可能的大,其实就是最长上升子序列的另外一种说法,读到这里题目就可以开始分析了。 从数据范围可以知道,最多有1e6个单词,用普通……