随笔分类 - 博弈
摘要:link class Solution { public: struct State{ int mpos; int cpos; int turn; int win; State(int m, int c, int t, int w){ mpos=m; cpos=c; turn=t; win=w; }
阅读全文
摘要:link #include <bits/stdc++.h> # define LL long long using namespace std; struct Edge{ int to; int next; }e1[500010], e2[500010]; int head1[100010]; in
阅读全文
摘要:题目链接 题目描述 输入k及k个整数n1,n2,…,nk,表示有k堆火柴棒,第i堆火柴棒的根数为ni;接着便是你和计算机取火柴棒的对弈游戏。取的规则如下:每次可以从一堆中取走若干根火柴,也可以一堆全部取走,但不允许跨堆取,也不允许不取。 谁取走最后一根火柴为胜利者。 编一个程序,在给出初始状态之后,
阅读全文

浙公网安备 33010602011771号