上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页
摘要: Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 #includeint dir[4][2]={{-1,0},{1,0},{0,-1},{0,1}};int mm[105][105],a[105][105];int n,k;int dfs(int x,int y){ if(mm[x][y]>0) return 阅读全文
posted @ 2013-07-16 23:20 forevermemory 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall be able to reach the banana by placing one block on 阅读全文
posted @ 2013-06-28 13:46 forevermemory 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGG is some what afraid of his MM. Once his MM asks, he will always try his best to rush to their home. Obvious, he can run home in straight line directly. Alternatively, he can run to the main road and call the taxi. You can assume there is only one main road on the x-axis, with u 阅读全文
posted @ 2013-06-26 16:40 forevermemory 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the same value, because then they could just split the collection in half. But unfortunatel 阅读全文
posted @ 2013-06-25 23:39 forevermemory 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0#includeusing namespace std;#define mm 200005struct lmx{ int l; int r; int _max;};lmx lm[4*mm];int p[200005];int cou. 阅读全文
posted @ 2013-06-24 10:53 forevermemory 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Problem Description A sequence Sn is defined as:Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate Sn. You, a top coder, say: So easy!Input There are several test cases, each test case in one line contains four positive integers: a, b, n, m. W... 阅读全文
posted @ 2013-06-22 23:54 forevermemory 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报第3个营地到第10个营地共有多少人!”Tidy就要马上开始计 阅读全文
posted @ 2013-06-19 09:50 forevermemory 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionI like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game is about playing on a number stack. Now we have a number stack, and we should link and pop the same element pairs from top to bottom. Each time, you ca 阅读全文
posted @ 2013-06-18 08:56 forevermemory 阅读(370) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards respectively. Alice wants to use his cards to cover Bob's. The card A can cover the card B if the height of A is not smaller than B and the widt 阅读全文
posted @ 2013-06-18 00:04 forevermemory 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new geometries are the favorite. I. M. Hei, the lead cow pasture architect, is in charge of creating a triangular pasture surrounded by nice white fence 阅读全文
posted @ 2013-06-17 16:37 forevermemory 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页