Search found 12 matches

by ashis.csedu
Sun Dec 16, 2007 4:33 pm
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 37263

turcse143, I found your approach is somehow wrong. Consider the following samples - Sample Input: 5 1 2 -1 3 5 18 1 2 3 4 5 -1 2 2 3 4 5 7 4 2 1 0 -3 You are keeping two information - maxn[] the maximum negative values and maxp[]: the maximum positive values, right? But you reinitialized the maxp[] ...
by ashis.csedu
Sun Dec 16, 2007 3:01 pm
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 37263

Turcse, check your maxp[] indexing. I found your code assigns uninitialized maxp[] values to c in the following code fragment - if(c<maxp[i]) c=maxp[i]; --here verify that all your maxp 's are valid or initialized earlier. Also check the following I/O: Sample Input: 3 0 -2 3 2 0 -2 Sample output: Ca...
by ashis.csedu
Wed Sep 12, 2007 6:35 am
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 12163

Forget that, I've solved the bug. I guess there are cases like the following - Input: (*a++(*) (*a{+}*) <************)> ()(***)(**) ()(***)(*) ({{}{}}[{(){}[]} ([)) ()(**) ()* aaaaaaa aaa(aaaa ******* a*a*a*a ()a a() ()*() (*a{+}*) **) *(* (*a++(*) Output: NO 6 YES NO 13 YES NO 7 NO 17 NO 3 YES YES ...
by ashis.csedu
Tue Sep 11, 2007 8:56 pm
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 12163

Can anyone tell me what is wrong with my code? or provide some critical I/O....

Code: Select all

Thanks, I got "Solved"
by ashis.csedu
Tue Sep 11, 2007 10:53 am
Forum: Bugs and suggestions
Topic: About "Problem Stats" in the newserver.
Replies: 1
Views: 1850

About "Problem Stats" in the newserver.

After solving any problems, I always check my rank in the Problem stats page. In previous system I found my rank down few pages, but now in the new system I was stuck to see few of my ranks at top 10...or above. I was thinking and praising myself for that, but after a while I found that ranking prob...
by ashis.csedu
Sat Sep 08, 2007 7:25 am
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27276

Thanks Jan, Your point is right. Taking input using gets() is wrong in the following inputs...(Leading spaces in a line jeopardized my procedures). Good observation!! Sample Input: 0000005 1250000 1 00000000000000 12 50 0 100001 5 80100 Sample Output: 6250000 0 600 0 400500
by ashis.csedu
Fri Sep 07, 2007 8:02 pm
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27276

What is the problem with my code - it's getting WA.
I've read all the posts, that's why I've ommited any leading zeros...increased the size of the arrays...Please check it.

Code: Select all

Thanks Jan, 
Removed code after getting Accepted.
I've also checked with all the I/O in posted corresponding threads...
by ashis.csedu
Thu Aug 30, 2007 8:09 am
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 12229

Thanks Jan,
It's now accepted.
by ashis.csedu
Wed Aug 29, 2007 5:57 am
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 12229

Jan,
I'm getting WA in the following code. can you find bugs in my code? Can you give some test cases too.

Code: Select all

Removed after accepted.
Thanks.
by ashis.csedu
Mon Aug 27, 2007 8:38 am
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 12229

My previous post was a mistake cause i copied Miras's input with mouse and pasted, so a trailing space character can be seen in my output. Now i've corrected the input, now my output is - The string 'aAa' contains 3 palindromes. The string ' AAAAAAAAAAAAAAAAAAAAAAmirasAAAAAAAAAAAAAA' contains 28 pal...
by ashis.csedu
Mon Aug 27, 2007 8:33 am
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 12229

Miras's input: aAa AAAAAAAAAAAAAAAAAAAAAAmirasAAAAAAAAAAAAAA A A My output: (yet getting WA):( The string 'aAa ' contains 4 palindromes. The string ' AAAAAAAAAAAAAAAAAAAAAAmirasAAAAAAAAAAAAAA ' contains 28 palindromes. The string 'A A' contains 5 palindromes. Is there anybody verify this? Can you gi...
by ashis.csedu
Sun Aug 26, 2007 10:35 pm
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 12229

Miras, is your second case's output OK?

Code: Select all

A***A
your output is 4. But aren't there 5 palindromes?

Code: Select all

A
A***A
*
**
***
Though i'm getting WA :D
Can you please send me more test cases..??

Ashis, CSEDU

Go to advanced search