結果

問題 No.949 飲酒プログラミングコンテスト
ユーザー YamadaYamada
提出日時 2019-12-12 19:00:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 10,816 KB
実行使用メモリ 8,804 KB
最終ジャッジ日時 2023-09-07 18:51:26
合計ジャッジ時間 2,019 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,812 KB
testcase_01 AC 15 ms
7,820 KB
testcase_02 AC 15 ms
7,896 KB
testcase_03 AC 16 ms
7,828 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,812 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,796 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 17 ms
8,248 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 17 ms
8,428 KB
testcase_18 AC 20 ms
8,652 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 16 ms
7,804 KB
testcase_24 AC 19 ms
8,488 KB
testcase_25 WA -
testcase_26 AC 20 ms
8,800 KB
testcase_27 WA -
testcase_28 AC 20 ms
8,492 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 19 ms
8,780 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(i)for i in input().split()]
B = [int(i)for i in input().split()]
D = [int(i)for i in input().split()]
D.sort(reverse=True)
A.append(0)
B.append(0)
nowa = A.pop(0)
nowb = B.pop(0)
ans = 0
def kousin():
    global nowa,nowb,A,B
    if nowa -A[0] < nowb -B[0]:
        nowa = A.pop(0)
    else:
        nowb = B.pop(0)
    return False


kousin()
for i in D:
    if i <= nowa +nowb:
        ans += 1
        kousin()


print(ans)
0