- 博客(673)
- 收藏
- 关注
原创 Sicily 2002. Feeding Time
2002. Feeding TimeConstraintsTime Limit: 1 secs, Memory Limit: 292.96875 MBDescriptionIt's Bessie's feeding time, and Farmer John is trying to decide where to put her. FJ has a f
2015-03-30 01:03:54 656
原创 Sicily 1938. Message Flood
1938. Message FloodConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription Well, how do you feel about mobile phone? Your answer would probably be something like that “It’s
2015-03-30 01:03:49 648
原创 Sicily 1934. 移动小球
1934. 移动小球ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription你有一些小球,从左到右依次编号为1,2,3,...,n. 你可以执行两种指令(1或者2)。其中, 1 X Y表示把小球X移动到小球Y的左边, 2 X Y表示把小球X移动到小球Y右边。 指令保证合法,即X不等于Y。
2015-03-30 01:03:11 683
原创 Sicily 1893. Sell Ticket
1893. Sell TicketConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionOne day, little pig wants to go to the park for fun. He has just one piece of five dollar and luckil
2015-03-30 01:01:48 608
原创 Sicily 1299. Academy Awards
1299. Academy AwardsConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionSelected from 3,850 teams from 1,329 universities in 68 countries competing at 106 sites and prel
2015-03-30 01:01:07 731
转载 Sicily 1888. Circular Sequence
1888. Circular SequenceConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGiven a sequence with n elements, if the last element is also adjacent to the first element of
2015-03-30 00:59:18 549
原创 Sicily 1936. Knight Moves
1936. Knight MovesConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the s
2015-03-30 00:58:48 654
原创 Sicily 1781. Knight
1781. KnightConstraintsTime Limit: 1 secs, Memory Limit: 64 MBDescriptionYour task is to write a program to calculate the minimum number of moves needed for a knight to reach one
2015-03-30 00:58:06 613
原创 Sicily 1764. 立体图
1764. 立体图ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription小渊是个聪明的孩子,他经常会给周围的小朋友们讲些自己认为有趣的内容。最近,他准备给小朋友们讲解立体图,请你帮他画出立体图。小渊有一块面积为m*n的矩形区域,上面有m*n个边长为1的格子,每个格子上堆了一些同样
2015-03-30 00:56:34 484
原创 Sicily 1763. 传球游戏
1763. 传球游戏ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。 游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每
2015-03-30 00:55:08 647
原创 Sicily 10330. Cutting Sausages
10330. Cutting SausagesConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionMirko has given up on the difficult coach job and switched to food tasting instead. Having sk
2015-03-30 00:53:34 571
原创 Sicily 1422. Table Tennis
1422. Table TennisConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThere is a rectangular pool table ABCD with side lengths m and n, where m and n are integers with m
2015-03-30 00:52:00 527
原创 Sicily 1426. Phone List
1426. Phone ListConstraintsTime Limit: 1 secs, Memory Limit: 64 MBDescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the pre?x
2015-03-30 00:51:43 566
原创 Sicily 9456. Clumsy Cows
9456. Clumsy CowsConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionBessie the cow is trying to type a balanced string of parentheses into her new laptop, but she is s
2015-03-30 00:50:07 588
原创 Sicily 1234. Playground
1234. PlaygroundConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGeorge has K <= 20 steel wires shaped in the form of half-circles, with radii a1, a2, . . . , aK. The
2015-03-30 00:49:56 482
原创 Sicily 1484. 守望者的逃离
1484. 守望者的逃离ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription 恶魔猎手尤迪安野心勃勃,他背叛了暗夜精灵,率领深藏在海底的娜迦族企图叛变。守望者在与尤迪安的交锋中遭遇了围杀,被困在一个荒芜的大岛上。为了杀死守望者,尤迪安开始对这个荒岛施咒,这座岛很快就会沉下去。到那时,岛上的
2015-03-30 00:48:31 647
原创 Sicily 1459. The Dragon of Loowater
1459. The Dragon of LoowaterConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.
2015-03-30 00:47:45 508
原创 Sicily 1405. Mahershalalhashbaz, Nebuchadnezzar, and Billy Bob Benjamin Go to the Regionals
1405. Mahershalalhashbaz, Nebuchadnezzar, and Billy Bob Benjamin Go to the RegionalsConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe Association for Computing Mac
2015-03-30 00:46:17 634
原创 LeetCode OJ Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BAN
2015-03-29 23:24:28 441
原创 Sicily 13862. Empty Stalls
13862. Empty StallsConstraintsTime Limit: 2 secs, Memory Limit: 64 MBDescriptionFarmer John's new barn consists of a huge circle of N stalls (2 At the end of each day, FJ's c
2015-03-29 20:56:36 560
原创 Sicily 13861. Pogo-Cow
13861. Pogo-CowConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionIn an ill-conceived attempt to enhance the mobility of his prize cow Bessie, Farmer John has attached
2015-03-29 20:11:18 643
原创 Sicily 13859. Farmer John has no Large Brown Cow
13859. Farmer John has no Large Brown CowConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionFarmer John likes to collect as many different types of cows as possible. I
2015-03-29 19:08:00 962
原创 Sicily 1389. Linear Pachinko
1389. Linear PachinkoConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThis problem is inspired by Pachinko, a popular game in Japan. A traditional Pachinko machine is
2015-03-29 12:01:08 712
原创 Sicily 1031. Campus(shortest path)
1031. CampusConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAt present, Zhongshan University has 4 campuses with a total area of 6.17 square kilometers sitting res
2015-03-29 11:55:31 1582
原创 Sicily 1321. Robot
1321. RobotConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionKarell Incorporated has designed a new exploration robot that has the ability to explore new terrains, thi
2015-03-29 11:54:32 1474
原创 Sicily 1345. 能量项链
1345. 能量项链ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription在Mars星球上,每个Mars人都随身佩带着一串能量项链。在项链上有N颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。
2015-03-29 11:53:24 878
原创 Sicily 1305. Who’s Winner?
1305. Who’s Winner?ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionNic and Susan play the game of multiplication by multiplying an integer p by one of the numbers 2
2015-03-29 11:51:26 537
转载 LeetCode OJ Unique Binary Search Trees II
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all 5 unique BST's shown below. 1 3
2015-03-28 22:28:29 397
原创 Sicily 13858. Goldilocks and the N Cows
13858. Goldilocks and the N CowsConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionYou may have heard the classical story about Goldilocks and the 3 bears. Little know
2015-03-28 21:33:41 818
原创 Sicily 13860. Crowded Cows
13860. Crowded CowsConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionFarmer John's N cows (1 A cow feels "crowded" if there is another cow at least twice her heig
2015-03-28 20:40:31 638
原创 LeetCode OJ Word Ladder II
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exi
2015-03-28 10:47:37 638
原创 LeetCode OJ Best Time to Buy and Sell Stock I II III IV
LeetCode OJ Best Time to Buy and Sell Stock 系列题解。
2015-03-25 18:47:08 715
原创 LeetCode OJ Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i,ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find
2015-03-25 00:57:58 498
原创 Sicily 1302. Magic Square
1302. Magic SquareConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA magic square is an arrangement of the numbers from 1 to n2 (n-squared) in an n*n matrix, with
2015-03-24 19:55:03 585
原创 Sicily 1278. Soldiers
1278. SoldiersConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe soldiers of the moon army are standing in a line, some of them looking to the left end of the lin
2015-03-24 19:20:49 399
转载 Sicily 1133. SPAM
1133. SPAMConstraintsTime Limit: 10 secs, Memory Limit: 32 MBDescriptionYou never had any friends, and don't really want any anyways, and so you have decided to collect email add
2015-03-24 19:14:15 607
原创 Sicily 1090. Highways
1090. HighwaysConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the tra
2015-03-24 19:13:18 534
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人