- 博客(12)
- 收藏
- 关注
原创 【洛谷 P2709】 小B的询问
小B的询问 洛谷 题目大意 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200522152728803.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTkxOTgx,size_16,color_FFFFFF,t_70 数据范围在5e4 最基础的莫队算法 分块+暴力 对每个
2020-05-22 15:36:12
343
原创 【nowcoder 牛客 13887】Maximize The Beautiful Value
Maximize The Beautiful Value 网址:牛客网 题目大意 给定一个序列,序列价值为:a[i] * i 有且仅有一次交换,将一个值提前最少k个,其他相对顺序不变 求序列价值 解题思路 使用前缀和找到最小差值相减 #include<bits/stdc++.h> using namespace std; #define ll long long #define rep(i,n) for(int i = 0; i < n; ++i) #define rep2(i,s
2020-05-14 16:06:13
119
原创 【nowcoder 牛客 14553】小明打联盟
小明打联盟 网址链接:牛客网 题目大意 有三个基本技能施法时间x,y,z,其伤害分别为a,b,c 有一个大招施法时间为L,可以释放的时间为[L,R],这个区间,其伤害为 temp + A * i (i为从L开始的蓄力时间) 求T时间内最大连招伤害 解题思路 可以考虑使用背包DP思路,将大招L,R的时间点看成两个独立的技能,L的伤害为temp,R的伤害为temp+(R-L)*A。最后在dp结果求一遍大招最大伤害,求得最优解。 #include<bits/stdc++.h> usi
2020-05-14 14:31:52
182
原创 D - Silver Cow Party 【kuangbin带你飞专题四】
One cow from each ofNfarms (1 ≤N≤ 1000) conveniently numbered 1..Nis going to attend the big cow party to be held at farm #X(1 ≤X≤N). A total ofM(1 ≤M≤ 100,000) unidirectional (one-way roa...
2019-08-19 19:49:31
127
原创 C - Heavy Transportation 【kuangbin带你飞专题四】
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cus...
2019-08-19 19:02:40
120
原创 C - Catch That Cow 【kuangbin带你飞专题一】
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,0...
2019-07-29 19:44:25
105
原创 B - Dungeon Master 【kuangbin带你飞专题一】
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, so...
2019-07-29 19:20:25
115
原创 我数23 (丑数变题)
题目描述 给你一个数字n,找出大于等于n的最小的,质因数只有2,3,5,7的数。 输入 第一行输入一个数字T,表示有T组测试数据,1 <= T <= 500000 之后T行,每一行有一个数字n,0 <= n <= 109 输出 对每个样例,皆输出一个数字表示答案。 样例输入 5 1 11 111 1111 11111 样例输出 210 210 210 1260 11...
2018-08-20 21:55:52
100
原创 修改天平 UVA 12166
A mobile is a type of kinetic sculpture constructed to take advantage of the principle of equilibrium. It consists of a number of rods, from which weighted objects or further rods hang. The objects ha...
2018-08-13 23:07:08
171
原创 困难的串 UVA129
You have been employed by the organisers of a Super Krypton Factor Contest in which contestants have very high mental and physical abilities. In one section of the contest the contestants are tested o...
2018-08-06 22:34:23
183
原创 Ducci序列 uva1594
A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, · · · , an), the next n-tuple in the sequence is formed by taking the absolute differences of neighboring ...
2018-07-29 18:39:48
151
原创 Score uva-1585
上代码!(本人第一次写blog 0.0) #include<stdio.h> #include<string.h> #include<ctype.h> #include<math.h> int main() { char s[200]; int n; scanf("%d",&n); while(n--){ sc...
2018-07-22 23:22:42
143
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人