結果

問題 No.110 しましまピラミッド
コンテスト
ユーザー roiti46
提出日時 2015-02-10 18:45:26
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 417 bytes
記録
コンパイル時間 134 ms
コンパイル使用メモリ 77,524 KB
最終ジャッジ日時 2025-12-03 13:47:09
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

Nw = int(raw_input())
W = list(set(map(int,raw_input().split())))
Nb = int(raw_input())
B = list(set(map(int,raw_input().split())))
WB = sorted([[w,"w"] for w in W] + [[b,"b"] for b in B])[::-1]

ans = 0
for sp in range(2):
    bar,col = WB[sp]
    tmp = 1
    for i,wb in WB[sp+1:]:
        if wb != col and i < bar:
            tmp += 1
            col = wb
            bar = i
    ans = max(ans,tmp)
print ans
    
0