You are not logged in. Please login at to post your questions!


[closed] spoj BYECAKES

Getting WA repeatedly. Can't find the error in my logic. Can anyone Help??

asked 12 Nov '14, 21:23

abeyaar's gravatar image

accept rate: 30%

closed 21 Dec '14, 14:24

Have you tried using C++?

(13 Nov '14, 03:20) michelangelo4★

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 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) michelangelo4★

Yeah I knew that before..but still can't find anything wrong

(14 Nov '14, 07:13) abeyaar1★
(25 Nov '14, 12:55) abeyaar1★
(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

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..


answered 21 Dec '14, 14:07

dracowane's gravatar image

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) dracowane6★

but one thing.. after adding this tricky case i still didn't got a AC :P

(21 Dec '14, 14:36) dracowane6★ You can use this Solution for reference. And can you also look into

(21 Dec '14, 14:39) abeyaar1★

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • 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:


question asked: 12 Nov '14, 21:23

question was seen: 3,320 times

last updated: 21 Dec '14, 14:39