C. MP3 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One common way of digitalizing sound is to record sound intensity at particular time moments. For each time moment intensity is record…
http://codeforces.com/contest/1199/problem/D Examples input1 output1 input2 output2 Note In the first example the balances change as follows: 1 2 3 4 → 3 3 3 4 → 3 2 3 4 → 3 2 3 4 In the second example the balances change as follows: 3 50 2 1 10 → 3…
Div2 A 长度为\(n(n≤10^5)\)的数组,每个元素不同,求有多少个位置\(d\)满足\(d - x \le j < d \And d < j \le d + y a_d<a_j(0\le x,y\le 7)\) \(x,y\)较小,遍历每个位置,暴力判断即可 B 如下图,给出\(L,H\),求水面深度 设水面深度为\(x\),勾股定理:\(x^2+L^2=(x+H)^2\),解得\(x=\frac{L^2-H^2}{2H}\) Div1 A 长度为\(n(1 \le n \l…
Codeforces Round #383 (Div. 2) A. Arpa's hard exam and Mehrdad's naive cheat 题意 求1378^n mod 10 题解 直接快速幂 代码 #include<bits/stdc++.h> using namespace std; long long quickpow(long long m,long long n,long long k) { long long b = 1; while (n > 0) { if…