n不为1的时候输出a[1],否则输出0

#include<cstdio>
#include<cstring>
#include<cmath>
#include<queue>
#include<algorithm>
using namespace std; long long y[]; int main()
{
int n;
int T;
scanf("%d",&T); while(T--)
{
scanf("%d",&n);
long long ans;
for(int i=;i<=n;i++) scanf("%lld",&y[i]);
if(n==) ans=y[];
else ans=;
printf("%lld\n",ans);
}
return ;
}

HDU 5650 so easy的更多相关文章

  1. HDU 5650 so easy 数学

    so easy 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5650 Description Given an array with n integ ...

  2. hdu 5650 so easy (异或)

    我们考虑集合中的每个数x对答案的贡献. 设集合有n个数,则包含x的子集个数有2^(n-1)个. 那么当n > 1时,x出现了偶数次,所以其对答案的贡献就是0:当 n = 1时,其对答案的贡献是 ...

  3. HDU 5572 An Easy Physics Problem (计算几何+对称点模板)

    HDU 5572 An Easy Physics Problem (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5572 Descripti ...

  4. 5650 so easy

    so easy  Accepts: 512  Submissions: 1601  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 6553 ...

  5. hdu 5058 So easy

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5058 So easy Description Small W gets two files. Ther ...

  6. hdu 5475 An easy problem(暴力 || 线段树区间单点更新)

    http://acm.hdu.edu.cn/showproblem.php?pid=5475 An easy problem Time Limit: 8000/5000 MS (Java/Others ...

  7. HDU 5475 An easy problem 线段树

    An easy problem Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pi ...

  8. 数据结构(主席树):HDU 4729 An Easy Problem for Elfness

    An Easy Problem for Elfness Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 65535/65535 K (J ...

  9. HDU 4565 So Easy(矩阵解公式)

    So Easy [题目链接]So Easy [题目类型]矩阵解公式 &题解: 感觉这种类型的题都是一个套路,这题和hdu 2256就几乎是一样的. 所以最后2Xn就是答案 [时间复杂度]\(O ...

随机推荐

  1. LightOJ 1370 Bi-shoe and Phi-shoe 数论

    题目大意:f(x)=n 代表1-x中与x互质的数字的个数.给出n个数字a[i],要求f(x)=a[i],求x的和. 思路:每个素数x 有x-1个不大于x的互质数.则f(x)=a[i],若a[i]+1为 ...

  2. 利用Fiddler抓取手机APP数据包

    Fiddler是一个调试代理,下载地址http://www.telerik.com/download/fiddler 下载安装运行后,查出运行机器的IP,手机连接同一网域内的WIFI,手机WIFI连接 ...

  3. 优化eclipse

    1.取消自动validation windows–>perferences–>validation 除开Manual下面的复选框全部选中之外,其他全部不选 如需验证,在要验证的文件上,单击 ...

  4. 编译使用tinyxml

    环境: win7 32位旗舰版,VS2010,tinyxml_2_6_2版本 1.下载tinyxml,并解压到tinyxml文件夹下 2.生成动态链接库 原生的Tinyxml只支持静态库(没有在.h文 ...

  5. linux的学习系列 10---vi

    Linux下的文本编辑器有很多种,vi 是最常用的,也是各版本Linux的标配.注意,vi 仅仅是一个文本编辑器,可以给字符着色,可以自动补全,但是不像 Windows 下的 word 有排版功能. ...

  6. 使用Qt报错error while building deploying project

    方法一:点击左侧的“项目”栏,看“构建目录”栏的路径,一定要注意,在路径中一定不要出现汉字,否则一定会报“error while building deploying project”的错误. 方法二 ...

  7. 学习笔记——享元模式Flyweight

    Flyweight模式提供对象的复用. FlyweightFactory类似工厂模式中的工厂,生成对象并提供. 区别在于,享元的工厂会记录生成的对象,当第二次请求到相同的对象时,享元不会再生成一个新对 ...

  8. Node.js学习 - CallBack Function

    Node.js异步编程的直接体现就是回调,Node使用了大量的回调函数,其所有的API都支持回调. 阻塞代码实例(同步) var fs = require("fs"); var d ...

  9. The Accumulation of Capital

    The Accumulation of Capital ---- by *Adam Smith Capitals are increased by parsimony, and diminished ...

  10. git rebase 使用

    git rebase 不会取回代码 要用git fetch先取回, git rebase 是合并代码. (1)首先用git fetch返回服务器上的代码 (2)首先用git rebase origin ...