結果

問題 No.989 N×Mマス計算(K以上)
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-12 23:06:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 11,908 KB
実行使用メモリ 18,680 KB
最終ジャッジ日時 2023-10-20 02:45:19
合計ジャッジ時間 2,884 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,080 KB
testcase_01 AC 29 ms
10,080 KB
testcase_02 AC 30 ms
10,148 KB
testcase_03 AC 31 ms
10,148 KB
testcase_04 AC 32 ms
10,084 KB
testcase_05 AC 31 ms
10,080 KB
testcase_06 WA -
testcase_07 AC 29 ms
10,084 KB
testcase_08 WA -
testcase_09 AC 30 ms
10,084 KB
testcase_10 AC 109 ms
14,848 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 65 ms
15,452 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 97 ms
14,408 KB
testcase_17 AC 64 ms
15,448 KB
testcase_18 AC 83 ms
12,000 KB
testcase_19 AC 94 ms
17,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
from operator import add, mul
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n, m, k = map(int, input().split())
op, *B = input().split()
B = list(map(int, B))
A = [int(input()) for _ in range(n)]

B.sort()

ans = 0
if op == "+":
    for a in A:
        ans += m - bisect.bisect_left(B, k - a)
    print(ans)
else:
    for a in A:
        ans += m - bisect.bisect_left(B, k // a)
    print(ans)
0