I wrote two different codes, which differs only on order of headers.↵
Two codes are like these:↵
↵
1. ↵
↵
~~~~~↵
#include <stdio.h>↵
#include <algorithm>↵
....(blahblah)....↵
↵
2.~~~~~↵
↵
↵
2.↵
↵
~~~~~↵
↵
#include <algorithm>↵
#include <stdio.h>↵
....(blahblah)....↵
~~~~~↵
↵
↵
Note: At (blahblah) part, there are 9 millions scanf("%d", &t) operations.↵
Compilation options are both GNU C++14. (GNU C++14 6.2.0, which is used on Codeforces.)↵
↵
For my opinion, this two code should exactly do the same operations.↵
↵
But, 1st code gives 1.6ms / 2ms AC, and 2nd code gives TLE.↵
This issue is not about server status, it's still same during many submits.↵
↵
Can someone help me about what's going on here?
Two codes are like these:↵
↵
1. ↵
↵
~~~~~↵
#include <stdio.h>↵
#include <algorithm>↵
....(blahblah)....↵
2.
↵
↵
2.↵
↵
~~~~~↵
↵
#include <algorithm>↵
#include <stdio.h>↵
....(blahblah)....↵
~~~~~↵
↵
↵
Note: At (blahblah) part, there are 9 millions scanf("%d", &t) operations.↵
Compilation options are both GNU C++14. (GNU C++14 6.2.0, which is used on Codeforces.)↵
↵
For my opinion, this two code should exactly do the same operations.↵
↵
But, 1st code gives 1.6ms / 2ms AC, and 2nd code gives TLE.↵
This issue is not about server status, it's still same during many submits.↵
↵
Can someone help me about what's going on here?