Hotel visit code giving wrong answer

my code: https://ide.codingblocks.com/s/667822

Nevermind changing x and y to long long solved the issue

@gaurarjun444 yup that was the issue…