WA in DCOWS-SPOJ

I’m getting WA in 14th Test Case of Spoj problem DCOWS.
Help me.Here’s my code - Ideone