How can we add new test case to the problem which may fail many of AC solutions?
EDIT 1: Low possibility for such test case but curious if its possible to do as above?
EDIT 2: Supersized to know this fact that even operations > 1e9 can be done in 2 seconds. Thanks
See testcase 24.
Maybe you think the solution should get TLE. No it shouldn't, because compilers are clever enough to optimize such code.
how in my ide compiler(g++) it shows TLE, can you explain or direct me to sources where i can find more about it? Thanks
It's actually not about >1e9 operations per second. The compiler optimizes that for loop to a formula.
What are you compiling options? Is
-O2
set? Are there any other configuration differences?How can i check compiling options, I don't know about it? btw i use VS code and "code runner" extension to run them in VS code.
Do you have a build file or just compile manually?
If it's the first case, look for
launch.json
ortasks.json
file and you can edit your preferred command line arguments inargs
key.If it's the second case, you can optimize your code by passing some optimization flags during compilation.
EDIT:
For Code Runner, type
@ext:formulahendry.code-runner
in settings and clickEdit in settings.json
underCode-runner: Executor Map
and you can edit your compilation command incpp
key.okay thanks, i am not use to these things but will try and report you back soon bro.
Auto comment: topic has been updated by coder_Aditya_404 (previous revision, new revision, compare).