上次的湘潭赛的C题,用线段树敲了下还是WA,不知道为何,我已经注意了处理相同数据,然后他们当时用的RMQ。所以学了下RMQ,感觉算法思想是一样的,RMQ用了DP或者是递推,由单个数到2^k往上推,虽然有部分重叠的,也没关系,因为RMQ是求区间最值嘛然后这道题目,要把出现次数化为最值,构造一个新的数组...
分类:
其他好文 时间:
2014-06-16 06:21:13
阅读次数:
248
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2876HDU集训队选拔赛地点:3教3楼机房,时间:5月10日(周六)12:00開始,请相互...
分类:
其他好文 时间:
2014-06-13 07:27:22
阅读次数:
308
K -QuadtreesTime Limit:3000MSMemory Limit:0KB64bit
IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionQuadtreesA
quadtree is a represent....
分类:
其他好文 时间:
2014-06-12 23:57:11
阅读次数:
509
非常巧妙的题目,巧用cmp,注意cmp的重载
#include
#include
using namespace std;
string a[55];
bool cmp(string a, string b){
return a+b > b+a;
}
int main(int argc, char const *argv[])
{
int n;
while(cin >...
分类:
其他好文 时间:
2014-06-11 06:10:28
阅读次数:
293
题意:http://acdream.info/problem?pid=1112
Problem Description
Here is Alice and Bob again !
Alice and Bob are playing a game. There are several numbers.First, Alice choose a number n.Then he c...
分类:
其他好文 时间:
2014-06-10 14:48:56
阅读次数:
236
Description
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square ...
分类:
其他好文 时间:
2014-06-10 07:59:06
阅读次数:
335
Two players, S and T, are playing a game where they make alternate moves. S plays
first.
In this game, they start with an integer N. In each move, a player removes one digit from the integer and p...
分类:
其他好文 时间:
2014-06-10 06:31:29
阅读次数:
302
在create table的时候出现如下问题
1. ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
解决方案:这个问题是从单机配置到多机配置的时候出的问题,修改conf/hbase-env.sh 注释掉export HBASE_MANAGES_ZK=true...
分类:
其他好文 时间:
2014-06-09 23:38:14
阅读次数:
304
Now, when you buy food, you will be able to
return home in reusable bags that will not be rejected, which can be used over
and over again, and washed ...
分类:
其他好文 时间:
2014-06-09 18:35:51
阅读次数:
320
Rotating Sentences
In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to b...
分类:
其他好文 时间:
2014-06-08 04:51:34
阅读次数:
236