Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Double Nesting Monte Carlo && Greedy

Revision en1, by yawn_lento, 2026-07-24 05:57:03

Using two layer of Monte Carlo and Greey algorithm, I managed to gain AC, though still achievable at small numbers.

below are my codes in Github:https://github.com/yawn-lento/yawn-s-codes/blob/main/P1004%20%E5%8F%8C%E5%B1%82%E9%9A%8F%E6%9C%BA%E5%B5%8C%E5%A5%97%E5%B0%9D%E8%AF%95.cpp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English yawn_lento 2026-07-24 06:03:05 8 Tiny change: ' Output:\n\n67\nCons' -> ' Output:\n67\nCons'
en2 English yawn_lento 2026-07-24 06:01:56 1072 Tiny change: 'in Github:https://gi' -> 'in Github:\n\nhttps://gi'
en1 English yawn_lento 2026-07-24 05:57:03 322 Initial revision (published)