Help: What is the Time Complexity of this?

Revision en2, by SP_22, 2023-06-07 09:40:40

I was attempting the E problem of round #878 Div 3. I am getting TLE in my code but it seems to me that the Time complexity of the code if O(T * (t + q)) which should get accepted. Please tell me the mistake in the code.

Approach: I am storing the position which are unblocked at time (relative to current time) in a queue. The string a and b are just a copy of s1 and s2 which will be blocked and unblocked throughout the process (s1 and s2 are not altered).

Problem: Div 3 E
My submission: Submission

Code
Tags time complexity, string, div 3, queue, #problem e, implementations

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English SP_22 2023-06-07 09:40:40 163 Tiny change: 'oblem/E)\nMy submi' -> 'oblem/E)\n\nMy submi'
en1 English SP_22 2023-06-07 09:37:22 2108 Initial revision (published)