随笔分类 -  位运算

摘要:POJ 3253 Fence RepairSTL堆操作我想说,STL里堆是我目前见到最蛋疼的操作。#include #include #include #include #include #include #include #include #include #include #include #d... 阅读全文
posted @ 2014-09-04 12:46 Estimator 阅读(342) 评论(0) 推荐(0)
摘要:学了下bitset用法,从网上找的一些bitset用法,并从中调出一些常用的用法。构造函数bitset b;b有n位,每位都为0.参数n可以为一个表达式.如bitset b0;则"b0"为"00000";bitset b(unsigned long u);b有n位,并用u赋值;如果u超过n位,则顶端... 阅读全文
posted @ 2014-08-19 23:42 Estimator 阅读(418) 评论(0) 推荐(0)
摘要:位运算+暴搜 16MS过 奇迹啊#include#includeusing namespace std;int d[1000000],w[1000000],p[1000000];int main(){ int i,j,k=0,g=0,h=1; for(i=1;i990000) con... 阅读全文
posted @ 2013-10-30 19:09 Estimator 阅读(166) 评论(0) 推荐(0)