usaco4.2.3 Job Processing

ioi1996题目及测试数据 立即下载

一 原题

Job Processing
IOI'96

A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are capable of performing each operation.

Figure 1 shows the organization of the production line that works as follows. A type "A" machine takes a job from the input container, performs operation "A" and puts the job into the intermediate container. A type "B" machine takes a job from the intermediate container, performs operation "B" and puts the job into the output container. All machines can work in parallel and independently of each other, and the size of each container is unlimited. The machines have different performance characteristics, a given machine requires a given processing time for its operation.

Give the earliest time operation "A" can be completed for all N jobs provided that the jobs are available at time 0. Compute the minimal amount of time that is necessary to perform both operations (successively, of course) on all N jobs.

PROGRAM NAME: job

INPUT FORMAT

Line 1:Three space-separated integers:
  • N, the number of jobs (1<=N<=1000).
  • M1, the number of type "A" machines (1<=M1<=30)
  • M2, the number of type "B" machines (1<=M2<=30)
Line 2..etc:M1 integers that are the job processing times of each type "A" machine (1..20) followed by M2 integers, the job processing times of each type "B" machine (1..20).

SAMPLE INPUT (file job.in)

5 2 3
1 1 3 1 4

OUTPUT FORMAT

A single line containing two integers: the minimum time to perform all "A" tasks and the minimum time to perform all "B" tasks (which require "A" tasks, of course).

SAMPLE OUTPUT (file job.out)

3 5



二 分析

给定N个零件,M台机器,可以贪心(根据机器i结束当前加工的时间t[i]加上生产一个零件的时间s[i])求出每个零件加工完成的时间T[i]。如果有两道工序A,B,只需要将工序A里最慢的交给工序B里最快的即可,即答案等于max{Ta[i] + Tb[n-1-i]}。



三 代码

运行结果:
USER: Qi Shen [maxkibb3]
TASK: job
LANG: C++

Compiling...
Compile: OK

Executing...
   Test 1: TEST OK [0.000 secs, 4188 KB]
   Test 2: TEST OK [0.000 secs, 4188 KB]
   Test 3: TEST OK [0.000 secs, 4188 KB]
   Test 4: TEST OK [0.000 secs, 4188 KB]
   Test 5: TEST OK [0.000 secs, 4188 KB]
   Test 6: TEST OK [0.000 secs, 4188 KB]
   Test 7: TEST OK [0.000 secs, 4188 KB]
   Test 8: TEST OK [0.000 secs, 4188 KB]
   Test 9: TEST OK [0.000 secs, 4188 KB]
   Test 10: TEST OK [0.000 secs, 4188 KB]
   Test 11: TEST OK [0.000 secs, 4188 KB]
   Test 12: TEST OK [0.000 secs, 4188 KB]

All tests OK.

Your program ('job') produced all correct answers! This is your submission #6 for this problem. Congratulations!


AC代码:
/*
ID:maxkibb3
LANG:C++
PROB:job
*/

#include<cstdio>

const int MAXN = 1005;
const int MAXM = 35;
const int INF = 0x7fffffff;

int n, m[2];
int a[2][MAXM];
int t[2][MAXM];
int s[2][MAXN];

int max(int n1, int n2) {
    return (n1 > n2) ? n1 : n2;
}

void init() {
    scanf("%d%d%d", &n, &m[0], &m[1]);
    for(int i = 0; i < m[0]; i++) scanf("%d", &a[0][i]);
    for(int i = 0; i < m[1]; i++) scanf("%d", &a[1][i]);
}

void f(int idx) {
    for(int i = 0; i < n; i++) {
        int min_val = INF, min_idx;
        for(int j = 0; j < m[idx]; j++) {
            if(t[idx][j] + a[idx][j] < min_val) {
                min_val = t[idx][j] + a[idx][j];
                min_idx = j;
            }
        }
        s[idx][i] = t[idx][min_idx] = min_val;
    }
}

void solve() {
    f(0);
    f(1);
    int max_val = 0;
    for(int i = 0; i < n; i++) {
        if(s[0][i] > max_val) max_val = s[0][i];
    }
    printf("%d ", max_val);
    max_val = 0;
    for(int i = 0; i < n; i++) {
        if(s[0][i] + s[1][n - 1 -i] > max_val) max_val = s[0][i] + s[1][n - 1- i];
    }
    printf("%d\n", max_val);
}

int main() {
    freopen("job.in", "r", stdin);
    freopen("job.out", "w", stdout);
    init();
    solve();
    return 0;
}


有了网段为什么还要有VLAN??? 近几日,在学习VLAN及VXLAN方面的知识,对于产生原因做一个总结及详解。 VLAN(Virtual Local Area Network,虚拟局域网),其主要用途是用来缩小广播域,即进行隔离。 先对广播域的一个概念做如下描绘:如下图,主机A、B、C、D均连接在交换机SW1上,其中A、C同网段为192.168.252网段,而B和D同网段,为192.168.250网段。 现,假如A与C第... 阅读详情

相关推荐

模拟电子技术课设-压控信号发生器

正弦波产生电路的目的就是使电路产生一定频率和幅度的正弦波,我们一般在放大电路中引入正反馈,并创造条件,使其产生稳定可靠的振荡。由于图2.3-1所示电路中存在RC电路和积分电路两个延迟环节,在实用电路中,将它们“合二为一”,即去掉方波发生电路中的RC回路,使积分运算电路即作为延迟环节,又作为方变三角波电路,滯回比较器和积分运算电路的输出互为另一个电路的输入。接着对各单元电路的工作原理进行了分析,由直流稳压电源电路提供所需电压,文氏振荡器产生正弦波,滞回比较器产生方波,滞回比较器与积分器连接产生三角波。

Sulfurone的博客 5324

Job Processing

题意:求二分图的最大匹配 解题思路: 匈牙利算法(参考算法http://www.cnblogs.com/bofengqiye/archive/2012/05/02/2479809.html) 代码: /* ID: zc.rene1 LANG: C PROG: job */ #include #include #include #define MAX 99999 int N; i

原味 629

贝叶斯校准在计算机模型不确定性分析中的实践指南

本文深入探讨了贝叶斯校准在计算机模型不确定性分析中的核心原理与实践方法。通过将模型从“黑箱”转变为“透明箱”,该方法系统量化了参数不确定性、模型结构缺陷及观测误差。文章重点阐释了如何利用高斯过程作为代理模型和模型不足函数,构建完整的贝叶斯校准框架,并提供了从数据准备、模型训练到MCMC推断及不确定性分析的实战指南,最终实现更可靠的预测与决策支持。

weixin_29088655的博客 292

[USACO4.2.3]Job Processing

Job Processing IOI'96 A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are c

qq_37665716的博客 270

CXL Virtual Hierarchy (VH) Enumeration理解

在 CXL 3.0 协议中,CXL Virtual Hierarchy (VH) Enumeration 是一种针对 CXL 虚拟层级(Virtual Hierarchy) 设计的设备枚举机制,它允许软件将物理连接的 CXL 设备抽象为多个逻辑层级(虚拟层级),从而实现更灵活的资源管理和拓扑扩展。与传统的 PCIe 枚举相比,CXL VH 枚举在协议特性、拓扑抽象和资源分配机制上有显著差异。本质:VH 是一个逻辑上的设备层级结构,可能与物理连接拓扑不同。

Summer的博客 1001

STM32单片机语音提示盲人拐杖整点报时夜间警示超声波测距

STM32单片机语音提示盲人拐杖整点报时夜间警示超声波测距 关键词:语音提示盲人拐杖 整点报时 超声波测距拐杖

LS840233684的博客 2047

C++——【USACO 4.2.3】——Job Processing

Job Processing IOI'96 A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are

McDonnell_Douglas的博客 530

QT+SOEM主站协议库实战指南—从编译到嵌入式应用

本文提供了一份QT与SOEM开源EtherCAT主站协议库的集成实战指南。详细介绍了在Windows和Linux平台下编译SOEM库的步骤,并讲解了如何将其无缝集成到QT项目中,构建具备实时监控与控制功能的工业上位机应用。内容涵盖从环境搭建、核心协议开发到嵌入式部署与优化的全流程,为开发高性价比、自主可控的工业控制解决方案提供完整路径。

u6v7w8x的博客 437

USACO Training 4.2.3 Job Processing 工序安排 题解与分析

Job Processing 工序安排 IOI'96 描述 一家工厂的流水线正在生产一种产品,这需要两种操作:操作A和操作B。每个操作只有一些机器能够完成。 上图显示了按照下述方式工作的流水线的组织形式。A型机器从输入库接受工件,对其施加操作A,得到的中间产品存放在缓冲库。B型机器从缓冲库接受中间产品,对其施加操作B,得到的最终产品存放在输出库。所有的机器平行并且独立地

初学者 1617

SAP-ABAP: BP主数据完全指南:从基础到高阶应用

SAP-ABAP: BP主数据完全指南:从基础到高阶应用

baidu_35680696的博客 1647

华为od 面试八股文_C++_01_含答案

华为od 面试八股文_C++_01_含答案

MISAYAONE的博客 5588

USACO4.2.3 Job Processing (job)

先进行工序a。因为所有的产品都同时放在输入库中,所以这一步直接贪心,只要有空闲的机器,就从输入库中取出产品放进去。这样工序a完成的时间一定是最短的,如下图  开始 1 | -------- 2 | ------ 3 | ---- 4 | --- 5 | - 然后进行工序b。这是因为每件产品完成工序a的时间不同,所以不能像上一步一样做。那怎么办呢? 我们可以把工序b想象成用机

Shion的专栏 502

全新YOLOv11有效涨点改进专栏目录 | 本专栏持续更新500+篇内容 | 包含各种卷积、主干网络、各种注意力机制、检测头、损失函数、小目标检测改进、二次创新模块、独家创新等几百种创新点改进

YOLOv11专栏持续更新500+种创新改进方案,涵盖卷积优化、注意力机制、主干网络、Neck特征融合、检测头、小目标检测等核心模块。提供独家创新点组合方案、模型轻量化改进及最新Mamba架构融合技术,配套完整实验代码和训练参数解析。订阅用户可加入专属答疑群,获取一键运行项目支持。专栏包含YOLOv11网络结构详解、配置文件解读等入门必读内容,助力科研论文发表与模型性能提升。限时开放订阅通道,提供多种涨点改进方案组合,满足不同研究需求。

Ai缝合怪、助力小伙伴高效发论文 3996

usaco training 4.2.3 Job Processing 题解

Job Processing题解 IOI'96 A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines a

阿蒋的专栏 2852

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

[USACO4.2.3 Job Processing]

[关键字]:贪心 [题目大意]:有多个A机器和多个B机器N个需加工物品,每个物品序先被某一A机器再被某一B机器加工,每个A机器和B机器都有不同的加工时间,求出A机器所需最小时间和B机器最小时间。 //==================================================================================================...

weixin_30606461的博客 108

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

USACO Job Processing

<br />USACO 4.2 job processing <br />题目链接:  http://www.nocow.cn/index.php/Translate:USACO/job<br />这题很经典,网上资料大多是一带而过,因此转载了一篇较详细的分析。<br />http://magicalcode.blogbus.com/logs/37193487.html<br />若有疑问的地方,可参照本文中引理的证明。<br /> <br />引理1:题目第一问,单个最优解的构造(即让最晚零件结束的时间最

petercsj的专栏 1335

[洛谷P2751] [USACO4.2]工序安排Job Processing

洛谷题目链接:[USACO4.2]工序安排Job Processing 题目描述 一家工厂的流水线正在生产一种产品,这需要两种操作:操作A和操作B。每个操作只有一些机器能够完成。 Ioi96d1.gif 上图显示了按照下述方式工作的流水线的组织形式。A型机器从输入库接受工件,对其施加操作A,得到的中间产品存放在缓冲库。B型机器从缓冲库接受中间产品,对其施加操作B,得到的最终产品存放在输出...

dengtun2502的博客 289

USACO 4.2 job processing

A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are capable of performing eac

sunny606的专栏 1182

[USACO4.2]工序安排Job Processing

https://www.luogu.org/problemnew/show/P2751 题解:贪心 从前往后贪心,用f[i]记录第i个零件完成的最小时间 定义一个结构体,记录 v:每一台机器完成一个零件的时间和 s:完成下一个零件到达的时间点(会不断变化) 从前往后每次找完都要排序 最后输出f[n] f数组肯定是f[i]<=f[i+1],为了让最长时间尽量少,我们就尽量 ...

无限迭代中...... 599

USACO Training Section 4.2 Job Processing

英文原题 中文题译   大意: 有N个工件,每个工件要经过两道工序A,B,有若干台机器分别可用于A,B工序(不重合),每台机器有各自的加工时间。问最少何时A工序全部完成,最少何时B工序全部完成。   分析与实现   只有两道工序,很简单。分别计算A,B机器完成N个工件需要的时间,A工序的即为所求。对B工序,为使得总的最大时间最小,应该把A先加工出来的工件给B中加工最久的,这样依次统计...

山中竹笋 237

usaco 4.2 Job Processing(贪心)

Job Processing IOI'96 A factory is running a production line that requires two operations to be performed on each job: first operation "A" then operation "B". Only a certain number of machines are

志当存高远 945

USACO-Section 4.2 Job Processing (贪心)

完成A操作的时间总和最小值很容易想到 但是完成B操作的时间总和最小值还不是能理解,觉得A操作完成的时间对B操作的时间影响很大

idealism_xxm的专栏 466

Luogu P2751 [USACO4.2]工序安排Job Processing

一家工厂的流水线正在生产一种产品,这需要两种操作:操作A和操作B。每个操作只有一些机器能够完成。上图显示了按照下述方式工作的流水线的组织形式。A型机器从输入库接受工件,对其施加操作A,得到的中间产品存放在缓冲库。B型机器从缓冲库接受中间产品,对其施加操作B,得到的最终产品存放在输出库。所有的机器平行并且独立地工作,每个库的容量没有限制。每台机器的工作效率可能不同,一台机器完成一次操作需要一定的时间。给出每台机器完成一次操作的时间,计算完成A操作的时间总和的最小值,和完成B操作的时间总和的最小值。

SandwichBK的博客 227

P2751 [USACO4.2]工序安排Job Processing(玄学贪心)

展开 题目描述 一家工厂的流水线正在生产一种产品,这需要两种操作:操作A和操作B。每个操作只有一些机器能够完成。 上图显示了按照下述方式工作的流水线的组织形式。A型机器从输入库接受工件,对其施加操作A,得到的中间产品存放在缓冲库。B型机器从缓冲库接受中间产品,对其施加操作B,得到的最终产品存放在输出库。所有的机器平行并且独立地工作,每个库的容量没有限制。每台机器的工作效率可能不同,一台机器完成一次...

tomjobs的博客 556
上一篇: usaco4.2.1 Drainage Ditches
下一篇: usaco4.3.1 Buy Low, Buy Lower
max_kibble
博客等级 码龄11年 2粉丝 110原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值