1409. Two Gangsters - Problem Solution & Logic
#include <cstdio>
using namespace std;
int main(){
int x,y;
scanf("%d %d",&x,&y);
printf("%d %d\n",y-1,x-1);
return 0;
}
3 comments
MH
Mahmud Hossain
July 16, 2026
Well written. Bookmarked this for my team's reference. Looking forward to more content like this.
SB
Sumaiya Begum
July 15, 2026
Does this approach also work for larger datasets? Our team is dealing with something similar at scale.
RK
Rafiq Khan
July 14, 2026
Really insightful article! This is one of the clearest explanations I've come across. The examples make it very easy to understand.
AD
AdminAdminJuly 14, 2026Thank you Rafiq! Glad it was helpful.
