Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int T;
cin >> T;
for(int i=0;i<T;i++){
long long n,m,x,y,p,q,pos,pos1,pos2,pos3,pos4,pos5,pos6,pos7;
cin >> n >> m >> x >> y >> p >> q;
pos = x+1;
pos1 = y+1;
pos2 = x-1;
pos3= y-1;
pos4 = x-1;
pos5 =y+1;
pos6 =x+1;
pos7 = y-1;
if(pos==p && pos1==q || pos2==p && pos3==q ||pos4==p && pos5==q || pos6==p && pos7==q ){
cout << "YES\n";
}else{
cout << "NO\n";
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1115 Destination
- Contest
- LU IUJPC : Sylhet Division 2024, Mock Round
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-07 10:56:39
- Judged At
- 2024-12-07 10:56:39
- Judged By
- Score
- 0
- Total Time
- 247ms
- Peak Memory
- 888.0 KiB