Rikka with Chess
Accepts: 393
Submissions: 548
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65536/65536 K (Java/Others)
把偶数行翻转,把偶数列翻转,即可全部颜色相同。
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int T;
int n,m;
int num;
cin>>T;
while(T--)
{
cin>>n>>m;
num=n/2+m/2;
cout<<num<<endl;
}
}