水题,注意数据范围

#include <iostream>
using namespace std; int main(){
long long n,a;
cin >> n;
long long sum =(n*(n+))>>;
for(int i = ; i < n- ; ++i){
cin >>a;
sum -=a;
}
cout<<sum<<endl;
}

Codeforces Testing Round #10 A. Forgotten Episode的更多相关文章

  1. Codeforces Testing Round #10 B. Balancer

    水题,只要遍历一遍,不够平均数的,从后面的借,比平均数多的,把多余的数添加到后面即可,注意数据范围 #include <iostream> #include <vector> ...

  2. Codeforces Beta Round #10 D. LCIS

    题目链接: http://www.codeforces.com/contest/10/problem/D D. LCIS time limit per test:1 secondmemory limi ...

  3. Codeforces Beta Round #10 D. LCIS 动态规划

    D. LCIS 题目连接: http://www.codeforces.com/contest/10/problem/D Description This problem differs from o ...

  4. Codeforces Beta Round #10 C. Digital Root 数学

    C. Digital Root 题目连接: http://www.codeforces.com/contest/10/problem/C Description Not long ago Billy ...

  5. Codeforces Beta Round #10 B. Cinema Cashier 暴力

    B. Cinema Cashier 题目连接: http://www.codeforces.com/contest/10/problem/B Description All cinema halls ...

  6. Codeforces Beta Round #10 A. Power Consumption Calculation 水题

    A. Power Consumption Calculation 题目连接: http://www.codeforces.com/contest/10/problem/A Description To ...

  7. Codeforces Testing Round #12 C. Subsequences 树状数组维护DP

    C. Subsequences Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/597/probl ...

  8. Codeforces Testing Round #12 A. Divisibility 水题

    A. Divisibility Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/597/probl ...

  9. Codeforces Testing Round #12 C. Subsequences 树状数组

    C. Subsequences     For the given sequence with n different elements find the number of increasing s ...

随机推荐

  1. jq div鼠标放上、离开马上展开、收缩方法

    <body> <div id="aa" style="width:500px; height:30px; border:1px solid #000&q ...

  2. 设置tomcat内存设定

    Linux: 在/usr/local/apache-tomcat-/bin 目录下的catalina.sh添加: JAVA_OPTS='-Xms512m -Xmx1024m'要加"m&quo ...

  3. Tomcat的Session管理机制

    >>Session和Cookie请求的过程 Http连接本身是无状态的,即前一次发起的连接跟后一次没有任何关系,是属于两次独立的连接请求,但是互联网访问基本上都是需要有状态的,即服务器需要 ...

  4. php获取一维,二维数组长度的方法(有实例)

    在php中获取数组长度方法很简单,php为我们提供了两个函数可以计算一维数组长度,如count,sizeof都可以直接统计数组长度哦,下面我们来看几个实例吧.php如何获取数组的长度,使用php函数c ...

  5. 使用RMAN DUPLICATE...FROM ACTIVE DATABASE创建物理standby database

    Applies to: Oracle Server - Enterprise Edition - Version 11.1.0.6 to 11.2.0.4 [Release 11.1 to 11.2] ...

  6. jQuery easyUI datagrid 增加求和统计行 分类: JavaScript 2015-01-14 17:46 2178人阅读 评论(0) 收藏

    在datagrid的onLoadSuccess事件增加代码处理. <style type="text/css"> .subtotal { font-weight: bo ...

  7. C++中引用(&)的用法和应用实例

    转自:http://www.cnblogs.com/Mr-xu/archive/2012/08/07/2626973.html 对于习惯使用C进行开发的朋友们,在看到c++中出现的&符号,可能 ...

  8. JQuery EasyUI validatebox(验证框)

    JQuery EasyUI validatebox(验证框) http://www.easyui.info/archives/602.html

  9. jackson对多态or多子类序列化的处理配置

    [TOC] Jackson Jackson可以轻松的将Java对象转换成json对象和xml文档,同样也可以将json.xml转换成Java对象. 多态类型的处理 jackson允许配置多态类型处理, ...

  10. UVA 12901 Refraction 数学

    题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=83008#problem/E Description HINT 题意: 给你一个 ...