結果

問題 No.110 しましまピラミッド
ユーザー titiatitia
提出日時 2022-01-31 02:04:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-09-02 01:58:40
合計ジャッジ時間 1,938 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,964 KB
testcase_01 WA -
testcase_02 AC 15 ms
7,920 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,828 KB
testcase_05 AC 14 ms
7,800 KB
testcase_06 AC 14 ms
7,884 KB
testcase_07 AC 14 ms
7,880 KB
testcase_08 AC 15 ms
7,832 KB
testcase_09 AC 15 ms
7,964 KB
testcase_10 AC 14 ms
7,836 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,996 KB
testcase_13 AC 15 ms
7,992 KB
testcase_14 WA -
testcase_15 AC 15 ms
7,876 KB
testcase_16 AC 15 ms
7,980 KB
testcase_17 WA -
testcase_18 AC 14 ms
7,932 KB
testcase_19 WA -
testcase_20 AC 15 ms
7,988 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 14 ms
7,920 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 14 ms
7,840 KB
権限があれば一括ダウンロードができます

ソースコード

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