栈和队列
_大太阳_
有梦想就去追
展开
-
手动扩大栈内存
还在因为 怕 g++ 提交时间很慢,但是用C++ 交又怕栈溢出??? 我们都知道,如果代码里有 递归函数 频繁调用, 用 C++ 提交代码, 很可能就会 出现 Runtime Error (ACCESS_VIOLATION) 但是用G++提交,如果数据量很多的话,又会出现 Time Limit Exceeded 那怎么办呢???原创 2015-08-08 09:06:33 · 941 阅读 · 0 评论 -
poj 3250 Bad Hair Day(单调栈)
http://poj.org/problem?id=3250 Bad Hair Day Description 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,原创 2015-11-16 19:03:51 · 438 阅读 · 0 评论 -
CodeForces 546C Soldier and Cards (队列)
http://codeforces.com/problemset/problem/546/C Soldier and Cards Two bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all原创 2015-11-27 20:59:53 · 667 阅读 · 0 评论