Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a ...
分类:
其他好文 时间:
2018-09-07 22:04:20
阅读次数:
167
这题考试的时候并没有想出来……还是自己太弱了。 当时的想法是如何找到一条最短而且经过点最多的路,之后就一直卡在这上面出不来了…… 但后来发现并不需要这样,因为我们要求的是……路径长和经过点数的比值,所以我们可以选择在原图中跑spfa或者dij,每次走到一个新的点,就把当前点数设置为转移过来的那个地方 ...
分类:
其他好文 时间:
2018-09-07 15:09:08
阅读次数:
189
Docker的本地网络实现其实就是利用了Linux上的网络命名空间和虚拟网络设备(特别是veth pair)。 基本原理 直观上看,要实现网络通信,机器需要至少一个网络接口(物理接口或虚拟接口)与外界相通,并可以收发数据包;此外,如果不同子网之间要进行通信,需要额外的路由机制。 Docker中的网络 ...
分类:
其他好文 时间:
2018-09-06 02:28:53
阅读次数:
227
set nocompatible " required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vun ...
分类:
系统相关 时间:
2018-09-06 00:05:28
阅读次数:
175
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of e ...
分类:
其他好文 时间:
2018-09-05 08:59:28
阅读次数:
160
因为是x,y均为整数因此对于同一直线的点,其最简分数x/y是相同的(y可以为0,这里不做除法)于是将这些点不断求最简分数用pair在set中去重即可。 ...
分类:
其他好文 时间:
2018-09-04 23:29:50
阅读次数:
170
MATLAB部分: xmap = repmat( linspace( -regionW/2, regionW/2, regionW), regionH, 1 );%linspace [x1,x2,N] 等差数列 ymap = repmat( linspace( -regionH/2, regionH... ...
分类:
编程语言 时间:
2018-09-04 19:12:29
阅读次数:
479
https://nanti.jisuanke.com/t/30996 题意 每天增加m个灯泡,n个房间,能一次性换就换,模拟换灯泡过程。询问第几天的状态 分析 离线做,按题意模拟。比赛时线段树写挫了。。导致不断超时,我太弱了。每次询问符合要求的最左边的点。 ...
分类:
其他好文 时间:
2018-09-04 16:57:34
阅读次数:
301
" 10028. 「一本通 1.4 例 3」Knight Moves" 【题目描述】 编写一个程序,计算一个骑士从棋盘上的一个格子到另一个格子所需的最小步数。骑士一步可以移动到的位置由下图给出。 【算法】 双向bfs。 【代码】 cpp include define P pair define ff ...
分类:
其他好文 时间:
2018-09-03 22:59:26
阅读次数:
221
Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ances ...
分类:
其他好文 时间:
2018-09-03 13:41:00
阅读次数:
154