摘要: 【代码】 阅读全文
posted @ 2017-11-09 19:43 qwerfcxs 阅读(1336) 评论(0) 推荐(0) 编辑
摘要: 【问题描述】 还记得 NOIP 2012 提高组 Day2 中的借教室吗?时光飞逝,光阴荏苒,两年 过去了,曾经借教室的同学们纷纷归还自己当初租借的教室。请你来解决类似于 借教室的另一个问题。 在接受借教室请求的 n 天中,第 i 天剩余的教室为 ai 个。作为大学借教室服 务的负责人,你需要完成如 阅读全文
posted @ 2017-11-09 18:06 qwerfcxs 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 【问题描述】 求关于 x 的同余方程 ax≡1(mod b) 的最小正整数解。 【输入格式】 输入只有一行,包含两个正整数 a , b ,用一个空格隔开。 【输出格式】 输出只有一行,包含一个正整数 x0 ,即最小正整数解。输入数据保证一定有解。 【样例输入】 3 10 【样例输出】 7 【数据范围 阅读全文
posted @ 2017-11-09 10:46 qwerfcxs 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 【代码】 归并排序模板 阅读全文
posted @ 2017-11-09 09:24 qwerfcxs 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 【代码】 树状数组模板 cpp include include include include include include using namespace std; define f(i,n) for(int i=1;i 阅读全文
posted @ 2017-11-09 09:05 qwerfcxs 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 【代码】 KMP模板 cpp include include include include include include include using namespace std; define f(i,n) for(int i=1;i 阅读全文
posted @ 2017-11-09 08:45 qwerfcxs 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 【代码】 拓扑排序模板 阅读全文
posted @ 2017-11-09 08:43 qwerfcxs 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 【代码】 dfs模板 cpp include include include include include include include using namespace std; define f(i,n) for(int i=1;i 阅读全文
posted @ 2017-11-09 08:41 qwerfcxs 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 【代码】 Kruskal模板 cpp include include include include include include include using namespace std; define f(i,n) for(int i=1;i 阅读全文
posted @ 2017-11-09 08:39 qwerfcxs 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 【代码】 dijstra模板 阅读全文
posted @ 2017-11-09 08:36 qwerfcxs 阅读(149) 评论(0) 推荐(0) 编辑
摘要: spfa模板 【代码】 阅读全文
posted @ 2017-11-09 08:32 qwerfcxs 阅读(107) 评论(0) 推荐(0) 编辑