[NOIP2006 提高组] 作业调度方案(修改)
题目:
这里对于之前的题目进行修改记录。果然还是受不了等待,利用晚饭时间又看了这个题目。于是发现了问题。
之前的博客: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 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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)

不过这道题目也应该注意时间的最大长度,要开的足够大,尽量选择大的数字,也不用太大。再就是运行中的标签更替要仔细。
相关文章:
[NOIP2006 提高组] 作业调度方案(修改)
题目: 这里对于之前的题目进行修改记录。果然还是受不了等待,利用晚饭时间又看了这个题目。于是发现了问题。 之前的博客:https://blog.csdn.net/KLSZM/article/details/135522867?spm1001.2014.3001.5501 问题修改描述 上午书写的代码中是…...
uniapp微信小程序投票系统实战 (SpringBoot2+vue3.2+element plus ) -全局异常统一处理实现
锋哥原创的uniapp微信小程序投票系统实战: uniapp微信小程序投票系统实战课程 (SpringBoot2vue3.2element plus ) ( 火爆连载更新中... )_哔哩哔哩_bilibiliuniapp微信小程序投票系统实战课程 (SpringBoot2vue3.2element plus ) ( 火爆连载更新中... )共计21条视频…...
浏览器缓存引发的odoo前端报错
前两天,跑了一个odoo16项目,莫名其妙的前端报错, moment.js 报的错, 这是一个时间库,不是我自己写的代码,我也没做过任何修改,搞不清楚为什么报错。以为是odoo的bug,所以从gitee下载…...
如何搭建开源知识库软件AFFiNE并实现公网环境远程协作【内网穿透】
目录 前言 1. 使用Docker安装AFFINE 2. 安装cpolar内网穿透工具 3. 配置AFFINE公网访问地址 4. 实现公网远程访问AFFINE 结语 作者简介: 懒大王敲代码,计算机专业应届生 今天给大家聊聊如何搭建开源知识库软件AFFiNE并实现公网环境远程协作【内网穿…...
记忆泊车信息安全技术要求
一.概述 1.1 编写目的 记忆泊车过程涉及车辆通信、远程控制车辆等关键操作,因此需要把信息安全考虑进去,确保整个自动泊车过程的信息安全。 1.2 编写说明 此版为信息安全需求,供应商需要整体的信息安全方案。 1.3 适用范围 …...
开源分布式任务调度系统DolphinScheduler本地部署与远程访问
文章目录 前言1. 安装部署DolphinScheduler1.1 启动服务 2. 登录DolphinScheduler界面3. 安装内网穿透工具4. 配置Dolphin Scheduler公网地址5. 固定DolphinScheduler公网地址 前言 本篇教程和大家分享一下DolphinScheduler的安装部署及如何实现公网远程访问,结合内…...
C++day3作业
完善对话框,点击登录对话框,如果账号和密码匹配,则弹出信息对话框,给出提示”登录成功“,提供一个Ok按钮,用户点击Ok后,关闭登录界面,跳转到其他界面 如果账号和密码不匹配…...
设计模式⑤ :一致性
一、前言 有时候不想动脑子,就懒得看源码又不像浪费时间所以会看看书,但是又记不住,所以决定开始写"抄书"系列。本系列大部分内容都是来源于《 图解设计模式》(【日】结城浩 著)。该系列文章可随意转载。 …...
Android通过Recyclerview实现流式布局自适应列数及高度
调用 FlowAdapter 跟普通recyclerview一样使用 RecyclerView rvLayout holder.getView(R.id.spe_tag_layout); FlowAdapter rvAdapter new FlowAdapter(); FlowLayoutManager flowLayoutManager new FlowLayoutManager(); rvLayout.setLayoutManager(flowLayoutManager); r…...
AlexNet(fashion-mnist)
前言 AlexNet相较于LeNet-5具有更深的网络结构,采用relu激活函数。 AlexNet 参数更多,计算量更大,计算速度更慢,精度更高。 netnn.Sequential(nn.Conv2d(1,96,kernel_size11,stride4,padding1),nn.ReLU(),nn.MaxPool2d(kernel…...
2024新年烟花代码完整版
文章目录 前言烟花效果展示使用教程查看源码HTML代码CSS代码JavaScript 新年祝福 前言 在这个充满希望和激动的2024年,新的一年即将拉开帷幕,而数字科技的创新与发展也如火如荼。烟花绚丽多彩的绽放,一直以来都是新年庆典中不可或缺的元素。…...
Fontfabric:一款字体与设计的完美结合
一、产品介绍 Fontfabric是一款由国际字体设计公司Fontfabric开发的字体设计软件。它提供了一整套完整的字体设计工具,让用户可以轻松地创建、设计和定制自己的字体。Fontfabric拥有丰富的字体库,包括各种风格和类型,能够满足用户在不同场景…...
Python爬虫—requests模块简单应用
Python爬虫—requests模块简介 requests的作用与安装 作用:发送网络请求,返回响应数据 安装:pip install requests requests模块发送简单的get请求、获取响应 需求:通过requests向百度首页发送请求,获取百度首页的…...
江科大STM32
参考: https://blog.csdn.net/weixin_54742551/article/details/132409170?spm1001.2014.3001.5502 https://blog.csdn.net/Johnor/article/details/128539267?spm1001.2014.3001.5502 SPI:https://blog.csdn.net/weixin_62127790/article/details/132…...
银河麒麟Kylin-Server-V10-SP3使用ISO镜像搭建本地内网YUM/DNF源cdrom/http
机房服务器安装一般是内网环境,需要配置本地的YUM/DNF源。本文介绍通过ISO镜像搭建内网环境的UM/DNF源 准备工作: 提前准备好Kylin-Server-V10-SP3的ISO镜像文件。 本机IP地址:192.168.40.201 镜像存放目录/data/iso/Kylin-Server-V10-SP3-Ge…...
力扣第 379 场周赛VP
目录 一1.思路2.代码 二1.思路2.代码 三1.思路2.代码 四1.思路2.代码 链接:https://leetcode.cn/contest/weekly-contest-379/ 一 1.思路 找最长对角线,很显然直接比较a^2 b ^ 2就行 注意更新时考虑对角线长度相等时候去面积最大 2.代码 class Solution { publ…...
String intern()方法
String intern 方法有什么作用? String.intern() 是一个 native(本地)方法,其作用是将指定的字符串对象的引用保存在字符串常量池中,并返回常量池中对应的字符串引用。 当使用字面量创建字符串时,Java 会在编译期间自…...
springboot 物业管理系统
springboot mysql mybatisthymeleaf 基础信息管理 房屋信息 用户信息 业主信息 租房信息 公告管理 日常管理 财务管理...
K8S--- kubectl auth
该命令可以校验用户或者serviceaccount是否有对应的权限 [root@yyzc-zjjcs01 ~]# /opt/kubernetes/bin/kubectl --kubeconfig /opt/kubernetes/conf/default-admin.kubeconfig auth --help Inspect authorization Available Commands: can-i Check whether an action is allowe…...
HarmonyOS 开发基础(九)forEach
HarmonyOS 开发基础(九)forEach 一、基础使用 Entry Component struct Index {// 创建一个变量,用来存储图片网络网址imageUrl: string https://gw.alicdn.com/imgextra/i2/2201227850912/O1CN01B7gVvP1Ibk6HMiDRz_!!2201227850912.jpg_Q75.…...
SpringBoot-17-MyBatis动态SQL标签之常用标签
文章目录 1 代码1.1 实体User.java1.2 接口UserMapper.java1.3 映射UserMapper.xml1.3.1 标签if1.3.2 标签if和where1.3.3 标签choose和when和otherwise1.4 UserController.java2 常用动态SQL标签2.1 标签set2.1.1 UserMapper.java2.1.2 UserMapper.xml2.1.3 UserController.ja…...
eNSP-Cloud(实现本地电脑与eNSP内设备之间通信)
说明: 想象一下,你正在用eNSP搭建一个虚拟的网络世界,里面有虚拟的路由器、交换机、电脑(PC)等等。这些设备都在你的电脑里面“运行”,它们之间可以互相通信,就像一个封闭的小王国。 但是&#…...
Redis相关知识总结(缓存雪崩,缓存穿透,缓存击穿,Redis实现分布式锁,如何保持数据库和缓存一致)
文章目录 1.什么是Redis?2.为什么要使用redis作为mysql的缓存?3.什么是缓存雪崩、缓存穿透、缓存击穿?3.1缓存雪崩3.1.1 大量缓存同时过期3.1.2 Redis宕机 3.2 缓存击穿3.3 缓存穿透3.4 总结 4. 数据库和缓存如何保持一致性5. Redis实现分布式…...
Objective-C常用命名规范总结
【OC】常用命名规范总结 文章目录 【OC】常用命名规范总结1.类名(Class Name)2.协议名(Protocol Name)3.方法名(Method Name)4.属性名(Property Name)5.局部变量/实例变量(Local / Instance Variables&…...
多模态商品数据接口:融合图像、语音与文字的下一代商品详情体验
一、多模态商品数据接口的技术架构 (一)多模态数据融合引擎 跨模态语义对齐 通过Transformer架构实现图像、语音、文字的语义关联。例如,当用户上传一张“蓝色连衣裙”的图片时,接口可自动提取图像中的颜色(RGB值&…...
Rust 异步编程
Rust 异步编程 引言 Rust 是一种系统编程语言,以其高性能、安全性以及零成本抽象而著称。在多核处理器成为主流的今天,异步编程成为了一种提高应用性能、优化资源利用的有效手段。本文将深入探讨 Rust 异步编程的核心概念、常用库以及最佳实践。 异步编程基础 什么是异步…...
深入解析C++中的extern关键字:跨文件共享变量与函数的终极指南
🚀 C extern 关键字深度解析:跨文件编程的终极指南 📅 更新时间:2025年6月5日 🏷️ 标签:C | extern关键字 | 多文件编程 | 链接与声明 | 现代C 文章目录 前言🔥一、extern 是什么?&…...
什么是Ansible Jinja2
理解 Ansible Jinja2 模板 Ansible 是一款功能强大的开源自动化工具,可让您无缝地管理和配置系统。Ansible 的一大亮点是它使用 Jinja2 模板,允许您根据变量数据动态生成文件、配置设置和脚本。本文将向您介绍 Ansible 中的 Jinja2 模板,并通…...
云原生玩法三问:构建自定义开发环境
云原生玩法三问:构建自定义开发环境 引言 临时运维一个古董项目,无文档,无环境,无交接人,俗称三无。 运行设备的环境老,本地环境版本高,ssh不过去。正好最近对 腾讯出品的云原生 cnb 感兴趣&…...
【Java学习笔记】BigInteger 和 BigDecimal 类
BigInteger 和 BigDecimal 类 二者共有的常见方法 方法功能add加subtract减multiply乘divide除 注意点:传参类型必须是类对象 一、BigInteger 1. 作用:适合保存比较大的整型数 2. 使用说明 创建BigInteger对象 传入字符串 3. 代码示例 import j…...
