题解:CF718A Efim and Strange Grade】的更多相关文章

C. Efim and Strange Grade 题目连接: http://codeforces.com/contest/719/problem/C Description Efim just received his grade for the last test. He studies in a special school and his grade can be equal to any positive decimal fraction. First he got disappoin…
C. Efim and Strange Grade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Efim just received his grade for the last test. He studies in a special school and his grade can be equal to any po…
题目链接:http://codeforces.com/problemset/problem/719/C C. Efim and Strange Grade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Efim just received his grade for the last test. He studies in a…
C. Efim and Strange Grade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Efim just received his grade for the last test. He studies in a special school and his grade can be equal to any po…
Efim and Strange Grade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Efim just received his grade for the last test. He studies in a special school and his grade can be equal to any posit…
codeforces 373 A - Efim and Strange Grade(算数模拟) 原题:Efim and Strange Grade 题意:给出一个n位的实型数,你可以选择t次在任意位进行四舍五入的进位,求最大结果. 解法:这道题一定不能忽略数位计算时本身带来的进位,如果我们要改变这个数的大小,一定是在最先的那个出现5以上的数字进行四舍五入,之后的t次允许我们多次四舍五入,如果自然进位则不消耗t. 最后一点,整数位的进位也是需要考虑的 #include <cstdio> #inc…
Codeforces 718A Efim and Strange Grade 程序分析 jerry的程序 using namespace std; typedef long long ll; string buf; int i; void up(int at) { at--; if (at < 0) { buf = '1' + buf; i++; return; } if (buf[at] == '.') at--; buf[at]++; if (buf[at] == '9'+1) { buf[…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Efim just received his grade for the last test. He studies in a special school and his grade can be equal to any positive decimal fraction. F…
题意:给定一个浮点数,让你在时间 t 内,变成一个最大的数,操作只有把某个小数位进行四舍五入,每秒可进行一次. 析:贪心策略就是从小数点开始找第一个大于等于5的,然后进行四舍五入,完成后再看看是不是还可以,一循环下去,直到整数位,或者没时间了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <…
收录已发布的题解 按发布时间排序. 部分可能与我的其他文章有重复捏 qwq . AtCoder for Chinese: Link ZHOJ: Link 洛谷 \(1\sim 5\) : [题解]CF45I TCMCF+++ [题解]CF1013B And [题解]CF991C Candies [题解]CF356A Knight Tournament [题解]CF1715A Crossmarket \(6\sim 10\) : [题解]CF1215C Swap Letters [题解]CF172…