結果

問題 No.989 N×Mマス計算(K以上)
ユーザー convexineqconvexineq
提出日時 2020-02-14 21:31:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 493 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 24,640 KB
最終ジャッジ日時 2024-04-16 01:34:18
合計ジャッジ時間 2,113 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 32 ms
10,752 KB
testcase_02 AC 33 ms
10,752 KB
testcase_03 AC 32 ms
10,752 KB
testcase_04 AC 33 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 30 ms
10,752 KB
testcase_08 WA -
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 107 ms
19,948 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 66 ms
16,020 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 92 ms
18,108 KB
testcase_17 AC 66 ms
15,956 KB
testcase_18 AC 79 ms
15,892 KB
testcase_19 AC 94 ms
19,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,m,k = [int(i) for i in readline().split()]

x = read().split()
op = x[0]

b = list(map(int,x[1:m+1]))
a = list(map(int,x[m+1:]))

#a.sort()
b.sort()

from bisect import bisect_left as bis

#print(op,b,a)
if op == "+":
    ans = 0
    for ai in a:
        ans += m - bis(b,k-ai)

    print(ans)

else:
    ans = 0
    for ai in a:
        ans += m - bis(b,k//ai)

    print(ans)














0