NikaraBika's blog

By NikaraBika, history, 10 years ago, In English

Hello :)
This(14612490) is a brute force solution for 506D - Mr. Kitayuta's Colorful Graph and it's time complexity is absolutely O(n^2). (n <= 100 * 1000)
I submitted it and got AC!
Could someone help me? Why did it happen? Weak test data or fast servers?
(That code must get TLE if we give it a path of size 100 * 1000 and all edges with the same color without any query)

  • Vote: I like it
  • -1
  • Vote: I do not like it

»
10 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

absolutely weak algorithm analyse ! because your algorithm is O(nsqrtn).