BZOJ 1660: [Usaco2006 Nov]Bad Hair Day 乱发节 (单调栈)
相关文章
BZOJ 1657: [Usaco2006 Mar]Mooo 奶牛的歌声 (单调栈)
1657: [Usaco2006 Mar]Mooo 奶牛的歌声 # Time Limit: 5 Sec Memory Limit: 64 MB Submit: 634 Solved: 447 [Submit][Status][Discuss]
BZOJ 1628: [Usaco2007 Demo]City skyline (单调栈)
1628: [Usaco2007 Demo]City skyline # Time Limit: 5 Sec Memory Limit: 64 MB Submit: 396 Solved: 317 [Submit][Status][Discuss]
codeforces 442C. Artem and Array
C. Artem and Array
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Artem has an array of n positive integers. Artem decided to play with it. The game consists of n moves. Each move goes like this. Artem chooses some element of the array and removes it. For that, he gets min(a, b) points, where a and b are numbers that were adjacent with the removed number. If the number doesn’t have an adjacent number to the left or right, Artem doesn’t get any points.
BZOJ 1656: [Usaco2006 Jan] The Grove 树木(神奇的bfs之射线法)
1656: [Usaco2006 Jan] The Grove 树木 # Time Limit: 5 Sec Memory Limit: 64 MB Submit: 143 Solved: 88 [Submit][Status][Discuss]
BZOJ 3407: [Usaco2009 Oct]Bessie's Weight Problem 贝茜的体重问题(01背包)
3407: [Usaco2009 Oct]Bessie’s Weight Problem 贝茜的体重问题 # Time Limit: 3 Sec Memory Limit: 128 MB Submit: 88 Solved: 79 [Submit][Status][Discuss]