Search found 12 matches

by The_Madman
Wed Jul 06, 2011 5:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 55832

Re: 10035 - Primary Arithmetic

UVA do not give any verdict for the code below. It only says, Your submission with number ******* for the problem 10035 - Primary Arithmetic has failed with verdict . Verdict what? Where is the problem? Code accepted and removed. I feel stupid. The problem does explicitly specify less than 10 digits...
by The_Madman
Wed Jul 06, 2011 5:40 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 55832

Re: 10035 - Primary Arithmetic

i can't find why the system refuse my code What do you mean by refuse ? Can you please tell the exact verdict ? i can't find where is the mistake Your code seems to compile correctly but gives incorrect output. Did you run your program on the inputs given in the previous posts? for(i=0; i<SIZE; i++...
by The_Madman
Tue Mar 02, 2010 6:03 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 65624

Re: 10189 - Minesweeper

To : behnam.hamidi

1. remove al && conditions from if statements
2. output a blank line after each field, currently your program output 2 blank lines at end of file.

hope this helps
by The_Madman
Wed Dec 24, 2008 4:44 pm
Forum: Algorithms
Topic: Coin Change
Replies: 4
Views: 1541

Re: Coin Change

Thanks for your reply. Can you please give any reason why should I remove those lines? Since it simply replaces the bases cases. And are similar to your code. Say, else if(i-s[j]<0) table[i][j] = 0; is similar to ((i>=s[j]) ? table[i-s[j]][j] : 0) or, if (i>=s[j] not true then 0) And, else if(i>=1 &...
by The_Madman
Sun Dec 21, 2008 6:16 pm
Forum: Algorithms
Topic: Coin Change
Replies: 4
Views: 1541

Re: Coin Change

Thanks that helped a lot! But I've a few questions. I followed the algo as below: for(i=0; i<n; i++) for(j=0; j<m; j++) { if(i==0) table[i][j] = 1; else if(i-s[j]<0) table[i][j] = 0; else if(i>=1 && j==0) table[i][j] = 0; else table[i][j] = table[i][j-1] + table[i-s[j]][j]; } why didn't it work? And...
by The_Madman
Sun Dec 14, 2008 9:26 pm
Forum: Algorithms
Topic: Coin Change
Replies: 4
Views: 1541

Coin Change

Can anyone convert the Pseudo code into c/c++ (?) : ********************************************************** func count( n, m ) initialize table with base cases for i from 0 to n for j from 0 to m table[ i, j ] = table[ i - S_j, j ] + table[ i, j - 1 ] return table[ n, m ] ************************...
by The_Madman
Sun Oct 12, 2008 7:12 pm
Forum: Volume 5 (500-599)
Topic: 576 - Haiku Review
Replies: 50
Views: 17441

Re: 576

I get WA though my outputs are correct for every inputs given in this forum. Can anyone tell where is the problem?

Code: Select all

Removed after AC.  
Regards.

"So there is nobody to help!? :cry: "
"Well, this time i was able to solve it myself! but the problem i figured out was so silly.... :P "
by The_Madman
Fri Jun 27, 2008 11:32 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 32920

Re: 102 Runtime Error (SIGSEGV)

shiplu_1320 wrote:You have declare

Code: Select all

int sum[5]
but you are trying to access index sum[5] , which doesn't exist.

Good luck.
Thanks that worked!
by The_Madman
Thu Jun 19, 2008 9:18 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 32920

Re: 102 Runtime Error (SIGSEGV)

Verdict "Runtime Error":
Removed after accepted :)
by The_Madman
Mon Jun 02, 2008 12:02 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 31178

Re:

Array size should be 1000000. thanx bro....it really helped and now's been accepted. but here comes a question....how can one assume the length of these string type questions...some days ago...i was stuck by this same kind of prob..while the algo was ok..it needed to change the string length to 100...
by The_Madman
Tue May 27, 2008 8:17 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 34601

Re: 272 -WA-Plz help to debug it!!!

To: hahahaken Do I need to consider the spaces and newlines in the output? No you don't. :D Why do I get wrong answer? Can anyone help take a look at it? Change the code below : else if (s == '\'') use numbers instead of '\''. You see the second apostrophe cancels the third one!
by The_Madman
Mon May 26, 2008 9:26 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 34601

Re: 272 -Runtime Error-Plz help to debug it!!!

This is the program that i submitted to onlide judge. And as assumed(!) it replied with "verdict Runtime error. This means that the execution of your program didn't finish properly. Remember to always terminate your code with the exit code 0." Though all inputs and outputs are correct (as i guess) t...

Go to advanced search