题解列表

筛选

留住了塔没留住她:[竞赛入门]简单的a+b

摘要:解题思路:        我们可以定义两个变量a和b        由于题目输入数据数量不限所以我们要用while(cin>>a>>b)        cout就是输出,(a+b)就是求a+b的和  ……

屎山代码写法

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using names……

普通的写法

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;const int N=100;int a[N]; 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……

pair来写容易很多

摘要:解题思路:pair第一个存学号第二个存成绩然后用bool来进行判断加上sort排序注意事项:参考代码:#include<iostream>#include<algorithm>using namesp……

1308: 表达式计算2

摘要:```cpp #include using namespace std; const int N=10001; int a[N],b[N]; char op,k; bool key,mar……

哪需要那么复杂几步的事

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