Whenever I run my code on compiler it's showing output "-1", but Codeforces shows "1" and gives WA. Can anyone explain the reason behind this?
Problem Link: 1066_B
My Solution: https://ideone.com/XdpmQJ?fbclid=IwAR3dgEZMtqeKHY60H5xKsN2S_5tMsxdLocCP7fINeYo2W3Bjksv7ArJwWoo