結果

問題 No.110 しましまピラミッド
コンテスト
ユーザー tnoda_
提出日時 2015-08-10 12:46:32
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 345 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 196 ms
コンパイル使用メモリ 77,864 KB
最終ジャッジ日時 2025-12-03 16:10:16
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def solve(w, h, xs, ys):
    if not xs:
        return h
    if xs[0] <= w:
        return solve(w, h, xs[1:], ys)
    else:
        return solve(xs[0], h + 1, ys, xs[1:])

_ = input()
W = sorted(map(int, raw_input().strip().split()))
_ = input()
B = sorted(map(int, raw_input().strip().split()))
print(max(solve(0, 0, W, B), solve(0, 0, B, B)))
0