In my opinion the time limit for CSUBQ is pretty tight. Inputting with 1.5*10^6 numbers, and outputting 5*10^5 is pretty costly itself, also operating with a 5*10^5 size array can get pretty slow.
I’d ask @admin to consider increasing the time limit to 1.5, or 2 seconds.
Thanks in advance.
It is nothing to constraints for problem SEGPROD, which has constraints Q up to 2*10^7, but that’s what the long challenges are all about, to figure out various approaches till you hit AC.
Well, i don’t really believe that constraints would be reduced or time limit increased, because that would require a complete rejudge for all submissions of this problem. Also, increase in time limit would be a bit unfair to those who have already solved the problem.
Though i would like it, it is really unlikely that constraints or time limit would be relaxed.
2 Likes
SEGPROD got like 6 times less I/O than CSUBQ, and also got 4 times higher timelimit.
Also I don’t really see why would it be unfair for people who already solved the problem, if someone solves SEGPROD in less than 1 sec, it’s unfair for him/her that people solved it in 3-4 secs too?
Mate, i too am struggling to solve these problems within time limit. But i guess (only guess, not sure) the problem SEGPROD was written to accept only the fastest solutions. No doubt only around 70 people has solved this problem during 5 days.
Maybe the problem is with me, because I’m the only one in top 50, who doesn’t have max point on CSUBQ, but the limit just seems too harsh for me.
Not really. My solution ran comfortably with more than half a second to spare…
I’ve been challenging myself to do it in pure Haskell, and unfortunately I can’t use Data.Vector
, so I end up copying arrays instead of doing in-place, constant-time updates. I think, with the right libraries available, it would be feasible.
I just solved the problem , There is nothing to worry about the Time Limit. If you use the correct approach u will surely pass it.
For input/output u can use fast I/O operations.
Rest is doable.
1 Like
i too am struggling with last sub-task. Maybe my approach is too slow.
This question was hell -_-
And I’m still struggling to break out of this hell :D… Never wasted this much time nor submissions for a single problem before this.
1 Like
Just scraped AC, just on border of TL(0.02 seconds away). Time Limit shouldn’t be this strict i guess…
You beat @bazsi700 . He got AC with margin of 0.03 sec away from TLE XDXD
Time Limit shouldn't be this strict i guess...
IDK, but for some reason, just reading statement of SEGPROD gave me a TLE…
(Get the pun? - The constraints are so high I am giving TLE to my logic before even coming up with one XD)
I too felt like this for SEGPROD, I mean, who ask for 10^7 queries. The person asking queries must be really free to ask this many queries or determined to wrong-foot you.
PS: As baszi700 said, time limit of SEGPROD is 4 times that of CSUBQ…
Just approach it right way, you may even get AC in first attempt
I too felt like this for SEGPROD, I mean, who ask for 10^7 queries.
Holy shit XDXDXDXD LMAO.
My reply pun: Apparently the setter seems to be free enough- hes the one asking 2*{10}^{7} queries in first place!
Thankfully problem setters didn’t ask us to input B array of size 10^7, or they would have to increase TL by one second only for IO.
Lololololol. Or thanfully they didnt said
“The next Q lines contain 2 integers, L and R which denote the starting and ending points of query”
Even worse, “The next Q lines contains 2 integers, L and R, where (L+x)%N and (R+X)%N are start and end points of query. swap l and r if l>r”
Although in your way, this problem would have been the one with input larger than LARGE INPUT TEST PROBLEM.
Time limit 10 seconds. 5 seconds for input?
God save if you use Scanner in JAVA tho. (Its slow af)