Description給定一長串的數字 a[],找到一段最長的區間 [l, r],符合 a[l] <= a[k] <= a[r] for k in [l, r]。
Input Format第一行有一個正整數 T,代表有幾組測試資料。
每組側資......(詳全文)
發表時間:2014-03-08 10:11 | 人氣:1092 | 回應:0
Problem G: Mayor's posters
The citizens of Bytetown, AB, could not stand that the candidates
in the mayoral election campaign have been placing their electoral posters
at al......(詳全文)
發表時間:2014-02-17 09:22 | 人氣:976 | 回應:0
Problem F
Reverse Prime
Input: Standard Input
Output: Standard Output
There are a few 7
digit positive numbers whose reverse number is a prime number ......(詳全文)
發表時間:2013-09-22 21:01 | 人氣:1427 | 回應:0
After doing Ray a great favor to collect sticks for Ray, Poor Neal
becomes very hungry. In return for Neal's help, Ray makes a great dinner
for Neal. When it is time for dinn......(詳全文)
發表時間:2013-05-29 15:09 | 人氣:745 | 回應:0
4th IIUC Inter-University Programming Contest, 2005
E
Lucky Number
Input: standard input
Outp......(詳全文)
發表時間:2013-05-08 07:32 | 人氣:729 | 回應:0
B
Potentiometers
Input: Standard Input
Output:
Standard Output
A potentiometer, or potmeter for short, is an
electronic de......(詳全文)
發表時間:2013-05-06 20:23 | 人氣:346 | 回應:0
The skyline of Singapore as viewed from the Marina Promenade (shown on
the left) is one of the iconic scenes of Singapore. Country X would also
like to create an iconic skyli......(詳全文)
發表時間:2013-05-05 20:30 | 人氣:522 | 回應:0
內容
:
江江江江,有一條江耶! 經
過長時間的觀察,老姜發現這條江有許多支流,且整個河系可以用一個以源頭為根的樹狀結構來表示。除此之外老姜還發現有許多小......(詳全文)
發表時間:2013-04-13 08:24 | 人氣:279 | 回應:0
內容
:
OIER公
司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务之一便是统计每位员工的工资。这本来是一份不错的工作,但是令人郁闷的是......(詳全文)
發表時間:2013-01-05 12:37 | 人氣:372 | 回應:0
Let's play a stone removing game.
Initially, n
stones are arranged on a circle and numbered
1,..., n
clockwise (Figure 1). You are also given two numbers k
and m
.......(詳全文)
發表時間:2012-12-27 07:50 | 人氣:751 | 回應:0
內容
:
有一个包含n个元素的数组,要求实现以下操作:DELETE k:删除位置k上的数。右边的数往左移一个位置。QUERY i j:查询位置i~j上所有数的最小值和最大值。例如有......(詳全文)
發表時間:2012-12-08 12:35 | 人氣:549 | 回應:1
...這題不算難,難是難在卡時間,很清楚地我們知道要進行矩陣連乘積,也就是 N*N 的矩陣連乘 E-S 次,最後乘上一個 N*1 的矩陣。不能直接做矩陣乘法,因為會消耗 O(N*N*N) 計算兩個 N*N 相乘。在此......(詳全文)
發表時間:2012-11-27 17:03 | 人氣:95 | 回應:0
It's normal to feel worried and tense the day before a programming contest. To relax, you went out for a drink with some friends in a nearby pub. To keep your mind sharp for the ne......(詳全文)
發表時間:2012-11-11 18:04 | 人氣:2309 | 回應:6
Problem H
Ahoy, Pirates!
Input: Standard
Input
Output: Standard
Output
In the ancient pirate ages, the Pirate
Land was divided into two teams......(詳全文)
發表時間:2012-05-20 07:37 | 人氣:184 | 回應:0
[UVA] 11297 - Census#include <stdio.h>#include <string.h>#define max(x, y) ((x) > (y) ? (x) : (y))#define min(x, y) ((x) < (y) ? (x) : (y))struct subTree { &......(詳全文)
發表時間:2012-05-12 17:53 | 人氣:875 | 回應:0