BZOJ3687【bitset】
来源:互联网 发布:qq飞车天使之翼数据 编辑:程序博客网 时间:2024/04/29 02:06
/* I will wait for you*/#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <algorithm>#include <iostream>#include <fstream>#include <vector>#include <queue>#include <deque>#include <map>#include <set>#include <string>#include <bitset>#define make make_pair#define fi first#define se secondusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair<int,int> pii;const int maxn = 100010;const int maxm = 1010;const int maxs = 26;const int inf = 0x3f3f3f3f;const int P = 1000000007;const double error = 1e-9;inline int read(){int x = 0, f = 1;char ch = getchar();while (ch <= 47 || ch >= 58)f = (ch == 45 ? -1 : 1), ch = getchar();while (ch >= 48 && ch <= 57)x = x * 10 + ch - 48, ch = getchar();return x * f;}int n, ans, sum;bitset<2000000> a;int main(){n = read(), a[0] = 1;for (int i = 1; i <= n; i++) {int num; scanf("%d", &num);sum += num, a ^= (a << num);}for (int i = 1; i <= sum; i++)ans ^= a[i] * i;printf("%d\n", ans);return 0;}
0 0
- BZOJ3687【bitset】
- 【bzoj3687】 简单题 bitset
- 【bzoj3687】【简单题】【bitset】
- 【BZOJ3687】简单题【bitset】
- [BZOJ3687][简单题][Bitset]
- bzoj3687简单题 bitset
- bzoj3687 -- bitset优化DP
- [bzoj3687]简单题 bitset
- bzoj3687 简单题 bitset
- 【bzoj3687】【简单题】bitset
- 【bitset乱搞】BZOJ3687 简单题
- [bzoj3687]简单题(bitset)
- bzoj3687
- BZOJ3687 简单题 解题报告 【递推】【bitset】
- bitset
- bitset
- BitSet
- bitset
- HDOJ 畅通工程 1863(并查集+prim)
- Android点滴---TextView,RadioButton 设置 HTML文本,加载网络图片
- ecshop增加积分记录的相关代码
- IIS 配置PHP 运行环境
- 10个针对企业的免费大数据分析工具
- BZOJ3687【bitset】
- 浩易南:我是怎么赚钱的?
- ASIHTTPRequest 详解, http 请求终结者
- 网易新闻页面信息抓取 -- htmlagilitypack搭配scrapysharp
- Java中 ehcache简单使用实例
- shell从函数文件中调用函数
- openssl主要流程程序代码
- 用java来计算分段函数
- UI随设备旋转从iOS6到iOS8的适配策略