As we all know, there is no breakfast for college students. And during Little Gyro's vacation, this kind of situation seems to be especially common.
It contains three meals in one day. Every day there includes breakfast, lunch and supper(Of course, always in this order) prepared by Little Gyro's parents Mr./Mrs. Potato. But Little Gyro sometimes missed some of them. The only thing that Little Gyro could remember till now is how many times he had breakfast, lunch and supper, which Mrs. Potato told him.
Little Gyro couldn't exactly remember the time when he went back home(before breakfast, before lunch, before supper or after supper), and the time when he went to school(before breakfast, before lunch, before supper or after supper). So he considers any of these options. After Little Gyro went back home, he was at home all the time until he went to school.
Please note, it's possible that Little Gyro might have left home on the same day he arrived.
According to Little Gyro's mother Mrs. Potato told him, you are asked to help Little Gyro find the minimum number of meals he might forget. You shouldn't count the missed meals on the arrival day before Little Gyro's arrival and the departure day after he left home.
输入描述:
There are multiple test cases. The first line of the input contains an integer T (1 ≤ T ≤ 1000), indicating the number of test cases. For each test case:
Each line contains three integers b, l and s (0 ≤ b,d,s ≤
), indicating the number of breakfast, lunch and supper which Little Gyro had taken during his vacation.
输出描述:
For each case, output the minimum number of the meals which Little Gyro might forget during his vacation.