自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

待到山花烂漫时

你指尖流动的代码是我不变的信仰

  • 博客(31)
  • 收藏
  • 关注

原创 【课设项目】 图像的边缘识别和处理问题 源码分享

先上效果图(原图/边缘识别 对比):1、系统概述:日常需求中,不难发现有很多图像描边的功能要求,以及图像平滑、降噪等优化需求。这时候,将一个图像数据化处理的技术就显得格外重要。通过对图像对应的矩阵信息进行梯度操作、阈值处理、边缘化保留和卷积,可以将一个个点阵转化为平滑的的图像点,实现图像到数据,再从数据到图像的转化。系统主要功能分四类:一个功能是图像数据采集,通过读取包含图像信息的t...

2020-04-16 21:55:14 582 6

原创 【POJ 3258】 River Hopscotch 二分答案

DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight riv...

2020-04-30 18:54:17 183

原创 【HDU 1846】 Brave Game DP爆破法

Problem Description十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。当然,除了“勇...

2020-04-29 19:13:27 158

原创 【HDU 3555】 Bomb 数位dp

Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current...

2020-04-29 12:04:46 185

原创 【Codeforces Beautiful numbers】 数位dp + 离散

Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue with...

2020-04-28 13:18:08 209 3

原创 【18726 查找最接近的元素】 dp 预处理 SCAU

Description已知长度为n的非下降序列。现在有q个查询,每个查询给出一个指定值。输出序列中第一个大于等于给定值的元素下标,若不存在这样的元素,输出n+1。输入格式第一行一个整数n,为非降序列长度。1=<n<=100000。第二行n个整数,为非降序列元素。所有元素的大小均在int范围内。第三行包含一个整数q,为要询问的给定值个数。1=<q<=100000...

2020-04-28 12:50:25 468

原创 【POJ 3252】 Round Numbers 数位dp

DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone’ (also known as ‘Rock, Paper, Scissors’, ‘Ro, Sham, Bo’, and a host of other names) in o...

2020-04-27 19:18:56 167

原创 【HDU 4734】 F(x) 数位dp 优化版

Problem DescriptionFor a decimal number x with n digits (AnAn-1An-2 … A2A1), we define its weight as F(x) = An * 2n-1 + An-1 * 2n-2 + … + A2 * 2 + A1 * 1. Now you are given two numbers A and B, pleas...

2020-04-27 15:27:17 202

原创 【组队排位赛#5】K - Birdwatching BFS

Kiara studies an odd species of birds that travel in a very peculiar way. Their movements are best explained using the language of graphs: there exists a directed graph G where the nodes are trees, an...

2020-04-26 13:21:39 728 3

原创 【SCAU大数据2班数据结构堂测】 火车进站 指针模拟出栈序列

描述opPush市有一个著名的火车站,该火车站建于上个世纪。 由于资金有限及缺乏可用空间,此火车站只有一个轨道,如图所示。该火车站的运作方式是每列火车从A方向进站,进站后的火车以某种方式进行重组后出站继续沿B方向行驶。 假设从方向A到达的火车有N( N <= 1000)列,进站的次序按照递增的顺序1,2,…,N 编号。火车重组的负责人想知道这 N 列火车是否有可能在B方向上以a1,a...

2020-04-25 18:37:07 864

原创 【HDU 3038】How Many Answers Are Wrong 带权并查集

Problem DescriptionTT and FF are … friends. Uh… very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin w...

2020-04-24 16:28:47 171

原创 【Codeforces Round #601 (Div. 2) B】Math Problem 贪心

Your math teacher gave you the following problem:There are n segments on the x-axis, [l1;r1],[l2;r2],…,[ln;rn]. The segment [l;r] includes the bounds, i.e. it is a set of such x that l≤x≤r. The lengt...

2020-04-19 00:03:43 181

原创 【POJ 1797】 Heavy Transportation 最短路变型 Dijkstra堆优化

BackgroundHugo 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 cust...

2020-04-17 22:26:19 196

原创 【POJ 3321】 Apple Tree 树状数组 + DFS序(详解)

DescriptionThere is an apple tree outside of kaka’s house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.The ...

2020-04-13 12:13:58 513

原创 【组队排位赛 #1】 Fenwick Tree 利用树状数组的运算法则

Input file: fenwick.inOutput file: fenwick.outTime limit: 3 secondsMemory limit: 256 megabytesFenwick tree is a data structure effectively supporting prefix sum queries.For a number t denote as h...

2020-04-11 18:06:46 258

原创 【Codeforces EC 85】 C. Circle of Monsters 思维 预处理

You are playing another computer game, and now you have to slay n monsters. These monsters are standing in a circle, numbered clockwise from 1 to n. Initially, the i-th monster has ai health.You may ...

2020-04-11 01:48:22 570 3

原创 【POJ Count Color】 线段树 区间查询

Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is ...

2020-04-09 22:26:41 151

原创 【Codeforces #632 Div2】 C. Eugene and an array 动态规划 详解

Eugene likes working with arrays. And today he needs your help in solving one challenging task.An array c is a subarray of an array b if c can be obtained from b by deletion of several (possibly, zer...

2020-04-09 13:47:43 337

原创 【HDU 1540】 Tunnel Warfare 树状数组 前后缀

Problem DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay...

2020-04-08 00:39:41 152

原创 【HDU 2795】 Billboard 线段树 区间最值 详解

Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements a...

2020-04-07 19:04:56 369

原创 【HDU 1394】 Minimum Inversion Number 树状数组 逆序对 详解

Problem DescriptionThe inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, …, an, i...

2020-04-07 14:23:24 264

原创 【校队排位赛#13 J】 A Dangerous Maze 概率

You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose the ith door, it can either ...

2020-04-05 17:58:27 112

原创 【HDU 1035】Robot Motion 简单dfs模拟 【校队排位赛#13 H】

Problem DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are...

2020-04-05 17:23:01 146

原创 【校队排位赛#13 I】 Paths on a Grid 简单组合问题 + 细节处理

Imagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things that you already mastered years ago (this time he’s explaining that (a+b) 2=a 2+2ab+b ...

2020-04-05 17:11:32 217

原创 【HDU 1176】 免费馅饼 记忆化搜索 DP简洁版 【校队排位赛#13 E】

免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 81577 Accepted Submission(s): 28527Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,...

2020-04-05 16:59:01 224

原创 【HDU 1698】 Just a Hook 线段树 + pushdown 懒惰标记 成段更新

Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same ...

2020-04-05 00:57:20 193

原创 【HDU 1754】 I Hate It 树状数组 + 区间最值 模板题

Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200...

2020-04-04 22:39:13 105

原创 【洛谷】 P1462 通往奥格瑞玛的道路 二分答案 + SPFA 超详解~

题目背景在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量有一天他醒来后发现自己居然到了联盟的主城暴风城在被众多联盟的士兵攻击后,他决定逃回自己的家乡奥格瑞玛题目描述在艾泽拉斯,有n个城市。编号为1,2,3,…,n。城市之间有m条双向的公路,连接着两个城市,从某个城市到另一个城市,会遭到联盟的攻击,进而损失一定的血量。每次经过一个城市,都会被收取一定的过路费(包括起点和终...

2020-04-04 00:29:07 445

原创 【洛谷】 P1144 最短路计数 SPFA

题目描述给出一个NN个顶点MM条边的无向无权图,顶点编号为1-N1−N。问从顶点11开始,到其他每个点的最短路有几条。输入格式第一行包含22个正整数N,MN,M,为图的顶点数与边数。接下来MM行,每行22个正整数x,yx,y,表示有一条顶点xx连向顶点yy的边,请注意可能有自环与重边。输出格式共NN行,每行一个非负整数,第ii行输出从顶点11到顶点ii有多少条不同的最短路,由于答案有可...

2020-04-02 23:47:09 241 1

原创 【洛谷 P1629 邮递员送信】 Floyd or Dijkstra 堆优化 最短路问题

题目描述有一个邮递员要送东西,邮局在节点 11。他总共要送 n-1n−1 样东西,其目的地分别是节点 22 到节点 nn。由于这个城市的交通比较繁忙,因此所有的道路都是单行的,共有 mm 条道路。这个邮递员每次只能带一样东西,并且运送每件物品过后必须返回邮局。求送完这 n-1n−1 样东西并且最终回到邮局最少需要的时间。输入格式第一行包括两个整数,nn 和 mm,表示城市的节点数量和道路数量...

2020-04-02 19:08:10 899

原创 【洛谷】P4779 单源最短路径(标准版+弱化版) Dijkstra堆优化

题目背景2018 年 7 月 19 日,某位同学在 NOI Day 1 T1 归程 一题里非常熟练地使用了一个广为人知的算法求最短路。然后呢?100 \rightarrow 60100→60;\text{Ag} \rightarrow \text{Cu}Ag→Cu;最终,他因此没能与理想的大学达成契约。小 F 衷心祝愿大家不再重蹈覆辙。题目描述给定一个 nn 个点,mm 条有向边的...

2020-04-01 19:29:34 347

空空如也

空空如也

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

TA关注的人

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