上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 32 下一页
摘要: 1. 克鲁斯卡尔 适合边稠密情况 按边排序从小至大纳入集合 //#pragma GCC optimize(2) #include <cstdio> #include <iostream> #include <cstdlib> #include <cmath> #include <cctype> #i 阅读全文
posted @ 2018-09-06 17:08 张浦 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 暴力模拟//#pragma GCC optimize(2)#include #include #include #include #include #include #include #include #incl... 阅读全文
posted @ 2018-09-05 19:08 张浦 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 暴搜//#pragma GCC optimize(2)#include #include #include #include #include #include #include #include #includ... 阅读全文
posted @ 2018-09-05 19:05 张浦 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 裸线段树//#pragma GCC optimize(2)#include #include #include #include #include #include #include #include #incl... 阅读全文
posted @ 2018-09-05 19:04 张浦 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 贪心 线段重合求最大重叠段长度和最大间距//#pragma GCC optimize(2)#include #include #include #include #include #include #includ... 阅读全文
posted @ 2018-09-05 19:03 张浦 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 由题余数为零 则该串必定为1开头的01串由BFS特性可得首解最优因此队头1向后添加0 或 1进行取模搜索当前取模值单一后推运算即可否则展开规律相同 无意义#pragma GCC optimize(2)#inclu... 阅读全文
posted @ 2018-09-04 19:55 张浦 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 记忆化模拟题纸上推一推就能发现把当前位置的数记录到下一秒的左右三个位置可以接到错了好几发 都是开着结构体里塞着数组正着推过去了题目要求初始点在5开二维倒推输出5点即可//#pragma GCC optimize(... 阅读全文
posted @ 2018-09-01 20:56 张浦 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 用STL优先队列进行模拟但是求小根堆好像是priority_queue , greater > PQ;比较麻烦直接默认PQ塞负数也可以解决//#pragma GCC optimize(2)#include #i... 阅读全文
posted @ 2018-09-01 20:51 张浦 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 经典的BFS路长为一求最短路思路:先找钥匙 再找箱子两次BFS 未找到钥匙不可走箱子先把箱子变墙找到钥匙再恢复注意判重//#pragma GCC optimize(2)#include #include #inc... 阅读全文
posted @ 2018-09-01 20:46 张浦 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 输入内容非常有规律且EOF停止所以循环读入整形与符形读题 数据范围合适所以懒计算过程不约分最后判正负约分lazy算法??//#pragma GCC optimize(2)#include #include #i... 阅读全文
posted @ 2018-08-26 12:02 张浦 阅读(108) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 32 下一页