Vector Implementation gives TLE/MLE where as Set implementation Gives AC.

Revision en1, by huzaifa242, 2018-11-01 20:19:37

In past few days I have faced this problem very frequently. Implementing same Logic with set gives AC where as vector implementation gives TLE OR MLE.

Question 1

TLE Solution

AC Solution

I just changed the set implementation to set in order to check the running time.

Question 2

MLE Solution

AC SOlution

Above is the example of MLE v/s AC.

If anyone could tell me what I am mising...

Thanks in Advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English huzaifa242 2018-11-01 20:19:37 840 Initial revision (published)