結果
問題 |
No.989 N×Mマス計算(K以上)
|
ユーザー |
|
提出日時 | 2020-04-06 17:01:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 672 bytes |
コンパイル時間 | 76 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 20,332 KB |
最終ジャッジ日時 | 2024-07-06 13:21:30 |
合計ジャッジ時間 | 1,876 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 7 |
ソースコード
MOD = 10 ** 9 + 7 INF = 10 ** 10 import sys input = sys.stdin.readline sys.setrecursionlimit(100000000) dy = (-1,0,1,0) dx = (0,1,0,-1) from bisect import bisect_left,bisect_right def main(): n,m,k = map(int,input().split()) li = input().split() op = li[0] b = [int(li[i]) for i in range(1,len(li))] a = [int(input()) for i in range(n)] a.sort() if op == '+': cnt = 0 for i in range(m): cnt += n - bisect_left(a,k - b[i]) print(cnt) elif op == '*': cnt = 0 for i in range(m): cnt += n - bisect_left(a,k//b[i]) print(cnt) if __name__ =='__main__': main()