結果

問題 No.110 しましまピラミッド
コンテスト
ユーザー roiti46
提出日時 2015-02-10 18:45:26
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 58 ms / 5,000 ms
+ 287µs
コード長 417 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 72 ms
コンパイル使用メモリ 81,024 KB
実行使用メモリ 80,640 KB
最終ジャッジ日時 2026-07-17 09:28:25
合計ジャッジ時間 3,604 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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