結果

問題 No.200 カードファイト!
ユーザー roiti46roiti46
提出日時 2015-04-29 00:34:39
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 6,488 KB
実行使用メモリ 6,096 KB
最終ジャッジ日時 2023-09-18 14:37:48
合計ジャッジ時間 1,499 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 12 ms
5,912 KB
testcase_04 AC 11 ms
6,080 KB
testcase_05 AC 11 ms
5,892 KB
testcase_06 AC 11 ms
5,880 KB
testcase_07 AC 12 ms
6,020 KB
testcase_08 AC 12 ms
5,972 KB
testcase_09 WA -
testcase_10 AC 11 ms
5,992 KB
testcase_11 AC 12 ms
5,968 KB
testcase_12 AC 11 ms
5,876 KB
testcase_13 AC 11 ms
6,072 KB
testcase_14 AC 11 ms
5,896 KB
testcase_15 AC 11 ms
5,988 KB
testcase_16 AC 11 ms
5,924 KB
testcase_17 AC 11 ms
5,972 KB
testcase_18 AC 12 ms
6,024 KB
testcase_19 AC 11 ms
6,048 KB
testcase_20 AC 12 ms
6,096 KB
testcase_21 AC 12 ms
5,988 KB
testcase_22 AC 11 ms
6,076 KB
testcase_23 AC 11 ms
5,928 KB
testcase_24 AC 11 ms
6,084 KB
testcase_25 AC 11 ms
6,064 KB
testcase_26 AC 11 ms
6,048 KB
testcase_27 AC 11 ms
5,968 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N = int(raw_input())
A = int(raw_input())
B = sorted(map(int, raw_input().split()))
C = int(raw_input())
D = sorted(map(int, raw_input().split()))

ans = 0
b = B[:]
d = D[:]
for i in xrange(N):
    if i % A == 0: b = B[:]
    if i % C == 0: d = D[:]
    if max(b) <= min(d):
        b.pop(0)
        d.pop()
        continue
    for j in xrange(len(b)):
        pos = bisect.bisect_right(d, b[j])
        if pos > 0:
            b.pop(j)
            d.pop(pos - 1)
            break
    ans += 1
print ans
0