marttians's blog

By marttians, history, 6 years ago, In English

105860386 If I'm not mistaken the complexity of this code is O(n) with 1 <= n <= 10^9 . Please explain to me !!. Thank you.

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

»
6 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it
»
6 years ago, hide # |
 
Vote: I like it +24 Vote: I do not like it

Amazing compiler~~~

»
6 years ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

Check this — 106281265

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Check this: https://codeforces.me/contest/1398/submission/90016644

O(n^2) solution passed in 1.6sec for 1<=n<=10^5.