摘要: 题意:第一行给定变量,第二行给定给定约束,每个约束包含两个变量, x y表示x>ch) ……#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=200... 阅读全文
posted @ 2018-08-06 21:45 MCQ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题意:一笔画画出圣诞老人的房子,并按字典序输出。思路:从1点DFS遍历图(八条边需要9画)#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=2000... 阅读全文
posted @ 2018-08-06 15:35 MCQ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题意:从一个素数变到另一个素数,中途只能改变一个位上的数而且改变后还是素数。方法:先打素数表,再BFS#include#include#include#include#include#include#include#include#include#include#in... 阅读全文
posted @ 2018-08-06 14:32 MCQ 阅读(96) 评论(0) 推荐(0) 编辑