結果

問題 No.110 しましまピラミッド
ユーザー maimai
提出日時 2016-01-23 19:47:58
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 11,932 KB
実行使用メモリ 16,116 KB
最終ジャッジ日時 2023-10-21 13:51:21
合計ジャッジ時間 3,862 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
16,116 KB
testcase_02 AC 69 ms
16,116 KB
testcase_03 AC 73 ms
16,116 KB
testcase_04 AC 73 ms
16,116 KB
testcase_05 AC 70 ms
16,116 KB
testcase_06 AC 70 ms
16,116 KB
testcase_07 AC 69 ms
16,116 KB
testcase_08 AC 69 ms
16,116 KB
testcase_09 AC 70 ms
16,116 KB
testcase_10 AC 71 ms
16,116 KB
testcase_11 AC 70 ms
16,112 KB
testcase_12 AC 69 ms
16,116 KB
testcase_13 WA -
testcase_14 AC 71 ms
16,116 KB
testcase_15 WA -
testcase_16 AC 68 ms
16,116 KB
testcase_17 WA -
testcase_18 AC 87 ms
16,116 KB
testcase_19 AC 72 ms
16,116 KB
testcase_20 AC 70 ms
16,116 KB
testcase_21 AC 72 ms
16,116 KB
testcase_22 AC 71 ms
16,116 KB
testcase_23 AC 72 ms
16,112 KB
testcase_24 AC 70 ms
16,116 KB
testcase_25 AC 69 ms
16,116 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 72 ms
16,116 KB
testcase_29 AC 71 ms
16,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

bi=[0,0]
bb=[nil,nil]
bi[0]=gets.to_i-1
bb[0]=gets.split(" ").map(&:to_i).sort!
bi[1]=gets.to_i-1
bb[1]=gets.split(" ").map(&:to_i).sort!

sz=99
sel=bb[0][bi[0]]>bb[1][bi[1]] ? 0 : 1
99.times{|h|
    while sz<=bb[sel][bi[sel]]
        bi[sel]-=1
        if bi[sel]<0
            p h
            exit
        end
    end
    sz=bb[sel][bi[sel]];bi[sel]-=1
    sel=sel^1
}
0