博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cf C. Magic Formulas
阅读量:4699 次
发布时间:2019-06-09

本文共 666 字,大约阅读时间需要 2 分钟。

http://codeforces.com/contest/424/problem/C

1 #include 
2 #include
3 #include
4 #include
5 #define maxn 1000001 6 using namespace std; 7 8 int f[maxn],n; 9 long long a[maxn];10 void inti()11 {12 f[0]=0;13 f[1]=1;14 for(int i=2; i<=maxn; i++)15 {16 f[i]=f[i-1]^i;17 }18 }19 int main()20 {21 inti();22 scanf("%d",&n);23 cin>>a[0];24 long long sum=a[0];25 for(int i=1; i
>a[i];28 sum^=a[i];29 }30 for(int i=0; i
View Code

 

转载于:https://www.cnblogs.com/fanminghui/p/3698069.html

你可能感兴趣的文章
Java parseInt()方法
查看>>
yahoo的30条优化规则
查看>>
[CCF2015.09]题解
查看>>
[NYIST15]括号匹配(二)(区间dp)
查看>>
json_value.cpp : fatal error C1083: 无法打开编译器生成的文件:No such file or directory
查看>>
洛谷 P1101 单词方阵
查看>>
Swift DispatchQueue
查看>>
C#和JAVA 访问修饰符
查看>>
小甲鱼OD学习第1讲
查看>>
HDU-1085 Holding Bin-Laden Captive-母函数
查看>>
php提示undefined index的几种解决方法
查看>>
LRJ
查看>>
Struts2环境搭建
查看>>
Linux: Check version info
查看>>
stl学习之测试stlen,cout等的运行速度
查看>>
魔戒三曲,黑暗散去;人皇加冕,光明归来
查看>>
Error和Exception
查看>>
Python和Singleton (单件)模式[转载]
查看>>
httpclient设置proxy与proxyselector
查看>>
IT常用单词
查看>>