E. Santa Claus and Tangerines time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Santa Claus has n tangerines, and the i-th of them consists of exactly ai slices. Santa Claus came to a school…
C. Vasily the Bear and Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasily the bear has got a sequence of positive integers a1, a2, ..., *a**n*. Vasily the Bear wants to write o…
两个二分 枚举位数 #include <bits/stdc++.h> #define MOD 1000000007 using namespace std; typedef long long ll; ll ten[]; ll check1(ll x) { ll ans = ; ll l, r; ; i <= ; i++) { l = ten[i], r = ten[i + ] - ; if (r < x) { ans += i * ( * x - l - r) * (r - l…
E. Santa Claus and Tangerines time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Santa Claus has n tangerines, and the i-th of them consists of exactly ai slices. Santa Claus came to a school…
A /*#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cstdio>#include<cmath>#include<iostream>*/ #include<bits/stdc++.h> using namespace std; typedef long long ll; ; int main() { in…
C. Anton and Making Potions 题目连接: http://codeforces.com/contest/734/problem/C Description Anton is playing a very interesting computer game, but now he is stuck at one of the levels. To pass to the next level he has to prepare n potions. Anton has a…