Sleepy Classroom
CodeChefOpen on judge ↗
A classroom has N seats, each having a student. A student can be either Attentive (Denoted by A) or Sleeping (Denoted by S). A class is held as long as there is at least a single Attentive student. Given the number of seats (N) you are to find the number of arrangements in the class can be conducted. For simplicity it is assumed that the seats are arranged in a line. Input Format The first line
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