結果
| 問題 | No.110 しましまピラミッド |
| コンテスト | |
| ユーザー |
tnoda_
|
| 提出日時 | 2015-08-10 12:47:06 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 5,000 ms |
| コード長 | 346 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 77,468 KB |
| 最終ジャッジ日時 | 2025-12-03 16:10:20 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
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, W)))
tnoda_