码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
Codeforces Round #341 (Div. 2)
在家都变的懒惰了,好久没写题解了,补补CF 模拟 A - Wet Shark and Odd and Even #include <bits/stdc++.h> typedef long long ll; const int N = 1e5 + 5; const int INF = 0x3f3f3f
分类:其他好文   时间:2016-02-01 20:40:03    阅读次数:176
codeforces#341
A题:偶数直接加进去,奇数排序后去掉最小的即可。 /* ID: NotPassedCET4 PROG: #341 LANG: C++ */ #include<bits/stdc++.h> #define REP(i,a,b) for(int i=a;i<=b;i++) #define MS0(a)
分类:其他好文   时间:2016-02-01 09:37:44    阅读次数:230
bzoj 2424
裸费用流,要注意的是当天供应的东西不一定要从仓库里拿,所以S限制的容量应该是i'-(i+1)的 数据那么弱,暴力或许过得去? 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define dec(i,l,
分类:其他好文   时间:2016-02-01 01:54:35    阅读次数:232
bzoj 1407
裸最大权封闭子图 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define dec(i,l,r) for(int i=l;i>=r;i--) 4 #define link(x) for(edge *j
分类:其他好文   时间:2016-01-30 18:07:43    阅读次数:133
bzoj 3156
f[i]=max{f[j]+(i-j-1)*i-(b[i-1]-b[j])+a[i]}b[i]为i的前缀和 易得(f[j]+b[j]-f[k]-b[k])/(j-k)<i 同样单调队列维护凸包 longlong老是没注意,AC率就是这么刷下来的QAQ 1 #include<bits/stdc++.h
分类:其他好文   时间:2016-01-30 09:32:00    阅读次数:174
leetcode笔记:Reverse Bits
题目的要求比较简单,输入一个32位的无符号整数,根据其二进制表示,输出与其二进制相对称的无符号整数。题目也给出了一个例子。...
分类:其他好文   时间:2016-01-29 21:22:04    阅读次数:144
bzoj 2588
树上用主席树的话,对每个点到根的区间开个线段树就好了 弄了好久只是空间的问题,开空间也不能太随意。。 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define dec(i,l,r) for(int i
分类:其他好文   时间:2016-01-28 19:18:08    阅读次数:147
【树】Serialize and Deserialize Binary Tree
题目: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer,
分类:其他好文   时间:2016-01-28 18:53:35    阅读次数:138
hdu 3665
半个月的期末。。然后CZL和CTL神犇就刷了几百道题orz!!!! 区间K大值,主席树入门 这个数据结构就是先离散化后对[1-i]建树,每次多建个相关的链(好神奇的做法) 然后这样就要记录儿子了,所以数组写起来好难看所以就用了指针 1 //#include<bits/stdc++.h> 2 #inc
分类:其他好文   时间:2016-01-28 00:42:23    阅读次数:204
浮点数
做这个题目之前有必要好好了解一下浮点数的有关知识,怎样将浮点数转换为十进制形式,以及怎样将十进制形式转化为浮点数整个32位分为3部分:sign:符号位,1 bit,0为正,1 为负Exponent(bias):指数部分 8 bits 存储格式为移码存储,偏移量为127Mantissa(fractio...
分类:其他好文   时间:2016-01-26 17:56:36    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!