自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 csu2087(dfs)

csu-2087​As is known to all, Wells doesn't have a good command of English. As a result, some unfamiliar words, which may cause sadness of Wells, is called tragedy words. In more detail, a word will ...

2018-09-29 16:19:36 156

原创 ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 Tomb Raider(map+二进制枚举)

#1829 : Tomb Raider时间限制:1000ms单点时限:1000ms内存限制:256MB描述Lara Croft, the fiercely independent daughter of a missing adventurer, must push herself beyond her limits when she discovers the island ...

2018-09-25 20:01:08 180

原创 ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 80 Days(双向队列+尺取法)

#1831 : 80 Days时间限制:1000ms单点时限:1000ms内存限制:256MB描述80 Days is an interesting game based on Jules Verne's science fiction "Around the World in Eighty Days". In this game, you have to manage the...

2018-09-25 19:59:02 196

原创 hdu6397(组合+容斥原理)

Character EncodingTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1991    Accepted Submission(s): 765Problem DescriptionIn computer sci...

2018-09-21 15:56:19 554 1

原创 C(n,m)模板~

#include<bits/stdc++.h>using namespace std;#define e exp(1)#define pi acos(-1)#define mod 1000000007#define inf 0x3f3f3f3f#define ll long long#define ull unsigned long long#define mem(...

2018-09-21 15:49:41 781

原创 The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online

zoj4047A Live LoveDreamGrid is playing the music game Live Love. He has just finished a song consisting of n notes and got a result sequence A​1​​,A​2​​,...,A​n​​ (A​i​​∈ {PERFECT, NON-PERFECT}). ...

2018-09-21 13:00:39 463

原创 zcmu2993(暴力枚举)

2993: Fibonacci-ishTime Limit: 2 Sec  Memory Limit: 256 MBSubmit: 46  Solved: 19[Submit][Status][Web Board]DescriptionYash has recently learnt about the Fibonacci sequence and is very excited ...

2018-09-20 16:24:26 199

原创 ACM-ICPC 2018 焦作赛区网络预赛 Transport Ship(dp)

There are N different kinds of transport ships on the port. The ith kind of ship can carry the weight of V[i] and the number of the ith kind of ship is 2^C[i]−1. How many different schemes there are i...

2018-09-20 16:17:43 245

原创 ACM-ICPC 2018 焦作赛区网络预赛 Give Candies(隔板法+欧拉降幂)

There are N children in kindergarten. Miss Li bought them N candies. To make the process more interesting, Miss Li comes up with the rule: All the children line up according to their student number (1...

2018-09-17 14:53:17 189

原创 ACM-ICPC 2018 焦作赛区网络预赛 Poor God Water(递推+构造矩阵)

God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous.Every hour, God Water will eat one kind of fo...

2018-09-16 21:56:51 243 5

原创 矩阵快速幂模板~

?#include<bits/stdc++.h>using namespace std; #define e exp(1)#define pi acos(-1)#define mod 1000000007#define inf 0x3f3f3f3f#define ll long long#define ull unsigned long long#define m...

2018-09-16 21:34:02 140

原创 ACM-ICPC 2018 沈阳赛区网络预赛 Spare Tire(容斥+公式推)

A sequence of integer \lbrace a_n \rbrace{an​} can be expressed as:\displaystyle a_n = \left\{ \begin{array}{lr} 0, & n=0\\ 2, & n=1\\ \frac{3a_{n-1}-a_{n-2}}{2}+n+1, & n>1 \end{array...

2018-09-13 11:09:50 196

原创 hdu6181(第k短路的次短路)

Two PathsTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others)Total Submission(s): 1930    Accepted Submission(s): 787Problem DescriptionYou are given a undirect...

2018-09-11 20:12:40 355

原创 第k短路 (A*算法)

A*算法:A*,启发式搜索,是一种较为有效的搜索方法。我们在搜索的时候,很多时候在当前状态,已经不是最优解了,但是我们却继续求解;这个就是暴力搜索浪费时间的原因。我们在有些时候,往往可以根据一些信息推断出继续搜索是一种劣解。所以如果能够判断出来的话,就可以不继续了,以达到节省运行时间的目的。估价函数:为了提高搜索效率,我们可以对未来可能产生的代价进行预估。我们设计一个估价函数...

2018-09-11 14:41:47 1269

原创 ACM-ICPC 2018 沈阳赛区网络预赛 Made In Heaven(第k短路)

One day in the jail, F·F invites Jolyne Kujo (JOJO in brief) to play tennis with her. However, Pucci the father somehow knows it and wants to stop her. There are NN spots in the jail and MM roads conn...

2018-09-11 14:30:43 224

原创 ACM-ICPC 2018 沈阳赛区网络预赛 Supreme Number(枚举)

A prime number (or a prime) is a natural number greater than 11 that cannot be formed by multiplying two smaller natural numbers.Now lets define a number NN as the supreme number if and only if each...

2018-09-10 19:18:34 384

原创 ACM-ICPC 2018 徐州赛区网络预赛 Features Track(STL二维map)

Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat features in each frame. A cat feature is a two-dime...

2018-09-10 16:18:52 293 2

原创 ACM-ICPC 2018 徐州赛区网络预赛 Ryuji doesn't want to study(公式化简+前缀和)

Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i].Unfortunately, the longer he learns, the fewer he gets.That means...

2018-09-10 15:20:41 180

原创 二维向量的叉乘判断凹凸多边形

平面上三个点:p1(x1,y1),p2(x2,y2),p3(x3,y3)s(p1,p2,p3)=(x1-x3)*(y2-y3)-(x2-x3)*(y1-y3)如果s>0 则说明 这连接这3个点时是按照逆时针的顺序,如果是s<0则说明连接这3个点是按照顺时针的顺序这样的话按顺序的遍历每三个点,如果有小于0的说明有一条直线向右拐弯了struct node{ double ...

2018-09-06 19:43:05 2537

原创 hdu6447(树状数组+离散化优化dp)

YJJ's SalesmanTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2161    Accepted Submission(s): 809Problem DescriptionYJJ is a salesman who...

2018-09-06 14:46:12 381

原创 hdu3499(分层图最短路)

FlightTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 4357    Accepted Submission(s): 975Problem DescriptionRecently, Shua Shua had a b...

2018-09-04 15:14:42 376

原创 分层图最短路

 分层图最短路,就是在分层图上解决最短路问题 第一种就是dp的思想:一般模型为:在一张图上,有k次机会可以通过一条边而不需要计算权值(免费过路),求从起点到终点的最短路线常规思路:想象将一个点拆分为k + 1个点,分别表示到这个点时,免费权消耗了0次,1次,2次......k次这样实际我们可以把这k个点想象成对应dp的不同的状态dis[i][j]表示到第i个点时,消耗了j次乘车权后的最短路...

2018-09-04 11:48:26 1643 1

原创 zcmu1133(dfs+判重)

1133: 第九章:致我们终将逝去的青春Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 28  Solved: 18[Submit][Status][Web Board]Description                        /青 春 是 用 来 追 忆 的 /当 你 怀 揣 着 她 时 /她 ...

2018-09-03 12:56:00 229

原创 hdu6386(dijkstra+堆优化+记录状态)

Age of MoyuTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3285    Accepted Submission(s): 1051Problem DescriptionMr.Quin love fishes s...

2018-09-02 17:04:16 453 1

原创 dijkstra+堆优化

 分析:可知Dijkstra算法的复杂度是O(n*n)Dijkstra算法在寻找集合T中距离最小的顶点W(即寻找dist数组中最小值)复杂度是O(n),在更新距离操作时复杂度为O(n)。上述操作需要进行n次,将n个点的最短路径值确定因此复杂度为O(n)。可以发现外层的n次循环是不可避免的,因为需要求出源点到各个点的最短路径。可以优化的地方就在寻找dist数组最小值。可以采用合适的数...

2018-09-02 14:39:47 1968

空空如也

空空如也

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

TA关注的人

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