結果
| 問題 |
No.240 ナイト散歩
|
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-04-16 16:01:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 371 bytes |
| コンパイル時間 | 615 ms |
| コンパイル使用メモリ | 55,040 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-07 21:24:11 |
| 合計ジャッジ時間 | 1,331 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
#include<iostream>
using namespace std;
int main(){
long long X,Y;
int dx[9]={ 0,-2,-2,-1,-1, 1, 1, 2, 2};
int dy[9]={ 0,-1, 1,-2, 2,-2, 2,-1, 1};
cin>>X>>Y;
for(int i=0;i<9;i++){
for(int j=0;j<9;j++){
for(int k=0;k<9;k++){
if(dx[i]+dx[j]+dx[k]==X&&dy[i]+dy[j]+dy[k]==Y){
cout<<"YES"<<endl;
return 0;
}
}
}
}
cout<<"NO"<<endl;
}
kongarishisyamo