khan_ali's blog

By khan_ali, history, 7 months ago, In English

Hello codeforces,

Recently I was practicing 1800 rated problems and I came across this latter picking problem. I implemented O(n ** 2) solution and submitted in pypy. here is the link to the submission (pypy submission) But it got tle at test 5. I was very confused why this is happening as the n for this problem is 2000.

I changed the interpreter to python 3 and submitted the solution and it gets passed.

Can anybody tell me what is the potential problem here?

here is the python3 submission (python 3 submission).

both submissions are identical but I got tle on pypy submission.

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

»
7 months ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

(Deleted) sorry I'm wrong

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by khan_ali (previous revision, new revision, compare).