結果

問題 No.1714 Tag on Grid
ユーザー elphe
提出日時 2024-12-06 18:02:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 77,052 KB
最終ジャッジ日時 2025-02-26 11:14:57
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdint>
#include <cmath>

using namespace std;

int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int32_t H, W, n_i, n_j, z_i, z_j;
	cin >> H >> W >> n_i >> n_j >> z_i >> z_j;

	if (abs(n_i - z_i) + abs(n_j - z_j) == 1 || (H == 2 && W == 3 || H == 3 && W == 2) && abs(n_i - z_i) + abs(n_j - z_j) == 3)
		cout << "Yes\n";
	else
		cout << "No\n";

	return 0;
}
0