Codeforces 439A Devu, the Singer and Churu, the Joker
2014-06-05 22:37
316 查看
题目链接:Codeforces 439A Devu, the Singer and Churu, the Joker
#include <iostream> #include <cstdio> using namespace std; int main() { int n, d, sum = 0, arr[120]; scanf("%d%d", &n, &d); for(int i = 0; i < n; i++) { scanf("%d", &arr[i]); sum += arr[i]; } if(sum + (n - 1) * 10 > d) puts("-1"); else printf("%d\n", (d - (sum + (n - 1) * 10)) / 5 + (n - 1) * 10 / 5); return 0; }
相关文章推荐
- codeforces 439A Devu, the Singer and Churu, the Joker
- Codeforces 439A Devu, the Singer and Churu, the Joker
- Codeforces 439 A. Devu, the Singer and Churu, the Joker
- codeforces—— 439A —— Devu, the Singer and Churu, the Joker
- Codeforces 439A, the Singer and Churu, the Joker(水题)
- Codeforces Round #251 (Div. 2) A - Devu, the Singer and Churu, the Joker
- A. Devu, the Singer and Churu, the Joker
- Codeforces Round #251(Div. 2) 439A. Devu, the Singer and Churu, the Joker 水题
- Devu, the Singer and Churu, the Joker
- codeforces 602 E. Kleofáš and the n-thlon (概率dp)
- codeforces 289 B. Polo the Penguin and Matrix
- codeforces 251 div2 C. Devu and Partitioning of the Array 模拟
- H - The Child and Toy-CodeForces 437C-水题
- G - The Child and Set-CodeForces 437B-水题
- Codeforces 601C Kleofáš and the n-thlon(dp)
- Codeforces 556A:Case of the Zeros and Ones
- codeforces --- Round #250 (Div. 2) B. The Child and Set
- codeforces 289 B. Polo the Penguin and Matrix
- Codeforces 336A【 Vasily the Bear and Triangle 】
- Codeforces 189 C. Kalila and Dimna in the Logging Industry