結果
問題 | No.110 しましまピラミッド |
ユーザー |
![]() |
提出日時 | 2016-05-16 20:40:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 637 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-31 11:19:40 |
合計ジャッジ時間 | 1,954 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 == []:breaki = max(next_color)m.append(i)base = [s for s in base if s < i]if base == []:breaki = max(base)m.append(i)return len(m)WC = W[:]BC = B[:]if __name__ == '__main__':white = get_height(WC, BC)black = get_height(BC, WC)print(max(white, black))