C++[竞赛入门]简单的a+b题解 摘要:题目答案: ```cpp #include using namespace std; int main() { int a,b; while(cin>>a>>b)cout…… 题解列表 2024年11月04日 0 点赞 0 评论 501 浏览 评分:0.0
蓝桥杯2015年第六届真题-生命之树 树形dp 摘要: #include using namespace std; typedef long long ll; const int N=100010,M=2*N; …… 题解列表 2024年11月04日 0 点赞 0 评论 270 浏览 评分:9.9
详细解释 2842: 大整数减法 摘要:## 高精度减 高精度减会比较麻烦,需要考虑更多的因素 主要是考虑到负数的处理问题 为了方便,在进行运算之前,我们要先判断哪个数字是较大的那个 ```c++ bool cmp…… 题解列表 2024年11月04日 0 点赞 0 评论 399 浏览 评分:0.0
详细解释 2841: 大整数加法 摘要:## 高精度加 会超出long long 运算类型的运算使用传统的方法无法计算 此时此刻就需要使用高精度运算进行这种大整数的运算 ```c++ string s1,s2; cin…… 题解列表 2024年11月04日 0 点赞 0 评论 322 浏览 评分:0.0
C++容器秒了 摘要:解题思路:c++用容器写简单粗暴,输入的n表示换行次数,用一个COUNT表示已经输入的换行次数,这跟单例的计数(忘了具体叫什么名字了)比较像然后用<algorithm>里面的sort函数来进行从小到大…… 题解列表 2024年11月04日 0 点赞 0 评论 228 浏览 评分:0.0
2860: 字符串判等 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){string s,snew;getline(cin,s);f…… 题解列表 2024年11月03日 0 点赞 0 评论 212 浏览 评分:0.0
熟练使用STL容器,尽量多使用STL容器 摘要:解题思路: - 用vector容器将所有老年人(age>=60)筛出,然后排序,排序的话要使用stable_sort,它会在排序过程保持相等元素的原来的顺序 - 用vector存老年人要在里套一个…… 题解列表 2024年11月03日 0 点赞 0 评论 258 浏览 评分:0.0
母牛的故事_推导表达式 摘要:解题思路:采用递归的做法,我么需要考虑每一年母牛的数量和前面几年之间的关系,写出递推公式,就能轻松写出代码。我们以f(n)表示第n年母牛的数量。第一年:f(1)=1,只有一只母牛。第二年:f(2)=f…… 题解列表 2024年11月03日 4 点赞 0 评论 535 浏览 评分:10.0
明明的随机数 摘要:```cpp include include include include using namespace std; const int N = 110; int n; in…… 题解列表 2024年11月03日 1 点赞 0 评论 336 浏览 评分:9.9
没有上司的晚会 树形dp 摘要: #include using namespace std; int h[6005], v[6005], f[6005][2], n, x, y, root; /*h数组…… 题解列表 2024年11月02日 0 点赞 0 评论 252 浏览 评分:9.9