摘要:
Time Limit: 1000 MS Memory Limit: 131072 K DescriptionLong time ago, a king occupied a vast territory. Now there is a problem that he worri... 阅读全文
摘要:
单调栈与单调队列很相似。首先栈是后进先出的,单调性指的是严格的递增或者递减。 单调栈有以下两个性质: 1、若是单调递增栈,则从栈顶到栈底的元素是严格递增的。若是单调递减栈,则从栈顶到栈底的元素是严格递减的。 2、越靠近栈顶的元素越后进栈。 单调栈与单调队列不同的地方在于栈只能在栈顶操... 阅读全文
摘要:
Largest Rectangle in a Histogram Time Limit: 1000MS Memory Limit: 65536K Total Submissions: ... 阅读全文
摘要:
time limit per test1 second memory limit per test256 megabytes inputstandard input outpu... 阅读全文
摘要:
Problem Description A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both ... 阅读全文
摘要:
## Nearest Neighbor Search ##Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 1024 megabyt... 阅读全文
摘要:
You have number a, whose decimal representation quite luckily contains digits 1, 6, 8, 9. Rearrange the digits in its decimal representation so that t... 阅读全文
摘要:
Simon has a prime number x and an array of non-negative integers a1, a2, ..., an.Simon loves fractions very much. Today he wrote out number on a piec... 阅读全文
摘要:
A triangle field is numbered with successive integers in the way shown on the picture below. The traveller needs to go from the cell with number M to ... 阅读全文
摘要:
Mr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer m and asks for the number of positive integ... 阅读全文