Description 思路 cf题解中合法的x的处于一段连续区间不太明白。在知道这个前提下,将E1的代码改成二分即可。 有空再补回来。 #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #incl ...
分类:
其他好文 时间:
2020-07-04 19:00:50
阅读次数:
82
/** * * @param str * 需要过滤的字符串 * @return * @Description:过滤数字以外的字符 */ public static String filterUnNumber(String str) { // 只允数字 String regEx = "[^0-9]"; ...
分类:
编程语言 时间:
2020-07-04 17:19:27
阅读次数:
169
Description Given an array of integers cost and an integer target. Return the maximum integer you can paint under the following rules: The cost of pai ...
分类:
其他好文 时间:
2020-07-04 16:59:34
阅读次数:
73
import java.util.Stack; /** * @Class LongestValidParentheses * @Description 32. 最长有效括号 * 给定一个只包含 '(' 和 ')' 的字符串,找出最长的包含有效括号的子串的长度。 * <p> * 示例 1: * 输入: ...
分类:
其他好文 时间:
2020-07-04 15:36:31
阅读次数:
51
Description There are G people in a gang, and a list of various crimes they could commit. The i-th crime generates a profit[i] and requires group[i] g ...
分类:
其他好文 时间:
2020-07-04 13:37:37
阅读次数:
57
Visual Studio -VS2015 Total UnInstaller July 4, 2020 12:07 AM Release version zip Description This executable is designed to cleanup/scorch all Previe ...
分类:
其他好文 时间:
2020-07-04 01:15:35
阅读次数:
81
地址 https://www.acwing.com/problem/content/description/1130/ 战争时期,前线有 n 个哨所,每个哨所可能会与其他若干个哨所之间有通信联系。 信使负责在哨所之间传递信息,当然,这是要花费一定时间的(以天为单位)。 指挥部设在第一个哨所。 当指挥 ...
##题面 Problem Description Fibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。 Input 输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。 Output 输出 ...
分类:
编程语言 时间:
2020-07-03 23:05:34
阅读次数:
62
题目 Description 给定一个正整数序列A,要求支持以下操作 1): ADD a b c 表示在[a,b]上加上一个常数C。 2): COVER a b c 把[a,b]整体赋值为一个常数K。 3): QUERY a b 查询[a,b]的sum。 Input 第一行两个正整数n、m,n表示序 ...
分类:
其他好文 时间:
2020-07-03 17:30:05
阅读次数:
63
Description 给定一个正整数序列A,要求支持以下操作 1): + a b c 表示在[a,b]上加上一个常数C。 2): * a b c 在[a,b]上乘上一个常数K。 3): QUERY a b 查询[a,b]的sum。 Input 第一行两个正整数n、m,n表示序列长度,m表示操作数 ...
分类:
其他好文 时间:
2020-07-03 15:31:03
阅读次数:
49