wrong answer ??

what are the possible reasons for getting WA… the code is working fine on my machine and giving right answer

Don’t check for given test cases only. Check for the given limits/constraints. May be output file of your code doesn’t match with standard output file.