Fork me on GitHub
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1042栈的模拟,题目大意是已知元素次序, 判断出栈次序是否合理。 需要考虑到各种情况, 分类处理。常见错误:使用前未清空栈使用STL思路较为清晰代码附上, 欢迎各位大神指点~~#include #incl... 阅读全文
posted @ 2014-11-29 12:26 I'm coding 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1042由于数字特别大, 所以用数组来模拟。 经测试, 数组大小开50000 可过。附AC代码, 欢迎大神指点~#include #include const int maxn = 50000 + 100;... 阅读全文
posted @ 2014-11-29 12:05 I'm coding 阅读(155) 评论(0) 推荐(0) 编辑