与‘数据结构-栈/单调’有关的日志

uva12096

maksyuki 发表于 oj 分类,标签:
0
uva12096

Background from Wikipedia: “Set theory is a branch of mathematics created principally by the German mathematician Georg Cantor at the end of the 19th century. Initially controversial, set theory has come to play the role of a foundational theory in m >>继续阅读

poj3250

maksyuki 发表于 oj 分类,标签:
0
poj3250

Bad Hair Day

Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of other cows' heads. Each cow i has a >>继续阅读

uva10935

maksyuki 发表于 oj 分类,标签:
0
uva10935

Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck:

Throw away the top card and move the card that is now on >>继续阅读

uva514

maksyuki 发表于 oj 分类,标签:
0
uva514

There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreover, it turned >>继续阅读

zoj1061

maksyuki 发表于 oj 分类,标签:
0
zoj1061

Web Navigation

Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forw >>继续阅读

lightoj1113

maksyuki 发表于 oj 分类,标签:
0
lightoj1113

1113 - Discover the Web

BACK: If the backward stack is empty, the command is ignored. Otherwise, push the current page on the top of the forward stack. Pop the page from the top of the backward stack, making it the new current page.Standard web bro >>继续阅读