In the new version of the famous game "Heroes of Might and Magic" heroes themselves take active part in battles. More of that, hero can defeat some monsters alone, without any supporting army. In this problem you are asked to develop the program which would find the strategy for a mage hero fighting face to face with a pack of monsters.nEach hero initially has HP_H hit points and MP_H mana points. Heroes can use different spells. Your hero knows three spells: Lighting Bolt, Teleport and Heal. Each spell costs one mana point.nnEach monster has HP_M hit points. Pack of monsters is a single group of several monsters who act as one. Therefore if initially the pack consists of N_M monsters, they have N_M x HP_M hit points. As the battle proceeds, monsters' number of hit points decreases. If monsters have H hit points, that means that the group consists of ceiling(H / HP_M) monsters (ceiling is a function that returns the smallest integer number not less its argument).nnThe battle runs on a one-dimensional battlefield consisting of N + 1 squares, numbered starting from 0. Your hero resides on the square number 0 and does not move. Monsters initially reside on Nth square and can move. Monsters can move at most V squares a turn.nnThe battle consists of turns. First your hero makes a turn, then the monsters, and so on. Monsters' strategy is very easy - they move in the direction of your hero min(V, P - 1) squares where P is the square number where they were in the beginning of their turn. If the monsters are on the square number 1 in the end of the movement, then they strike your hero. If there are K monsters left in a pack, their strike decreases hit points of the hero by K. If your hero has non-positive hit points, then the hero is defeated.nnYour hero's turn is always the casting of some spell. Lighting Bolt spell removes LP hit points from a pack of monsters, where P is the square number on which the monsters reside. Teleport spell moves monsters to any desired square (except 0 where your hero resides). Heal spell adds dH hit points to hero. However, his hit points never <em>exceed</em> HP_H, so if after using Heal spell his hit points are greater then HP_H, they are decreased to HP_H. If your hero has zero mana points and there is at least one monster left in the pack, then the hero is defeated.nnFind the strategy which would allow your hero to defeat monsters. Monsters are defeated if their hit points are non-positive.nnnInputnnThe first line of the input file contains positive integer numbers separated by spaces in the following order: N, HP_H, MP_H, HP_M, N_M, V, dH. (1 < HP_H). The second line of the input file contains N integer numbers L1, L2, ..., LN (1 s turn. The first character of the line must be one of the following:nnL - Cast Lighting Bolt spell. nT - Cast Teleport spell. nH - Cast Heal spell. nIf the hero casts Teleport spell then T character must be followed by a space and an integer number from 1 to N - the square number where the monsters should be teleported to.nnnSample Inputnn2 3 2 1 2 1 1n1 1n2 3 2 3 1 1 1n1 1n4 4 3 1 4 1 1n3 1 1 1n1 6 5 1 4 1 3n1nnnSample OutputnnVICTORIOUSnLnLnDEFEATEDnVICTORIOUSnLnT 2nLnVICTORIOUSnLnLnHnLnL
我在将数据拼接成XML作为参数传给SQL的时候,在TOMCAT中报下面的错误,应该是因为XML字符串太长的原因,请问该怎么解决呢rnrnrn=== 2011-08-15 14:45:17,596 [sor6] INFO [/] - Parameters were not parsed becausrne the size of the posted data was too big. Use the maxPostSize attribute of thernconnector to resolve this if the application should accept large POSTs.rn=== 2011-08-15 14:45:17,606 [sor6] ERROR IDACall - Top-level servlet error:rnjava.lang.IllegalStateException: Post too large
在安装Microsoft SOAP Toolkit 3.0时，出现如下错误提示，不知应该如何解决？rn安装环境win2000 server，几台服务器上都试过，均出现如下错误码。rn我本机win2000pro安装正常。rn谢谢rnrnProduct: Microsoft SOAP Toolkit 3.0 -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action QFE_2K.6AB4B1E3_9BF2_4A9B_BC64_CE23E2B44659, location: C:\WINNT\Installer\MSIB2.tmp, command: -q -z
已经写好了wsdl,用了xmlspy做编辑器，服务在http://localhost:8080/muse/services/routerrnrn但是当我要发送一个<em>soap</em>请求时，总是<em>失败</em>，有错误：HTTP error: could not POST file '/muse/services/router' on server 'localhost' (500).rnrn请教大侠是由于什么原因？？rn谢谢
另外<em>might</em>也可以不表示过去，而表示更加委婉的语气。用法1.推测 “可能”The paly [may begin] at any moment.
It 【may have begun】 already.
#may have d
触发器<em>调用</em>函数getReady定义如下，函数中应用Soap控件，但是当窗口frm的定时器TimeSetEvent<em>调用</em>getReady时，执行到rn<em>soap</em>Client.MSSoapInit "http://192.168.1.144/GetDataFromZKEM.jws?wsdl"时会出现实时错误，调试了好久都不成，不知有哪位大虾可以帮忙看一下，谢谢！rnrngetReady(ByVal uID As Long, ByVal uMsg As Long, ByVal dwUser As Long, ByVal dw1 As Long, ByVal dw2 As Long)rn If Hour(Time) = frm2.Combo1.text And Minute(Time) = frm2.Combo2.text Thenrn MsgBox Hour(Time) & ":" & Minute(Time)rn Dim dwEnrollNumber As Longrn Dim dwVerifyMode As Longrn Dim dwInOutMode As Longrn Dim timeStr As Stringrn Dim <em>soap</em>Client As New SoapClient30rn Dim j As Longrn Dim text As Stringrn <em>soap</em>Client.MSSoapInit "http://192.168.1.144/GetDataFromZKEM.jws?wsdl"rn If frm2.CZKEM1.GetGeneralLogDataStr(CInt("1"), dwEnrollNumber, dwVerifyMode, dwInOutMode, timeStr) Thenrn frm2.StatusBar1.Panels(1).text = "数据下载中......"rn j = 0rn While frm2.CZKEM1.GetGeneralLogDataStr(CInt("1"), dwEnrollNumber, dwVerifyMode, dwInOutMode, timeStr)rn text = <em>soap</em>Client.GetData(j, dwEnrollNumber, timeStr, location, sensor)rn j = j + 1rn If (j = 1024) Thenrn text = <em>soap</em>Client.SetData()rn j = 0rn End Ifrn Wendrn If (j < 1024) Thenrn text = <em>soap</em>Client.SetData()rn End Ifrn frm2.StatusBar1.Panels(1).text = "数据下载完毕"rn End Ifrn End IfrnEnd Sub
我装了<em>exceed</em>7.0，把Xaccess，Xservers，xdm_congif等都改了rn启动了xdm，但还是不行rnrnstart method 选择TELNET(TCP/IP),Program type 选择Terminal Emulator，可以正常telnet上主机（linux）rn可是Program type 选择XWindow，start method 选择TELNET(TCP/IP)，没有响应，rnstart method选择其它如REXEC,PCX$SERVER(DECnet)提示：unable to connect to host using specified atart methodrnstart method选择RSH、RLOGIN等提示：connection closed（0）rn没有XDMCP选项。rnrnrn大侠们能不能给分别解释一下都是怎么回事？rn我为什么不能运行x终端？
执行到 SoapConnector->EndMessage()的时候报以下错误：rnUnhandled exception in ***.exe:0xE06D7363;Microsoft C++ Exception.rnrn运行项目的时，报以下错误：rnthis application has <em>request</em>ed,the runtime to terminate it in an unusual way.rnplease contact the application's support team for more information.rnrn请高手指教
The following is a sample SOAP 1.1 <em>request</em> and response. The placeholders shown need to be replaced with actual values.
POST /ServiceApi.asmx H