第一行输入整数
— 测试用例数量。
接下来
行,每行五个整数
。
对于每个用例输出一行,一个整数表示同时刷过全部三部曲的人数。
1 28 16 16 22 12
7
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while(t--) {
int n, a, b, c, d;
cin >> n >> a >> b >> c >> d;
cout << (a + b + c - d - n) / 2 << endl;
}
return 0;
}