結果
| 問題 |
No.110 しましまピラミッド
|
| コンテスト | |
| ユーザー |
zombietan
|
| 提出日時 | 2016-05-16 20:49:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 612 bytes |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-31 11:19:56 |
| 合計ジャッジ時間 | 2,028 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
nw = int(input())
W = list(map(int, input().split()))
nb = int(input())
B = list(map(int, input().split()))
def get_height(base, next_color):
m = []
i = max(base)
m.append(i)
while True:
next_color = [k for k in next_color if k < i]
if next_color == []:
break
i = max(next_color)
m.append(i)
base = [s for s in base if s < i]
if base == []:
break
i = max(base)
m.append(i)
return len(m)
if __name__ == '__main__':
white = get_height(W, B)
black = get_height(B, W)
print(max(white, black))
zombietan