Блог пользователя NikaraBika

Автор NikaraBika, история, 8 лет назад, По-английски

Hello :)
This(14612490) is a brute force solution for 506D - Цветной граф мистера Китаюта 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)

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

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