C. Pie or die Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/55/problem/C Description Volodya and Vlad play the following game. There are k pies at the cells of n × m board. Each turn Volodya moves one pie to the neighbo…
/* CF55C. Pie or die http://codeforces.com/problemset/problem/55/C 博弈论 乱搞 获胜条件是存在一个棋子到边界的值小于5 */ #include <cstdio> int main() { int n,m,k; scanf("%d%d%d",&n,&m,&k); int x,y; ; while(k--) { scanf("%d%d",&x,&y);…
http://codeforces.com/problemset/problem/55/C 题意:一个博弈. 题解:瞎猜,目前不清楚原理 #include<iostream> #include<stdio.h> #include<algorithm> using namespace std; typedef long long ll; int main(){ int n,m,k; cin>>n>>m>>k; ; ;i<=k;i+…
做法:先把四个角分别覆盖一条边,于是问题转化为判断离边最近的一个点是否离边的距离大于等于4 #include<iostream> #include<cstdio> #include<cstring> using namespace std; int n,m,k,x,y; int main(){ scanf("%d%d%d",&n,&m,&k); ;i<=k;i++){ scanf("%d%d",&am…