题解列表
数组求和(c语言代码)
摘要:解题思路:让数组循环,每次只需要记录从数组第一个元素起,到第m个元素的和,再比较大小。
```c
#include
#include
void cycle(int*, int);
……
vector存储写法,易懂
摘要:解题思路:减法需要判断会不会为负数注意事项:参考代码:#include <iostream>#include <vector>using namespace std;bool cmp(vector<i……
vector存储写法,易懂
摘要:解题思路:注意事项:参考代码:#include#includeusing namespace std;vector{ if(A.size()<B.size())return add(B,A); ……
pair方法解决,方便易懂
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;typedef pair<int,double> bai……
2829: 数1的个数
摘要:解题思路:注意事项:参考代码:public class Main { public static void main(String[] args) {Scanner sc = new Scann……
pair来写容易很多
摘要:解题思路:pair第一个存学号第二个存成绩然后用bool来进行判断加上sort排序注意事项:参考代码:#include<iostream>#include<algorithm>using namesp……