码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
LeetCode 190. Reverse Bits
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur ...
分类:其他好文   时间:2016-04-05 07:07:21    阅读次数:131
LeetCode 191. Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit ...
分类:其他好文   时间:2016-04-05 07:05:24    阅读次数:195
usaco 2016 Feb 负载平衡
题目大意:平面上一堆点,用两条平行于坐标轴的直线将其分为四部分,使得点数最多的一部分最少 第一维枚举,第二维三分,点集用两棵树状数组维护 #include<bits/stdc++.h> #define maxn 100010 using namespace std; inline int read( ...
分类:其他好文   时间:2016-04-03 15:57:22    阅读次数:279
BZOJ3631: [JLOI2014]松鼠的新家 树链剖分/lca/树上查分
求n次lca后树上差分。 每次移动时在起始点和终点各打一个start标记,在LCA和LCA的父节点处各上打一个end标记,然后深搜,start标记一直上传,遇到end标记就停止,最后再处理一下就行 % PoPoQQQ大爷 #include<bits/stdc++.h> #define rep(i,l ...
分类:其他好文   时间:2016-04-03 11:45:11    阅读次数:251
190. Reverse Bits
...
分类:其他好文   时间:2016-04-03 11:43:39    阅读次数:130
【LeetCode】Counting Bits(338)
1. Description Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary repre ...
分类:其他好文   时间:2016-04-03 10:11:41    阅读次数:127
&1的用法
看到不少大神都喜欢用&1来判断一些东西,但是作为渣渣的我总是不理解这个&1到底是有什么作用。 今天写了程序看了一下,其实是判断奇偶用的。 如果是奇数,其结果为1,偶数结果为false。 我在这里想吐槽一下,大神为什么不直接mod2判断呢。。。。。。。。。。。。 #include<bits/stdc+ ...
分类:其他好文   时间:2016-04-03 08:52:05    阅读次数:202
解决php5.2与mysql兼容问题
最近在做一键安装包(LAMP、LAMP)--适用于阿里云小白的产品。过程中,遇到一个问题,在Ubuntu14.04系统上,测试Apache2.2+php5.2+mysql5.1,编译安装php出现了问题。报错内容:ext/zip/lib/.libs/zip_dirent.o:Infunction`memset‘: /usr/include/x86_64-linux-gnu/bits/string..
分类:数据库   时间:2016-04-01 16:15:39    阅读次数:272
codeforces480E Parking Lot
题目大意:给一个点阵,其中有的地方没有点,操作是去掉某个点,并询问当前点阵中最大的正方形 若没有修改的话,裸dp 加上修改,可以考虑时光倒流,这样答案就是递增的 可以用并查集维护点的连通性,O^2的 #include<bits/stdc++.h> using namespace std; #defi ...
分类:其他好文   时间:2016-04-01 06:32:33    阅读次数:190
[LeetCode]Number of 1 Bits
题目描述: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 3 ...
分类:其他好文   时间:2016-03-30 22:24:12    阅读次数:172
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!