結果
| 問題 |
No.110 しましまピラミッド
|
| コンテスト | |
| ユーザー |
tnoda_
|
| 提出日時 | 2015-08-10 12:46:32 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 51 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-18 06:29:06 |
| 合計ジャッジ時間 | 1,193 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 WA * 10 |
ソースコード
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)))
tnoda_