自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 资源 (5)
  • 收藏
  • 关注

原创 Isomorphic Inversion 哈希判断 Contest1818 - 2019年我能变强组队训练赛第十场

Isomorphic Inversion题目描述Let s be a given string of up to 106 digits. Find the maximal k for which it is possible to partition s into k consecutive contiguous substrings, such that the k parts form a...

2019-08-29 18:36:42 319

原创 HDU - 6705 K短路(无源点) 2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛

pathYou have a directed weighted graph with n vertexes and medges. The value of a path is the sum of the weight of the edges you passed. Note that you can pass any edge any times and every time you ...

2019-08-26 21:28:29 578

原创 Aizu - 1634 Balance Scale Contest1814 - 2019年我能变强组队训练赛第七场

Balance ScaleYou, an experimental chemist, have a balance scale and a kit of weights for measuring weights of powder chemicals.For work efficiency, a single use of the balance scale should be enough...

2019-08-23 21:31:10 329

原创 2019牛客暑期多校训练营(第九场) A The power of Fibonacci 斐波那契循环节

题目链接分析:首先,我们要知道fibonacci序列模n的话是有一个循环节的存在,那对于题目这样的fibonacci也同样是有循环节的存在;我们知道Fibonacci数列,现在我们来求一个Fib数模n的循环节的长度。对于一个正整数n,我们求Fib数模n的循环节的长度的方法如下:(1)把n素因子分解,即n=p1^a1*p2^a2……pk^ak(2)分别计算Fib数模每个p^m的循...

2019-08-22 17:03:47 246

原创 2019牛客暑期多校训练营(第九场) H Cutting Bamboos 二分+主席树

题目链接输入:5 43 5 1 7 42 4 3 51 4 4 91 3 1999 1011112 2 1 1输出:2.1000000052154062.6296296380460264.8220668546855450.000000026077032题意:有n棵竹子,然后你需要用y次去砍完这些竹子,但是你每次砍下来的竹子的长度和是相同的,问第x砍竹子的时候是在...

2019-08-21 10:27:27 386

原创 2019牛客暑期多校训练营(第九场) Symmetrical Painting (类似扫描)

题目链接样例1:31 54 72 3输出:4题意:给你n个矩形,每个矩形的左下端点和右上端点根据题目给出的格式给出,然后问这n个矩形所能构成的关于某一平行于x轴的直线对称的面积最大是多少;分析:emmmmm,关于某一平行于x轴的直线对称??模拟一下,发现矩形的中心轴是个分界点,什么意思呢?从矩形的下边界开始,往上边界开始枚举那个对称轴,就会发现,所求的面积是递增的...

2019-08-19 17:31:35 233

原创 2019牛客暑期多校训练营(第九场) All men are brothers 并查集+思维

[All men are brothers](https://ac.nowcoder.com/acm/contest/889/E)样例1:6 61 23 44 53 53 62 4输出:15940000样例2:100000 0输出4166416671249975000题意:n个人,m个相互认识的关系,问从n个人中选择4个人,使其相互不认识的方案是多...

2019-08-19 11:05:41 230

原创 2019牛客暑期多校训练营(第九场) D Knapsack Cryptosystem 折半查找

sample input1:8 1129295 592 301 14 28 353 120 236sample out1:01100001sample input2:36 687194767351 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 10485...

2019-08-17 09:53:24 227

原创 2019牛客暑期多校训练营(第九场)B Quadratic equation 二次剩余(逆元)

题目链接样例输入:104 45 610 1010 2520000 1000000000 53 6220 2840 11000000000 1000000000输出:2 22 3-1 -15 510000 10000474848249 525151758352077071 647922939448762649 551237578-1 -1366417...

2019-08-15 21:17:18 229

原创 二次剩余

1.什么是二次剩余2.二次剩余有什么用说白了就是如果存在有解的话,那么n可以在mod p的前提下开根号3.如何求解呢以下的方法使用的话需要有一个前提,就是mod的数p必须是奇素数先引入一个定理:接下来我们引入一个新概念:勒让德符号(legender symbol)定义:引申一个定理:接下来是最后一个定理https://blog.csdn.net/a_crazy_c...

2019-08-15 16:15:07 2494

原创 2019牛客暑期多校训练营(第七场)H Pair 数位dp

题目链接题意:给你A,B,C,三个数其中1<=x<=A,1<=y<=B,要你判断有多少对x,y是满足:(x and y) >C(x xor y) <C满足上述的任意一个即可;分析:数位dp,这里直接球满足题意的有点麻烦,不妨我们球不满足题意的,这样就用所有的组合情况减去不满足题意的就好了;定义dp[pos][i][j][k][l]为...

2019-08-15 11:07:39 232

原创 2019 Multi-University Training Contest 8 HDU 6667 Roundgod and Milk Tea

Roundgod and Milk TeaRoundgod is a famous milk tea lover at Nanjing University second to none. This year, he plans to conduct a milk tea festival. There will be n classes participating in this festiv...

2019-08-15 09:15:27 225

原创 2019年我能变强组队训练赛第三场 Mancala II

题目链接题意:n个球,你需要用若干个圆形盒子,将这些球按照一定的规则排好,使其所有的球都可以到最左边的那个方格里,规则就是只有当第i个圆形盒子中有i个球的时候才能将其所有的i球分到其左边的每个盒子中,包括方形格子,问你这n个球的在这些若干个盒子中的分布情况分析:构造一下#include<iostream>#include<cstdio>#include&lt...

2019-08-14 08:52:42 202

原创 2019 Multi-University Training Contest 7 HDU - 6651 Final Exam (构造)

Final ExamFinal Exam is coming! Cuber QQ has now one night to prepare for tomorrow’s exam.The exam will be a exam of problems sharing altogether m points. Cuber QQ doesn’t know about the exact distr...

2019-08-13 10:06:27 300

原创 2019牛客暑期多校训练营(第八场) A All-one Matrices 【单调栈】

All-one Matrices题意:求给出的n*m的矩阵中全一的不可扩展的最大子矩阵这篇博客里面有对题意的样例解释(在后面)https://blog.csdn.net/weixin_43720526/article/details/99210681分析:官方给出的题解是先用一个二维数组dp[i][j[表示第i行第j列这个位置向上有多少连续的1,然后再用一个二维数组sum[i][j]...

2019-08-12 21:25:58 261

原创 2019牛客多校第二场 H.Second Large Rectangle 单调栈

Second Large Rectangle题目大意:找到在N*M 的矩阵中第二大全1矩阵的面积是多少分析:用一个二维数组dp【i】【j】表示第i行第j列向上最多有多少个连续的1;然后去暴力枚举每一行用单调栈去维护当前行的高度,该高度是呈现单调递增的,若栈中维护的的矩阵的高度大于当前dp[i][j],那么就出栈。每次更新完栈的时候就去更新答案。其实可以手动模拟栈#incl...

2019-08-12 19:54:13 278

原创 2019牛客暑期多校训练营(第八场) C CDMA 构造题

1 11 -1

2019-08-11 12:09:36 209

原创 2019牛客暑期多校训练营(第八场) B Beauty Values

题目描述Gromah and LZR have entered the second level. There is a sequence a_1, a_2, \cdots, a_na1​,a2​,⋯,an​ on the wall.There is also a note board saying “the beauty value of a sequence is the number o...

2019-08-10 21:04:42 280

原创 2019年我能变强组队训练赛第二场(补题场) K Pakage 二维01背包

题目描述It was bound to happen. Modernisation has reached the North Pole. Faced with escalating costs for feeding Santa Claus and the reindeer, and serious difficulties with security, NP Management has...

2019-08-10 10:41:10 228

原创 HDU3496 Watch The Movie 二维01背包

题目链接New semester is coming, and DuoDuo has to go to school tomorrow. She decides to have fun tonight and will be very busy after tonight. She like watch cartoon very much. So she wants her uncle to b...

2019-08-09 21:27:02 320

原创 2019牛客暑期多校训练营(第七场) A String

样例输入:4000010010111011110样例输出:00001001 0111 01111 0分析:一开始打算是先用分块的思想,每次对只含有01的串进行连接,判断是否是可以连接的,但是,,,,,这种情况的判断出现问题了,导致这个暴力的题目用了5个小时才A,QWQ然后就去看了一下大佬的代码,处理的方法就是枚举最长的串可以是多长,这样就保证了切割原串是最小的次数;...

2019-08-09 09:23:08 194

原创 HDU 2451 找规律 2008哈尔滨现场赛

题目链接题目描述A luxury yacht with 100 passengers on board is sailing on the sea in the twilight. The yacht is ablaze with lights and there comes out laughers and singing from the hall where an evening pa...

2019-08-06 21:39:15 384

原创 2019牛客暑期多校训练营(第六场)D Move 二分

链接:https://ac.nowcoder.com/acm/contest/886/D来源:牛客网题目描述After the struggle of graduating from college, TangTang is about to move from a student apartment to his new home.TangTang has n items to move...

2019-08-06 11:20:56 269

原创 HDU 6629 string matching next数组的运用 2019 Multi-University Training Contest 5

string matchingString matching is a common type of problem in computer science. One string matching problem is as following:Given a string s[0…len−1], please calculate the length of the longest comm...

2019-08-05 17:50:20 244

原创 ACM-ICPC 2018 焦作赛区网络预赛 F Modular Production Line 最大费用最大流

题目链接题目描述An automobile factory has a car production line. Now the market is oversupply and the production line is often shut down. To make full use of resources, the manager divides the entire produc...

2019-08-05 09:35:23 231

原创 P3980 [NOI2008](经典问题)志愿者招募 最小费用流

题目链接题目描述申奥成功后,布布经过不懈努力,终于成为奥组委下属公司人力资源部门的主管。布布刚上任就遇到了一个难题:为即将启动的奥运新项目招募一批短期志愿者。经过估算,这个项目需要N 天才能完成,其中第i 天至少需要Ai 个人。 布布通过了解得知,一共有M 类志愿者可以招募。其中第i 类可以从第Si 天工作到第Ti 天,招募费用是每人Ci 元。新官上任三把火,为了出色地完成自己的工作,布布希望...

2019-08-05 09:22:20 388

原创 2019HDU多校第四场—— HDU 6621

K-th Closest DistanceYou 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 numbers p and K. Your goal is to find the Kth clos...

2019-08-04 09:49:58 268

原创 POJ - 2104 主席树入门

题目链接You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return...

2019-08-02 11:23:09 172

原创 Minimal Power of Prime HDU - 6623 2019 Multi-University Training Contest 4

Minimal Power of PrimeYou are given a positive integer n > 1. Consider all the different prime divisors of n. Each of them is included in the expansion n into prime factors in some degree. Require...

2019-08-01 15:12:51 103

flash29banben.zip

用于解决flash需要更新的问题,flash30以上的版本就已经开始需要不断去更新有广告的版本,不更新没有办法使用,但是30版本之前的是没有这个问题的。

2020-03-29

Windows下用Bison和Lex实现中缀转后缀.zip

在Windows下使用Lex和Bison实现中缀表达式转化为后缀表达式

2019-10-06

操作系统课设.zip+解析

通过用c++语言来模拟实现操作系统的页面置换算法,包括FIFO、LRU、LFU、时钟算法、NRU、OPT

2019-07-03

数据结构课设之--校园导航(更新)

里面主要是运用了迪杰斯特拉算法来实现的最短路径的,还有dfs的递归查找路径等 备注:这是用codeblocks写的

2019-05-22

数据结构课设之--校园导航

里面主要是运用了迪杰斯特拉算法来实现的最短路径的,还有dfs的递归查找路径等

2019-05-22

空空如也

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

TA关注的人

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