My PCM Dilemma

Problem Link: CCBTS01

Let me preface this by saying this is nothing serious. It was Break-The-Server, not Break-The-Checkers.

Issue: The problem constraint specify that the strings in input will only contain letters from the set {“P”, “C”, “M”}. However, it seems that it was not the case.
It is clear from my two different submission.

Submission 1
Submission 2

In the first submission, a hard check for letter “M” is not done, and it gives WA, whereas in the second submission, a hard check is done and it gives AC. Would love to get some help on this @daanish_adm .

The links you gave aren’t accessible

Sorry for the confusion. Thank you to @cubefreak777 for pointing it out.

I tried the same approaches (comparing sorted strings, checking permutation) as well. Ended up walking away frustrated because I couldn’t even solve a Div3 Problem

Lol, same situtation. I was confused after getting 3 WA.