码迷,mamicode.com
首页 >  
搜索关键字:long    ( 19145个结果
POJ 1273 Drainage Ditches(网络流,最大流)
Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to r...
分类:其他好文   时间:2014-07-27 11:17:12    阅读次数:255
D14
T1:有点坑的模拟,考心细+代码能力T2:最小生成树 记得开long long,不然会全WA.. 莫名超时三个点,据学长说可以开并查集优化,叫做按秩排序..=-=现在木有网啊..哪天再看T3:dijkstra+堆处理 先说一下dijkstra好了 从所连的最小的号数开始,边权值分别为1.2.3.4....
分类:其他好文   时间:2014-07-27 10:45:42    阅读次数:215
Leetcode | Sqrt(x)
Implement int sqrt(int x).Compute and return the square root of x.线性查找会TLE。用二分查找。注意溢出的处理。全部都改成long long. 1 class Solution { 2 public: 3 int sqrt(i...
分类:其他好文   时间:2014-07-27 10:41:02    阅读次数:181
hdu 4849
简单题,公式计算+最短路。注意点:注意1 取模,2 数组开到n*n+n. #include #include using namespace std; long long x[1234567];long long y[1234567];long long z[1234567]; int c[1001][1001]; int d[1002];int inq[1002]; const in...
分类:其他好文   时间:2014-07-26 15:08:10    阅读次数:271
POJ 2887 Big String (块状数组)
题意:给一个字符串(#include #include #include #include #include #define ll long longusing namespace std;int Maxn, N ;int sum[1005];struct BlockList{ int siz...
分类:其他好文   时间:2014-07-26 14:58:11    阅读次数:244
(转载)VB 查询Oracle中blob类型字段,并且把blob中的图片以流的方式显示在Image上
原文摘自:http://heisetoufa.iteye.com/blog/504068'模块代码Private Declare Function CreateStreamOnHGlobal Lib "ole32" (ByVal hGlobal As Long, ByVal fDeleteOnRel...
分类:数据库   时间:2014-07-26 14:51:40    阅读次数:349
POJ 1273 Drainage Ditches 最大流
很裸的最大流问题,不过注意会有重边,o(╯□╰)o,被阴了WA了一发 还有就是要用long long#include #include #include #include #include #include #include #include #include #include #include #...
分类:其他好文   时间:2014-07-26 14:15:05    阅读次数:214
Linux下模拟一个简易的消息机制
声明 #define?MSG_ERROR? -1 #define?MSG_SUCCEED 0 #define?MSG_TRUE 1 #define?MSG_FALSE 0 #define?PM_NOREMOVE??? 0x00 #define?PM_REMOVE??? 0x01 typedef?unsigned?long? WPARAM; ...
分类:系统相关   时间:2014-07-26 03:33:27    阅读次数:365
POJ 2778 AC自动机+矩阵幂 不错的题
http://poj.org/problem?id=2778 有空再重新做下,对状态图的理解很重要 题解: http://blog.csdn.net/morgan_xww/article/details/7834801 另外做了矩阵幂的模板: //ac.sz是矩阵的大小 void mulmtr(long long x[MAXNODE][MAXNODE],long long y...
分类:其他好文   时间:2014-07-26 02:31:46    阅读次数:239
P85
#include long fun(long num) { long k=1; do { k*=num%10; num/=10; } while(num>0); return k; } main() { long n; printf("please enter a number:"); scanf("%ld",&n); printf("\n%ld\n",fun(n));...
分类:其他好文   时间:2014-07-26 02:06:06    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!