[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.…...

网络编程(Modbus进阶)
思维导图 Modbus RTU(先学一点理论) 概念 Modbus RTU 是工业自动化领域 最广泛应用的串行通信协议,由 Modicon 公司(现施耐德电气)于 1979 年推出。它以 高效率、强健性、易实现的特点成为工业控制系统的通信标准。 包…...
web vue 项目 Docker化部署
Web 项目 Docker 化部署详细教程 目录 Web 项目 Docker 化部署概述Dockerfile 详解 构建阶段生产阶段 构建和运行 Docker 镜像 1. Web 项目 Docker 化部署概述 Docker 化部署的主要步骤分为以下几个阶段: 构建阶段(Build Stage):…...

Chapter03-Authentication vulnerabilities
文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

ESP32读取DHT11温湿度数据
芯片:ESP32 环境:Arduino 一、安装DHT11传感器库 红框的库,别安装错了 二、代码 注意,DATA口要连接在D15上 #include "DHT.h" // 包含DHT库#define DHTPIN 15 // 定义DHT11数据引脚连接到ESP32的GPIO15 #define D…...
基于数字孪生的水厂可视化平台建设:架构与实践
分享大纲: 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年,数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段,基于数字孪生的水厂可视化平台的…...

(转)什么是DockerCompose?它有什么作用?
一、什么是DockerCompose? DockerCompose可以基于Compose文件帮我们快速的部署分布式应用,而无需手动一个个创建和运行容器。 Compose文件是一个文本文件,通过指令定义集群中的每个容器如何运行。 DockerCompose就是把DockerFile转换成指令去运行。 …...

Redis数据倾斜问题解决
Redis 数据倾斜问题解析与解决方案 什么是 Redis 数据倾斜 Redis 数据倾斜指的是在 Redis 集群中,部分节点存储的数据量或访问量远高于其他节点,导致这些节点负载过高,影响整体性能。 数据倾斜的主要表现 部分节点内存使用率远高于其他节…...

JVM 内存结构 详解
内存结构 运行时数据区: Java虚拟机在运行Java程序过程中管理的内存区域。 程序计数器: 线程私有,程序控制流的指示器,分支、循环、跳转、异常处理、线程恢复等基础功能都依赖这个计数器完成。 每个线程都有一个程序计数…...

vulnyx Blogger writeup
信息收集 arp-scan nmap 获取userFlag 上web看看 一个默认的页面,gobuster扫一下目录 可以看到扫出的目录中得到了一个有价值的目录/wordpress,说明目标所使用的cms是wordpress,访问http://192.168.43.213/wordpress/然后查看源码能看到 这…...

LLMs 系列实操科普(1)
写在前面: 本期内容我们继续 Andrej Karpathy 的《How I use LLMs》讲座内容,原视频时长 ~130 分钟,以实操演示主流的一些 LLMs 的使用,由于涉及到实操,实际上并不适合以文字整理,但还是决定尽量整理一份笔…...