結果
問題 | No.240 ナイト散歩 |
ユーザー |
![]() |
提出日時 | 2016-04-01 15:49:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 642 ms |
コンパイル使用メモリ | 54,668 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 21:23:26 |
合計ジャッジ時間 | 1,855 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
#include<iostream>using namespace std;int main(){int x, y;cin >> x >> y;x = abs(x);y = abs(y);if ((x + y) % 2 != 0 && x + y < 10 && x < 7 && y < 7)cout << "YES" << endl;else if (x + y == 0 || x + y == 2 || (x + y == 4 && x != 2) || (x > 1 && y > 1 && x + y == 6))cout << "YES" << endl;else cout << "NO" << endl;return 0;}