Codeforces Round #373 (Div. 2) A】的更多相关文章

Codeforces Round #373 (Div. 1) A. Efim and Strange Grade 题意 给一个长为\(n(n \le 2 \times 10^5)\)的小数,每次可以选择某位小数进行四舍五入,最多做\(t(t \le 10^9)\)次. 求最大的数. 思路 每次必然找小数部分能进行四舍五入的最高位,并且四舍五入的位置是递增的. 注意:99.5这样的数据,最高位会进位. 代码 A. Efim and Strange Grade C. Sasha and Array…
Codeforces Round #373 (Div. 2) A. Vitya in the Countryside 这回做的好差啊,a想不到被hack的数据,b又没有想到正确的思维 = = [题目链接]A. Vitya in the Countryside [题目类型]模拟 &题意: 一个月30天,月亮的大小分别是上面所说的规律,求输入的下一天是变大还是变小 &题解: 我想的是首先n==1的时候,我想的是一定-1,但这样是错的,因为当那一个数是15或0时,那么答案就不是-1了. 最后,只…
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…
题目链接: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…
A,B,C傻逼题,就不说了. E题: #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; ,mod=; typedef long long int64; ]; int64 a[maxn],s1[maxn<<],s2[maxn<<]; struct…
A. Vitya in the Countryside time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Every summer Vitya comes to visit his grandmother in the countryside. This summer, he got a huge wart. Every gran…
E. Sasha and Array 题目连接: http://codeforces.com/contest/719/problem/E Description Sasha has an array of integers a1, a2, ..., an. You have to perform m queries. There might be queries of two types: 1 l r x - increase all integers on the segment from l…
B. Anatoly and Cockroaches 题目连接: http://codeforces.com/contest/719/problem/B Description Anatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of tw…
A. Vitya in the Countryside 题目连接: http://codeforces.com/contest/719/problem/A Description Every summer Vitya comes to visit his grandmother in the countryside. This summer, he got a huge wart. Every grandma knows that one should treat warts when the…
http://codeforces.com/contest/719/problem/E 题目大意:给你一串数组a,a[i]表示第i个斐波那契数列,有如下操作 ①对[l,r]区间+一个val ②求出[l,r]区间的和. 定义区间的和为该区间内每个a[i]所对应的斐波那契数列的和. 思路:线段树保存区间val,和区间更新,用矩阵快速幂求解复杂度是m*logn*logk //看看会不会爆int!数组会不会少了一维! //取物问题一定要小心先手胜利的条件 #include <bits/stdc++.h>…