- 博客(18)
- 资源 (3)
- 收藏
- 关注
原创 How Many Maos Does the Guanxi Worth
Problem Description"Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanxi can be based on friendship, but also can be built on money. So Chinese often s
2017-04-27 21:11:53 234
原创 Dogs' Candies
Problem DescriptionFar far away, there live a lot of dogs in the forest. Unlike other dogs, those dogs love candies much more than bones.Every candy has two attributes: the sweetness degree p
2017-04-27 21:02:23 252
原创 Keep In Line
又到饭点了,SK同学靠着惯性走到了食堂,但长长的队伍顿时让他失去了食欲。突然,他注意到某个窗口前的队伍里明显存在插队的现象,于是他默默记录下了同学们进队和出队的变化。对于进队,SK同学只知道队伍里多了一个人,并不知道新来的人是老老实实站到了队尾还是插到了队伍里的某个位置;对于出队,SK同学能确定是队伍里站在最前面的人出队了。初始时队伍为空,给出条队伍进出的信息,保证已经出队的同学不会再入队,并且最
2017-04-22 20:22:24 548
原创 Euclidean Geometry
在某节无聊的课上,SK同学随意画了一个三角形然后用尺子量了一下,发现三边长分别为,然后SK同学拿起圆规分别以三个顶点为圆心画了三个圆,为了使图形看上去更美观,这三个圆两两不相交也互不包含,这里认为圆的半径可以是(称之为“点圆”),现在SK同学想知道怎么画圆才能使三个圆的面积之和最大。Input第一行是一个正整数,表示测试数据的组数,每组测试数据只有一行,包含三个不超
2017-04-22 19:55:10 600
原创 文章标题 Catch That Cow
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,00
2017-04-21 20:50:36 512
原创 文章标题 Dungeon Master
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south,
2017-04-21 16:51:21 271
原创 文章标题 棋盘问题
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-
2017-04-20 21:23:21 344
原创 文章标题 Arbitrage
Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British
2017-04-20 19:57:33 384
原创 文章标题 Robbers
N robbers have robbed the bank. As the result of their crime they chanced to get M golden coins. Before the robbery the band has made an agreement that after the robbery i-th gangster would get Xi=Y of
2017-04-20 19:34:36 344
原创 文章标题 Silver Cow Party
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa
2017-04-19 20:47:52 323
原创 文章标题 Frogger
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ suns
2017-04-18 21:42:44 222
原创 文章标题 Til the Cows Come Home
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get ba
2017-04-18 21:37:56 152
原创 文章标题 大数加法
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>using namespace std;int main(){ string a,b; while(cin>>a) { cin>>b; int i,j,l1,l2,c[10010],e[1001
2017-04-18 21:28:52 175
原创 文章标题 Chinese Girls' Amusement
You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us.So it is known that there is one popular gam
2017-04-18 21:25:45 420
原创 文章标题 Ultra-QuickSort
In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in
2017-04-12 15:59:44 223
原创 文章标题 Friends
Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than k friends in common, they will become friends in several days. Curr
2017-04-07 17:40:50 427
原创 文章标题 Break Standard Weight
The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizontal lever of equal length arms, called the beam, with a weighing pan, also called
2017-04-07 17:36:29 280
原创 文章标题 高桥和低桥
有个脑筋急转弯是这样的:有距离很近的一高一低两座桥,两次洪水之后高桥被淹了两次,低桥却只被淹了一次,为什么?答案是:因为低桥太低了,第一次洪水退去之后水位依然在低桥之上,所以不算“淹了两次”。举例说明:假定高桥和低桥的高度分别是5和2,初始水位为1第一次洪水:水位提高到6(两个桥都被淹),退到2(高桥不再被淹,但低桥仍然被淹)第二次洪水:水位提高到8(高桥又被淹了),退到3。没错,文字游戏。关键在于
2017-04-06 17:26:44 296
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人