'commit'
This commit is contained in:
20
TangDou/AcWing_TiGao/T5/GameTheory/HDU1730.cpp
Normal file
20
TangDou/AcWing_TiGao/T5/GameTheory/HDU1730.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
int main() {
|
||||
int n, m;
|
||||
while (~scanf("%d %d", &n, &m)) {
|
||||
int res = 0;
|
||||
for (int i = 1; i <= n; ++i) {
|
||||
int a, b;
|
||||
scanf("%d %d", &a, &b);
|
||||
// 两个棋子的距离的绝对值减1.因为我们看当两个棋子相邻的时候,
|
||||
// 已经是一个必败态了。不信我贴着你,你走吧。你走一步我跟一步,最后你将无路路可走
|
||||
res = res ^ (abs(a - b) - 1);
|
||||
}
|
||||
if (res == 0)
|
||||
puts("BAD LUCK!");
|
||||
else
|
||||
puts("I WIN!");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user