Graveyard Design Time Limit: 10000MS Memory Limit: 64000K Total Submissions: 4443 Accepted: 946 Case Time Limit: 2000MS Description King George has recently decided that he would like to have a new design for the royal graveyard. The graveyard mu…
Graveyard Design Time Limit: 10000MS Memory Limit: 64000K Total Submissions: 6107 Accepted: 1444 Case Time Limit: 2000MS Description King George has recently decided that he would like to have a new design for the royal graveyard. The graveyard m…
Description King George has recently decided that he would like to have a new design for the royal graveyard. The graveyard must consist of several sections, each of which must be a square of graves. All sections must have different number of graves.…
[题目链接] http://poj.org/problem?id=2100 [题目大意] 给出一个数,求将其拆分为几个连续的平方和的方案数 [题解] 对平方数列尺取即可. [代码] #include <cstdio> using namespace std; typedef long long LL; const int N=10000010; LL n,ansl[N],ansr[N]; int main(){ while(~scanf("%lld",&n)){ L…
Linear world 题目大意:一些人生活在线性世界中,到达线性世界两端就会消失,两个人的前进方向有两个,相遇会改变各自相遇方向,求最后一个人掉下的人的名字和时间. 其实这一题就是弹性碰撞的模型,所谓弹性碰撞的模型是两个物体相碰后会改变方向,但是可以看成是各自擦身而过,这个模型可以很快速求解与端点的问题 但是这一题还问你一个问题,就是你要找到这个人的名字,这个我一开始,没有想到,只能参考一下别人的代码了 http://www.cnblogs.com/gtarcoder/p/4908715…