結果

問題 No.240 ナイト散歩
コンテスト
ユーザー kurenai3110
提出日時 2016-08-23 21:40:02
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 630 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 403 ms
コンパイル使用メモリ 88,056 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-05-08 07:57:13
合計ジャッジ時間 2,755 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 7 RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long

bool Ans[10][10];

int main() {
	Ans[0][0] = true; Ans[1][2] = true; Ans[2][1] = true;
	Ans[0][4] = true; Ans[2][4] = true; Ans[3][3] = true; Ans[4][2] = true; Ans[4][0] = true;
	Ans[1][6] = true; Ans[3][6] = true; Ans[4][5] = true; Ans[4][3] = true;
	Ans[3][4] = true; Ans[5][4] = true; Ans[6][3] = true; Ans[6][1] = true;

	int x, y;
	cin >> x >> y;

	if (Ans[(int)abs(x)][(int)abs(y)]) cout << "YES" << endl;
	else cout << "NO" << endl;

	return 0;
}
0