結果
問題 | No.683 Two Operations No.3 |
ユーザー |
|
提出日時 | 2018-05-14 01:00:00 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 91 ms / 2,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-06-28 10:49:20 |
合計ジャッジ時間 | 2,271 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
Syntax OK
ソースコード
# https://yukicoder.me/submissions/256892def ascan; gets.split.map(&:to_i);endA,B = ascan# 計算時間解析用#@h = []def check(a,b)return true if a == 0 || b == 0return false if a < 0 || b < 0#@h << [a,b]ok = falseok ||= true if a > 0 && a.even? && check(a/2,b-1)ok ||= true if b > 0 && b.even? && check(a-1,b/2)return okendputs check(A,B) ? "Yes" : "No"#STDERR.puts @h.size#STDERR.puts @h.map{|e|e*","}