CF55C. Pie or die

 1 /*
 2  CF55C. Pie or die
 3  http://codeforces.com/problemset/problem/55/C
 4  博弈论 乱搞
 5  获胜条件是存在一个棋子到边界的值小于5
 6  */
 7 #include <cstdio>
 8 int main()
 9 {
10     int n,m,k;
11     scanf("%d%d%d",&n,&m,&k);
12     int x,y;
13     int ans=0;
14     while(k--)
15     {
16         scanf("%d%d",&x,&y);
17         if(x>=n-4 || x<=5 || y>=m-4 || y<=5)
18             ans=1;
19     }
20     if(ans)
21         printf("YES
");
22     else
23         printf("NO
");
24     return 0;
25 }
原文地址:https://www.cnblogs.com/BBBob/p/6627454.html