結果
| 問題 |
No.110 しましまピラミッド
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-19 12:43:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 516 bytes |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-31 11:30:05 |
| 合計ジャッジ時間 | 1,813 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
n_w = int(input())
w_blocks = [int(i) for i in input().split()]
n_b = int(input())
b_blocks = [int(i) for i in input().split()]
w_blocks.sort(reverse=True)
b_blocks.sort(reverse=True)
def solve(col, size):
if col == 'w':
for w in w_blocks:
if w < size:
return solve('b', w) + 1
else:
for b in b_blocks:
if b < size:
return solve('w', b) + 1
return 0
w_start = solve('w', 21)
b_start = solve('b', 21)
print(max(w_start, b_start))