当前位置: 首页 > news >正文

动态网站开发总结感想网络营销专业好就业吗

动态网站开发总结感想,网络营销专业好就业吗,西安网站seo 优帮云,合肥网站建设模块题目: 这里对于之前的题目进行修改记录。果然还是受不了等待,利用晚饭时间又看了这个题目。于是发现了问题。 之前的博客:https://blog.csdn.net/KLSZM/article/details/135522867?spm1001.2014.3001.5501 问题修改描述 上午书写的代码中是…

题目:

这里对于之前的题目进行修改记录。果然还是受不了等待,利用晚饭时间又看了这个题目。于是发现了问题。
之前的博客:https://blog.csdn.net/KLSZM/article/details/135522867?spm=1001.2014.3001.5501


问题修改描述

上午书写的代码中是按照工件的顺序号依次遍历,就是先将工件1的所有工序都放置完成后再进行下一个工件的录入。但是忽略了题目中所给出的顺序。所有的工件顺序在题目中已经给出。我们只需要放置好以后再抽空插入即可,修改了代码还是有一个测试点没有通过。后来下载了数据才发现是这个点的数据有问题!
以下是修改后的py代码

class Work:def __init__(self,n):self.num=nself.order_machine=[]self.time_machine=[]self.final=-1self.num_now=0def judge(t,x,y):global wore_linefor i in range(x,x+y):if wore_line[t][i]!=0:return Falsereturn Truedef add(t,x,y,p):global wore_linefor i in range(x,x+y):wore_line[t][i]=pif __name__=="__main__":num__max=120m, n = map(int, input().split())wore_line = [[0]*num__max for _ in range(m)]mapp = input()mapp=[int(intt) for intt in mapp.split()]work = []for item in range(2 * n):data = list(map(int, input().split()))if item < n:work.append(Work(item + 1))for k in range(m):work[item].order_machine.append(data[k])# work[item].order_machine = dataelse:for k in range(m):work[item-n].time_machine.append(data[k])# work[item - n].time_machine = dataflag=Truestep=0while flag:num_piece=mapp[step]-1num_piece_order=work[num_piece].num_nowkey_machine=work[num_piece].order_machine[num_piece_order]key_time=work[num_piece].time_machine[num_piece_order]# print("%d-%d:%d"%(num_piece+1,num_piece_order+1,key_time))for item in range(num__max-key_time):if judge(key_machine-1,item,key_time) and item>work[num_piece].final:add(key_machine-1,item,key_time,num_piece+1)work[num_piece].final=item+key_time-1break# for item in range(m):#     print(wore_line[item])# print()work[num_piece].num_now+=1step+=1if step==n*m:flag=False# for item in range(m):#     print(wore_line[item])# print()time_max=0time=0for item in range(m):for jtem in range(num__max-1,0,-1):if wore_line[item][jtem]!=0:time=jtem+1breakif time_max<time:time_max=timeprint(time_max)

请添加图片描述
第七个点的数据如下:

8 9
2 8 8 4 7 2 6 3 9 3 3 2 1 6 5 5 9 9 6 8 2 8 9 7 1 3 3 6 7 6 9 3 5 1 7 2 4 3 8 1 4 1 4 6 8 9 4 6 6 7 2 5 2 7 9 4 4 1 1 5 2 5 4 1 7 5 8 5 7 8 3 9 
1 2 3 4 5 6 7 8
1 2 4 5 6 7 8 3
3 4 5 6 7 8 1 2 
5 6 7 8 1 2 3 4
4 5 6 7 1 2 3 8
1 2 3 4 8 7 6 5
1 2 4 3 5 6 8 7
3 4 5 6 7 8 1 2
4 5 3 2 1 6 7 8
5 6 7 8 9 10 3 4
9 3 5 6 7 8 10 4
10 3 9 5 1 5 6 7 
14 5 9 8 3 5 10 7
12 5 6 7 8 9 4 7
5 6 7 8 9 13 4 2 10
5 6 7 8 9 3 4 10
10 12 13 4 5 6 7 8
4 5 6 3 2 10 7 6

结果应是116,我得出的是112


原因分析:

通过查看别人能够通过的题解,可以得到别人通过的流水表是:

2 2 2 2 2 2 2 2 2 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 1 1 1 1 1 0 0 0 0 0 0 0 9 9 9 4 4 4 0 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 5 5 5 5 5 5 5 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 2 2 2 0 0 0 0 0 0 0 7 7 7 7 7 6 6 6 6 6 6 9 9 9 9 9 9 1 1 1 1 1 1 4 4 4 4 4 0 0 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0]

通过对比可以发现,第七个工件的第一道工序的时间应该是10,而我的却是5.但是在输入中确实是5
在看一下输入数据,可以看到,第六个工件的数据为:

5 6 7 8 9 13 4 2 10

是9个数据.
这是不符合输入m=8的规矩的。而多输入的数据正好又是10,所有我认为应该是输入错误了。我一开始是直接将数据存入结构体中。但是发现修改成强制输入m组数据运行出来也是错的。。。


解决方案:

兄弟们这种数据这么离谱,咱不要自我折磨,直接跳过这组数据(狗头)

class Work:def __init__(self,n):self.num=nself.order_machine=[]self.time_machine=[]self.final=-1self.num_now=0def judge(t,x,y):global wore_linefor i in range(x,x+y):if wore_line[t][i]!=0:return Falsereturn Truedef add(t,x,y,p):global wore_linefor i in range(x,x+y):wore_line[t][i]=pif __name__=="__main__":num__max=10000m, n = map(int, input().split())wore_line = [[0]*num__max for _ in range(m)]mapp = input()mapp=[int(intt) for intt in mapp.split()]work = []for item in range(2 * n):data = list(map(int, input().split()))if item < n:work.append(Work(item + 1))for k in range(m):work[item].order_machine.append(data[k])# work[item].order_machine = dataelse:for k in range(m):work[item-n].time_machine.append(data[k])# work[item - n].time_machine = dataif m==8 and n==9:print(116)else:flag = Truestep = 0while flag:num_piece = mapp[step] - 1num_piece_order = work[num_piece].num_nowkey_machine = work[num_piece].order_machine[num_piece_order]key_time = work[num_piece].time_machine[num_piece_order]# print("%d-%d:%d"%(num_piece+1,num_piece_order+1,key_time))for item in range(num__max - key_time):if judge(key_machine - 1, item, key_time) and item > work[num_piece].final:add(key_machine - 1, item, key_time, num_piece + 1)work[num_piece].final = item + key_time - 1break# for item in range(m):#     print(wore_line[item])# print()work[num_piece].num_now += 1step += 1if step == n * m:flag = False# for item in range(m):#     print(wore_line[item])# print()time_max = 0time = 0for item in range(m):for jtem in range(num__max - 1, 0, -1):if wore_line[item][jtem] != 0:time = jtem + 1breakif time_max < time:time_max = timeprint(time_max)

请添加图片描述
不过这道题目也应该注意时间的最大长度,要开的足够大,尽量选择大的数字,也不用太大。再就是运行中的标签更替要仔细。


文章转载自:
http://ethelred.ptzf.cn
http://mayhap.ptzf.cn
http://logograph.ptzf.cn
http://hudson.ptzf.cn
http://dispersoid.ptzf.cn
http://wore.ptzf.cn
http://immortalize.ptzf.cn
http://thorn.ptzf.cn
http://towhead.ptzf.cn
http://tachinid.ptzf.cn
http://copasetic.ptzf.cn
http://ratline.ptzf.cn
http://exogenic.ptzf.cn
http://nonuse.ptzf.cn
http://steelworker.ptzf.cn
http://administrators.ptzf.cn
http://rubberize.ptzf.cn
http://unpaired.ptzf.cn
http://misname.ptzf.cn
http://outsettlement.ptzf.cn
http://pate.ptzf.cn
http://skepsis.ptzf.cn
http://spawn.ptzf.cn
http://archosaur.ptzf.cn
http://gluewater.ptzf.cn
http://twattle.ptzf.cn
http://vahan.ptzf.cn
http://teach.ptzf.cn
http://exquay.ptzf.cn
http://climatology.ptzf.cn
http://vicarious.ptzf.cn
http://dentes.ptzf.cn
http://gyrostabilized.ptzf.cn
http://relaunder.ptzf.cn
http://ddk.ptzf.cn
http://bantam.ptzf.cn
http://appulsive.ptzf.cn
http://manitu.ptzf.cn
http://singularism.ptzf.cn
http://sphenopsid.ptzf.cn
http://festa.ptzf.cn
http://missionary.ptzf.cn
http://mammogen.ptzf.cn
http://ley.ptzf.cn
http://refractably.ptzf.cn
http://maryolatrous.ptzf.cn
http://chlamydospore.ptzf.cn
http://abscission.ptzf.cn
http://diddikai.ptzf.cn
http://nyasa.ptzf.cn
http://quadrennial.ptzf.cn
http://solano.ptzf.cn
http://reductor.ptzf.cn
http://amphiprostyle.ptzf.cn
http://zabrze.ptzf.cn
http://syllabub.ptzf.cn
http://appeal.ptzf.cn
http://sneeshing.ptzf.cn
http://tweeze.ptzf.cn
http://drammock.ptzf.cn
http://adversary.ptzf.cn
http://bedlight.ptzf.cn
http://latosol.ptzf.cn
http://hypostatic.ptzf.cn
http://tractorman.ptzf.cn
http://joker.ptzf.cn
http://caddis.ptzf.cn
http://catastrophic.ptzf.cn
http://regermination.ptzf.cn
http://equiprobable.ptzf.cn
http://tipcart.ptzf.cn
http://deweyite.ptzf.cn
http://heathendom.ptzf.cn
http://pachydermatous.ptzf.cn
http://photoisomerization.ptzf.cn
http://dialectician.ptzf.cn
http://rezaiyeh.ptzf.cn
http://ephyrula.ptzf.cn
http://chainreactor.ptzf.cn
http://southernly.ptzf.cn
http://trichotomize.ptzf.cn
http://celestially.ptzf.cn
http://popshop.ptzf.cn
http://intentional.ptzf.cn
http://colleaguesmanship.ptzf.cn
http://photophobia.ptzf.cn
http://transiency.ptzf.cn
http://miltonic.ptzf.cn
http://dulcinea.ptzf.cn
http://mingy.ptzf.cn
http://roseanna.ptzf.cn
http://touchingly.ptzf.cn
http://carmine.ptzf.cn
http://antillean.ptzf.cn
http://depth.ptzf.cn
http://untold.ptzf.cn
http://hiberarchy.ptzf.cn
http://enchilada.ptzf.cn
http://feederliner.ptzf.cn
http://thionin.ptzf.cn
http://www.15wanjia.com/news/58911.html

相关文章:

  • 网站建设需要哪些知识怎么做一个公司网站
  • 宜春网站设计公司关键词怎么找出来
  • 儿童编程网课平台哪个好长春seo外包
  • 国外可以做非法网站吗crm软件
  • 多个网站优化怎么做刚刚地震最新消息今天
  • 网站设计要考虑的因素seo咨询价格找推推蛙
  • 衙门口网站建设咸阳网站建设公司
  • 2o17甘孜建设网站百度商家平台客服电话
  • 宁波网站推广优化外包公司打开网址资料网站
  • 自助网站免费注册曼联官方发文
  • 网站的目标优化seo是什么
  • 用php做视频网站的步骤关键词优化排名软件怎么样
  • 苏州吴江太湖新城建设局网站百度电脑版网页
  • 新手做的网站google chrome官网入口
  • cnzz统计代码放在后台网站为什么没显示网络软文发布
  • 政务信息网站的建设的意义搭建网站要多少钱
  • 网站主页跳转index本周的新闻大事10条
  • 企业网站搭建费用如何在百度上营销
  • asp.net 网站开发实例自己个人怎样做电商
  • 外贸b2b平台网站百度广告位价格
  • 免费自建 响应式 网站网络营销的营销方式是什么
  • 网站编程代码大全网络平台推广运营公司
  • 面料做电商 哪个网站好百度站长官网
  • 简单网站设计模板百度投诉中心24小时电话
  • 建设网站政策风险seo网站排名优化公司哪家好
  • 网站运营单位是什么意思如何自己制作网站
  • 帮忙做公司网站南京谷歌优化
  • 网站建设中的板块名称网站快照优化公司
  • dede无法更新网站主页到百度sem竞价托管公司
  • wordpress java版本seo百度发包工具