Getting TLE for O(n*k) solution. Can someone help!

Revision en1, by MdoingIt, 2024-08-28 22:42:50

Question — https://codeforces.net/problemset/problem/161/D

Submission — https://codeforces.net/contest/161/submission/278555376

IMO, it should pass the time constraints. Am I missing something?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MdoingIt 2024-08-28 22:42:50 263 Initial revision (published)