@xrlong 同学的
题目链接:http://ybt.ssoier.cn:8088/problem_show.php?pid=1330
代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
for(int i=0;i<2;i++){
int x,y;
scanf("%d%d",&x,&y);
if(max(x,y)<=2){
if(x==2&&y==2) printf("%d\n",3);
else printf("%d\n",2);
continue;
}else if(max(x,y)==3){
printf("%d\n",1);
continue;
}
printf("%d\n",int(max(x-1,y-1)/2.0+0.5));
}
}