随笔分类 - 博弈论
摘要:#include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> #include<iterator> #include<set> #include<stack> #
阅读全文
摘要:#include <cstring> #include <iostream> #include <algorithm> #include <unordered_set> using namespace std; const int N = 110; int n; int f[N]; int sg(i
阅读全文
摘要://a1 ^ a2 ^ ··· ^ an = 0 –>先手必败; //a1 ^ a2 ^ ··· ^ an != 0 –>先手必胜; #include<iostream> using namespace std; int main() { int n; cin >> n; int res = 0;
阅读全文
摘要:#include<iostream> using namespace std; int n; int main() { cin>>n; int res=0; for(int i=1; i<=n; i++) { int x; cin>>x; if(i%2) res=res^x;//判断是不是奇数 }
阅读全文
摘要://只能拿某些特定个数的石子 #include <cstring> #include <iostream> #include <algorithm> #include <unordered_set> using namespace std; const int N = 110, M = 10010;
阅读全文