自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 问答 (1)
  • 收藏
  • 关注

原创 1083 List Grades (25分) 两种思路

https://pintia.cn/problem-sets/994805342720868352/problems/994805383929905152思路一:用一个vector保存所有的数据排序按顺序输出,遇到不在范围内的,跳过#include <iostream>#include <vector>#include <string>#include <algorithm>using namespace std;struct No

2020-10-15 16:33:50 65

原创 1094 The Largest Generation (25分)

思路:先建立一个邻接表来保存这颗树 -> 然后BFS这棵树 -> 记录每一层的结点数和层数#include <iostream>#include <vector>#include <queue>#include <algorithm>#include <string.h>#define MAXN 10010using namespace std;struct Node { int num; int

2020-09-14 10:01:07 50

原创 大整数加法 string版本

思路:用string来保存大整数 -> 用0补全较短的那个数 -> 相应位数相加 -> 检查最后的进位是否为1实现#include <iostream>#include <string>#include <algorithm>using namespace std;string temp(1000, '0');string add(string s1, string s2){ string s; int len_1 = s1

2020-08-31 20:15:42 152

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除