×

# [closed] spoj BYECAKES

 0 http://www.spoj.com/problems/BYECAKES/ https://ideone.com/GdbHQs Getting WA repeatedly. Can't find the error in my logic. Can anyone Help?? asked 12 Nov '14, 21:23 1★abeyaar 334●2●21●40 accept rate: 30% Have you tried using C++? (13 Nov '14, 03:20) No, I dont't think language is a problem here. The only difference between my code and the accepted ones seems to be in the ratio line http://qr.ae/mK44O. But still I dont find anything wrong in my logic of taking ratios (13 Nov '14, 05:54) abeyaar1★ I can't find anything wrong with your logic. Someone must answer this question. But I would like to point out one thing:  b[0]+=max-b[0];  does nothing but assigning max to b[0]. Same for b[1],b[2],b[3]. (13 Nov '14, 23:05) Yeah I knew that before..but still can't find anything wrong (14 Nov '14, 07:13) abeyaar1★ can anyone help tried many test cases (25 Nov '14, 12:55) abeyaar1★ can anyone help tried many test cases (21 Dec '14, 13:34) abeyaar1★ showing 5 of 6 show all

### The question has been closed for the following reason "The question is answered, right answer was accepted" by abeyaar 21 Dec '14, 14:24

 1 check for input 0 0 0 0 its a tricky case of this question ,i guess.. answer should be 0 right? as he's not wasting anything.. https://ideone.com/mlqFRv answered 21 Dec '14, 14:07 593●1●6 accept rate: 48% lol..thanks mate such a bad mistake on my part of not checking the boundary cases. :) (21 Dec '14, 14:23) abeyaar1★ anytime :) (21 Dec '14, 14:29) but one thing.. after adding this tricky case i still didn't got a AC :P (21 Dec '14, 14:36) https://ideone.com/LI0jz6 You can use this Solution for reference. And can you also look into http://discuss.codechef.com/questions/59132/spoj-brckts-runtime-error-nzec (21 Dec '14, 14:39) abeyaar1★

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,134

question asked: 12 Nov '14, 21:23

question was seen: 3,320 times

last updated: 21 Dec '14, 14:39