HELP IN 439C

Revision en1, by 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!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English mercurist 2021-03-25 15:49:51 646 Initial revision (published)