Codeforces Round #415 (Div. 2) A. Straight «A»
来源:互联网 发布:刘雨晴淘宝卖假货 编辑:程序博客网 时间:2024/06/05 11:03
这次竟然在夜里两点多才开,熬不到。。。。
暴力水过
#include <cstdio>#include <cstring>int n,k;float sum;int mark;bool check(int cnt){ int score = (int)(sum/(cnt+n)+0.5); if(score == k) return true; return false;}int main(){ scanf("%d %d",&n,&k); for(int i = 0; i < n; ++i) { scanf("%d",&mark); sum += mark; } int cnt = 0; while(!check(cnt)) { ++cnt; sum += k; } printf("%d\n",cnt); return 0;}
阅读全文
0 0
- Codeforces Round #415 (Div. 2) A. Straight «A»
- Codeforces Round #415 (Div. 2) A. Straight «A»
- Codeforces Round #415 (Div. 2)A. Straight «A» (暴力)
- Codeforces Round #415 A Straight <<A>>
- 【Codeforces 808 A. Straight «A»】
- codeforces 810A Straight «A»
- Codeforces 810A Straight «A» 题解
- A. Straight «A»
- Cards(Codeforces 701A)(Codeforces Round #364Div.2 A)
- Codeforces Round #131 (Div. 2) A B
- Codeforces Round #174 (Div. 2) Problem A
- Codeforces Round #173 (Div. 2) A.Bit++
- Codeforces Round #181 (Div. 2) A题
- Codeforces Round #184 (Div. 2) A题
- Codeforces Round #185 (Div. 2)--A,B
- Codeforces Round #172 (Div. 2) A题
- Codeforces Round #166 (Div. 2) A题
- Codeforces Round #132 (Div. 2) A题
- 获取验证码的URL后边要加上一个不断变化的参数
- kubernetes的ceph RBD volume(2): 使用Ceph RBD作为persistent volume
- 【五大布局】Android五大布局详解
- lua cocos 中对FNT字体的使用
- Java 试题二
- Codeforces Round #415 (Div. 2) A. Straight «A»
- 解压rpm包
- iOS与js交互
- 在Android中使用SVG图遇到的坑
- 汇编--学习笔记(二)-寻址方式
- Java 试题三
- Ninja 构建系统
- 【Docker】Docker基础
- Java8系列之重新认识HashMap