// // main.cpp // haha // // Created by 王元玮 on 16/2/19. // Copyright © 2016年 王元玮. All rights reserved. // #include #include #include #include #define RANGE 1005 #define INF 0x7fffffff using namespace std; int main() { long long n,m,ans; int t; scanf("%d",&t); while(t--){ scanf("%lld%lld",&n,&m); ans = n/2 + m/2; printf("%lld\n",ans); } return 0; }