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 ...
Search found 12 matches
- Sun Dec 16, 2007 4:33 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11059 - Maximum Product
- Replies: 96
- Views: 51691
- Sun Dec 16, 2007 3:01 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11059 - Maximum Product
- Replies: 96
- Views: 51691
- Wed Sep 12, 2007 6:35 am
- Forum: Volume 5 (500-599)
- Topic: 551 - Nesting a Bunch of Brackets
- Replies: 56
- Views: 20557
- Tue Sep 11, 2007 8:56 pm
- Forum: Volume 5 (500-599)
- Topic: 551 - Nesting a Bunch of Brackets
- Replies: 56
- Views: 20557
Can anyone tell me what is wrong with my code? or provide some critical I/O....
Code: Select all
Thanks, I got "Solved"
- Tue Sep 11, 2007 10:53 am
- Forum: Bugs and suggestions
- Topic: About "Problem Stats" in the newserver.
- Replies: 1
- Views: 2220
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 ...
I was thinking and praising myself for that, but after a while I found that ranking ...
- Sat Sep 08, 2007 7:25 am
- Forum: Volume 101 (10100-10199)
- Topic: 10106 - Product
- Replies: 98
- Views: 40157
- Fri Sep 07, 2007 8:02 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10106 - Product
- Replies: 98
- Views: 40157
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.
I've also checked with all the I/O in posted corresponding threads...
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.
- Thu Aug 30, 2007 8:09 am
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies: 43
- Views: 20243
- Wed Aug 29, 2007 5:57 am
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies: 43
- Views: 20243
Jan,
I'm getting WA in the following code. can you find bugs in my code? Can you give some test cases too.
Thanks.
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.
- Mon Aug 27, 2007 8:38 am
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies: 43
- Views: 20243
- Mon Aug 27, 2007 8:33 am
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies: 43
- Views: 20243
- Sun Aug 26, 2007 10:35 pm
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies: 43
- Views: 20243
Miras, is your second case's output OK?
your output is 4. But aren't there 5 palindromes?
Though i'm getting WA
Can you please send me more test cases..??
Ashis, CSEDU
Code: Select all
A***A
Code: Select all
A
A***A
*
**
***

Can you please send me more test cases..??
Ashis, CSEDU