delete pics to save space
This commit is contained in:
22
history_source/信息学奥赛一本通/3.1.1.cpp
Normal file
22
history_source/信息学奥赛一本通/3.1.1.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include<cstdio>
|
||||
int main()
|
||||
{
|
||||
char stack[25]={'s','\0'},li;
|
||||
int top=1;
|
||||
while(li=getchar(),li!='@')
|
||||
{
|
||||
if(li=='(') stack[top++]=li;
|
||||
if(li==')')
|
||||
{
|
||||
if(stack[top-1]=='(') top--;
|
||||
else
|
||||
{
|
||||
printf("NO\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(top==1) printf("YES\n");
|
||||
else printf("NO\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user