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
T1:有点坑的模拟,考心细+代码能力T2:最小生成树 记得开long long,不然会全WA.. 莫名超时三个点,据学长说可以开并查集优化,叫做按秩排序..=-=现在木有网啊..哪天再看T3:dijkstra+堆处理 先说一下dijkstra好了 从所连的最小的号数开始,边权值分别为1.2.3.4....
分类:
其他好文 时间:
2014-07-27 10:45:42
阅读次数:
215
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
简单题,公式计算+最短路。注意点:注意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
题意:给一个字符串(#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
原文摘自: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
很裸的最大流问题,不过注意会有重边,o(╯□╰)o,被阴了WA了一发 还有就是要用long long#include #include #include #include #include #include #include #include #include #include #include #...
分类:
其他好文 时间:
2014-07-26 14:15:05
阅读次数:
214
声明 #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
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
#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