GETTING TLE NOT UNDERSTANDING WHY..

Revision en2, by back_to_match, 2021-11-08 05:15:12

this is the atcoder contest link: https://atcoder.jp/contests/abc225/tasks/abc225_d

submission link: https://atcoder.jp/contests/abc225/submissions/26955824

If anybody could help please help me out as for printing i have proceeded with naive approach and my total time complexity O(no of elements connected*No of queries) total time complexity if any one can help

pls help me out

Tags atcoder beginner, dfs and similar

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English back_to_match 2021-11-08 05:15:12 0 (published)
en1 English back_to_match 2021-11-08 05:14:43 454 Initial revision (saved to drafts)