Graveyard Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1654 Accepted: 840 Special Judge Description Programming contests became so popular in the year 2397 that the governor of New Earck — the largest human-inhabited planet of the…
1255. Graveyard of the Cosa Nostra Time limit: 1.0 secondMemory limit: 64 MB There is a custom among the Ural Mafiosi — a big Mafioso’s coffin is to be carried by all his subordinates. The length of the coffin (in meters) equals to the number of the…
Description Programming contests became so popular in the year 2397 that the governor of New Earck -- the largest human-inhabited planet of the galaxy -- opened a special Alley of Contestant Memories (ACM) at the local graveyard. The ACM encircles…
Graveyard Programming contests became so popular in the year 2397 that the governor of New Earck -- the largest human-inhabited planet of the galaxy -- opened a special Alley of Contestant Memories (ACM) at the local graveyard. The ACM encircles a gr…
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.…
Graveyard Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1707 Accepted: 860 Special Judge Description Programming contests became so popular in the year 2397 that the governor of New Earck — the largest human-inhabited planet of the…
Graveyard Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1289 Accepted: 660 Special Judge Description Programming contests became so popular in the year 2397 that the governor of New Earck — the largest human-inhabited planet of the…
在一个周长为 10000 的圆上等距分布着 n 个雕塑.现在又有 m 个新雕塑加入(位置可以随意摆放),希望所有 n + m 个雕塑能在圆周上均匀分布.这就需要移动一些原有的雕塑.要求 n 个雕塑移动的总距离最小. 因为是均匀分布,所以如果在摆放好所有的雕塑之后,统一移动相同的距离依旧是均匀分布的,所以这题可以先把某一个雕塑当做原点固定不动.并将这个墓碑的距离设置为0. 之后利用等比缩放,将整个圆缩放成一个周长为 n + m 的圆,于是原有的雕塑的位置可以利用公式得出: 又因为,圆已经缩放成周长…
[题目链接] 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…
一开始不知道在想啥,竟然写了个双重for循环的.T T一直WA,又没效率. T T然后在纸上模拟演算,改了,就AC了 以后做题果断要先模拟一下例子...能加深对题目的理解. 当教训吧..太懒导致写了好久.. #include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { int n,m; while(cin>>n>>m) { double…