結果
| 問題 | No.2500 Products in a Range |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-13 21:31:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 639 bytes |
| 記録 | |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 86,912 KB |
| 最終ジャッジ日時 | 2026-04-04 20:49:24 |
| 合計ジャッジ時間 | 7,129 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 48 WA * 13 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#n = int(input())
#
#alist = []
#s = input()
n,l,r = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
alist = list(map(int,input().split()))
alist.sort()
ans = 1
temp = 1
mi = -1
for i in range(n-1):
if l <= alist[i] * alist[i+1] <= r and (mi == -1 or l <= mi * alist[i+1] <= r):
temp += 1
if temp == 2:
mi = alist[i]
else:
ans = max(ans,temp)
temp = 1
mi = -1
ans = max(ans,temp)
#print(alist)
print(ans)