You have n courses. Each course can be scheduled in morning slot or afternoon slot. Some pairs conflict: they cannot both be in the same slot because they share a room. Model this as -SAT where x_i is true if course i is in the morning.
Conflicts give you clauses: cannot both be morning (NOT x_i OR NOT x_j) or cannot both be afternoon (x_i OR x_j). Build the implication graph and solve using SCCs. Find a valid schedule or determine it is impossible.