Showing WA in printing LCS

my code https://ide.codingblocks.com/s/36602
ques link https://hack.codingblocks.com/contests/c/526/277

when I’m running it on IDE it is running perfectly and always showing the correct ans
but when i’m submitting it on hackerblocks it is showing WA for all test cases

https://ide.codingblocks.com/s/38094
Check the comments^