結果

問題 No.989 N×Mマス計算(K以上)
コンテスト
ユーザー cologne
提出日時 2025-12-03 15:29:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,584 KB
実行使用メモリ 93,232 KB
最終ジャッジ日時 2025-12-03 15:30:00
合計ジャッジ時間 2,342 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
from bisect import bisect_right


def input(): return sys.stdin.readline().rstrip('\n')


def main():
    n, m, k = map(int, input().split())
    op, *b = input().split()
    *b, = sorted(map(int, b))
    ans = 0
    for _ in range(n):
        a = int(input())
        targ = (k - 1) // a if op == '*' else k - 1 - a
        ans += m - bisect_right(b, targ)

    return ans


if __name__ == '__main__':
    ret = main()
    if ret is not None:
        print(ret)
0