摘要: #include <cstring> #include <iostream> #include <algorithm> #include <unordered_set> using namespace std; const int N = 110; int n; int f[N]; int sg(i 阅读全文
posted @ 2019-11-23 17:43 晴屿 阅读(174) 评论(0) 推荐(0)
摘要: //a1 ^ a2 ^ ··· ^ an = 0 –>先手必败; //a1 ^ a2 ^ ··· ^ an != 0 –>先手必胜; #include<iostream> using namespace std; int main() { int n; cin >> n; int res = 0; 阅读全文
posted @ 2019-11-23 17:42 晴屿 阅读(96) 评论(0) 推荐(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;//判断是不是奇数 } 阅读全文
posted @ 2019-11-23 17:42 晴屿 阅读(141) 评论(0) 推荐(0)
摘要: //只能拿某些特定个数的石子 #include <cstring> #include <iostream> #include <algorithm> #include <unordered_set> using namespace std; const int N = 110, M = 10010; 阅读全文
posted @ 2019-11-23 17:42 晴屿 阅读(104) 评论(0) 推荐(0)
摘要: #include<iostream> #include<math.h> using namespace std ; const int N=1001; int n; bool st[N]; double x[N]; double y[N]; double dis[N][N]; double ans= 阅读全文
posted @ 2019-11-23 01:04 晴屿 阅读(162) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=1010; int y[N][N]; int n; int a[N]; bool st[N]; int sum; bool flag; void print() { for(int i=1; i 阅读全文
posted @ 2019-11-23 00:05 晴屿 阅读(134) 评论(0) 推荐(0)