![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
博弈论_习题
yurio7r
ipy8pyp
展开
-
51nod 1069 Nim游戏
奇异局势的判定。#include const int MAX = 1e3 + 5;int arr[MAX];int main(){ int num; std::cin >> num; for (int i = 1; i <= num; ++i) { if(i == 1) { std::cin >> arr[i]; continue; } else原创 2016-03-04 09:54:11 · 579 阅读 · 0 评论 -
51nod 1066 Bash游戏
博弈论问题。#include int main(){ int t; std::cin >> t; while (t--) { int n, k; std::cin >> n >> k; if (n % (k + 1) == 0) std::cout << "B\n"; else std::cout << "A\n"; } return 0;}原创 2016-03-03 23:37:05 · 300 阅读 · 0 评论 -
51nod 1072 威佐夫游戏
简单的博弈论问题#include #include #include using namespace std;int main(){ int t; cin >> t; while (t--) { int a, b; cin >> a >> b; double t = (sqrt(5.0) + 1) / 2.0; if (a > b) { int原创 2016-03-04 13:39:03 · 552 阅读 · 0 评论