Ya..I am really sorry....
What I wanted to say was that the max string length was given to be 128. So what was the need to set the array size to 130 ? 129 should have been enough, isn't it ?
Search found 4 matches
- Thu Jul 03, 2008 6:35 pm
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 80007
- Mon Jun 30, 2008 8:46 pm
- Forum: Volume 5 (500-599)
- Topic: 531 - Compromise
- Replies: 73
- Views: 37252
Re: 531 - Compromise - WA
Always getting WA for this code. I have tried many test cases..Someone please help..
#include<iostream>
#include<string.h>
using namespace std;
void print_LCS(char A[][40],int dir[][40],int a, int b)
{
if(a==0 || b==0) {}
else if(dir[a][b]==0) {print_LCS(A,dir,a-1,b-1);cout<<A[a]<<" ";}
else if ...
#include<iostream>
#include<string.h>
using namespace std;
void print_LCS(char A[][40],int dir[][40],int a, int b)
{
if(a==0 || b==0) {}
else if(dir[a][b]==0) {print_LCS(A,dir,a-1,b-1);cout<<A[a]<<" ";}
else if ...
- Mon Jun 30, 2008 7:38 am
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 80007
Re: 673 - Parentheses Balance
Onek Dhonnobad, Jan. Ekhon solution Accepted hoyeche. Tobe ektu bistarito bhabe karon ta bojhate parbey ? After all, maximum string length to 128 bola chilo, tai na?
- Sun Jun 29, 2008 9:28 pm
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 80007
Re: 673 - Parentheses Balance
Always getting a Wrong Answer for this code.....I have tried all possible test cases..Can anyone please help ?
#include<stdio.h>
#include<string.h>
int main()
{
char c,s[129],stack[129];
int sp=-1,i,j,n,l,k;
scanf("%d",&n);
c=getchar();
for(i=1;i<=n;i++)
{
sp=-1;k=0;
while(1)
{
c=getchar ...
#include<stdio.h>
#include<string.h>
int main()
{
char c,s[129],stack[129];
int sp=-1,i,j,n,l,k;
scanf("%d",&n);
c=getchar();
for(i=1;i<=n;i++)
{
sp=-1;k=0;
while(1)
{
c=getchar ...