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

×

December Long problem MAXEP

Problem-https://www.codechef.com/DEC18B/problems/MAXEP When exactly we get -1 as response?

When we try to perform a task but we don't have enough coins to perform that or when we enter some out of range or values in wrong format(correct format being "1 y").

And in case we run out of coins then we should not print final line with operation 3 since we don't have value of x yet or we print operation 3 with last tried value of y?

edit: I looked up previous posts on this topic and it seems that there is no test case where if solved correctly we should run out of coins or get -1 as response?

asked 12 Dec '18, 02:22

yugandhar_t's gravatar image

3★yugandhar_t
111
accept rate: 0%

edited 12 Dec '18, 02:46

got AC.For others still confused out there: If done properly you will never run out of coins or get -1 as response so rethink your approach if you are stuck thinking about how to handle these cases.

(12 Dec '18, 23:34) yugandhar_t3★
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,313
×102

question asked: 12 Dec '18, 02:22

question was seen: 536 times

last updated: 16 Dec '18, 13:43