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. eclipse提升注解提示速度

    preference--输入content--java--editor--content Assist--aoto delay 选项 改为100或者更低  提示速度              --ao ...

  2. Android OpenGL ES(五)GLSurfaceView .

    Android OpenGL ES 相关的包主要定义在 javax.microedition.khronos.opengles    GL 绘图指令 javax.microedition.khrono ...

  3. jquery 简单的栏目切换

    <style> ul{ list-style:none; padding:0px; margin:0px;} #nav_box{ width:502px; height:402px; ov ...

  4. Converting between IEEE 754 and Float (Format related

    The float can be converted to well known single-precision IEEE 754 number, why 754? It's the standar ...

  5. static方法与非static方法是否可以互相调用

    情况一.static方法调用非static方法 非静态方法只有实例对象才可调用,而静态方法随着类的加载而加载,类的加载在实例对象产生之前,所以静态方法不能调用非静态方法 情况二.非atic方法调用st ...

  6. CI 路由设置

    $route['news/show/(:num)']='news/show/$1';   前边是匹配 网址   后边是  指定控制器 在application/config/文件夹下有routes.p ...

  7. RxSwift 之官方文档

    RxSwift 官方文档结构 Introduction: Subjects Transforming Observables Filtering Observables Combining Obser ...

  8. php实现json

    <?PHP function __json_encode( $data ) { if( is_array($data) || is_object($data) ) { $islist = is_ ...

  9. AngularJS vs. jQuery,看看谁更胜一筹

    http://www.apjs.net/ http://docs.angularjs.cn/api/ng/function 本文由PHP100中文网编译,转载请看文末的转载要求,谢谢合作!除非特别声明 ...

  10. 分类算法-----KNN

    摘要: 所谓K最近邻,就是k个最近的邻居的意思,说的是每个样本都可以用她最接近的k个邻居来代表.kNN算法的核心思想是如果一个样本在特征空间中的k个最相似的样本中的大多数属于某一个类别,则该样本也属于 ...