Блог пользователя debugger2017

Автор debugger2017, история, 10 лет назад, По-английски

Given an array, find the number of increasing sub-sequences having GCD=1 Example: A={1, 2, 3} Output: 5 The increasing sub-sequences are {1},{1,2},{1,2,3},{1,3},{2,3} The only approach I can think is to try all the possible sub-sequences and calculate their GCD.

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

»
10 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +21 Проголосовать: не нравится

UPD: contest is over, if you know how to solve this task, I'd like to know either.