Can anyone Tell me Whats Wrong in my Submission in Atcoder Beginner Contest 219 problem C

Revision en1, by Saksham_Sahgal, 2021-09-20 10:46:56

Link to my submission

My approach was to map characters 'a' with the first character in the string then ,'b' with the second character in the string .. and so on , then while taking input of the N strings I converted those string(X) to a mapped string(Y) (each character conveted to its mapped value) and stored that mapped string(Y) in a multiset key with vaue as the original string(X), i did this as multiset will sort the keys lexographically and then i just printed the values of the map,

the first two given testcase gives right ans , but i dont understand why all other testcases give WA.

ps. i also solved it with custom comparator function which got AC(As expected) , but i don't understand why this approach gives me WA

Tags atcoder, 219, beginner contest, contest


  Rev. Lang. By When Δ Comment
en1 English Saksham_Sahgal 2021-09-20 10:46:56 893 Initial revision (published)