Ahttp://hihocoder.com/problemset/problem/1227题意:给出平面上m个点,任选一个点为圆心,选最小的半径使得恰好n个点在圆内。解法:枚举圆心,然后对所有点到该圆心距离排序,取第n大的距离作为半径,若第n+1大的在圆内或圆上不合法。 1 //#define de...
分类:
其他好文 时间:
2015-10-26 13:41:57
阅读次数:
166
DescriptionGiven an n*n grid with non-negative integers, you start from the upper left corner (1,1) and can only move right or down.Your task is to fi...
分类:
其他好文 时间:
2015-10-12 21:01:48
阅读次数:
273
DescriptionLittle Hi and Little Ho are playing a construction simulation game. They build N cities (numbered from 1 to N) in the game and connect them...
分类:
其他好文 时间:
2015-10-12 14:02:26
阅读次数:
373
DescriptionA fancy square image encryption algorithm works as follow:0. consider the image as an N x N matrix1. choose an integer k∈ {0, 1, 2, 3}2. ro...
分类:
其他好文 时间:
2015-10-11 21:30:12
阅读次数:
266
#1162 : 骨牌覆盖问题·三Time Limit:10000msCase Time Limit:1000msMemory Limit:256MB描述前两周里,我们讲解了2xN,3xN骨牌覆盖的问题,并且引入了两种不同的递推方法。这一次我们再加强一次题目,对于给定的K和N,我们需要去求KxN棋盘的...
分类:
其他好文 时间:
2015-10-08 21:29:12
阅读次数:
400
题目链接:http://hihocoder.com/problemset/problem/1014 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int maxn = 1e6 + 5...
分类:
其他好文 时间:
2015-10-07 00:57:31
阅读次数:
156
传送门时间限制:10000ms单点时限:5000ms内存限制:256MB描述你正在和小冰玩一个猜数字的游戏。小冰首先生成一个长为N的整数序列A1, A2, …, AN。在每一轮游戏中,小冰会给出一个区间范围[L, R],然后你要猜一个数K。如果K在AL, AL+1, …, AR中,那么你获胜。在尝试...
分类:
其他好文 时间:
2015-10-03 15:36:15
阅读次数:
176
题目链接:http://hihocoder.com/problemset/problem/1175题目难度:一星级(简单题)今天闲来无事,决定刷一道水题。结果发现这道水题居然把我卡了将近一个钟头。最后终于调通了。总结起来,原因只有一个:不够仔细。思路不用细说了,就是拓扑排序的简单应用。然而,一些不起...
分类:
编程语言 时间:
2015-10-02 23:48:37
阅读次数:
256
刚开始学习C语言,准备在做hiho的题目的过程中来学习,在此进行记录,如果代码中有错误或者不当的地方还请指正。时间限制:1000ms单点时限:1000ms内存限制:256MB描述fjxmlhx每天都在被沼跃鱼刷屏,因此他急切的找到了你希望你写一个程序屏蔽所有句子中的沼跃鱼(“marshtomp”,不...
分类:
其他好文 时间:
2015-10-02 22:31:17
阅读次数:
160
刚开始学习C语言,准备在做hiho的题目的过程中来学习,在此进行记录,如果代码中有错误或者不当的地方还请指正。时间限制:10000ms单点时限:1000ms内存限制:256MB描述Little Hi gets lost in the city. He does not know where he i...
分类:
其他好文 时间:
2015-10-02 22:21:50
阅读次数:
257