Hououin Kyouma !

This is an interactive problem!

Okabe Rintarou, the mad scientist is doing research to find the most desired Steins Gate. Besides being a mad scientist, he is a student too. As a result, he has to attend online classes. Class $i$ occurs between $B_{i}$th hour and $E_{i}$th hour ($B_i \leq E_i$). That is to say, Class $i$ begins at $B_i$th hour and ends at $E_i$th hour. [N.B: $B_i$th hour and $E_i$th hour are considered as class hours too.]


This is a companion discussion topic for the original entry at https://toph.co/p/hououin-kyouma