A question on abc331_f

Revision en1, by 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.

Tags problem

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Lucky_zajasi 2023-12-02 17:47:16 516 Initial revision (published)