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

×

How to solve the TORN PAGES question?

0
1

Please help me solve the TORN PAGES problem.

I made a few submissions, but got a WA. Please help me solve the problem. Here's the link to my code.

asked 10 Aug, 18:55

dhruvsomani's gravatar image

4★dhruvsomani
947
accept rate: 6%

edited 2 days ago


@dhruvsomani - I have tried this question and I am also getting wrong answer, but I could tell you that your code will fail for test cases when S=4 & 64 and possible others.....Check out my solution for reference but it is not fully correct

link

answered 11 Aug, 17:15

pmirdha91's gravatar image

2★pmirdha91
1
accept rate: 0%

it is a tricky one !!

i didn't know python so, i cant suggest anything but i can tell u the corner cases which your code isn't passing :)

56(answer is -1 but your code gives 17 because may be u are not checking that the output page exists or not )!

link

answered 2 days ago

pk301's gravatar image

0★pk301
263
accept rate: 11%

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:

×737
×21
×15

question asked: 10 Aug, 18:55

question was seen: 110 times

last updated: 2 days ago