Need help on a DSU problem

Revision en1, by Tobby_And_Friends, 2019-10-10 20:13:02

Can anyone please help me figure out what is wrong with my solution?

Problem: My solution: Verdict: WA

I used DSU and processed the queries in reversed order. So, basically I started with the string after the characters of the string were replaced by the '#' character. For query of type 1 i, I stored the current maximum for that character to be printed later on and for query of type 2 i, I tried to incorporate this character with the remaining set and updated the maximum for this character.


  Rev. Lang. By When Δ Comment
en1 English Tobby_And_Friends 2019-10-10 20:13:02 593 Initial revision (published)