ks07onmc117's blog

By ks07onmc117, history, 7 months ago, In English

I was solving 1673B — A Perfectly Balanced String. The editorial explained: find the prefix length k until a character repeats. This k equals the number of distinct characters before the first repetition. And then it traverse from i=k->n-1 and checks for mismatch.

To me finding k is very annoying. So i took all distinct element and then traverse from i=distinct_char_len->n-1. It was accepted and I was like "How!" Submission id: 342392163

Full text and comments »

  • Vote: I like it
  • -19
  • Vote: I do not like it