TopCoder
文章平均质量分 88
superhack250
这个作者很懒,什么都没留下…
展开
-
TCHS-1-250
Problem Statement A speed radar is installed in a highway zone where the maximum speed limit is maxLimit mph, and the minimum speed limit is minLimit mph. Any reading that is stri...原创 2010-01-26 16:16:00 · 90 阅读 · 0 评论 -
TCHS-7-250
Problem Statement You are given a String text. Determine the letters (both lowercase and uppercase) that appear in text. Return a String which contains those letters, converted to l...原创 2010-02-05 13:32:02 · 97 阅读 · 0 评论 -
TCHS-7-500
Problem Statement An array of ints is said to be a straight if it contains five elements that are five consecutive numbers. For example, the array { 6, 1, 9, 5, 7, 15, 8 } is ...原创 2010-02-05 13:45:26 · 88 阅读 · 0 评论 -
TCHS-7-1000
Problem Statement You are given an even number of points in the plane. You want to find a rectangle whose corners have integer coordinates and sides are parallel to the axes, such...原创 2010-02-05 15:21:39 · 110 阅读 · 0 评论 -
TCHS-8-250
Problem Statement Last night, after that terrible nightmare about pink elephants, you decided that you would never again go to sleep unless the time showing on your digital clock wa...原创 2010-02-19 10:18:08 · 82 阅读 · 0 评论 -
TCHS-8-500
Problem Statement A common task for math students is to solve 'word math' questions, where each distinct letter represents a distinct digit.Given a list of word math numbers to ...原创 2010-02-19 10:56:54 · 112 阅读 · 0 评论 -
TCHS-8-1000
Problem Statement When scheduling tasks to be executed by a person, it is sometimes the case that when one task is completed, a later task suddenly becomes more important. In these ...原创 2010-02-19 11:57:09 · 101 阅读 · 0 评论 -
TCHS-9-250
Problem Statement One day, nClassmates classmates decided to play an exciting game. They formed a circle and assigned themselves player numbers from 0 to nClassmates - 1 in a cl...原创 2010-02-20 15:24:33 · 86 阅读 · 0 评论 -
TCHS-9-500
Problem Statement A simple way to compress a string is to encode repeated consecutive substrings as a counter followed by the substring. For example, if X represents a substring,...原创 2010-02-20 16:26:29 · 128 阅读 · 0 评论 -
TCHS-9-1000
Problem Statement Consider a square n x n matrix A. The cell Ai,j is equal to the product i * j (i, j are 1-based). Let's create a one-dimensional array which contains all the el...原创 2010-02-20 18:45:04 · 88 阅读 · 0 评论 -
TCHS-10-250
Problem Statement Given a int[] x and a percentile p (between 0 and 100, inclusive), find the smallest element y in x such that at least p percent of the elements in x are less th...原创 2010-02-21 14:26:17 · 92 阅读 · 0 评论 -
TCHS-10-500
Problem Statement There are several cannons located on a plane. Each cannon is represented as a point, and can shoot in one of four directions: left, right, up or down. Given the ...原创 2010-02-21 15:16:49 · 91 阅读 · 0 评论 -
TCHS-10-1000
Problem Statement You have a string s containing only ones and zeroes. Your goal is to make all the characters in s equal using a minimal number of operations. A single operation ...原创 2010-02-21 16:35:35 · 96 阅读 · 0 评论 -
TCHS-11-250
Problem Statement You are given a String[] blocks representing the layout of a city. Each character of each element of blocks represents one city block. A 'B' character represents...原创 2010-02-22 11:38:14 · 70 阅读 · 0 评论 -
TCHS-11-500
Problem Statement You are playing a game with some friends. The game is played on a rectangular chess board where each cell may be either empty or occupied by a rook. You are give...原创 2010-02-22 13:11:13 · 86 阅读 · 0 评论 -
TCHS-11-1000
Problem Statement You have beads of several different colors that are to be placed on a string, with the requirement that for any group of three adjacent beads, all three must hav...原创 2010-02-22 15:22:35 · 98 阅读 · 0 评论 -
TCHS-12-250
Problem Statement In some of the old historical chronicles the Indict system of chronology was used. Instead of a year, this system uses three integers, called indict, circle to t...原创 2010-02-28 09:53:52 · 120 阅读 · 0 评论 -
TCHS-12-550
Problem Statement Let's consider a standard six-sided die. Each side contains a distinct number between 1 and 6. We can represent a single die as a sequence of 6 digits in the fol...原创 2010-03-01 10:04:32 · 256 阅读 · 0 评论 -
TCHS-6-900
Problem Statement We are given a maze which is a cube of NxNxN cells. We start at (1,1,1) and we move to (N,N,N), in each move visiting one of the three adjacents cells in the pos...原创 2010-02-04 12:06:09 · 64 阅读 · 0 评论 -
TCHS-6-600
Problem Statement You have just hacked into your friend's computer, and you want to delete one of his personal files. But wait, why not let him delete it! As you keep watching him...原创 2010-02-04 11:33:07 · 80 阅读 · 0 评论 -
TCHS-1-500
Problem Statement In written languages, some symbols may appear more often than others. Expected frequency tables have been defined for many languages. For each symbol in a langua...原创 2010-01-26 16:23:49 · 175 阅读 · 0 评论 -
TCHS-1-1000
Problem Statement People enjoy mazes, but they also get them dirty. Arrows, graffiti, and chewing gum are just a few of the souvenirs people leave on the walls. You, the maze keep...原创 2010-01-27 12:12:51 · 134 阅读 · 0 评论 -
TCHS-2-250
Problem Statement A Fountain of Life is a special fountain that produces the elixir of life at a constant speed of elixir liters per second. A dark mage managed to cast a Curse of D...原创 2010-01-28 08:58:50 · 108 阅读 · 0 评论 -
TCHS-2-500
Problem Statement The number 666 is considered to be the occult "number of the beast" and is a well used number in all major apocalypse themed blockbuster movies. However the number...原创 2010-01-28 09:22:52 · 81 阅读 · 0 评论 -
TCHS-2-1000
Problem Statement A spell is defined by its incantation, the word spoken when the spell is being cast. If you know the incantation of a spell, you can create counterspells in the...原创 2010-01-28 11:43:44 · 141 阅读 · 0 评论 -
TCHS-3-250
Problem Statement After selling goods all day, a salesman would like to determine the most desirable item in his inventory. You are given a String[] items, each element of whic...原创 2010-01-28 14:58:37 · 95 阅读 · 0 评论 -
TCHS-3-450
Problem Statement Three kids are playing the following game: A word is written on a sheet of paper, and one after another, the players take turns adding letters to the word. Durin...原创 2010-01-29 13:45:13 · 130 阅读 · 0 评论 -
TCHS-3-1000
Problem Statement A decomposition of a non-negative integer n is a list of non-negative integers that sum to exactly n. The product of a decomposition is the product of all its me...原创 2010-01-29 15:11:04 · 67 阅读 · 0 评论 -
TCHS-4-250
Problem Statement You will be running a race on a straight track, and you have devised the following trick to help you win. The weather forecast for the day of the race indicat...原创 2010-01-30 08:58:58 · 69 阅读 · 0 评论 -
TCHS-4-500
Problem Statement In music, each note has a relative duration. For example, a whole note lasts four times longer than a quarter note. Half notes, eighth notes, and sixteenth notes...原创 2010-01-30 09:20:03 · 92 阅读 · 0 评论 -
TCHS-4-1100
Problem Statement Your master construction unit can build 1 unit of type 0 in times[0] seconds at a cost of costs[0]. Each unit of type 0, once built, can in turn build 1 unit of ty...原创 2010-01-30 10:52:27 · 69 阅读 · 0 评论 -
TCHS-5-300
Problem Statement Given the width and height of a rectangular grid, return the total number of rectangles (NOT counting squares) that can be found on this grid. For example, wid...原创 2010-01-30 13:15:12 · 79 阅读 · 0 评论 -
TCHS-5-600
Problem Statement Masterbrain is a two player board game in which one player decides on a secret combination of digits, while the other must figure it out in 10 guesses or less. T...原创 2010-01-30 14:08:39 · 91 阅读 · 0 评论 -
TCHS-5-250
Problem Statement When shopping for TVs consumers may notice that a TV's size is given by its diagonal in inches. The aspect ratio of a screen is the ratio of its width to its heigh...原创 2010-02-02 12:41:59 · 70 阅读 · 0 评论 -
TCHS-5-500
Problem Statement A sentence is composed of words, spaces and punctuation. For this problem, words are maximal contiguous strings of letters. Given a sentence, sort the words in the...原创 2010-02-02 12:43:40 · 114 阅读 · 0 评论 -
TCHS-5-1000
Problem Statement When programming, I don't like to take my fingers off the keyboard, and hence, I don't use the mouse. So, when navigating my source, I like to do so in such a way ...原创 2010-02-02 14:47:05 · 189 阅读 · 0 评论 -
TCHS-6-250
Problem Statement A digital clock displays time in the format "DD:DD:DD" (quotes for clarity only), where each D is a single digit, and each pair of contiguous digits represents eit...原创 2010-02-04 09:56:24 · 99 阅读 · 0 评论 -
TCHS-12-950
Problem Statement An army of k knights is going to try to kill an evil dragon. The dragon has h heads, and the knights must cut off all his heads one by one to complete their miss...2010-03-01 12:58:54 · 84 阅读 · 0 评论