結果

問題 No.110 しましまピラミッド
ユーザー titia
提出日時 2022-01-31 02:04:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-11 08:37:48
合計ジャッジ時間 2,185 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 14 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

a=int(input())
W=list(map(int,input().split()))
b=int(input())
B=list(map(int,input().split()))

W=[(w,0) for w in W]
B=[(b,1) for b in B]

A=W+B
A.sort()

ANS=1
now=A[0][1]

for i in range(1,len(A)):
    if A[i][0]!=A[i-1][0] and A[i][1]!=now:
        ANS+=1
        now^=1

print(ANS)
0