結果

問題 No.1714 Tag on Grid
ユーザー elphe
提出日時 2024-12-06 18:09:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 603 ms
コンパイル使用メモリ 77,288 KB
最終ジャッジ日時 2025-02-26 11:15:03
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 || abs(n_i - z_i) + abs(n_j - z_j) == 3 && (z_i == 1 || z_j == 1 || z_i == H || z_j == W) && n_i != z_i && n_j != z_j)
		cout << "Yes\n";
	else
		cout << "No\n";

	return 0;
}
0