Two States
CodeChefOpen on judge ↗
In Ancient Greece, Athenians and Spartans are two well known warring Tribes. One the occasion on Carnea, the two warring tribes come and celebrate the festival together. For the festival, the two have to stand in a line of length n (the n people will consist of both Spartans and Athenians without any restriction on number of athenians and spartans) and honor the Greek gods. But Spartans, being jea
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start