A question on abc331_f

Правка en1, от Lucky_zajasi, 2023-12-02 17:47:16

Today,I'm solving abc331_f.I used brute force at that moment.Its time complexity is $$$\Theta(nq)$$$ which $$$n$$$ is not greater than $$$10^6$$$ and $$$q$$$ is not greater than $$$10^5$$$.but I passed it in about $$$1$$$ second.

Soon I found the problem:I used C++23 Clang 16.0.0 to submit it in the beginning and it passed,but when I used C++20 gcc 12.2 to submit it,it got TLE.

So please can somebody tell me the reason?Thanks.

And here's my code.

Теги problem

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Lucky_zajasi 2023-12-02 17:47:16 516 Initial revision (published)