TLE for same theoretical Time Complexity?

Правка en1, от shauncodes, 2025-06-02 21:04:42

This is for the recent 2116C - Gellyfish and Flaming Peony question.

I use an $$$O(N^2)$$$ Dynamic Programming solution. Both are EXACTLY same, except one had don't pick first and the other has pick first.

322569273 -> TLE because I pick an element in the set first

322570586 -> AC because I don't pick an element in the set first

Can someone explain why one gives TLE while the other AC even though the TC is the same?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский shauncodes 2025-06-02 21:04:42 474 Initial revision (published)