Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--){
int n, m;
cin >> n >> m;
int x, y, a, b;
cin >> x;
cin >> y;
cin >> a;
cin >> b;
int xDiff = x - 1;
int yDiff = y - 1;
if(a+xDiff == b+xDiff){
cout << "Yes" << endl;
}
else {
if((x+y)%2 == 1){
if((a+b)%2 == 1){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else if((x+y)%2 == 0){
if((a+b)%2 == 0){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else {
cout << "No" << endl;
}
}
}
}
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 11:29:48
- Judged At
- 2024-12-07 11:29:48
- Judged By
- Score
- 10
- Total Time
- 313ms
- Peak Memory
- 1.027 MiB