自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 资源 (2)
  • 收藏
  • 关注

原创 马蜂窝爬虫

项目场景:提示:爬取例如:项目场景:示例:通过蓝牙芯片(HC-05)与手机 APP 通信,每隔 5s 传输一批传感器数据(不是很大)爬取马蜂窝里的所有国内城市的景点(目前发现城市的id大部分是5位数,所以尝试了所有的五位数)问题描述:提示:这里描述项目中遇到的问题:例如:数据传输过程中数据不时出现丢失的情况,偶尔会丢失一部分数据APP 中接收数据代码:@Override public void run() { bytes = mmInStream.read(buffer); mH

2020-09-24 15:00:41 825

原创 ubuntu18.04自带python,换成python3

在使用腾讯云服务器的时候发现ubuntu18.04自带python,只不过是python2,所以想要换成python31.查看当前ubuntu系统已经安装的python版本及当前使用的python版本python --version2.设置update-alternativer 切换python版本update-alternatives --list python执行后显...

2020-03-27 22:35:32 3616

原创 配置在ubuntu环境下,远程连接mongodb数据库

mongodb默认的是没有没有开启远程访问的,要开启远程访问需要修改mongodb的配置文件mongodb.conf我在安装mongodb数据库的时候使用的是apt-get install mongodb的方式安装的,所以默认的mongodb.conf配置文件在/etc/mongodb.conf1.修改配置文件 mongodb.conf命令: sudo vim /etc/mongodb.c...

2020-03-26 18:35:17 706

转载 ubuntu在vm里面配置网络

VMware在默认安装完成之后,会创建三个虚拟的网络环境:VMnet0、VMnet1和VMnet8。其类型分别为:桥接网络,Host-only和NAT。其中,NAT表示VMWware内安装的Ubuntu将会在一个子网中,VMware通过网络地址转换,通过物理机的IP上网。这里,我们选择NAT方式,来实现Ubuntu的静态IP地址配置。打开VMware,在顶部依次选择:编辑 > 虚拟网...

2019-07-01 18:06:29 1496

原创 点击界面出现心的图案

!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,...

2018-05-21 16:57:55 1104 1

原创 牛客网 车辆安排

有n个队伍,每个队伍的人数小于等于5,每辆车最多坐5个人,要求一个队伍的人都在一辆车上,求最少的车数输入描述:第一行n第二行n个数,表示每个队伍的人数输出描述:输出最少车数示例1输入33 4 5输出3备注:n≤1e5每个数小于等于5/*能够组成5的有1 1 1 21 2 21 1 31 4 2 35本来我的思路是先组合 1 4,2 3.再拿剩下的数去拼凑 1 2 2...

2018-05-13 15:10:25 427

原创 poj 1376

The Robot Moving Institute is using a robot in their local store to transport different items. Of course the robot should spend only the minimum time necessary when travelling from one place in the st...

2018-04-17 15:56:57 375

原创 生日蛋糕 POJ - 1190

7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 <= i <= M)层蛋糕是半径为Ri, 高度为Hi的圆柱。当i < M时,要求Ri > Ri+1且Hi > Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。 令Q = Sπ 请编程对...

2018-04-13 14:51:20 1411

原创 poj 2549

Given S, a set of integers, find the largest d such that a + b + c = d where a, b, c, and d are distinct elements of S.InputSeveral S, each consisting of a line containing an integer 1 <= n <= 1...

2018-04-11 19:51:12 358

原创 hdu 1753

话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input本题目包含多组测试数据,请处理到文件结束。 每一组测试数据在一行里面包含两个长度不大于400的正小数A和B。Outp

2018-04-11 10:52:54 295

转载 51Nod-1417 天堂里的游戏(解方程)

1417 天堂里的游戏基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注多年后,每当Noder看到吉普赛人,就会想起那个遥远的下午。Noder躺在草地上漫无目的的张望,二楼的咖啡馆在日光下闪着亮,像是要进化成一颗巨大的咖啡豆。天气稍有些冷,但草还算暖和。不远的地方坐着一个吉普

2017-12-11 19:27:34 328

原创 Choose and divide

题目大意:c(m,n)=(m!)/(n!(m-n)!),现在输入整数p,q,r,s,计算c(p,q)/c(r,s).此题用到了唯一分解定理,因为假如直接计算阶乘的话肯定会超过数的存储范围,所以可以先把n!里的每个数分解成素数乘积,这样的话在计算的时候假如是分子项的话直接在相应的素数系数上加就行了,如果是分母项就直接减去就行了.#include#include#include#incl

2017-12-07 15:50:31 263

原创 code force 893D Credit Card

Recenlty Luba got a credit card and started to use it. Let's consider n consecutive days Luba uses the card.She starts with 0 money on her account.In the evening of i-th day a transaction ai o

2017-12-05 21:49:23 421

原创 A Spy in the Metro

看了两天终于看懂了,但是思路还是不好想

2017-11-24 20:18:04 225

原创 Nikita and string

One day Nikita found the string containing letters "a" and "b" only.Nikita thinks that string is beautiful if it can be cut into 3 strings (possibly empty) without changing the order of the letters,

2017-10-31 19:34:06 352

原创 Subway POJ - 2502

You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you don't want

2017-10-03 14:58:21 297

原创 poj 1716 Integer Intervals

An integer interval [a,b], a Write a program that: finds the minimal number of elements in a set containing at least two different integers from each interval.InputThe first line of the input

2017-09-04 20:14:56 307

原创 51nod 1416

福克斯在玩一款手机解迷游戏,这个游戏叫做”两点”。基础级别的时候是在一个n×m单元上玩的。像这样:    每一个单元有包含一个有色点。我们将用不同的大写字母来表示不同的颜色。这个游戏的关键是要找出一个包含同一颜色的环。看上图中4个蓝点,形成了一个环。一般的,我们将一个序列 d1,d2,...,dk 看成一个环,当且仅当它符合下列条件时:1.    这k个点不一样,即当 

2017-09-02 20:21:48 227

转载 数论快速入门(同余、扩展欧几里德、中国剩余定理、大素数测定和整数分解、素数三种筛法、欧拉函数以及各种模板)

数学渣渣愉快的玩了一把数论,来总结一下几种常用的算法入门,不过鶸也是刚刚入门,所以也只是粗略的记录下原理,贴下模板,以及入门题目(感受下模板怎么用的)(PS:文中亮色字体都可以点进去查看百度原文)附赠数论入门训练专题:点我打开专题(题目顺序基本正常,用以配套数论入门)一、同余定理同余式 : a ≡ b (mod m) (即 a%m == b%m)简单粗暴

2017-08-14 10:58:14 381

原创 F - Trees on the level HDU - 1622

Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on fat trees. Quad- and octal-trees are fundamental to

2017-08-09 17:45:57 290

原创 C - 威威猫系列故事——打地鼠 HDU - 4540

威威猫最近不务正业,每天沉迷于游戏“打地鼠”。   每当朋友们劝他别太着迷游戏,应该好好工作的时候,他总是说,我是威威猫,猫打老鼠就是我的工作!   无话可说...      我们知道,打地鼠是一款经典小游戏,规则很简单:每隔一个时间段就会从地下冒出一只或多只地鼠,玩游戏的人要做的就是打地鼠。   假设:   1、每一个时刻我们只能打一只地鼠,并且打完以后该时刻出现的所

2017-08-03 14:22:02 316

原创 B - CA Loves Stick HDU - 5655

CA loves to play with sticks. One day he receives four pieces of sticks, he wants to know these sticks can spell a quadrilateral. (What is quadrilateral? Click here: https://en.wikipedia.org/wiki/

2017-08-03 14:12:04 240

转载 最大流 https://comzyh.com/blog/archives/568/

“网络流博大精深”—sideman语一个基本的网络流问题点击打开链接感谢WHD的大力支持最早知道网络流的内容便是最大流问题,最大流问题很好理解:解释一定要通俗!如右图所示,有一个管道系统,节点{1,2,3,4},有向管道{A,B,C,D,E},即有向图一张. [1]是源点,有无限的水量,[4]是汇点,管道容量如图所示.试问[4]点最大可接收的水的流

2017-07-27 21:41:10 808

转载 dinic

Dinic PK Isap  在Acm竞赛中,网络流中求最大流的主流算法有Dinic和Isap,那么这两种算法究竟选哪种好,有些人说Dinic稳定,有些人说Isap效率高,还有人说卡Dinic的题目都是不人道的。为此我分别测试了一下他们的效率。  测试的题目是POJ3469,题目的测试数据足以分辨这两个算法的效率了,所提交的语言为G++。  下面是Dinic的,没有

2017-07-27 19:12:06 514

转载 最大流

oa414的学习之路老当益壮,宁移白首之心;穷且益坚,不坠青云之志最大流:Ford-Fulkerson方法DFS实现最简单的最大流算法,不断搜索增广路增广。这是很不划算的算法,因为效率太低了,随便一个数据都能把它卡住。虽然现在10分钟就能打出一个没有错误的SAP,花很长时间搞出这个很不划算。但是,我不能死记一个高级的算法而连最基础的算法都打不出来。竞

2017-07-27 16:25:28 327

原创 AYIT2017暑假集训第三周周三赛 A - e-Coins POJ - 3021

At the Department for Bills and Coins, an extension of today's monetary system has newly been proposed, in order to make it fit the new economy better. A number of new so called e-coins will be produc

2017-07-27 11:18:42 180

转载 重要题目

1.poj1062 昂贵的聘礼(中等)    此题是个经典题目;用Dijkstra即可;但是其中的等级处理需要一定的技巧;   要理解好那个等级制度;这个处理好,基本就是裸体Dijkstra;2 poj1125 Stockbroker Grapevine(基本)   这个是简单Floyd,需要求出的是每对顶点之间的最短路径;   然后找到那个所需时间

2017-07-25 14:57:06 160

原创 Cow Contest poj 3615

Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12168 Accepted: 6760DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are particip

2017-07-25 14:49:48 142

原创 poj1125 - Stockbroker Grapevine

Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 36740 Accepted: 20398DescriptionStockbrokers are known to overreact to rumours. You

2017-07-25 14:12:28 205

原创 G - Five-In-a-Row CodeForces - 825B

Alice and Bob play 5-in-a-row game. They have a playing field of size10 × 10. In turns they put either crosses or noughts, one at a time. Alice puts crosses and Bob puts noughts.In current match the

2017-07-24 08:13:05 401

原创 AYIT2017暑假集训第二周周三赛 E - find the most comfortable road HDU - 1598

XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提速/降速,痛苦呀 ), 但XX星人对时

2017-07-24 08:11:42 246

原创 AYIT2017暑假集训第二周周三赛 D - Meteor Shower POJ - 3669

Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxious for her safety, she vows to find her way to a sa

2017-07-24 08:05:26 204

原创 AYIT2017暑假集训第二周周三赛 G - Five-In-a-Row CodeForces - 825B

Alice and Bob play 5-in-a-row game. They have a playing field of size10 × 10. In turns they put either crosses or noughts, one at a time. Alice puts crosses and Bob puts noughts.In current match the

2017-07-20 16:30:59 378

原创 AYIT2017暑假集训第二周周三赛 C - Highways POJ - 1751

The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numb

2017-07-20 16:12:12 221

原创 AYIT2017暑假集训第二周周三赛 B - Out of Hay POJ - 2395

The cows have run out of hay, a horrible event that must be remedied immediately. Bessie intends to visit the other farms to survey their hay situation. There are N (2 <= N <= 2,000) farms (numbered 1

2017-07-20 15:50:52 212

原创 AYIT2017暑假集训第二周周三赛 A - Find The Multiple POJ - 1426

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 may assume that n is not greater than 200 and there

2017-07-19 21:53:34 232

翻译 uva-307 sticks

#include#include#includeusing namespace std;int p[1000],book[1000],n;int cmp(int x,int y){ return x>y;}int dfs(int cur,int g,int id,int cnt,int sum)//g 代表棍子长度 id代表从哪开始找{

2017-07-14 17:30:43 174

acm模板,自己总结

私人模板,自己写的,有图论等基础知识,适用于省赛.......................................................................................................................................................................................................

2018-06-04

acm常用模板

acm算法模板

2017-07-28

空空如也

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

TA关注的人

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