摘要: http://codevs.cn/problem/1735/ 非常卡内存; 我用单hash,开bool记录是不是负数; 卡了好久才过; 至于做法这个就是把原式分成两半暴力;#include#include#include#include#define Ll long longusi... 阅读全文
posted @ 2017-03-28 15:28 largecube233 阅读(176) 评论(0) 推荐(0) 编辑
摘要: http://hzwer.com/3480.html n只有50啊,是不是很心动呢? 其实我们真的只是暴力就好了; 我们发现2^50次方是存的下的; 那么直接状压搜索就好了,蛮好; 然后加一个估价函数; 对于位运算的坑爹,就不多说了,反正加括号就是了; #include#inclu... 阅读全文
posted @ 2017-03-28 14:10 largecube233 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://daniu.luogu.org/problem/show?pid=3322 假设分块的长度是2^i 那我们把i从1到n枚举; 枚举到i时,会分成(2^n)/(2^i)块; 我们就让这几个块内的指递增,且每个相邻的数相差1; 如果我们不能维护成功,那么return; ... 阅读全文
posted @ 2017-03-28 10:58 largecube233 阅读(525) 评论(0) 推荐(0) 编辑