Tobby_And_Friends's blog

By Tobby_And_Friends, history, 8 months ago, In English,

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.

  • Vote: I like it
  • +3
  • Vote: I do not like it