HELP IN 439C

Правка en1, от mercurist, 2021-03-25 15:49:51

Problem Link: 439C - Devu and Partitioning of the Array
My Latest Submission: 110975767

Verdict: WA on tc#60
image

My approach: Create first (k - p) parts using a single odd element in each of them. For the next p parts, treat the first (p - 1) parts separately using odd elements in pairs first, and if we run out of odd elements, use a single even element afterwards. For the last part, display everything that's left.

PS: I know CF blogs aren't the best place for query resolution but it's the only one I've got!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский mercurist 2021-03-25 15:49:51 646 Initial revision (published)