浏览器标题切换
浏览器标题切换end

07 2019 档案

摘要:题意比较难懂,难点也在于转换题意 题意:找a-b所有路径中最大步数里面最小的 本来先用最小生成树写的,但是没写出来: #include<iostream> #include<string.h> #include<cmath> #include<iomanip> #define inf 0x3f3f3 阅读全文
posted @ 2019-07-30 13:13 抓水母的派大星 阅读(144) 评论(0) 推荐(0) 编辑
摘要:Background Binary trees are a common data structure in computer science. In this problem we will look at an infinite binary tree where the nodes conta 阅读全文
posted @ 2019-07-29 23:33 抓水母的派大星 阅读(216) 评论(0) 推荐(0) 编辑
摘要:今天写了这一题,一开始跑了两个Dijkstra,但是造成内存超限,所以现在在学习邻接表,打算明天用邻接表和优先队列写,目前还在学习中,所以题目啥也还没上传,先上传了今晚对于邻接表的理解(见上图),明天把这个解决了,再放上两个一个超时一个不超时的代码 阅读全文
posted @ 2019-07-29 23:29 抓水母的派大星 阅读(135) 评论(0) 推荐(0) 编辑
摘要:原题链接:https://hpuoj.com/contest/24/problem/E/ 思路:一般的尺取法,不断更新左端点的值。 这是直接调用库函数的一种写法(和上面的原理一样): 阅读全文
posted @ 2019-07-28 16:01 抓水母的派大星 阅读(179) 评论(0) 推荐(0) 编辑
摘要:再战斐波那契 单点时限: 1.0 sec 内存限制: 512 MB 单点时限: 1.0 sec 内存限制: 512 MB 单点时限: 1.0 sec 内存限制: 512 MB 小z 学会了斐波那契和 gcd 后,老师又给他出了个难题,求第N个和第M个斐波那契数的最大公约数,这可难倒了小z ,不过在小 阅读全文
posted @ 2019-07-28 14:39 抓水母的派大星 阅读(170) 评论(0) 推荐(0) 编辑
摘要:##公式 递推关系式: int f(int n) { if(n==0) return 0; else if (n==1) return 1; else return f(n-1)+f(n-2); } gcd(Fi+1,Fi)=1 gcd(Fi,Fj)=F(gcd(i,j)) Fm+n=Fm−1∗Fn 阅读全文
posted @ 2019-07-28 14:33 抓水母的派大星 阅读(141) 评论(0) 推荐(0) 编辑
摘要:##二分查找概念 二分查找:是一种在有序数组中查找某一特定元素的搜索算法。 这种搜索算法每一次比较都使搜索范围缩小一半。 ##写法一 根据定义: public static int binary(int[] a,int data) { int mi=0,ma=a.length-1,mid; whil 阅读全文
posted @ 2019-07-28 14:02 抓水母的派大星 阅读(467) 评论(0) 推荐(0) 编辑
摘要:In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the des 阅读全文
posted @ 2019-07-26 20:54 抓水母的派大星 阅读(183) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<string>#include<cmath>#include<cstdio> // FILE操作头文件。没有的话,CLION不会报错,直接显示自己设置的不能打开的语句,codeblocks会报错。using namespace std;const 阅读全文
posted @ 2019-07-25 20:41 抓水母的派大星 阅读(195) 评论(0) 推荐(0) 编辑
摘要:搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸 阅读全文
posted @ 2019-07-25 20:29 抓水母的派大星 阅读(170) 评论(0) 推荐(0) 编辑
摘要:FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= 阅读全文
posted @ 2019-07-24 22:02 抓水母的派大星 阅读(155) 评论(0) 推荐(0) 编辑
摘要:注意一下控制格式即可,最长公共上升子序列模版题 ##AC代码 #include<stdio.h> #include<iostream> #include<algorithm> #include<cmath> #include<iomanip> #include<string.h> using nam 阅读全文
posted @ 2019-07-24 08:55 抓水母的派大星 阅读(216) 评论(0) 推荐(0) 编辑
摘要:In Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its na 阅读全文
posted @ 2019-07-22 11:21 抓水母的派大星 阅读(219) 评论(0) 推荐(0) 编辑
摘要:George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the origina 阅读全文
posted @ 2019-07-21 18:11 抓水母的派大星 阅读(194) 评论(0) 推荐(0) 编辑
摘要:A problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying a boolean exp 阅读全文
posted @ 2019-07-21 16:52 抓水母的派大星 阅读(228) 评论(0) 推荐(0) 编辑
摘要:Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two s 阅读全文
posted @ 2019-07-21 15:07 抓水母的派大星 阅读(119) 评论(0) 推荐(0) 编辑
摘要:##题意 给出一列士兵的身高(会有重复),要求求出剔除最少士兵使得每一个士兵往左或者右看可以看到该队列的尽头士兵,原有的位置不得改变。 ##注意 不能直接排序去剔除除去最高士兵以外有重复的元素,因为题目要求原来的队列顺序不变。 A soldier see an extremity if there 阅读全文
posted @ 2019-07-21 13:14 抓水母的派大星 阅读(255) 评论(0) 推荐(0) 编辑
摘要:Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to writ 阅读全文
posted @ 2019-07-21 07:35 抓水母的派大星 阅读(216) 评论(0) 推荐(1) 编辑
摘要:n sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is installed at the horizontal center line o 阅读全文
posted @ 2019-07-21 07:00 抓水母的派大星 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You m 阅读全文
posted @ 2019-07-17 23:34 抓水母的派大星 阅读(205) 评论(0) 推荐(0) 编辑
摘要:##思路 一开始没有考虑元素是负数的情况,后来知道少考虑一种写法后用了新的方式写,思路不变 ##unique的使用 头文件:#include。 unique的作用是“去掉”容器中相邻元素的重复元素。 去掉的实质上是一个伪去除,它会把重复的元素添加到容器末尾,而返回值是去重之后的尾地址(是地址!!), 阅读全文
posted @ 2019-07-07 17:23 抓水母的派大星 阅读(130) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示