ryoko1's blog

By ryoko1, history, 14 months ago, In English,

the problem tag is: 796B - Find The Bone Here is my sol: 26520634. Another query is that in the above submission when I change my array size from (n+1) to max the OJ gives me TLE on 5th test case. Why is it so? According to my knowledge array creation is a O(1) process and should not affect the time complexity of the program by any means. Your help will be appreciated!!!

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

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

Use fast I/O formats .You can use either scanf,printf or add this into your code (ios_base::sync_with_stdio(false);cin.tie(0);) .It passes like this