Problem You are a physical education teacher, in five minutes a class from the class, you decide to get into a game. There are 100 students in our cla Read More
posted @ 2019-11-03 11:18 zhaodonglin Views(123) Comments(0) Diggs(0)
The implementation of SDN controller for data center. All switches are connected with each other Go func fixed_shooting(msg_chan chan string) { for { Read More
posted @ 2018-09-21 11:36 zhaodonglin Views(75) Comments(0) Diggs(0)
The implementation of SDN controller for data center. All switches are connected with each other ```Gofunc fixed_shooting(msg_chan chan string) { for Read More
posted @ 2018-09-21 11:32 zhaodonglin Views(95) Comments(0) Diggs(0)
p=[[1000,10, 1000, 30, 100], [1000,1000,50, 1000,1000], [1000,1000,1000,1000,10], [1000,1000,20, 1000,60], [1000,1000,1000,1000,1000]] dist=[0,0,0,0,0 Read More
posted @ 2016-06-07 19:24 zhaodonglin Views(168) Comments(0) Diggs(0)
weight=[20,10,26,15]_list = zip(weight, range(0, len(weight)))capacity =70 _list.sort(key=lambda item:item[0])print _list_list_load = []def load(item) Read More
posted @ 2016-06-07 08:37 zhaodonglin Views(127) Comments(0) Diggs(0)
from __future__ import division weight = [10,20,30]volume =[60,100,120]kept = [0,0,0]M = 50def knapback(M, weight, volume, kept): for i in range(0,3): Read More
posted @ 2016-06-07 08:36 zhaodonglin Views(133) Comments(0) Diggs(0)
n=5s = [1,3,0,5,3,5,6,8,8,2,12]f = [4,5,6,7,8,9,10,11,12,13,14]a =[False, False, False, False, False, False, False, False, False, False, False ]_list Read More
posted @ 2016-06-07 08:35 zhaodonglin Views(154) Comments(0) Diggs(0)
key_probability = [-1, 0.15, 0.1, 0.05, 0.1, 0.2]virtual_key_probability = [0.05, 0.1, 0.05, 0.05, 0.05, 0.1] expect_cost = [[0] *10 for i in range(10 Read More
posted @ 2016-06-06 18:42 zhaodonglin Views(165) Comments(0) Diggs(0)
a=[2,4,3,6,1]b=[5,2,3,1,7] tasks = zip(a,b)tasks_no= zip(tasks, range(1,6))_list1 = sorted(filter(lambda item:item[0][0] < item[0][1], tasks_no))_list Read More
posted @ 2016-05-27 08:10 zhaodonglin Views(148) Comments(0) Diggs(0)
p=[0,8,7,4,2,5,1,9,3,10,6]size= [[0 for col in range(0,11)] for row in range(0,11)]def calc_max_num(): for j in range(1,11): if (j >= p[0]): size[1][j Read More
posted @ 2016-05-24 20:03 zhaodonglin Views(131) Comments(0) Diggs(0)