結果

問題 No.989 N×Mマス計算(K以上)
ユーザー rkyiolklorkyiolklo
提出日時 2020-04-21 10:06:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 20,824 KB
最終ジャッジ日時 2024-04-16 17:31:30
合計ジャッジ時間 3,993 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
10,880 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k=map(int,input().split())
c=list(map(str,input().split()))
a=[0]*(n)
for i in range(n):
    a[i]=int(input())
op=c[0]
b=[0]*m
for i in range(m):
    b[i]=int(c[i+1])
a.sort()
b.sort()
from bisect import bisect_left
if op=='+':
    cnt=0
    for i in range(n):
        cnt+=bisect_left(b,k-a[i])
    print(cnt)
else:
    cnt=0
    for i in range(n):
        cnt+=bisect_left(b,k/a[i])
    print(cnt) 
0