Rounding Solution Proper Nutrition 枚举 Solution Phone Numbers 模拟 Solution Alarm Clock 贪心,好像不用线段树也可以,事实证明我很擅长想得太多. Solution Squares and not squares 以后再也不用qsort了 Solution Restoring the Expression 用哈希真的很讨厌好吗?你们怎么从来不考虑冲突的问题,用的那么毫无负担呢? Splitting in Teams S…
Codeforces Round #451 (Div. 2) A Rounding 题目链接: http://codeforces.com/contest/898/problem/A 思路: 小于等于5向下,大于补上差值输出 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; scanf("%I64d",&n); int r=n%10;…
Codeforces Beta Round #27 (Codeforces format, Div. 2) http://codeforces.com/contest/27 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define maxn 1000005 typ…
MySQL四舍五入函数ROUND(x) ROUND(x)函数返回最接近于参数x的整数,对x值进行四舍五入. 实例: 使用ROUND(x)函数对操作数进行四舍五入操作.SQL语句如下: mysql>SELECT ROUND(-2.34),ROUND(-4.56),ROUND(2.34),ROUND(4.56); ROUND(x)函数的执行结果如下图所示: 上图中代码执行的结果显示,进行四舍五入处理以后,只保留了各个值的整数部分. MySQL四舍五入函数ROUND(x,y) ROUND(x,y)函数…
A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, V…
A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, V…
PROBLEM D. Alarm Clock 题 OvO http://codeforces.com/contest/898/problem/D codeforces 898d 解 从前往后枚举,放进去后不合法就拿出来,记录拿出来的次数 中途每放进去一个数,会影响到一个区间,标记这个区间的首位(做差分,首+1,尾-1),同时维护这些标记的前缀和 #include <iostream> #include <cstring> #include <cmath> #includ…
水题场.... 结果因为D题看错题意,B题手贱写残了...现场只出了A,C,E A:水题.. #include<bits/stdc++.h> #define fi first #define se second #define mp make_pair #define pb push_back #define pi acos(-1.0) #define ll long long #define mod 1000000007 #define C 0.5772156649 #define ls l…
B. Proper Nutrition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n burles. One bottle of Ber-Cola costs a burles and one Bars bar costs b burles. He can buy any non-negative in…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟 [代码] /* 1.Shoud it use long long ? 2.Have you ever test several sample(at least therr) yourself? 3.Can you promise that the solution is right? At least,the main ideal 4.use the puts("") or putchar() or printf…