自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(399)
  • 收藏
  • 关注

原创 leetcode 44 通配符匹配 (贪心||DP)

https://leetcode-cn.com/problems/wildcard-matching/submissions/给定一个字符串(s) 和一个字符模式(p) ,实现一个支持'?'和'*'的通配符匹配。'?' 可以匹配任何单个字符。'*' 可以匹配任意字符串(包括空字符串)。两个字符串完全匹配才算匹配成功。说明:s可能为空,且只包含从a-z的小写字母...

2020-01-13 21:45:51 510

原创 【容斥好题】HDU - 5514 F - Frogs

F - FrogsHDU - 5514There aremmstones lying on a circle, andnnfrogs are jumping over them.The stones are numbered from00tom−1m−1and the frogs are numbered from11tonn. Theii-th frog ca...

2019-10-14 10:02:35 284

原创 【线段树求区间GCD(只有2,3)】CCPC2017 杭州站 HDU6273

http://acm.hdu.edu.cn/showproblem.php?pid=6273给你n个数,Q次操作,每次操作,选一段区间乘2或者乘3最后询问所有的数的GCD是多少解法:初始都为1,只管区间更新次数,和区间左右儿子更新次数,下面加上来的#include <bits/stdc++.h>#define ll long longusing namesp...

2019-09-23 19:08:03 216

原创 Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource

在application中添加@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) 导入适应包即可

2019-09-23 18:11:35 243

原创 【DP求方案数】 Codeforces Round #518 (Div. 2) [Thanks, Mail.Ru!] D. Array Without Local Maximums

http://codeforces.com/contest/1068/problem/DD. Array Without Local MaximumsIvan unexpectedly saw a present from one of his previous birthdays. It is array ofnnnumbers from1to200. Array is old...

2019-09-18 14:35:36 188 1

原创 【DP+线段树转移矩阵】2019南昌ICPC网络赛 C. Hello 2019

https://nanti.jisuanke.com/t/41350A digital string is "good": when it contains a subsequence91029102and does not contain a subsequence81028102.The bad value of a string is defined as how many c...

2019-09-09 15:20:22 233

原创 【DP+线段树转移矩阵】CF Good Bye 2016 E. New Year and Old Subsequence

http://codeforces.com/contest/750/problem/EA stringtis calledniceif a string "2017" occurs intas asubsequencebut a string "2016" doesn't occur intas asubsequence. For example, strings "20...

2019-09-09 15:05:31 117

原创 【链表】

链表逆转(头插法)#include <bits/stdc++.h>using namespace std;struct listnode{ int val; //当前结点的值 listnode *next; //指向下一个结点的指针 listnode(int x) : val(x), next(NULL) {} //初始化当前结点值为x,指针为空...

2019-09-03 12:32:07 119

原创 【线段树 区间加 区间乘】 洛谷 P3373 【模板】线段树 2

P3373 【模板】线段树 2https://www.luogu.org/problem/P3373题目描述如题,已知一个数列,你需要进行下面三种操作:1.将某区间每一个数乘上x2.将某区间每一个数加上x3.求出某区间每一个数的和输入格式第一行包含三个整数N、M、P,分别表示该数列数字的个数、操作的总个数和模数。第二行包含N个用空格分隔的整数,其中第i个数字表...

2019-08-20 14:23:21 219

原创 【单调队列维护DP】HDU 3401 Trade

TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6208Accepted Submission(s): 2154Problem DescriptionRecently, lxhgww is addicted ...

2019-08-11 23:01:39 98

原创 【单调队列优化DP】 POJ 1821 Fence

http://poj.org/problem?id=1821FenceTime Limit:1000MS Memory Limit:30000K Total Submissions:6917 Accepted:2306 DescriptionA team of k (1 <= K <= 100) workers should p...

2019-08-11 16:06:06 134

原创 【单调队列求区间最值】 Libre OJ #10175. 「一本通 5.5 例 1」滑动窗口

https://loj.ac/problem/10175题意:给你n个数,问你从1到n-k+1的连续k个数的最小值和最大值分别是多少题解:单调队列,维护k个中的从小到大或从大到小,如果到我这一个比这里面所有的数都要大或小,就放到第一个,不燃放到我该放的位置,然后保证a[q]数组里单调上升或下降,q数组存这一位是第几个数,所以如果head位(最值)是不在这k个里的就往后找#inc...

2019-08-10 21:51:09 216

原创 【线段树求区间最大连续子段和+单点更新】 SPOJ - GSS3 Can you answer these queries III

Can you answer these queries IIISPOJ - GSS3You are given a sequence A of N (N <= 50000) integers between -10000 and 10000. On this sequence you have to apply M (M <= 50000) operations:...

2019-08-09 16:26:27 176

原创 【线段树求区间最大连续子段和】 SPOJ - GSS1 Can you answer these queries I

Can you answer these queries ISPOJ - GSS1You are given a sequence A[1], A[2], ..., A[N] . ( |A[i]| ≤ 15007 , 1 ≤ N ≤ 50000 ). A query is defined as follows:Query(x,y) = Max { a[i]+a[i+1]+.....

2019-08-09 16:00:35 195

原创 【优雅的暴力LIS】2019多校第六场 HDU 6635 Nonsense Time

Nonsense TimeTime Limit: 14000/14000 MS (Java/Others)Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 910Accepted Submission(s): 300Problem DescriptionYou a given a per...

2019-08-09 14:41:56 122

原创 【01字典树+贪心】HDU 6625 three arrays (2019杭电多校第五场)

three arraysTime Limit: 3000/2500 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1212Accepted Submission(s): 408Problem DescriptionThere are three int...

2019-08-06 20:04:14 158

原创 【线性基+思维】杭电多校第一场 Operation

http://acm.hdu.edu.cn/showproblem.php?pid=6579 点击进入报名链接)~ Operation Time Limit: 8000/4000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 2840...

2019-08-04 15:25:22 163

原创 【贪心+线性基+高斯消元】libreoj「JLOI2015」装备购买

#2108. 「JLOI2015」装备购买https://loj.ac/problem/2108题目描述脸哥最近在玩一款神奇的游戏,这个游戏里有nn件装备,每件装备有mm个属性,用向量\mathbf{z_i}=(a_1, \ldots ,a_j, \ldots , a_m)zi​=(a1​,…,aj​,…,am​)表示 (1 \leq i \leq n, \ 1 \leq ...

2019-08-03 19:05:14 133

原创 【主席树+二分答案】 HDU-6621 杭电2019多校4 K-th Closest Distance

http://acm.hdu.edu.cn/showproblem.php?pid=6621Problem DescriptionYou have an array: a1, a2, , an and you must answer for some queries.For each query, you are given an interval [L, R] and two num...

2019-08-01 16:15:23 146

原创 【威尔逊定理+快速乘】hdu2019多校第三场 6608 Fansblog

http://acm.hdu.edu.cn/showproblem.php?pid=6608Problem DescriptionFarmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, he find the visits has r...

2019-07-31 11:12:06 133

原创 【倍增+线性基】2013.「SCOI2016」幸运数字

#2013.「SCOI2016」幸运数字内存限制:256 MiB时间限制:4000 ms标准输入输出题目描述A 国共有座城市,这些城市由 n-1 条道路相连,使得任意两座城市可以互达,且路径唯一。每座城市都有一个幸运数字,以纪念碑的形式矗立在这座城市的正中心,作为城市的象征。一些旅行者希望游览 A 国。旅行者计划乘飞机降落在号城市,沿着号城市到号城市之间那条唯一的路径游览,最终从...

2019-07-27 17:09:27 104

原创 【暴力DP+思维】Codeforces839 C - Journey

C - JourneyRecently Irina arrived to one of the most famous cities of Berland— the Berlatov city. There arenshowplaces in the city, numbered from1ton, and some of them are connected by one-...

2019-07-25 16:02:02 290

原创 【最短路建边+最小割最大流】 HDU 6582 2019杭电多校第一场1005 Path

http://acm.hdu.edu.cn/showproblem.php?pid=6582PathTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 685Accepted Submission(s): 189Pro...

2019-07-22 21:30:07 179

原创 【二分答案】HDU 6581 2019年杭电多校第一场1004 Vacation

http://acm.hdu.edu.cn/showproblem.php?pid=6581VacationTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 553Accepted Submission(s): 178...

2019-07-22 20:31:08 140

原创 【组合数+思维】HDU6143 Killer Names

Killer Names HDU6143> Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith Lord Darth Vader. A powerful Force-user who lived during the era of the Galactic Empire, Marek or...

2019-07-10 18:08:31 110

原创 【DFS算方案数】AtCoder Beginner Contest 133 E - Virus Tree 2

https://atcoder.jp/contests/abc133/tasks/abc133_eE - Virus Tree 2Time Limit: 2 sec / Memory Limit: 1024 MBScore :500500pointsProblem StatementYou are given a tree withNNvertices andN...

2019-07-08 16:09:58 351

原创 【随机大法好】AtCoder Beginner Contest 133 C - Remainder Minimization 2019

https://atcoder.jp/contests/abc133/tasks/abc133_cC - Remainder Minimization 2019Time Limit: 2 sec / Memory Limit: 1024 MBScore :300 pointsProblem StatementYou are given two non-negative ...

2019-07-08 10:40:18 294

原创 【DP】 HDU - 6092 H - Rikka with Subset

H - Rikka with SubsetHDU - 6092As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta hasnnpositiv...

2019-07-07 14:35:43 132

原创 【bitset骚操作】HDU - 6085 A - Rikka with Candies

A - Rikka with CandiesHDU - 6085As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:There arennchildr...

2019-07-07 13:56:51 154

原创 【线段树+二分答案+分数规划】 HDU - 6070 D - Dirt Ratio

D - Dirt RatioHDU - 6070In ACM/ICPC contest, the ''Dirt Ratio'' of a team is calculated in the following way. First let's ignore all the problems the team didn't pass, assume the team passedXXpro...

2019-07-05 10:15:33 225

原创 【约数定理+数学】HDU - 6069 C - Counting Divisors

C - Counting DivisorsHDU - 6069In mathematics, the functiond(n)denotes the number of divisors of positive integern.For example,d(12)=6because1,2,3,4,6,12are all12‘s divisors.In this prob...

2019-07-04 19:43:50 183

原创 【思维】Codeforces Round #513 C. Maximum Subrectangle

C. Maximum Subrectanglehttp://codeforces.com/contest/1060/problem/CYou are given two arraysaandbof positive integers, with lengthnandmrespectively.Letcbe ann×m matrix, whereci,j=a...

2019-07-02 18:27:07 151

原创 【树形DP】Codeforces Round #513 E. Sergey and Subway 所有简单路径和(新增边)

http://codeforces.com/contest/1060/problem/EE. Sergey and SubwaySergey Semyonovich is a mayor of a county city N and he used to spend his days and nights in thoughts of further improvements of Nke...

2019-07-02 18:20:31 186

原创 【树形DP】HDU - 2376 Average distance 所有简单路径权值和

Average distanceHDU - 2376Given a tree, calculate the average distance between two vertices in the tree. For example, the average distance between two vertices in the following tree is (d01...

2019-07-02 18:17:04 174

原创 pip 加速

如果pipinstallpack_name太慢了就换国内网python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simplepack_namepip install tensorflow==1.5 -i http://mirrors.aliyun.com/pypi/simple --trusted-host mir...

2019-07-01 00:07:50 134

原创 【关于mysql指令】

创建数据集CREATE XXX展示数据集SHOW DATABASES使用数据集use XXX退出exit进入数据集并修改mysql -uroot -p --default-character-set=gbk接下来这句(不知道需不需要,反正我加了)use XXX(数据集名字)样例添加table create table t_user( -> uid i...

2019-05-09 09:29:08 324

原创 【DP】 CF 102174J The 14-th BIT Campus Programming Contest金色传说

http://codeforces.com/gym/102174/problem/JJ. 金色传说time limit per test1.0 smemory limit per test256 MBinputstandard inputoutputstandard output龙老师获得了一个不寻常的计算器,因为这个道具的品质是金色传说。它除了在按666...

2019-05-08 09:58:50 190

原创 【DP】CF 1155D Beautiful Array

http://codeforces.com/problemset/problem/1155/DD. Beautiful Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given...

2019-04-24 19:11:04 207

原创 【矩阵快速幂】南昌邀请赛 C Angry FFF Party

https://nanti.jisuanke.com/t/38222In ACM labs, there are only few members who have girlfriends. And these people can make FFF Party angry easily. One day, FFF Party prepared a functionFand a setS....

2019-04-21 15:13:04 165

原创 【单调栈+线段树】多次询问输出(区间最大和*区间最小值)max 南昌邀请赛I题 Max Answer

南昌邀请赛I题 Max Answerhttps://nanti.jisuanke.com/t/38228Alice has a magic array. She suggests that the value of a interval is equal to the sum of the values in the interval, multiplied by the smallest...

2019-04-21 15:07:10 265

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除