105 teams scored 4040 points on this task, for a maximum score of 100, an average score of 38 and a median score of 10.
You like to take breaks from studying to play your favorite videogame. You plan to take a total of N breaks, numbered from 1 to N. Break i is defined by two integers A_i and B_i, which means that you start playing the game at the beginning of minute A_i, and stop playing at the end of minute B_i, unless you get bored before that. Your friend, Hano, will also take some breaks from studying. Hano plans take a total of M breaks, numbered from 1 to M. Hano's break j is defined by two integers X_j and Y_j, which means that Hano starts playing the game at the beginning of minute X_j and stops playing at the end of minute Y_j. You agreed that whenever both of you are logged in, you team up and play together. There is one problem though, you get bored easily. If you are on a break, and Hano doesn't show up in T minutes, you stop playing the game and end your current break, returning to study...