太子丶
愿你走出半生,归来仍为少年。
摘要: 2016湖南省赛 G - Parenthesis (括号匹配) Bobo has a balanced parenthesis sequence P=p 1 p 2…p n of length n and q questions. The i-th question is whether P rem 阅读全文
posted @ 2017-04-15 17:26 太子丶 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 2016湖南省赛 A 2016 (同余定理) Description 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍数。 2016湖南省赛 A 2016 (同余定理) Description 给出正整数 n 阅读全文
posted @ 2017-04-14 20:55 太子丶 阅读(360) 评论(0) 推荐(0) 编辑
摘要: set的特性是,所有元素都会根据元素的键值自动排序(默认为升序),set中不允许两个元素有相同的键值。 set基本操作: 1.头文件 #include<set>。 注:一定要加上using namespace std; 2.set对象的创建: set<int/char/string/基本数据类型/自 阅读全文
posted @ 2017-04-09 10:37 太子丶 阅读(718) 评论(0) 推荐(0) 编辑
摘要: vector基本操作: 1.头文件 #include<vector>。 注:一定要加上using namespace std; 2.vector对象的创建: vector<int/char/string/基本数据类型/自定义类型/结构体类型/.....>vec ; (以下以int类型为例) 3.ve 阅读全文
posted @ 2017-04-07 22:00 太子丶 阅读(12154) 评论(0) 推荐(0) 编辑