题解 CF176C 【Playing with Superglue】

frankchenfu

2018-02-20 21:46:17

Solution

正解:手动模拟,找出规律。至于证明,本人不会,网络上也没有中文博客的可靠资料。 设两个棋子时间曼哈顿距离为`dist1`和`dist2`,那么请注意`dis1==3&&dis2==4`的情况时后手,其余容易模拟得出。 ```cpp #include<cstdio> #include<cstring> unsigned int abs(int x){ return x<0?-x:x; } void swap(int &x,int &y){ int t=x;x=y;y=t; } int main(){ int n,m;scanf("%d%d",&n,&m); int x1,y1,x2,y2;scanf("%d%d%d%d",&x1,&y1,&x2,&y2); int dis1=abs(x1-x2); int dis2=abs(y1-y2); if(dis1>dis2) swap(dis1,dis2); if(dis1>=3&&dis2>=4||(dis1>4||dis2>4)) puts("Second"); else puts("First"); return 0; } ```