Search found 2 matches
- Tue Jul 26, 2005 8:27 pm
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 79322
- Tue Jul 26, 2005 8:26 pm
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 79322
673 wa :( please help
#include <stdio.h>
#include <string.h>
#define N 1000
int tab[N];
int k;
int main ()
{
int x;
char znak;
k=0;
scanf("%d\n",&x);
whhile: while (x--)
{
while((znak=getchar())!='\n' && znak!=EOF)
{
if(znak=='[') tab[k++]=1;
if(znak==']') if(k==0 || tab[--k]==2) {printf("No\n");while((znak ...
#include <string.h>
#define N 1000
int tab[N];
int k;
int main ()
{
int x;
char znak;
k=0;
scanf("%d\n",&x);
whhile: while (x--)
{
while((znak=getchar())!='\n' && znak!=EOF)
{
if(znak=='[') tab[k++]=1;
if(znak==']') if(k==0 || tab[--k]==2) {printf("No\n");while((znak ...