模拟
#include<iostream>
#include<string>
using namespace std;
int main(){
int T;
cin >> T;
getchar();
while(T --){
string s1, s2;
getline(cin, s1);
int a = stoi(s1.substr(0, 2)) * 3600 + stoi(s1.substr(3, 2)) * 60 + stoi(s1.substr(6, 2));
int b = stoi(s1.substr(9, 2)) * 3600 + stoi(s1.substr(12, 2)) * 60 + stoi(s1.substr(15, 2));
if(s1.size() == 22){
if(s1[20] == '1'){
b += 24 * 3600;
}
else{
b += 48 * 3600;
}
}
getline(cin, s2);
int c = stoi(s2.substr(0, 2)) * 3600 + stoi(s2.substr(3, 2)) * 60 + stoi(s2.substr(6, 2));
int d = stoi(s2.substr(9, 2)) * 3600 + stoi(s2.substr(12, 2)) * 60 + stoi(s2.substr(15, 2));
if(s2.size() == 22){
if(s2[20] == '1'){
d += 24 * 3600;
}
else{
d += 48 * 3600;
}
}
int t = (b - a + d - c) / 2;
printf("%02d:%02d:%02d\n", t / 3600, t % 3600 / 60, t % 60);
}
return 0;
}