英语翻译1310.ACMDiagnosticsTimeLim-查字典问答网
分类选择

来自符晓勤的问题

  英语翻译1310.ACMDiagnosticsTimeLimit:0.5secondMemoryLimit:16MBHaveyoueverheardaboutACM?Maybe,maybe…Itisknowntobeanewprojectofcomputingmachinerylab.ACM(AbstractComputationMachine)—itisanewdeviceforquitecompl

  英语翻译

  1310.ACMDiagnosticsTimeLimit:0.5second

  MemoryLimit:16MB

  HaveyoueverheardaboutACM?Maybe,maybe…Itisknowntobeanewprojectofcomputingmachinerylab.ACM(AbstractComputationMachine)—itisanewdeviceforquitecomplexcomputations.Thereisonlyoneproblem:thepre-productionmodeldoesn'tworkproperly.So,thediagnosticsisnecessarytofindoutthereasonsofthedevicefaults.Therearesomenecessaryfactsknownabouttheinternalstructureofthedevice.ItconsistsofLindependentregisters.Eachoftheseregistersisabletostorethenumberintherangefrom1toM.Notallregistersareusedforcomputations—someofthemareusedfortheproposesoferrorcontrol.Thevaluesoftheseregistersarechoosinginsuchway,thatthesumofthevaluesofallregistersisdividedbygivennumberK.ThevaluesofallregistersofACMcompletelydefinethestateofdevice.Soforproposesofdiagnosticsitisenoughtoknowthevaluesofalltheseregisters.Theproblemisthatdeveloperswhocreatedthediagnosticsprocedurehaddecidedtooptimizethepresentationofdiagnosticsinformation.Soinsteadofsimplelistofregistervaluestheprocedurereturnsthesingleinteger—codeofthestate.Thiscodeshouldcompletelydescribethestateofdevice.That'swhydevelopersdecidedtocalculateitsuchway.Stateofdevice—isanarbitraryvectoroflengthL,satisfieddefinedabovedemands.Andthecodeofthestateisjustanindexofthisvectorinthelexicographicallyincreasinglistofallpossiblestates.(Notethatthefirststatehasindex0).It'seasytounderstandthatsuchvectorisreallycompletelydefinesastateoftheACM.Nowthedevicefaultsandoutputscodeofthestate.Theerrorcodehasbecomeuseful!Nowitisnecessarytoreconstructthevaluesofdeviceregistersfromthiscode.Asyouguessed—itisyourentry!InputThefirstlineofinputcontainsthreenumbersL,MandK(1≤L≤100;2≤M≤50;1≤K≤50)ThesecondlinecontainsanintegernumberN—errorcode,returnedbytheACMdevice.OutputYouaretowritetheprogramthatoutputsthevaluesofdeviceregisters,correspondingtothecodeN.I.e.Lintegernumbers,separatedbyspaces.Sampleinputoutput3104

  213961

1回答
2019-05-01 14:29
我要回答
请先登录
李健勇

  1310.计算机diagnosticstime限制:0.5秒内存限制:16你有没有听到关于计算机?可能是,可能是……这是众所周知的是一个新项目的计算机械实验室计算机(抽象计算机)-这是一个新的设备相当复杂的计算.只存在一个问题:...

2019-05-01 14:30:46

最新问答

推荐文章

猜你喜欢

附近的人在看

推荐阅读

拓展阅读

  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  •