C. Maximum splitting time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given several queries. In the i-th query you are given a single positive integer ni. You are to represent ni as…
B. Maximum of Maximums of Minimums time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array a1, a2, ..., an consisting of n integers, and an integer k. You have to split the a…
Codeforces Round #440 (Div. 2) codeforces 870 A. Search for Pretty Integers(水题) 题意:给两个数组,求一个最小的数包含两个数组各至少一个数. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n, m; ], b[]; int main() { , y = , s = ; scanf(…
地址: 题目: C. Maximum splitting time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given several queries. In the i-th query you are given a single positive integer ni. You are to represe…
A. Search for Pretty Integers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given two lists of non-zero digits. Let's call an integer pretty if its (base 10) representation has at…
A. Search for Pretty Integers You are given two lists of non-zero digits. Let's call an integer pretty if its (base 10) representation has at least one digit from the first list and at least one digit from the second list. What is the smallest positi…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] k=1的时候就是最小值, k=2的时候,暴力枚举分割点. k=3的时候,最大值肯定能被"独立出来",则直接输出最大值 [代码] #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 1e5; int a[N+10],n,k,premi[N+10],aftermi[N+10]; int main() {…