本题还是有一定难度的。
注意点:
1 要使用逆向思维,不是要计算melt掉多少sculptures, 而是要计算需要剩下多少个sculptures
2 所有情况都需要考虑到,最大间隔melt掉的sculptures是n/3个
3 要判断这样间隔melt掉sculptures之后,剩下的sculptures是否能组成多边形
要很仔细想清楚才能做出来。
It is never too careful to scrutinize a problem!
It is never too careful to desi...
分类:
其他好文 时间:
2014-07-22 23:00:13
阅读次数:
279
Lease 的机制:hdfs支持write-once-read-many,也就是说不支持并行写,那么对读写的互斥同步就是靠Lease实现的。Lease说白了就是一个有时间约束的锁。客户端写文件时需要先申请一个Lease,对应到namenode中的LeaseManager,客户端的client name就作为一个lease的holder,即租约持有者。LeaseManager起什么作用呢?
读写过程的容错是怎么做的?数据块是如何复制的?数据块的恢复机制?本文都有涉及。...
分类:
其他好文 时间:
2014-05-02 23:22:14
阅读次数:
450
// 大数继续
hdu 1316 高精度斐波数...
分类:
其他好文 时间:
2014-05-02 22:08:36
阅读次数:
275
Factorial Problem in Base K
Time Limit: 2 Seconds Memory Limit: 65536 KB
How many zeros are there in the end of s! if both s and s! are written in base k which is not necessarily to be 10...
分类:
其他好文 时间:
2014-05-02 20:11:29
阅读次数:
376
题目/** * compareTo:根据该数值是小于、等于、或大于 val 返回 -1、0 或
1; public int compareTo(BigInteger val) 将此 BigInteger 与指定的 BigInteger
进行比较。 对于针对六个布尔比较运算符 (, >=, !=, ....
分类:
编程语言 时间:
2014-05-01 20:53:42
阅读次数:
448
The well-armed problem-finder/solver is fluent
in many mental languages and is able to use them interchangeably to record
information, communicate wit...
分类:
其他好文 时间:
2014-05-01 20:13:44
阅读次数:
433
简单并查集#include#include#include#include#include#include#include#include#include#include#include#define
inf 0x0f0f0f0fusing namespace std;const double p....
分类:
其他好文 时间:
2014-05-01 10:15:58
阅读次数:
367
There are many examples out there demonstrating
how AngularJS and Web API can be used together but almost all of them are in
MVC, so I tried to implem...
分类:
移动开发 时间:
2014-04-30 21:19:35
阅读次数:
625
Problem Description
In the Wide Web World, Which web server was popular in web site? Apache, nginx, lighttpd? Baidu.com use Apache, and many web sites like 163.com use nginx. Why? Its configuration i...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
355