420yoloswag69's blog

By 420yoloswag69, history, 9 years ago, In English

Hi any ways to check whether an array (1e5 items at most) has an arithmetic progression as a subsequence and output their positions?

for example 5

3 4 2 1 5

output 1 3 4

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Any two numbers form an arithmetic progression.

If you want 3 numbers, it seems like a harder version of 452F - Перестановка.