- 博客(17)
- 收藏
- 关注
原创 Berland National Library CodeForces - 567B
Berland National Library has recently been built in the capital of Berland. In addition, in the library you can take any of the collected works of Berland leaders, the library has areading room.To
2016-12-18 17:20:04 295
原创 Preparing Olympiad CodeForces - 550B
You have n problems. You have estimated the difficulty of thei-th one as integer ci. Now you want to prepare a problemset for a contest, using some of the problems you've made.A problemset for t
2016-12-18 16:29:20 335
原创 开机 CSU - 1254
机房有很多机器,不同机器开机时间不同。已知开始站在1号机器,从一台机器走到另一台机器需要5秒,如何才能用最短的时间打开所有的机器。Input每组数据开头一个n表示机器数,接下来n个数表示1~n号机器所需开机时间,以秒为单位。0 Output 每组数据输出一行一个数,表示所有机器打开所需最短时间。Sample Input3351030Sample
2016-12-17 16:11:25 281
原创 Oil Deposits HDU - 1241
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides th
2016-12-17 15:11:07 283
原创 Red and Black HDU - 1312
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'
2016-12-17 14:28:55 348
原创 棋盘问题 POJ - 1321
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1时表示输入结束
2016-12-16 19:42:30 281
原创 排列 POJ - 1833
题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述: 给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。 比如:n = 3,k=2 给出排列2 3
2016-12-16 19:13:01 340
原创 Aggressive cows POJ - 2456
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C <= N) cows
2016-12-16 18:23:58 342
原创 D - Cable master POJ - 1064
Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to co
2016-12-16 12:59:50 387
原创 Can you find it? HDU - 2141
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X. InputThe
2016-12-16 11:57:49 267
原创 Saitama Destroys Hotel CodeForces - 608A
Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The elevator is special — it starts on the top floor,
2016-12-15 16:28:58 390
原创 Muddy roads POJ - 2437
Farmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstorms and now contains (1 Farmer John has a collection of wooden planks of length L that he can use t
2016-12-15 14:55:00 405
原创 Prime Ring Problem HDU - 1016
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number
2016-12-15 14:13:37 234
原创 N皇后问题 HDU - 2553
在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。Sample
2016-12-14 21:39:51 260
原创 Rat Attack POJ - 1916
Background Baaaam! Another deadly gas bomb explodes in Manhattan's underworld. Rats have taken over the sewerage and the city council is doing everything to get the rat population under control. A
2016-12-14 14:46:24 443
原创 HDU - 2710 Max Factor
To improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. Unfortunately, he is unaware that the cows interp
2016-12-14 14:12:36 214
原创 UVA-156 Ananagrams
Ananagrams Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do no
2016-12-14 14:02:56 289
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人