Construction Problem

Правка en1, от iLoveIOI, 2020-04-24 12:49:34

Given n<=1000000 and k<=n*(n-1)/2 construct a sequence of length n that has exactly k inversions. How do I solve this? Thanks!

Теги #constructive algorithms

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский iLoveIOI 2020-04-24 12:49:34 148 Initial revision (published)