結果
問題 | No.989 N×Mマス計算(K以上) |
ユーザー |
![]() |
提出日時 | 2020-04-21 10:11:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 354 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,696 KB |
最終ジャッジ日時 | 2024-10-07 16:19:33 |
合計ジャッジ時間 | 3,032 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
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=n*m for i in range(n): cnt-=bisect_left(b,k-a[i]) print(cnt) else: cnt=n*m for i in range(n): cnt-=bisect_left(b,k/a[i]) print(cnt)