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

×

what if coins gets over before ans In Max and electrical panel decmeber long ?

what should i do when my coins are over in problem without reaching ans and should i abort if i get -1?

asked 10 Dec '18, 15:17

iamghost's gravatar image

2★iamghost
-11
accept rate: 0%


you have 1000 coins in the beginning and u have to find the answer in these 1000 coins only !!! u wont get more than 1000 coins in any test case. We can solve all the test cases with the given constraints . if u need more than 1000 coins to solve then simply change the way you are thinking , change your approach for this problem.

link

answered 10 Dec '18, 15:29

deepu_27398's gravatar image

3★deepu_27398
1
accept rate: 0%

Test case are very weak i got 100 but still my code contains bugs which I debug latter :p

link

answered 10 Dec '18, 19:23

adityaseth1011's gravatar image

4★adityaseth1011
32
accept rate: 0%

Think more mathematically >>>>> have a closer look at the ways you spend your coins , once you find where to save the coins , the problem is more simpler than it seems ....... Best Wishes.

link

answered 11 Dec '18, 21:43

harshraj22's gravatar image

4★harshraj22
605
accept rate: 0%

If you are running out of coins or getting -1 as response then rethink your approach.

link

answered 12 Dec '18, 23:36

yugandhar_t's gravatar image

3★yugandhar_t
111
accept rate: 0%

isn't it simple binary search? , i am getting few wrong answer by this approach

link

answered 14 Dec '18, 17:40

araj1998's gravatar image

3★araj1998
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,408
×102

question asked: 10 Dec '18, 15:17

question was seen: 1,077 times

last updated: 14 Dec '18, 17:40