Aneesh HiregangeViolet on Codeforces · 3y

This problem has a greedy solution.. But apparently there is a DFS solution, which I am unable to get. Can anyone help?

Greedy Solution:

Hint 1:

Hint 2:

Solution:

Read more… (167 words)

Active In

Competitive Programming

Indian Computing Olympiad (ICO)

Deep Learning

Artificial Intelligence

House of Cards

Featured Contributions

comment in this discussion

Aneesh HiregangeViolet on Codeforces · 3y

This problem has a greedy solution.. But apparently there is a DFS solution, which I am unable to get. Can anyone help?

Greedy Solution:

Hint 1:

Hint 2:

Solution:

Read more… (167 words)