Insertion Sort is a simple sorting technique which was covered in previous challenges. Sometimes, arrays may be too large for us to wait around for in...
分类:
其他好文 时间:
2014-08-12 18:13:14
阅读次数:
404
递推,但是要注意细节。题目的意思,就是求s(x) = i+(i+1)+(i+2),i 2 #include 3 4 __int64 pre[11]; 5 char buf[15]; 6 7 int main() { 8 int i, k, len; 9 __int64 ans;...
分类:
其他好文 时间:
2014-08-12 03:00:43
阅读次数:
206
Esspe-PeaseeEsspe-Peasee is an ancient game played by children throughout the land of Acmania. The rules are simple:A player simply quibs the yorba at...
分类:
其他好文 时间:
2014-08-11 23:45:23
阅读次数:
297
Problem Description
This is a simple game.The goal of the game is to roll two balls to two holes each.
'B' -- ball
'H' -- hole
'.' -- land
'*' -- wall
Remember when a ball rolls into a hole, the...
分类:
其他好文 时间:
2014-08-11 21:22:12
阅读次数:
308
HDU 4143 A Simple Problem(数论-水题)
题目大意:
给定n,求最小的正整数x,使得 n+x^2也是完全平方数。
解题思路:
假设y^2=n+x^2 ,那么 (y-x)*(y+x)=n,也就是n的两个因子,只需枚举因子即可。...
分类:
其他好文 时间:
2014-08-11 15:02:52
阅读次数:
199
1078. Hashing (25)
时间限制
100 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
The task of this problem is simple: insert a seq...
分类:
其他好文 时间:
2014-08-11 00:24:21
阅读次数:
206
a simple erlang process pool analysis...
分类:
其他好文 时间:
2014-08-11 00:21:50
阅读次数:
291
#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
http://poj.org/problem?id=3468真心觉得这题坑死我了,一直错,怎么改也没戏,最后tjj把q[rt].lz改成了long long 就对了,真心坑啊。线段树的区域更新。线段树功能:update:成段增减 query:区间求和#include #include #includ...
分类:
其他好文 时间:
2014-08-10 23:56:10
阅读次数:
291