突然发现有点问题uva673(栈括号匹…
来源:互联网 发布:淘宝奢侈品代购 编辑:程序博客网 时间:2024/04/29 20:33
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=8&problem=614&mosmsg=Submission+received+with+ID+10357983
673 - Parentheses Balance
Time limit: 3.000 seconds
Parentheses BalanceYou are given a string consisting of parentheses () and[]. A string of this type is said to becorrect:
- (a)
- if it is the empty string
- (b)
- if A and B are correct, AB is correct,
- (c)
- if A is correct, (A) and[A] is correct.
Write a program that takes a sequence of strings of this typeand check their correctness. Your program can assume that themaximum string length is 128.
Input
The file contains a positive integer n and a sequence ofn strings of parentheses () and [], onestring a line.
Output
A sequence of Yes or No on the outputfile.
SampleInput
3([])(([()])))([()[]()])()
SampleOutput
YesNoYes
Miguel Revilla
2000-08-14题意:括号匹配;
#include<string.h>
int n;
char q[130],str[130];
int top,len;
int main()
{
}
- 突然发现有点问题uva673(栈括号匹…
- uva673 栈 括号匹配
- UVA673-括号平衡
- UVa673(括号匹配)
- 今天发现CSDNBLOG有点问题。
- 发现BCB6的TComInterface实现有点问题
- 突然发现
- 突然发现
- 习题6-1 平衡的括号 UVa673
- UVA673:Parentheses Balance(平衡的括号)
- 突然觉得有点累
- 突然有点感慨
- 突然发现我并不适合……
- 栈的应用uva673
- UVA673 水,模拟栈
- uva673 - Parentheses Balance(栈)
- UVa673(数据结构 栈)
- 突然发现,MarsEdit可以离线…
- poj3981(字符替换)
- java实现Hbase中的查询(一)Filter方式
- poj1007(串排序)
- 纹理(讲得比较详细的文章)
- 1poj1363(栈)
- 突然发现有点问题uva673(栈括号匹…
- poj2105(水)
- int *ptr=(int *)(&a+1)问题的探讨
- poj3051(简单的dfs)
- poj1146(求下一个字符串,水)
- poj1953(找规律——斐波拉契数列)
- 归并两个线性表
- 初学者
- 用栈实现数制转换