The task is adapted from HDOJ 6701 - Make Rounddog Happy. Bobo has a sequence of integers a1, a2, ... , anand an integer m. Let f be the number of i where 1 ≤ i≤ j and max{ai, ... , aj} - ≥ m hold. Find the value of f, ... , f.
The task is adapted from HDOJ 6701 - Make Rounddog Happy. Bobo has a sequence of integers a1, a2, ... , an and an integer m. Let f(j) be the number of i where 1 ≤ i ≤ j and max{ai, ... , aj} - (j - i + 1) ≥ m hold. Find the value of f(1), ... , f(n).
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。