"""
Exercise 2: Number of Students Unable to Eat Lunch (LeetCode 1700)

students[i] is 0/1 (preferred sandwich); sandwiches is a stack (index 0 is
the top). The front student takes the top sandwich if it matches, otherwise
moves to the back. Stop when nobody wants the top sandwich. Return how many
students can't eat. Simulate with a deque, or count preferences.
"""

def count_students(students, sandwiches):
    # TODO
    return -1


# --- self-check: do not modify below this line ---
a = count_students([1, 1, 0, 0], [0, 1, 0, 1])
b = count_students([1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1])
print(a, b)
print("PASS" if a == 0 and b == 3 else "FAIL")
