自定义博客皮肤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)
  • 收藏
  • 关注

原创 2021-02-14

网络编程学习记录具体学习路线五种网络IO模型学习记录将自己所学习的网络编程知识总结起来,方便日后查看,同时也可以提高自己的总结能力。具体学习路线五种网络IO模型阻塞IO模型非阻塞IO模型信号驱动IO模型异步IO模型多路复用IO模型暂时先记录一下,日后会逐步扩充和丰富学习路线...

2021-02-14 17:52:07 94

原创 Thrift Linux下载安装

Thrift Linux下载安装Thrift 简介安装Thrift 简介安装安装环境 Ubuntu 18.04安装依赖环境sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-devthrift安装命令wget https://github.com/apache/

2021-02-14 17:51:02 438

原创 bzoj 1001 狼抓兔子 网络流

现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的,而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路 1:(x,y)<==>(x+1,y) 2:(x,y)<==>(x,y+1) 3:(x,y)<==>(x+...

2018-06-11 11:07:38 273

原创 湖南师范大学2018年大学生程序设计竞赛新生赛 J 名哥的完全平方数 莫队算法

题目链接:点击打开链接 题目描述511 CF第一人名哥不上紫名不实习!这天,名哥上CF刷了一道有趣的题(CF 480D),意犹未尽!跟数学大佬浩佬吹嘘,浩佬看了题目:”这太简单了!我改一下,看你能做出来吗? 给一个长度为n的数组,做q次询问,每次询问区间[l,r]里有多少对数的乘积为完全平方数?”名哥呆了,您能帮名哥解决吗?输入描述:第一行输入 n(1≤n≤3*10^5...

2018-06-07 19:17:53 307

原创 2018计蒜之道第一场A,B,C

A题 百度无人车二分车的重量,最后特判一下结果是否为0,如果为0那么答案就是1。AC代码:#include <bits/stdc++.h>using namespace std;const int maxn = 2e4 + 7;long long a[maxn];int n;long long s,p;long long check(long long x){ lo...

2018-05-22 16:45:32 206

原创 poj 2186 Popular Cows SCC+缩点

题目链接:poj2186Language:DefaultPopular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 37802 Accepted: 15393DescriptionEvery cow's dream is to become the most popular cow in the herd. In a ...

2018-05-03 19:21:02 181

原创 牛客网Wannafly挑战赛14 C可达性 SCC + 缩点

题目链接:可达性时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 给出一个 0 ≤ N ≤ 105 点数、0 ≤ M ≤ 105 边数的有向图,输出一个尽可能小的点集,使得从这些点出发能够到达任意一点,如果有多个这样的集合,输出这些集合升序排序后字典序最小的。输入描述:第一行为两个整数 1 ≤ n...

2018-04-26 23:37:44 224

原创 poj 1523 SPF 割点

题目链接:poj1523SPFTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9893 Accepted: 4447DescriptionConsider the two networks shown below. Assuming that data moves around these networks only betwee...

2018-04-23 17:32:58 224

原创 hdu 1087 基础dp

题目链接:hdu 1087Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45600    Accepted Submission(s): 21127Problem Descr...

2018-04-02 20:58:22 190

原创 poj 1860 Currency Exchange Bellman-Ford 求正环

题目链接:点击打开链接Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 33885 Accepted: 13008DescriptionSeveral currency exchange points are working in our city. Let us suppose that each...

2018-03-15 21:26:17 188

原创 poj 3259 spfa

题目链接:点击打开链接WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 58013 Accepted: 21697DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. ...

2018-03-15 19:28:26 234 1

原创 poj 3268 Silver Cow Party 最短路

题目链接:点击打开链接Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26082 Accepted: 11917DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to ...

2018-03-14 21:04:09 173

原创 2017乌鲁木齐区域赛D题Fence Building

题目链接:点击打开链接现场赛的时候想了一个整场都没推出来,xjb推出个式子来也不会写最后打铁。。。一直都知道这是一道公式题,就是不知道是啥公式,赛后才知道得用欧拉公式。。。平面内的区域个数=平面内的点数+平面内的边数+2,因为这个是在圆上,所以圆外的那1个要减去,所以最后+1而不是+2。点数=C(n,4),即每4个点连线就有一个平面内的点产生,边数=C(n,2),即每两个点连线就产生一条边。这题的...

2018-03-10 16:37:37 820

原创 组合数计算公式 数论笔记

今天的牛客网比赛的第二题一脸懵逼啊。。赛后看别人代码才知道了一种新的组合数公式计算方法。(a/b)%mod这个a/b在b比较大的时候在计算机里的精度有损失,所以我们将它转化为(a*c)%mod的形式,这里引入逆元的概念:(b*c)=1(%mod) ,那么(a/b)%mod=(a*c)%mod,这里就避免了精度损失。逆元的求法有好几种方法,我学了费马小定理,以后再补上其他的方法。费马小定理:设inv...

2018-03-10 00:03:40 2814

原创 整数划分及输出 dfs

这是这个学期的第一次算法作业,书上给出了整数划分的伪代码,作业是将它转化为输出整数划分的具体结果。感觉用书上的代码改写没什么思路,就用dfs写了。如果输出答案总数,那么就在输出序列那个地方ans++就行了。代码:#include <bits/stdc++.h>using namespace std;int n;int ans[1000];void out(int len)...

2018-03-09 15:49:42 851

原创 hdu1166 线段树模板

题目链接:点击打开链接敌兵布阵Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 107741    Accepted Submission(s): 45287Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以...

2018-03-06 21:26:01 164

原创 hdu1710 树的先序和中序遍历求后序遍历

题目链接:点击打开链接Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9346    Accepted Submission(s): 4222Problem DescriptionA binary...

2018-03-06 21:15:55 326

原创 codeforces 920F 线段树

F. SUM and REPLACEtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet D(x) be the number of positive divis

2018-02-05 19:37:58 482

原创 hdu 2181 dfs

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2181哈密顿绕行世界问题Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5699    Accepted Submissio

2018-01-27 23:37:38 218

原创 CF 893C DFS

题目链接:http://codeforces.com/problemset/problem/893/CC. Rumortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2017-12-17 19:33:28 394

原创 POJ 3617 字典序贪心

Best Cow LineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27553 Accepted: 7416DescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual

2017-12-10 23:31:04 215

原创 2017青岛区域赛I题The Squared Mosquito Coil

Lusrica designs a mosquito coil in a board with n × n grids. The mosquito coil is a series of consecutive grids, each two neighboring grids of which share a common border. If two grids in the mosqui

2017-11-16 22:38:47 549

原创 POJ 1200字符串hash

Crazy SearchTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 30412 Accepted: 8408DescriptionMany people like to solve hard puzzles some of which may lead

2017-11-08 19:14:47 227

原创 CF 887A

A. Div. 64time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTop-model Izabella participates in the competitio

2017-11-06 21:27:16 930

原创 2017.11.6 开始我的博客生涯

从今天开始,记录我的每一道ACM试题的解题报告

2017-11-06 21:23:22 253

空空如也

空空如也

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

TA关注的人

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