Need help solving problems

Правка en2, от HCCoder, 2025-07-10 19:23:51

You are given an array a of length N and an integer k. Your task is to find the number of index pairs (i, j) that satisfy the following conditions:

i < j

k * a[j] * a[i] > max(a[i], a[i+1], ..., a[j])

Input:

N — the length of the array (1 ≤ N ≤ 2 * 10^5) k — an integer (1 ≤ k ≤ 10^4) a[i] ≤ 1e9

Теги problem, hard problem, help, interesting problem

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский HCCoder 2025-07-10 19:24:28 1
en2 Английский HCCoder 2025-07-10 19:23:51 48
en1 Английский HCCoder 2025-07-10 19:23:21 349 Initial revision for English translation
ru1 Русский HCCoder 2025-07-10 19:20:22 337 Первая редакция (опубликовано)