水题

#include <iostream>
#include <vector>
#include <algorithm> using namespace std; int main(){
int n,d,t;
cin >> n >> d;
for(int i = ; i < n; ++ i){
cin >> t;
d-=t;
}
d-=(n-)*;
if(d < ) cout<<-<<endl;
else cout<<(n-)*+d/<<endl;
}

Codeforces Round #251 (Div. 2) A - Devu, the Singer and Churu, the Joker的更多相关文章

  1. Codeforces Round#251(Div 2)D Devu and his Brother

    --你以为你以为的.就是你以为的? --有时候还真是 题目链接:http://codeforces.com/contest/439/problem/D 题意大概就是要求第一个数组的最小值要不小于第二个 ...

  2. Codeforces Round #251 (Div. 2) C. Devu and Partitioning of the Array

    注意p的边界情况,p为0,或者 p为k 奇数+偶数 = 奇数 奇数+奇数 = 偶数 #include <iostream> #include <vector> #include ...

  3. Codeforces Round #251 (Div. 2) B. Devu, the Dumb Guy

    注意数据范围即可 #include <iostream> #include <vector> #include <algorithm> using namespac ...

  4. Codeforces Round 251 (Div. 2)

    layout: post title: Codeforces Round 251 (Div. 2) author: "luowentaoaa" catalog: true tags ...

  5. Codeforces 439 A. Devu, the Singer and Churu, the Joker

    这是本人第一次写代码,难免有点瑕疵还请见谅 A. Devu, the Singer and Churu, the Joker time limit per test 1 second memory l ...

  6. Codeforces Round #258 (Div. 2) E. Devu and Flowers 容斥

    E. Devu and Flowers 题目连接: http://codeforces.com/contest/451/problem/E Description Devu wants to deco ...

  7. Codeforces Round #258 (Div. 2)E - Devu and Flowers

    题意:n<20个箱子,每个里面有fi朵颜色相同的花,不同箱子里的花颜色不同,要求取出s朵花,问方案数 题解:假设不考虑箱子的数量限制,隔板法可得方案数是c(s+n-1,n-1),当某个箱子里的数 ...

  8. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  9. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

随机推荐

  1. jQuery积累

    一:Google的CDN(内容分发网络) <head> <script type="text/javascript" src="http://ajax. ...

  2. 如何使用Case进行简单判断

    Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数 CASE sex ' THEN '男' ' THEN '女' ELSE '其他' END --Case搜索函数 ' T ...

  3. Swipe JS – 移动WEB页面内容触摸滑动类库

    想必做移动前端的同学经常会接到这样子的一个需求,就是在移动设备页面上的banner图能够用手指触摸左右或上下的滑动切换,这在移动设备是个很常见的一个效果,其用户体验远甚于点击一个按钮区域,通过手指的触 ...

  4. 记录一次冷备恢复遇到的 ORA-00304问题

    希望通过冷备一个数据库,然后在另外一台数据库进行恢复 1.打tar包 tar -czvf Prod.tar.gz *control01.ctlcontrol02.ctlredo01.logredo02 ...

  5. EasyUI - DataGrid 去右边空白滚动条列 分类: JavaScript 2014-09-03 10:46 1090人阅读 评论(2) 收藏

    熟悉 EasyUI - DataGrid 的童鞋应该会注意到这样一个情景: 想去掉这块,找了下资料,发现也有人同样纠结:http://www.cnblogs.com/hantianwei/p/3440 ...

  6. go-martini 简单分析之二

    martini.go 对路由采用正则表达式处理,最终转化成正则表达式. 添加route对应的调用栈 按照生成,验证,添加的步骤 route := newRoute(method, pattern, h ...

  7. jQuery实现无限加载瀑布流特效

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. JMeter常用字符串相关函数

    JMeter的惯用函数使用-字符串相关 主要的函数如下:1.将字符串转为大写或小写: ${__lowercase(Hello,)}  ${__uppercase(Hello,)}2.生成字符串:  _ ...

  9. nginx 引号 x22

    这个好像是nginx故意这样做的. 因为Nginx默认的log_format使用双引号作为间隔符,为了避免日志分析时候出现混乱,所以将双引号解析为x22了. 只能每天日志切割的时候,自己替换日志中的x ...

  10. 苹果推送(APNs)ios push小结

    把app删除后就推送不成功了,可以看出deviceToken应该是设备+app来一起识别的,重新安装后仍然为同一个 简介 推送服务APNs(Apple Push Notification servic ...