原创 最大乘積 Uva 11059

輸入n個元素組成的序列S,你需要找出一個乘積最大的連續子序列。如果這個最大的乘積不是正數,應輸出0(表示 無解)。 1<=n<=18,-10<=si<=10. 樣例輸入: 3 2 4 -3 5 2 5 -1 2 -1 樣例輸出: 8 20

原创 最短的名

Description 在一個奇怪的村子中,很多人的名字都很長,比如aaaaa, bbb and abababab。 名字這麼長,叫全名顯然起來很不方便。所以村民之間一般只叫名字的前綴。比如叫'aaaaa'的時候可以只叫'a

原创 Break Standard Weight

The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horiz

原创 X-Plosives

A secret service developed a new kind of explosive that attain its volatile property only when a speci c association o

原创 Ping pong

 Ping pong Description N(3N20000) ping pong players live along a west-east street(consider the street as a

原创 Java Beans

Java Beans Description There are N little kids sitting in a circle, each of them are carrying some java beans i

原创 Fabled Rooks

Problem F: Fabled Rooks We would like to place n rooks, 1 ≤  n ≤ 5000, on a n×n board subject to the following res

原创 Play on Words

Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open th

原创 Star

Star Description Overpower often go to the playground with classmates. They play and chat on the playground.

原创 Easy Task

You are given n integers. Your task is very easy. You should find the maximum integer a and the minimum integer b among

原创 Floor problem

Floor problem Description In this problem, we have f(n,x)=Floor[n/x]. Here Floor[x] is the biggest integer such

原创 Uva 除法

輸入正整數n,按從小到大的順序輸出所有形如abcde/fghij=n的表達式,其中a~j恰好爲數字0-9的一個排列(可以有前導0,) 2<=n<=79 樣例輸入: 63 樣例輸出: 79546 / 01283 = 62 94736 / 0

原创 Bomb

Bomb Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on

原创 敵兵佈陣

敵兵佈陣 Problem Description C國的死對頭A國這段時間正在進行軍事演習,所以C國間諜頭子Derek和他手下Tidy又開始忙乎了。A國在海岸線沿直線佈置了N個工兵營地,Derek和Tidy的任務就是要監視這些工兵營

原创 Min Number

Now you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9'). You are all