結果

問題 No.240 ナイト散歩
ユーザー kurenai3110kurenai3110
提出日時 2016-08-23 21:40:02
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 630 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 63,628 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-25 13:40:55
合計ジャッジ時間 2,833 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 WA -
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 2 ms
6,944 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 2 ms
6,940 KB
testcase_25 WA -
testcase_26 AC 1 ms
6,940 KB
testcase_27 AC 2 ms
6,944 KB
testcase_28 AC 1 ms
6,944 KB
testcase_29 AC 2 ms
6,944 KB
testcase_30 AC 1 ms
6,944 KB
testcase_31 AC 2 ms
6,940 KB
testcase_32 AC 1 ms
6,940 KB
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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