B. Expansion coefficient of the array time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Let's call an array of non-negative integers a1,a2,…,an a k-extension for some non-negative integer k i…
A. Array 题目连接: http://www.codeforces.com/contest/300/problem/A Description Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold: The product of all numbers in the…
题目链接: http://codeforces.com/problemset/problem/498/C C. Array and Operations time limit per test1 secondmemory limit per test256 megabytes 问题描述 You have written on a piece of paper an array of n positive integers a[1], a[2], ..., a[n] and m good pair…
传送门:http://codeforces.com/contest/1108/problem/E2 E2. Array and Segments (Hard version) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The only difference between easy and hard versions i…
题目链接:http://codeforces.com/problemset/problem/295/A 我的做法,两次线段树 #include <cstdio> #include <cstring> const int N = 100005; long long sumv[N * 3]; long long add[N * 3]; long long a[N]; struct opera { int l, r; long long d; } op[N]; void pushdown…
time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Ayoub had an array aaa of integers of size nnn and this array had two interesting properties: All the integers in the array were between…
Please, another Queries on Array? 利用欧拉函数的计算方法, 用线段树搞一搞就好啦. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pair<LL, LL> #define PLI pair<LL, int> #define PII pair<int, i…