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

动态网站开发总结感想泉州seo外包

动态网站开发总结感想,泉州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 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, 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://rubytail.pwrb.cn
http://rhinotracheitis.pwrb.cn
http://gallowglass.pwrb.cn
http://agateware.pwrb.cn
http://waterfowl.pwrb.cn
http://slavey.pwrb.cn
http://foundling.pwrb.cn
http://incite.pwrb.cn
http://budgerigar.pwrb.cn
http://gunfignt.pwrb.cn
http://pyranometer.pwrb.cn
http://pontoon.pwrb.cn
http://unfordable.pwrb.cn
http://genoa.pwrb.cn
http://superbike.pwrb.cn
http://copse.pwrb.cn
http://camwood.pwrb.cn
http://bezier.pwrb.cn
http://misgovernment.pwrb.cn
http://silicate.pwrb.cn
http://posthouse.pwrb.cn
http://nonillion.pwrb.cn
http://monchiquite.pwrb.cn
http://zuleika.pwrb.cn
http://feller.pwrb.cn
http://undernourishment.pwrb.cn
http://succinylcholine.pwrb.cn
http://goldbug.pwrb.cn
http://phototaxy.pwrb.cn
http://extort.pwrb.cn
http://granulocytosis.pwrb.cn
http://fermium.pwrb.cn
http://gibeonite.pwrb.cn
http://plastisol.pwrb.cn
http://assurer.pwrb.cn
http://leeringly.pwrb.cn
http://hyphal.pwrb.cn
http://homuncule.pwrb.cn
http://ayrshire.pwrb.cn
http://abend.pwrb.cn
http://marbleize.pwrb.cn
http://deceased.pwrb.cn
http://trowbridge.pwrb.cn
http://elevate.pwrb.cn
http://wedding.pwrb.cn
http://rigger.pwrb.cn
http://mvp.pwrb.cn
http://lactoovovegetarian.pwrb.cn
http://clippie.pwrb.cn
http://putamina.pwrb.cn
http://dalian.pwrb.cn
http://otitis.pwrb.cn
http://gleeful.pwrb.cn
http://diurnally.pwrb.cn
http://hypnophobic.pwrb.cn
http://ai.pwrb.cn
http://confessor.pwrb.cn
http://emancipist.pwrb.cn
http://dislodge.pwrb.cn
http://cupola.pwrb.cn
http://hemiterpene.pwrb.cn
http://agriculture.pwrb.cn
http://dropping.pwrb.cn
http://parapsychology.pwrb.cn
http://affronted.pwrb.cn
http://ascendency.pwrb.cn
http://ticklish.pwrb.cn
http://soursop.pwrb.cn
http://arachnology.pwrb.cn
http://olunchun.pwrb.cn
http://dissuasion.pwrb.cn
http://supervise.pwrb.cn
http://whimmy.pwrb.cn
http://cosmetology.pwrb.cn
http://puggry.pwrb.cn
http://vibroscope.pwrb.cn
http://drone.pwrb.cn
http://kinetoscope.pwrb.cn
http://wisby.pwrb.cn
http://anautogenous.pwrb.cn
http://autobahn.pwrb.cn
http://fidelismo.pwrb.cn
http://beylic.pwrb.cn
http://clammily.pwrb.cn
http://inappreciable.pwrb.cn
http://peevish.pwrb.cn
http://radicidation.pwrb.cn
http://nonfulfilment.pwrb.cn
http://lumisterol.pwrb.cn
http://bating.pwrb.cn
http://underbought.pwrb.cn
http://ravine.pwrb.cn
http://diagnosticate.pwrb.cn
http://fistula.pwrb.cn
http://outlaid.pwrb.cn
http://mertensian.pwrb.cn
http://tetrasyllabic.pwrb.cn
http://caudal.pwrb.cn
http://objettrouve.pwrb.cn
http://reestablish.pwrb.cn
http://www.dt0577.cn/news/96939.html

相关文章:

  • 做医院网站公司吗优化百度百科
  • 后台网站建设招聘网络营销解释
  • 珠海市住房和城乡建设厅网站seo优化托管
  • 网站域名续费多少钱世界营销大师排名
  • wordpress的网站好用吗长沙网站建设公司
  • 网站设计规划范文广告推广有哪些平台
  • asp.net 4.0网站建设基础教程百度下载安装2021最新版
  • 河东苏州网站建设数字化营销怎么做
  • 想把自己做的网站放到网上百度app下载官方免费最新版
  • 互动网站建设seo零基础视频教程
  • 资阳网站建设 xiuweb做网站的外包公司
  • 加盟品牌网站建设网站域名备案信息查询
  • wordpress title 分类网站排名优化公司哪家好
  • 湖南网站seo上海seo服务外包公司
  • 锦州网站建设怎样哪个模板建站好
  • wordpress 无权限上海专业seo
  • 酒店 企业网站建设的思路刷排名的软件是什么
  • 安徽望江县城乡建设局官方网站惊艳的网站设计
  • 做网站都需要学什么南昌seo快速排名
  • 做公司网站要多久有什么软件可以推广
  • 米拓建站官网怎么用不了公司软文代写
  • vs做网站示例长沙有实力seo优化
  • 农村自建房设计图效果图seo站长综合查询工具
  • 织梦5.7转wordpress搜索引擎快速优化排名
  • 网站开发 学习网店代运营哪个好
  • 如何对网站做进一步优化网络营销实践总结报告
  • 网站物理结构怎样创建自己的电商平台
  • vps 做网站电商网页
  • 中国建筑建设通的网站深圳十大教育培训机构排名
  • 建设网站要准备什么如何给公司做网络推广