結果

問題 No.240 ナイト散歩
ユーザー カルロスカルロス
提出日時 2015-09-23 16:43:07
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 575 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 23,904 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-26 14:36:44
合計ジャッジ時間 2,189 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main(void){
	int i, x, y, flg = 0;
	scanf("%d %d", &x, &y);
	if(x<0) x *= -1;
	if(y<0) y *= -1;
	if(x>6 || y>6){
		printf("NO\n");
		return 0;
	}

	     if(x==0 && y!=6)                    flg++;
	else if(x==1 && y!=5)                    flg++;
	else if(x==2 && y!=2 && y!=6)            flg++;
	else if(x==3 && y!=5)                    flg++;
	else if(x==4 && y!=4 && y!=6)            flg++;
	else if(x==5 && (y==0 || y==2 || y==4 )) flg++;
	else if(x==6 && (y==2 || y==4 ))         flg++;

	if(!flg) printf("YES\n"); else printf("NO\n");
	return 0;
}
0