Playrix Codescapes Cup Problem B: T-shirt buying

Revision en1, by GODOF_Shinobi, 2017-05-12 06:17:26

This post is regarding yesterday's problem B.

Here are two solutions 27045354 and 27019672 although being similar , one of the two solutions passed and the other had a TLE on Case 39.

I know when we try to find and delete an element which is not present in set using set.erase(set.find(x)) ,then it gives an exception as find returns an iterator that points at the end of the set.

My doubt is does this happen even if I use set.erase(x), or was this ambiguous nature?

Any help would be appreciated.

Tags t-shirt buying

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English GODOF_Shinobi 2017-05-12 06:17:26 595 Initial revision (published)