Нужна помошь в решние задачи

Revision en1, by HCCoder, 2025-07-10 19:23:21

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

Tags problem, hard problem, help, interesting problem

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English HCCoder 2025-07-10 19:24:28 1
en2 English HCCoder 2025-07-10 19:23:51 48
en1 English HCCoder 2025-07-10 19:23:21 349 Initial revision for English translation
ru1 Russian HCCoder 2025-07-10 19:20:22 337 Первая редакция (опубликовано)