码迷,mamicode.com
首页 > 其他好文 > 详细

Codeforces Round #251 (Div. 2) A - Devu, the Singer and Churu, the Joker

时间:2014-06-09 13:05:02      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

水题

bubuko.com,布布扣
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n,d,t;
    cin >> n >> d;
    for(int i = 0 ; i < n; ++ i){
        cin >> t;
        d-=t;
    }
    d-=(n-1)*10;
    if(d < 0) cout<<-1<<endl;
    else cout<<(n-1)*2+d/5<<endl;
}
bubuko.com,布布扣

 

Codeforces Round #251 (Div. 2) A - Devu, the Singer and Churu, the Joker,布布扣,bubuko.com

Codeforces Round #251 (Div. 2) A - Devu, the Singer and Churu, the Joker

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/xiongqiangcs/p/3776927.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!