8d

广同合部将造两信便

梦想的初衷 提交于 2019-12-06 01:18:41
https://zhaopin.baidu.com/quanzhi?query=%E6%8F%AD%E9%98%B3%E5%B8%82%E5%A4%96%E5%9B%B4%E5%A5%B3%E9%A2%84%E7%BA%A6%E6%9C%8D%E5%8A%A1v%E4%BF%A11937%E2%91%A88803%E4%BF%9D%E5%81%A5%E6%9C%8D%E5%8A%A1qigk https://zhaopin.baidu.com/quanzhi?query=%E8%8C%82%E5%90%8D%E5%B8%82%E5%A4%96%E5%9B%B4%E5%A5%B3%E9%A2%84%E7%BA%A6%E6%9C%8D%E5%8A%A1v%E4%BF%A11937%E2%91%A88803%E6%8A%80%E5%B8%88%E6%9C%8D%E5%8A%A1sxsq https://zhaopin.baidu.com/quanzhi?query=%E6%A2%85%E5%B7%9E%E5%B8%82%E5%A4%96%E5%9B%B4%E6%A8%A1%E7%89%B9%E5%8C%85%E5%A4%9C%E6%9C%8D%E5%8A%A1v%E4%BF%A11937%E2%91%A88803%E9%AB%98%E7%BA%A7%E6%A8%A1%E7%89

CH2907 乳草的入侵 BFS

匿名 (未验证) 提交于 2019-12-03 00:03:02
题目链接 http://noi-test.zzstep.com/contest/0x29%E3%80%8C%E6%90%9C%E7%B4%A2%E3%80%8D%E7%BB%83%E4%B9%A0/2907%20%E4%B9%B3%E8%8D%89%E7%9A%84%E5%85%A5%E4%BE%B5 分析 BFS裸题,每次向周边八个位置扩展即可。 AC代码 # include <cstdio> # include <cstring> # include <algorithm> # include <queue> using namespace std ; inline int read ( ) { int num = 0 ; char c = getchar ( ) ; while ( c < '0' || c > '9' ) c = getchar ( ) ; while ( c >= '0' && c <= '9' ) num = num * 10 + c - '0' , c = getchar ( ) ; return num ; } const int maxn = 105 ; const int nxt [ 8 ] [ 2 ] = { { - 1 , 0 } , { 1 , 0 } , { 0 , - 1 } , { 0 , 1 } , { - 1 , - 1 } ,

SDN实验---Ryu的应用开发(三)流量监控

妖精的绣舞 提交于 2019-12-02 22:09:05
一:实现流量监控 (一)流量监控原理 其中控制器向交换机周期下发获取统计消息,请求交换机消息------是主动下发过程 流速公式:是(t1时刻的流量-t0时刻的流量)/(t1-t0) 剩余带宽公式:链路总带宽-流速--------是这一个这一个,例如s2-s3(不是一条,例如:h1->s1->s2->s3->h2)的剩余带宽 路径有效带宽是只:这一整条路径中,按照最小的剩余带宽处理 二:代码实现 (一)代码框架 from ryu.app import simple_switch_13 from ryu.controller.handler import set_ev_cls from ryu.controller import ofp_event from ryu.controller.handler import MAIN_DISPATCHER,DEAD_DISPATCHER class MyMonitor(simple_switch_13): #simple_switch_13 is same as the last experiment which named self_learn_switch ''' design a class to achvie managing the quantity of flow ''' def __init__(self,*args,*

CH2907 乳草的入侵 BFS

烈酒焚心 提交于 2019-11-29 09:49:58
题目链接 http://noi-test.zzstep.com/contest/0x29%E3%80%8C%E6%90%9C%E7%B4%A2%E3%80%8D%E7%BB%83%E4%B9%A0/2907%20%E4%B9%B3%E8%8D%89%E7%9A%84%E5%85%A5%E4%BE%B5 分析 BFS裸题,每次向周边八个位置扩展即可。 AC代码 # include <cstdio> # include <cstring> # include <algorithm> # include <queue> using namespace std ; inline int read ( ) { int num = 0 ; char c = getchar ( ) ; while ( c < '0' || c > '9' ) c = getchar ( ) ; while ( c >= '0' && c <= '9' ) num = num * 10 + c - '0' , c = getchar ( ) ; return num ; } const int maxn = 105 ; const int nxt [ 8 ] [ 2 ] = { { - 1 , 0 } , { 1 , 0 } , { 0 , - 1 } , { 0 , 1 } , { - 1 , - 1 } ,