divyam01986's blog

By divyam01986, history, 9 years ago, In English

Link to problem: http://codeforces.me/problemset/problem/546/D My solution to this problem matches that of other folks but, for some reason I keep getting TLE on test suite 3. Can anyone shed some light on why this might be? Your help is appreciated.

Link to submission: http://codeforces.me/contest/546/submission/28127026

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By divyam01986, history, 10 years ago, In English

How come test case number 9 in my submission has failed? Doesn't the caterpillar slip below ground level the first night and then catch the apple the next day. In the first day he is at height 801 cm but then at night he drops 1188cm (which would put him below ground). Could someone please explain why my assumption is wrong as the note in the problem announcements is unclear.

Link to problem:http://www.codeforces.com/contest/652

Link to Submission:http://www.codeforces.com/contest/652/submission/19505251

Problem announcement note:"Note that the forest is magic so the caterpillar can slip down under the ground and then lift to the apple." means that it is possible to slip down under the ground, but then lift to the apple. It doesn't mean that the caterpillar get the apple right after slipping down under the ground.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By divyam01986, history, 10 years ago, In English

For this problem the solution is acceptable when an Integer[] array is used but not when the same algorithm is used with an int[] array. Why? Problem URL:http://www.codeforces.com/problemset/problem/682/B TLE Solution:http://www.codeforces.com/contest/682/submission/19309219 Accepted Solution: http://www.codeforces.com/contest/682/submission/19309197

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it