HBC210275Factorio题解

冷默言语 算法基础篇 44 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
Apollotextit{Apollo}Apollo owns a factory named Factoriotextit{Factorio}Factorio. At Factoriotextit{Factorio}Factorio, there are lots of machines of two kinds: minerstextbf{miners}miners and assembler

Apollotextit{Apollo}Apollo owns a factory named Factoriotextit{Factorio}Factorio. At Factoriotextit{Factorio}Factorio, there are lots of machines of two kinds: minerstextbf{miners}miners and assemblerstextbf{assemblers}assemblers. The production rate of each of these machines is a real number between 0 and 1, both inclusive. Today, Averytextit{Avery}Avery joined Factoriotextit{Factorio}Factorio. He found something important in the Employee's Handbook: Final Producttextit{Final Product}Final Product: The Product that will not be used as raw materials for other items. It is guaranteed that there is only one Final Product in Factoriotextit{Factorio}Factorio. Natural Resourcestextit{Natural Resources}Natural Resources: Items used only as raw materials for other products. There may be more than one Natural Resourcestextbf{There may be more than one Natural Resources}There may be more than one Natural Resources. Assemblertextit{Assembler}Assembler: A machine that synthesizes specific raw materials into specific product, whose production rate can be adjusted arbitrarily within [0,1]. Minertextit{Miner}Miner: A machine that mine natural resources, whose production rate can be adjusted arbitrarily within [0,1]. A miner with a production rate of r will mine r resources per unit of timetextbf{A miner with a production rate of r will mine r resources per unit of time}A miner with a production rate of r will mine r resources per unit of time. Production Formulatextit{Production Formula}Production Formula: A formula that describes the direct raw materials and proportions required to produce a certain product, shaped like:cnt1  meteral1  +  cnt2  meteral2  +...+  cntk  meteralm  =  cntk+1  productcnt_1;meteral_1;+;cnt_2;meteral_2;+ ... +;cnt_k;meteral_m;=;cnt_{k+1};productcnt1​meteral1​+cnt2​meteral2​+...+cntk​meteralm​=cntk+1​product           For 1≤i≤k+11 leq i leq k+11≤i≤k+1 there is cnti∈{1,2}cnt_i in textbf{{1,2}}cnti​∈{1,2}, and the greatest common divisor (gcd) of cnt1,cnt2,...,cntk,cntk+1cnt_1, cnt_2, ..., cnt_k, cnt_{k+1}cnt1​,cnt2​,...,cntk​,cntk+1​ should be equal to 1.           For example :           1  copper  =  2  cable1;copper;=;2;cable1copper=2cable          2  cable  +  1  iron  =  1  circuit2;cable;+;1;iron;=;1;circuit2cable+1iron=1circuit Direct Raw Materialtextit{Direct Raw Material}Direct Raw Material: The raw material that appears in the synthetic formula of a product is called the direct raw material of the product. Raw Materialtextit{Raw Material}Raw Material: The direct raw materials of the product, as well as all the raw materials of the direct raw materials, are called the raw materials of the product. Shelf Lifetextit{Shelf Life}Shelf Life: The shelf life of all products (except the final product) is one unit time, that is, the remaining unused products in the production cannot be hoarded and will be directly discarded. Production Efficiencytextit{Production Efficiency}Production Efficiency The maximum final product output per unit time can be achieved by appropriately adjusting the production rate of each machine. Production bottlenecktextit{Production bottleneck}Production bottleneck A smallest collection of the products (natural resources) such that if each number of assemblers(miners) for producing these products (natural resources) is increased by one, the production efficiency will increase. However, Averytextit{Avery}Avery found that the production efficiency of the factory is not high, so he got a list from the production workshop which recorded how many assemblers (miners) are allocated for each product (natural resource) in production. Averytextit{Avery}Avery wanted to know what the production bottlenecktextbf{production bottleneck}production bottleneck in this factory was.

HBC210275Factorio题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC210275Factorio题解