the link to the problem: here
My Solution: link
I have checked the top of both strings and printed the lexicographically smaller one,
if both characters are same, I have traversed both the strings until I find a difference in character or I reach the end of one of the strings,
and according to the character after the above loop, I have printed either the first or second string’s characters.
I’ve tested my code on various test cases,
Can someone tell me where I have gone wrong? or provide a testcase where my code fails?
Your code is failing in following test cases…
INPUT
1
BCOEJUVPVABOYG
OE
Output
Yours - BCOEOEJUVPVABOYG
But Correct is - BCOEJOEUVPVABOYG
1 Like
I checked a lot of cases on your code. The only anomaly I found was what bansal stated. This OEJU thing was the nightmare…
1 Like
My solution was also giving wa, giving correct output even for above oeju case.
Can someone tell me where I have done wrong??
My solution::
https://www.codechef.com/viewsolution/12726722
1 Like
@ayush_agrawal_
INPUT
1
VY
TMWCYSYYCQPEVIKEF
Output
Correct: TMVWCYSYYCQPEVIKEFY
Yours : TMVWCYYSYYCQPEVIKEF
thanks a lot!
(I changed the first string to smaller one(length) and second string to the larger one in my code and it works now)
You seem to be having some superpower when it comes to finding test cases!! SERIOUSLY!!!
thanks a lot!
(it’s not letting me upvote you idk why)
1 Like
Np dear. I never answer for upvotes, I just want to learn
1 Like
hahaha! i m normal guy like you.