11150 - Cola

All about problems in Volume 111. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea

Post by helloneo »

My AC code gives the same output..
dileep
New poster
Posts: 2
Joined: Sun Mar 04, 2007 9:25 am
Contact:

Post by dileep »

helloneo wrote:My AC code gives the same output..
I'm also getting same output.....but it's showing WA

--
website: http://www.dileep.com
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

What a funny..............

Post by Tanu »

Some problem makes a lots of fun with me, like this one...
:P :P :P :P :P :P :P :P :P :P :P :P :P :P :P :P :P :P :P
turcse143
Learning poster
Posts: 81
Joined: Wed May 09, 2007 9:59 pm
Location: (CSE,DU) Dhaka,Bangladesh

Post by turcse143 »


i just use the normal algo.
here just have one trick.
add one to the n;
then continue the algo in the given pattarn.
''I want to be most laziest person in the world''
hunter_du
New poster
Posts: 5
Joined: Fri Feb 22, 2008 10:49 pm

all input/output is correct but why WA!!!!!!!

Post by hunter_du »

Code: Select all

removed code
Last edited by hunter_du on Sat Feb 23, 2008 7:35 am, edited 1 time in total.
turcse143
Learning poster
Posts: 81
Joined: Wed May 09, 2007 9:59 pm
Location: (CSE,DU) Dhaka,Bangladesh

Post by turcse143 »

hunter check the following input output.
ur code shows error.

Code: Select all

input:
11
17
29

output:
16
25
43
check this sequence.
''I want to be most laziest person in the world''
hunter_du
New poster
Posts: 5
Joined: Fri Feb 22, 2008 10:49 pm

Post by hunter_du »

Thanks turcse143, Finally i got ACC... That was the input where my output was wrong. Here is another good input/output

Code: Select all

20 - 30
Obaida
A great helper
Posts: 380
Joined: Wed Jan 16, 2008 6:51 am
Location: (BUBT) Dhaka,Bagladesh.

Re: 11150 - Cola

Post by Obaida »

How I can get it right???
Any one please help me?

Code: Select all

This simple problem made me think a lot!!!
try_try_try_try_&&&_try@try.com
This may be the address of success.
aeiou
New poster
Posts: 21
Joined: Wed May 07, 2008 11:32 am

11150 - Cola

Post by aeiou »

Hi,
I ve been thinking about this problem but not able to find the recurrence yet...Can anybody PM/post the recurrence?
Pls help this learner!!
Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 11150 - Cola

Post by Jan »

Search the board for 'Peter's Smoke'. It will help. However, you can formulate this as a math problem. You will find a simple formula. (Though the derivation is not simple)
Ami ekhono shopno dekhi...
HomePage
aeiou
New poster
Posts: 21
Joined: Wed May 07, 2008 11:32 am

11150 - Cola

Post by aeiou »

Thank u very much Jan for ur suggestions...I found the recurrence and got AC...
shinningangel
New poster
Posts: 2
Joined: Sat Nov 28, 2009 9:12 am

Re: 11150 - Cola

Post by shinningangel »

I always got RTE on this problem..
even I make my program as short as only 7 lines without simulations..
or with simulations!!

its drive me crazy ><
why!?

is there any idea why got RTE?
sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

Re: 11150 - Cola

Post by sohel »

Maybe it'd be better if you can show us your code. It's very tough to spot a bug in someone's code without seeing it. :)
Taman
New poster
Posts: 32
Joined: Sun Oct 11, 2009 8:59 pm
Location: Southeast University

Re: 11150 - Cola

Post by Taman »

@shinningangel:
Well, as the range of n is very small(only 200), I don't think you are getting RTE for stack overflow.
Two more vital reasons are left, first of all, if you are using array to keep your input or output check the size of it.
Second, Make sure you are not dividing any number by zero.
sms.islam
New poster
Posts: 19
Joined: Sat Oct 10, 2009 10:28 am

Re: 11150 - Cola

Post by sms.islam »

i have found out a connection.And it is working.if anyone solved uva online judge problem 11877.then just add the result with the corrosponding value of n then it will be ok.............................. :D

problem solving is really fun........
Post Reply

Return to “Volume 111 (11100-11199)”