Students Unable to Eat Lunch
Students (0/1 preferences) queue for a stack of sandwiches (0/1). The student at the front takes the top sandwich if it matches, otherwise goes to the back. Print how many students never get a sandwich.
Constraints
1 <= n <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.