結果

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

ソースコード

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

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

print(ANS)
0