HNS_17502's blog

By HNS_17502, history, 2 years ago, In English

Hello everyone, I was solving question 1521B and then I submitted my solution. In test case 2, my solution exceeded time limit and after that I referred to editorial. My Solution and editorial solution are having same time complexity of O(n). Can anyone help me with what's wrong with my solution?

My solution link:- 136682985 Editorial link:- Editorial

Tags tle
  • Vote: I like it
  • -13
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

If you submit this code using GNU C++20 (64) instead, you might see a Runtime error and not a TLE.