Hello Guys, Please help me, I am getting TLE but the complexity of my program is around O(n*logn + n + n + n + T) where n and t both are 5e6. The time limit is 3 sec. I think it should work. Please help. https://codeforces.me/contest/546/submission/145049261
In this case the input is taking a lot of time. You must add such code at the begin of the main function and all will be ok.
ios_base::sync_with_stdio(false); cin.tie(0);
I think its there,
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
oh my bad I havn't added the fastio in the main
Yes, but there is no word
fastio()
in your code and compiler doesn't putios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
anywhere