线性表
ghvn7777
这个作者很懒,什么都没留下…
展开
-
uva673 栈 括号匹配
673 - Parentheses Balance括号匹配输入一些由小括号和中括号组成的字符串,判断字符串是否正确。栈的基本应用,水题。自己比较得意的是如何判断是否匹配。方法是: little = ‘(’ + ‘)’; middle = ‘[’ + ‘]’; 判断当前字符和栈顶字符相加是否等于little 或middle代码:#include <stdio.h> #include <stdli原创 2015-06-07 15:18:32 · 481 阅读 · 0 评论 -
uva101The Blocks Problem积木问题,线性表
#include #include #include typedef struct Mark { int pos; int block; }Mark; typedef struct Blocks { int top; int s[30]; }Blocks; Blocks block[30]; Mark markOne, markTwo; int Jud原创 2015-06-05 16:46:16 · 799 阅读 · 0 评论 -
poj2590steps数列递推
Problem D: Step by step Time Limit: 1 Sec Memory Limit: 128 MB Submit: 23 Solved: 6 [Submit][Status][Web Board] Description One steps through integer points of the straight line. The length of a原创 2015-07-26 23:00:38 · 375 阅读 · 0 评论