結果
問題 |
No.683 Two Operations No.3
|
ユーザー |
![]() |
提出日時 | 2018-05-17 22:14:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 523 bytes |
コンパイル時間 | 422 ms |
コンパイル使用メモリ | 54,492 KB |
実行使用メモリ | 817,664 KB |
最終ジャッジ日時 | 2024-06-28 13:35:03 |
合計ジャッジ時間 | 2,266 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 MLE * 1 -- * 14 |
コンパイルメッセージ
main.cpp: In function ‘bool search(int, int)’: main.cpp:31:1: warning: control reaches end of non-void function [-Wreturn-type] 31 | } | ^
ソースコード
#include <iostream> using namespace std; bool search(int a, int b) ; int main() { int a, b; cin >> a >> b; if(search(a, b)) cout << "YES" << endl; else cout << "NO" << endl; return 0; } bool search(int a, int b) { if((a == 0) || (b == 0)) return true; else if((a%2 != 0) && (b%2 != 0)) return false; else if((a%2 == 0) && (b%2 == 0)) if(search(a, b)) return true; else if(search(a,b)) return true; }