結果

問題 No.110 しましまピラミッド
ユーザー DexctersuDexctersu
提出日時 2017-12-24 23:54:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 569 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2023-08-22 18:06:52
合計ジャッジ時間 2,022 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 15 ms
7,884 KB
testcase_02 AC 14 ms
7,808 KB
testcase_03 AC 14 ms
7,712 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,820 KB
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 AC 15 ms
7,892 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 RE -
testcase_14 WA -
testcase_15 RE -
testcase_16 WA -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 WA -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n_w=int(input())
w=list(map(int,input().split()))
n_b=int(input())
b=list(map(int,input().split()))
w.sort()
b.sort()
w.reverse()
b.reverse()
array=[]
if b[0]<=w[0]:
    array.append(w[0])
    for i in range(min(n_b,n_w)):
        if b[i]<array[i]:
            array.append(b[i])
            if w[i+1]<array[i+1]:
                array.append(w[i+1])
if w[0]<=b[0]:
    array.append(b[0])
    for i in range(min(n_b,n_w)):
        if w[i]<array[i]:
            array.append(w[i])
            if b[i+1]<array[i+1]:
                array.append(b[i+1])
print(len(array))
0