結果

問題 No.949 飲酒プログラミングコンテスト
ユーザー titiatitia
提出日時 2019-12-12 00:12:13
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 778 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 8,828 KB
最終ジャッジ日時 2023-09-06 13:35:05
合計ジャッジ時間 2,504 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,824 KB
testcase_01 AC 15 ms
7,760 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 AC 14 ms
7,800 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 14 ms
7,912 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,828 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 16 ms
8,292 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 17 ms
8,464 KB
testcase_18 AC 21 ms
8,720 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 15 ms
7,768 KB
testcase_24 AC 19 ms
8,616 KB
testcase_25 WA -
testcase_26 AC 21 ms
8,828 KB
testcase_27 WA -
testcase_28 AC 21 ms
8,612 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 19 ms
8,608 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
D=sorted(map(int,input().split()),reverse=True)

ind=0
inda=0
indb=0
ANS=0

while ind<N:
    #print(ind,inda,indb)
    if A[inda]-A[inda+1]<=B[indb]-B[indb+1]:
        inda+=1

    else:
        indb+=1

    while ind<N and A[inda]+B[indb]<D[ind]:
        ind+=1

    if ind <N and A[inda]+B[indb]>=D[ind]:
        ind+=1
        ANS+=1
    else:
        break

print(ANS)
0