题解列表
基于c++string特性的解法,但在vs上测试无问题,在网页验证过不去
摘要:解题思路:利用c++本身的string 的特性,来完成解答c++对于string字符串是允许直接对字符串本身进行用 [ ] 的方式来访问字符串中的 单个字符,因此,我们只需通过string库内自带的……
详细注释 2046: 输出全排列
摘要:```
#include
#include
#include
#include
#include
#include
#include
#include
#include
#incl……
C++[竞赛入门]简单的a+b题解
摘要:题目答案:
```cpp
#include
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)cout……
蓝桥杯2015年第六届真题-生命之树 树形dp
摘要: #include
using namespace std;
typedef long long ll;
const int N=100010,M=2*N;
……
详细解释 2842: 大整数减法
摘要:## 高精度减
高精度减会比较麻烦,需要考虑更多的因素
主要是考虑到负数的处理问题
为了方便,在进行运算之前,我们要先判断哪个数字是较大的那个
```c++
bool cmp……
详细解释 2841: 大整数加法
摘要:## 高精度加
会超出long long 运算类型的运算使用传统的方法无法计算
此时此刻就需要使用高精度运算进行这种大整数的运算
```c++
string s1,s2;
cin……
2860: 字符串判等
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){string s,snew;getline(cin,s);f……