码迷,mamicode.com
首页 >  
搜索关键字:long    ( 19145个结果
HDU 4825 Xor Sum(二进制的字典树,数组模拟)
题目//居然可以用字典树。。。//用cin,cout等输入输出会超时//这是从别处复制来的#include#include#includeusing namespace std;int node[3011111][2];int tag,m,n,cas=0,T;long long one[64],al...
分类:其他好文   时间:2014-08-11 17:34:52    阅读次数:286
c++IO之预定义格式控制
在C语言里,我们可以通过函数printf和scanf来进行格式化控制。而在C++中仍然包含了前者,但还提供了以下两种格式控制的方法:(1)使用流成员函数进行格式控制;(2)使用预定义操作符进行格式控制。下面我来一一介绍:   1.流成员函数主要是指ios类(流基类)中的,分别有: (1).设置状态标志流成员函数setf 一般格式:long ios::setf(long flags),调用格式...
分类:编程语言   时间:2014-08-11 15:12:32    阅读次数:343
JAVA IP地址转成长整型方法
JAVA IP地址转成长整型方法代码如下: /** * IP转成整型 * @param ip * @return */ public static Long ip2int(String ip) { Long num = 0L; if (ip == null){ return num; } try{ ip = ip.replaceAll(...
分类:编程语言   时间:2014-08-11 12:09:42    阅读次数:201
JAVA 长整型转换为IP地址的方法
JAVA 长整型转换为IP地址的方法代码如下: /** * 整型解析为IP地址 * @param num * @return */ public static String int2iP(Long num) { String str = null; Long[] tt = new Long[4]; tt[0] = (num >>> 24) >>>...
分类:编程语言   时间:2014-08-11 12:09:22    阅读次数:206
Codeforces 458B Distributed Join
题目没看懂 数据库什么的。。 照着样例直接贪心居然又AC了。。 #include using namespace std; long long a[100020],b[100020]; int main() { int m,n; scanf("%d%d",&m,&n); long long sum1=0,sum2=0,s1=0,s2=0,Max1=0,Max2=0; ...
分类:其他好文   时间:2014-08-11 12:00:32    阅读次数:139
HDU 1788 Chinese remainder theorem again
题目链接题意 : 中文题不详述。思路 : 由N%Mi=(Mi-a)可得(N+a)%Mi=0;要取最小的N即找Mi的最小公倍数即可。 1 //1788 2 #include 3 #include 4 #include 5 #include 6 #define LL long long 7 8...
分类:其他好文   时间:2014-08-11 11:37:52    阅读次数:160
使用Tomcat实现基于iframe streaming的Comet聊天室
这是一个基于Comet实现的聊天室Demo,功能类似于QQ群聊。聊天过程中如果有新想消息,那么就需要服务器推送消息到浏览器,所以这里可以使用Comet技术。 Comet一般有两种实现方式:长轮询(long-polling)、流(streaming)。而本文中的这个Demo的实现方式是基于流(streaming),前端使用了一个隐藏的iframe,这也是比较常用的一种方式。不过由于使用iframe流,导致浏览器上面的进度一直在转,这是因为iframe一直在加载的原因,先不要在意这些细节。 Tomcat提供了C...
分类:其他好文   时间:2014-08-11 10:09:52    阅读次数:213
the apple tree
the apple tree A long time ago, there was a huge apple tree. A little boy loved to come and lay around it every day. He climbed to the tree top, ate -the apples, took a nap under the shadow... He l...
分类:移动开发   时间:2014-08-11 06:19:12    阅读次数:265
POJ训练计划2299_Ultra-QuickSort(线段树/单点更新)
解题报告 题意: 求逆序数。 思路: 线段树离散化处理。 #include #include #include #include #define LL long long using namespace std; LL sum[2001000],num[501000],_hash[501000]; void push_up(int rt) { sum[rt]=sum[rt...
分类:其他好文   时间:2014-08-11 00:22:01    阅读次数:255
E - A Simple Problem with Integers
#include #include #include #include using namespace std;#define N 100002struct node{ int l,r; long long lz,w;}q[4*N];void pushup(int rt){ q[r...
分类:其他好文   时间:2014-08-10 23:57:40    阅读次数:512
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!