{"id":698,"date":"2020-03-27T11:48:12","date_gmt":"2020-03-27T03:48:12","guid":{"rendered":"http:\/\/kylelv.com\/?p=698"},"modified":"2020-03-27T11:50:33","modified_gmt":"2020-03-27T03:50:33","slug":"%e9%ad%94%e5%85%bd%e4%b8%96%e7%95%8c%e7%bb%88%e6%9e%81%e7%89%88","status":"publish","type":"post","link":"https:\/\/blog.kylelv.com\/?p=698","title":{"rendered":"\u9b54\u517d\u4e16\u754c\u7ec8\u6781\u7248"},"content":{"rendered":"\n<h2 class=\"has-text-align-center wp-block-heading\">A:\u9b54\u517d\u4e16\u754c\u7ec8\u6781\u7248<\/h2>\n\n\n\n<p class=\"has-text-align-center\">\u603b\u65f6\u95f4\u9650\u5236:&nbsp;6000ms&nbsp;\u5185\u5b58\u9650\u5236:&nbsp;65536kB<\/p>\n\n\n\n<p>\u63cf\u8ff0<\/p>\n\n\n\n<p>\u9b54\u517d\u4e16\u754c\u7684\u897f\u9762\u662f\u7ea2\u9b54\u519b\u7684\u53f8\u4ee4\u90e8\uff0c\u4e1c\u9762\u662f\u84dd\u9b54\u519b\u7684\u53f8\u4ee4\u90e8\u3002\u4e24\u4e2a\u53f8\u4ee4\u90e8\u4e4b\u95f4\u662f\u4f9d\u6b21\u6392\u5217\u7684\u82e5\u5e72\u57ce\u5e02\uff0c\u57ce\u5e02\u4ece\u897f\u5411\u4e1c\u4f9d\u6b21\u7f16\u53f7\u4e3a1,2,3 &#8230;. N ( N &lt;= 20 )\u3002\u7ea2\u9b54\u519b\u7684\u53f8\u4ee4\u90e8\u7b97\u4f5c\u7f16\u53f7\u4e3a0\u7684\u57ce\u5e02\uff0c\u84dd\u9b54\u519b\u7684\u53f8\u4ee4\u90e8\u7b97\u4f5c\u7f16\u53f7\u4e3aN+1\u7684\u57ce\u5e02\u3002\u53f8\u4ee4\u90e8\u6709\u751f\u547d\u5143\uff0c\u7528\u4e8e\u5236\u9020\u6b66\u58eb\u3002<\/p>\n\n\n\n<p>\u4e24\u519b\u7684\u53f8\u4ee4\u90e8\u90fd\u4f1a\u5236\u9020\u6b66\u58eb\u3002\u6b66\u58eb\u4e00\u5171\u6709 dragon \u3001ninja\u3001iceman\u3001lion\u3001wolf \u4e94\u79cd\u3002\u6bcf\u79cd\u6b66\u58eb\u90fd\u6709\u7f16\u53f7\u3001\u751f\u547d\u503c\u3001\u653b\u51fb\u529b\u8fd9\u4e09\u79cd\u5c5e\u6027\u3002<\/p>\n\n\n\n<p>\u53cc\u65b9\u7684\u6b66\u58eb\u7f16\u53f7\u90fd\u662f\u4ece1\u5f00\u59cb\u8ba1\u7b97\u3002\u7ea2\u65b9\u5236\u9020\u51fa\u6765\u7684\u7b2c n \u4e2a\u6b66\u58eb\uff0c\u7f16\u53f7\u5c31\u662fn\u3002\u540c\u6837\uff0c\u84dd\u65b9\u5236\u9020\u51fa\u6765\u7684\u7b2c n \u4e2a\u6b66\u58eb\uff0c\u7f16\u53f7\u4e5f\u662fn\u3002<\/p>\n\n\n\n<p>\u6b66\u58eb\u5728\u521a\u964d\u751f\u7684\u65f6\u5019\u6709\u4e00\u4e2a\u521d\u59cb\u7684\u751f\u547d\u503c\uff0c\u751f\u547d\u503c\u5728\u6218\u6597\u4e2d\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u5982\u679c\u751f\u547d\u503c\u51cf\u5c11\u52300\uff08\u751f\u547d\u503c\u53d8\u4e3a\u8d1f\u6570\u65f6\u5e94\u5f53\u505a\u53d8\u4e3a0\u5904\u7406\uff09\uff0c\u5219\u6b66\u58eb\u6b7b\u4ea1\uff08\u6d88\u5931\uff09\u3002<\/p>\n\n\n\n<p>\u6709\u7684\u6b66\u58eb\u53ef\u4ee5\u62e5\u6709\u6b66\u5668\u3002\u6b66\u5668\u6709\u4e09\u79cd\uff0csword, bomb,\u548carrow\uff0c\u7f16\u53f7\u5206\u522b\u4e3a0,1,2\u3002<\/p>\n\n\n\n<p>\u6b66\u58eb\u964d\u751f\u540e\u5c31\u671d\u5bf9\u65b9\u53f8\u4ee4\u90e8\u8d70\uff0c\u5728\u7ecf\u8fc7\u7684\u57ce\u5e02\u5982\u679c\u9047\u5230\u654c\u4eba\uff08\u540c\u4e00\u65f6\u523b\u6bcf\u4e2a\u57ce\u5e02\u6700\u591a\u53ea\u53ef\u80fd\u67091\u4e2a\u84dd\u6b66\u58eb\u548c\u4e00\u4e2a\u7ea2\u6b66\u58eb\uff09\uff0c\u5c31\u4f1a\u53d1\u751f\u6218\u6597\u3002\u6bcf\u6b21\u6218\u6597\u53ea\u6709\u4e00\u65b9\u53d1\u8d77\u4e3b\u52a8\u8fdb\u653b\u4e00\u6b21\u3002\u88ab\u653b\u51fb\u8005\u751f\u547d\u503c\u4f1a\u51cf\u53bb\u8fdb\u653b\u8005\u7684\u653b\u51fb\u529b\u503c\u548c\u8fdb\u653b\u8005\u624b\u4e2dsword\u7684\u653b\u51fb\u529b\u503c\u3002\u88ab\u8fdb\u653b\u8005\u82e5\u6ca1\u6b7b\uff0c\u5c31\u4f1a\u53d1\u8d77\u53cd\u51fb\uff0c\u88ab\u53cd\u51fb\u8005\u7684\u751f\u547d\u503c\u8981\u51cf\u53bb\u53cd\u51fb\u8005\u653b\u51fb\u529b\u503c\u7684\u4e00\u534a(\u53bb\u5c3e\u53d6\u6574)\u548c\u53cd\u51fb\u8005\u624b\u4e2dsword\u7684\u653b\u51fb\u529b\u503c\u3002\u53cd\u51fb\u53ef\u80fd\u81f4\u654c\u4eba\u4e8e\u6b7b\u5730\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6b66\u58eb\u5728\u6218\u6597\u4e2d\u6740\u6b7b\u654c\u4eba\uff08\u4e0d\u8bba\u662f\u4e3b\u52a8\u8fdb\u653b\u6740\u6b7b\u8fd8\u662f\u53cd\u51fb\u6740\u6b7b\uff09\uff0c\u5219\u5176\u53f8\u4ee4\u90e8\u4f1a\u7acb\u5373\u5411\u5176\u53d1\u90018\u4e2a\u751f\u547d\u5143\u4f5c\u4e3a\u5956\u52b1\uff0c\u4f7f\u5176\u751f\u547d\u503c\u589e\u52a08\u3002\u5f53\u7136\u524d\u63d0\u662f\u53f8\u4ee4\u90e8\u5f97\u67098\u4e2a\u751f\u547d\u5143\u3002\u5982\u679c\u53f8\u4ee4\u90e8\u7684\u751f\u547d\u5143\u4e0d\u8db3\u4ee5\u5956\u52b1\u6240\u6709\u7684\u6b66\u58eb\uff0c\u5219\u4f18\u5148\u5956\u52b1\u8ddd\u79bb\u654c\u65b9\u53f8\u4ee4\u90e8\u8fd1\u7684\u6b66\u58eb\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u67d0\u6b66\u58eb\u5728\u67d0\u57ce\u5e02\u7684\u6218\u6597\u4e2d\u6740\u6b7b\u4e86\u654c\u4eba\uff0c\u5219\u8be5\u6b66\u58eb\u7684\u53f8\u4ee4\u90e8\u7acb\u5373\u53d6\u5f97\u8be5\u57ce\u5e02\u4e2d\u6240\u6709\u7684\u751f\u547d\u5143\u3002\u6ce8\u610f\uff0c\u53f8\u4ee4\u90e8\u603b\u662f\u5148\u5b8c\u6210\u5168\u90e8\u5956\u52b1\u5de5\u4f5c\uff0c\u7136\u540e\u624d\u5f00\u59cb\u4ece\u5404\u4e2a\u6253\u4e86\u80dc\u4ed7\u7684\u57ce\u5e02\u56de\u6536\u751f\u547d\u5143\u3002\u5bf9\u4e8e\u56e0\u53f8\u4ee4\u90e8\u751f\u547d\u5143\u4e0d\u8db3\u800c\u9886\u4e0d\u5230\u5956\u52b1\u7684\u6b66\u58eb\uff0c\u53f8\u4ee4\u90e8\u4e5f\u4e0d\u4f1a\u5728\u53d6\u5f97\u6218\u5229\u54c1\u751f\u547d\u5143\u540e\u4e3a\u5176\u8865\u53d1\u5956\u52b1\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4e00\u6b21\u6218\u6597\u7684\u7ed3\u679c\u662f\u53cc\u65b9\u90fd\u5e78\u5b58(\u5e73\u5c40)\uff0c\u5219\u53cc\u65b9\u90fd\u4e0d\u80fd\u62ff\u8d70\u53d1\u751f\u6218\u6597\u7684\u57ce\u5e02\u7684\u751f\u547d\u5143\u3002<\/p>\n\n\n\n<p>\u57ce\u5e02\u53ef\u4ee5\u63d2\u65d7\u5b50\uff0c\u4e00\u5f00\u59cb\u6240\u6709\u57ce\u5e02\u90fd\u6ca1\u6709\u65d7\u5b50\u3002\u5728\u63d2\u7ea2\u65d7\u7684\u57ce\u5e02\uff0c\u4ee5\u53ca\u7f16\u53f7\u4e3a\u5947\u6570\u7684\u65e0\u65d7\u57ce\u5e02\uff0c\u7531\u7ea2\u6b66\u58eb\u4e3b\u52a8\u53d1\u8d77\u8fdb\u653b\u3002\u5728\u63d2\u84dd\u65d7\u7684\u57ce\u5e02\uff0c\u4ee5\u53ca\u7f16\u53f7\u4e3a\u5076\u6570\u7684\u65e0\u65d7\u57ce\u5e02\uff0c\u7531\u84dd\u6b66\u58eb\u4e3b\u52a8\u53d1\u8d77\u8fdb\u653b\u3002<\/p>\n\n\n\n<p>\u5f53\u67d0\u4e2a\u57ce\u5e02\u6709\u8fde\u7eed\u4e24\u573a\u6218\u6597\u90fd\u662f\u540c\u4e00\u65b9\u7684\u6b66\u58eb\u6740\u6b7b\u654c\u4eba(\u4e24\u573a\u6218\u6597\u4e4b\u95f4\u5982\u679c\u6709\u82e5\u5e72\u4e2a\u6218\u6597\u65f6\u523b\u5e76\u6ca1\u6709\u53d1\u751f\u6218\u6597\uff0c\u5219\u8fd9\u4e24\u573a\u6218\u6597\u4ecd\u7136\u7b97\u662f\u8fde\u7eed\u7684\uff1b\u4f46\u5982\u679c\u4e2d\u95f4\u6709\u5e73\u5c40\u7684\u6218\u6597\uff0c\u5c31\u4e0d\u7b97\u8fde\u7eed\u4e86) \uff0c\u90a3\u4e48\u8be5\u57ce\u5e02\u5c31\u4f1a\u63d2\u4e0a\u80dc\u65b9\u7684\u65d7\u5e1c\uff0c\u82e5\u539f\u6765\u63d2\u7740\u8d25\u65b9\u7684\u65d7\u5e1c\uff0c\u5219\u8d25\u65b9\u65d7\u5e1c\u843d\u4e0b\u3002\u65d7\u5e1c\u4e00\u65e6\u63d2\u4e0a\uff0c\u5c31\u4e00\u76f4\u63d2\u7740\uff0c\u76f4\u5230\u88ab\u654c\u4eba\u66f4\u6362\u3002\u4e00\u4e2a\u57ce\u5e02\u6700\u591a\u53ea\u80fd\u63d2\u4e00\u9762\u65d7\u5e1c\uff0c\u65d7\u5e1c\u6ca1\u88ab\u654c\u4eba\u66f4\u6362\u524d\uff0c\u4e5f\u4e0d\u4f1a\u518d\u6b21\u63d2\u540c\u989c\u8272\u7684\u65d7\u3002<\/p>\n\n\n\n<p>\u5404\u79cd\u6b66\u5668\u6709\u5176\u7279\u70b9\uff1a<\/p>\n\n\n\n<p>sword\u6b66\u5668\u7684\u521d\u59cb\u653b\u51fb\u529b\u4e3a\u62e5\u6709\u5b83\u7684\u6b66\u58eb\u7684\u653b\u51fb\u529b\u768420%\uff08\u53bb\u5c3e\u53d6\u6574\uff09\u3002\u4f46\u662fsword\u6bcf\u7ecf\u8fc7\u4e00\u6b21\u6218\u6597(\u4e0d\u8bba\u662f\u4e3b\u52a8\u653b\u51fb\u8fd8\u662f\u53cd\u51fb)\uff0c\u5c31\u4f1a\u53d8\u949d\uff0c\u653b\u51fb\u529b\u53d8\u4e3a\u672c\u6b21\u6218\u6597\u524d\u768480% (\u53bb\u5c3e\u53d6\u6574)\u3002sword\u653b\u51fb\u529b\u53d8\u4e3a0\u65f6\uff0c\u89c6\u4e3a\u6b66\u58eb\u5931\u53bb\u4e86sword\u3002\u5982\u679c\u6b66\u58eb\u964d\u751f\u65f6\u5f97\u5230\u4e86\u4e00\u4e2a\u521d\u59cb\u653b\u51fb\u529b\u4e3a0\u7684sword\uff0c\u5219\u89c6\u4e3a\u6b66\u58eb\u6ca1\u6709sword.<\/p>\n\n\n\n<p>arrow\u6709\u4e00\u4e2a\u653b\u51fb\u529b\u503cR\u3002\u5982\u679c\u4e0b\u4e00\u6b65\u8981\u8d70\u5230\u7684\u57ce\u5e02\u6709\u654c\u4eba\uff0c\u90a3\u4e48\u62e5\u6709arrow\u7684\u6b66\u58eb\u5c31\u4f1a\u653e\u7bad\u653b\u51fb\u4e0b\u4e00\u4e2a\u57ce\u5e02\u7684\u654c\u4eba\uff08\u4e0d\u80fd\u653b\u51fb\u5bf9\u65b9\u53f8\u4ee4\u90e8\u91cc\u7684\u654c\u4eba\uff09\u800c\u4e0d\u88ab\u8fd8\u51fb\u3002arrow\u4f7f\u654c\u4eba\u7684\u751f\u547d\u503c\u51cf\u5c11R\uff0c\u82e5\u51cf\u81f3\u5c0f\u4e8e\u7b49\u4e8e0\uff0c\u5219\u654c\u4eba\u88ab\u6740\u6b7b\u3002arrow\u4f7f\u75283\u6b21\u540e\u5373\u88ab\u8017\u5c3d\uff0c\u6b66\u58eb\u5931\u53bbarrow\u3002\u4e24\u4e2a\u76f8\u90bb\u7684\u6b66\u58eb\u53ef\u80fd\u540c\u65f6\u653e\u7bad\u628a\u5bf9\u65b9\u5c04\u6b7b\u3002<\/p>\n\n\n\n<p>\u62e5\u6709bomb\u7684\u6b66\u58eb\uff0c\u5728\u6218\u6597\u5f00\u59cb\u524d\u5982\u679c\u5224\u65ad\u81ea\u5df1\u5c06\u88ab\u6740\u6b7b\uff08\u4e0d\u8bba\u4e3b\u52a8\u653b\u51fb\u654c\u4eba\uff0c\u6216\u8005\u88ab\u654c\u4eba\u4e3b\u52a8\u653b\u51fb\u90fd\u53ef\u80fd\u5bfc\u81f4\u81ea\u5df1\u88ab\u6740\u6b7b\uff0c\u800c\u4e14\u5047\u8bbe\u6b66\u58eb\u53ef\u4ee5\u77e5\u9053\u654c\u4eba\u7684\u653b\u51fb\u529b\u548c\u751f\u547d\u503c\uff09\uff0c\u90a3\u4e48\u5c31\u4f1a\u4f7f\u7528bomb\u548c\u654c\u4eba\u540c\u5f52\u4e8e\u5c3d\u3002\u6b66\u58eb\u4e0d\u9884\u6d4b\u5bf9\u65b9\u662f\u5426\u4f1a\u4f7f\u7528bomb\u3002<\/p>\n\n\n\n<p>\u6b66\u58eb\u4f7f\u7528bomb\u548c\u654c\u4eba\u540c\u5f52\u4e8e\u5c3d\u7684\u60c5\u51b5\u4e0b\uff0c\u4e0d\u7b97\u662f\u4e00\u573a\u6218\u6597\uff0c\u53cc\u65b9\u90fd\u4e0d\u80fd\u62ff\u8d70\u57ce\u5e02\u7684\u751f\u547d\u5143\uff0c\u4e5f\u4e0d\u5f71\u54cd\u57ce\u5e02\u7684\u65d7\u5e1c\u3002<\/p>\n\n\n\n<p>\u4e0d\u540c\u7684\u6b66\u58eb\u6709\u4e0d\u540c\u7684\u7279\u70b9\u3002<\/p>\n\n\n\n<p>dragon\u53ef\u4ee5\u62e5\u6709\u4e00\u4ef6\u6b66\u5668\u3002\u7f16\u53f7\u4e3an\u7684dragon\u964d\u751f\u65f6\u5373\u83b7\u5f97\u7f16\u53f7\u4e3a n%3 \u7684\u6b66\u5668\u3002dragon\u8fd8\u6709\u201c\u58eb\u6c14\u201d\u8fd9\u4e2a\u5c5e\u6027\uff0c\u662f\u4e2a\u6d6e\u70b9\u6570\uff0c\u5176\u503c\u4e3a\u5b83\u964d\u751f\u540e\u5176\u53f8\u4ee4\u90e8\u5269\u4f59\u751f\u547d\u5143\u7684\u6570\u91cf\u9664\u4ee5\u9020dragon\u6240\u9700\u7684\u751f\u547d\u5143\u6570\u91cf\u3002dragon \u5728\u4e00\u6b21\u5728\u5b83\u4e3b\u52a8\u8fdb\u653b\u7684\u6218\u6597\u7ed3\u675f\u540e\uff0c\u5982\u679c\u8fd8\u6ca1\u6709\u6218\u6b7b\uff0c\u800c\u4e14\u58eb\u6c14\u503c\u5927\u4e8e0.8\uff0c\u5c31\u4f1a\u6b22\u547c\u3002dragon\u6bcf\u53d6\u5f97\u4e00\u6b21\u6218\u6597\u7684\u80dc\u5229(\u654c\u4eba\u88ab\u6740\u6b7b)\uff0c\u58eb\u6c14\u5c31\u4f1a\u589e\u52a00.2\uff0c\u6bcf\u7ecf\u5386\u4e00\u6b21\u672a\u80fd\u83b7\u80dc\u7684\u6218\u6597\uff0c\u58eb\u6c14\u503c\u5c31\u4f1a\u51cf\u5c110.2\u3002\u58eb\u6c14\u589e\u51cf\u53d1\u751f\u5728\u6b22\u547c\u4e4b\u524d\u3002<\/p>\n\n\n\n<p>ninja\u53ef\u4ee5\u62e5\u6709\u4e24\u4ef6\u6b66\u5668\u3002\u7f16\u53f7\u4e3an\u7684ninja\u964d\u751f\u65f6\u5373\u83b7\u5f97\u7f16\u53f7\u4e3a n%3 \u548c (n+1)%3\u7684\u6b66\u5668\u3002ninja \u6328\u6253\u4e86\u4e5f\u4ece\u4e0d\u53cd\u51fb\u654c\u4eba\u3002<\/p>\n\n\n\n<p>iceman\u6709\u4e00\u4ef6\u6b66\u5668\u3002\u7f16\u53f7\u4e3an\u7684iceman\u964d\u751f\u65f6\u5373\u83b7\u5f97\u7f16\u53f7\u4e3a n%3 \u7684\u6b66\u5668\u3002iceman \u6bcf\u524d\u8fdb\u4e24\u6b65\uff0c\u5728\u7b2c2\u6b65\u5b8c\u6210\u7684\u65f6\u5019\uff0c\u751f\u547d\u503c\u4f1a\u51cf\u5c119\uff0c\u653b\u51fb\u529b\u4f1a\u589e\u52a020\u3002\u4f46\u662f\u82e5\u751f\u547d\u503c\u51cf9\u540e\u4f1a\u5c0f\u4e8e\u7b49\u4e8e0\uff0c\u5219\u751f\u547d\u503c\u4e0d\u51cf9,\u800c\u662f\u53d8\u4e3a1\u3002\u5373iceman\u4e0d\u4f1a\u56e0\u8d70\u591a\u4e86\u800c\u6b7b\u3002<\/p>\n\n\n\n<p>lion \u6709\u201c\u5fe0\u8bda\u5ea6\u201d\u8fd9\u4e2a\u5c5e\u6027\uff0c\u5176\u521d\u59cb\u503c\u7b49\u4e8e\u5b83\u964d\u751f\u4e4b\u540e\u5176\u53f8\u4ee4\u90e8\u5269\u4f59\u751f\u547d\u5143\u7684\u6570\u76ee\u3002\u6bcf\u7ecf\u8fc7\u4e00\u573a\u672a\u80fd\u6740\u6b7b\u654c\u4eba\u7684\u6218\u6597\uff0c\u5fe0\u8bda\u5ea6\u5c31\u964d\u4f4eK\u3002\u5fe0\u8bda\u5ea6\u964d\u81f30\u62160\u4ee5\u4e0b\uff0c\u5219\u8be5lion\u9003\u79bb\u6218\u573a,\u6c38\u8fdc\u6d88\u5931\u3002\u4f46\u662f\u5df2\u7ecf\u5230\u8fbe\u654c\u4eba\u53f8\u4ee4\u90e8\u7684lion\u4e0d\u4f1a\u9003\u8dd1\u3002Lion\u5728\u5df1\u65b9\u53f8\u4ee4\u90e8\u53ef\u80fd\u9003\u8dd1\u3002lion \u82e5\u662f\u6218\u6b7b\uff0c\u5219\u5176\u6218\u6597\u524d\u7684\u751f\u547d\u503c\u5c31\u4f1a\u8f6c\u79fb\u5230\u5bf9\u624b\u8eab\u4e0a\u3002\u6240\u8c13\u201c\u6218\u6597\u524d\u201d\uff0c\u5c31\u662f\u6bcf\u4e2a\u5c0f\u65f6\u768440\u5206\u524d\u7684\u4e00\u77ac\u95f4\u3002<\/p>\n\n\n\n<p>wolf\u964d\u751f\u65f6\u6ca1\u6709\u6b66\u5668\uff0c\u4f46\u662f\u5728\u6218\u6597\u4e2d\u5982\u679c\u83b7\u80dc\uff08\u6740\u6b7b\u654c\u4eba\uff09\uff0c\u5c31\u4f1a\u7f34\u83b7\u654c\u4eba\u7684\u6b66\u5668\uff0c\u4f46\u81ea\u5df1\u5df2\u6709\u7684\u6b66\u5668\u5c31\u4e0d\u7f34\u83b7\u4e86\u3002\u88ab\u7f34\u83b7\u7684\u6b66\u5668\u5f53\u7136\u4e0d\u80fd\u7b97\u65b0\u7684\uff0c\u5df2\u7ecf\u88ab\u7528\u5230\u4ec0\u4e48\u6837\u4e86\uff0c\u5c31\u662f\u4ec0\u4e48\u6837\u7684\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e0d\u540c\u65f6\u95f4\u4f1a\u53d1\u751f\u7684\u4e0d\u540c\u4e8b\u4ef6\uff1a<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u6574\u70b9\uff0c\u5373\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c0\u5206\uff0c \u53cc\u65b9\u7684\u53f8\u4ee4\u90e8\u4e2d\u5404\u6709\u4e00\u4e2a\u6b66\u58eb\u964d\u751f\u3002<\/p>\n\n\n\n<p>\u7ea2\u65b9\u53f8\u4ee4\u90e8\u6309\u7167 iceman\u3001lion\u3001wolf\u3001ninja\u3001dragon \u7684\u987a\u5e8f\u5236\u9020\u6b66\u58eb\u3002<\/p>\n\n\n\n<p>\u84dd\u65b9\u53f8\u4ee4\u90e8\u6309\u7167 lion\u3001dragon\u3001ninja\u3001iceman\u3001wolf \u7684\u987a\u5e8f\u5236\u9020\u6b66\u58eb\u3002<\/p>\n\n\n\n<p>\u5236\u9020\u6b66\u58eb\u9700\u8981\u751f\u547d\u5143\u3002<\/p>\n\n\n\n<p>\u5236\u9020\u4e00\u4e2a\u521d\u59cb\u751f\u547d\u503c\u4e3a m \u7684\u6b66\u58eb\uff0c\u53f8\u4ee4\u90e8\u4e2d\u7684\u751f\u547d\u5143\u5c31\u8981\u51cf\u5c11 m \u4e2a\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u53f8\u4ee4\u90e8\u4e2d\u7684\u751f\u547d\u5143\u4e0d\u8db3\u4ee5\u5236\u9020\u67d0\u6b66\u58eb\uff0c\u90a3\u4e48\u53f8\u4ee4\u90e8\u5c31\u7b49\u5f85\uff0c\u76f4\u5230\u83b7\u5f97\u8db3\u591f\u751f\u547d\u5143\u540e\u7684\u7b2c\u4e00\u4e2a\u6574\u70b9\uff0c\u624d\u5236\u9020\u8be5\u6b66\u58eb\u3002\u4f8b\u5982\uff0c\u57282:00\uff0c\u7ea2\u65b9\u53f8\u4ee4\u90e8\u672c\u8be5\u5236\u9020\u4e00\u4e2a wolf \uff0c\u5982\u679c\u6b64\u65f6\u751f\u547d\u5143\u4e0d\u8db3\uff0c\u90a3\u4e48\u5c31\u4f1a\u7b49\u5f85\uff0c\u76f4\u5230\u751f\u547d\u5143\u8db3\u591f\u540e\u7684\u4e0b\u4e00\u4e2a\u6574\u70b9\uff0c\u624d\u5236\u9020\u4e00\u4e2a wolf\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c5\u5206\uff0c\u8be5\u9003\u8dd1\u7684lion\u5c31\u5728\u8fd9\u4e00\u65f6\u523b\u9003\u8dd1\u4e86\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c10\u5206\uff1a\u6240\u6709\u7684\u6b66\u58eb\u671d\u654c\u4eba\u53f8\u4ee4\u90e8\u65b9\u5411\u524d\u8fdb\u4e00\u6b65\u3002\u5373\u4ece\u5df1\u65b9\u53f8\u4ee4\u90e8\u8d70\u5230\u76f8\u90bb\u57ce\u5e02\uff0c\u6216\u4ece\u4e00\u4e2a\u57ce\u5e02\u8d70\u5230\u4e0b\u4e00\u4e2a\u57ce\u5e02\u3002\u6216\u4ece\u548c\u654c\u519b\u53f8\u4ee4\u90e8\u76f8\u90bb\u7684\u57ce\u5e02\u5230\u8fbe\u654c\u519b\u53f8\u4ee4\u90e8\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c20\u5206\uff1a\u6bcf\u4e2a\u57ce\u5e02\u4ea7\u51fa10\u4e2a\u751f\u547d\u5143\u3002\u751f\u547d\u5143\u7559\u5728\u57ce\u5e02\uff0c\u76f4\u5230\u88ab\u6b66\u58eb\u53d6\u8d70\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c30\u5206\uff1a\u5982\u679c\u67d0\u4e2a\u57ce\u5e02\u4e2d\u53ea\u6709\u4e00\u4e2a\u6b66\u58eb\uff0c\u90a3\u4e48\u8be5\u6b66\u58eb\u53d6\u8d70\u8be5\u57ce\u5e02\u4e2d\u7684\u6240\u6709\u751f\u547d\u5143\uff0c\u5e76\u7acb\u5373\u5c06\u8fd9\u4e9b\u751f\u547d\u5143\u4f20\u9001\u5230\u5176\u6240\u5c5e\u7684\u53f8\u4ee4\u90e8\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c35\u5206\uff0c\u62e5\u6709arrow\u7684\u6b66\u58eb\u653e\u7bad\uff0c\u5bf9\u654c\u4eba\u9020\u6210\u4f24\u5bb3\u3002\u653e\u7bad\u4e8b\u4ef6\u5e94\u7b97\u53d1\u751f\u5728\u7bad\u53d1\u51fa\u7684\u57ce\u5e02\u3002\u6ce8\u610f\uff0c\u653e\u7bad\u4e0d\u7b97\u662f\u6218\u6597\uff0c\u56e0\u6b64\u653e\u7bad\u7684\u6b66\u58eb\u4e0d\u4f1a\u5f97\u5230\u4efb\u4f55\u597d\u5904\u3002\u6b66\u58eb\u5728\u6ca1\u6709\u654c\u4eba\u7684\u57ce\u5e02\u88ab\u7bad\u5c04\u6b7b\u4e5f\u4e0d\u5f71\u54cd\u5176\u6240\u5728\u57ce\u5e02\u7684\u65d7\u5e1c\u66f4\u6362\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c38\u5206\uff0c\u62e5\u6709bomb\u7684\u6b66\u58eb\u8bc4\u4f30\u662f\u5426\u5e94\u8be5\u4f7f\u7528bomb\u3002\u5982\u679c\u662f\uff0c\u5c31\u7528bomb\u548c\u654c\u4eba\u540c\u5f52\u4e8e\u5c3d\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c40\u5206\uff1a\u5728\u6709\u4e24\u4e2a\u6b66\u58eb\u7684\u57ce\u5e02\uff0c\u4f1a\u53d1\u751f\u6218\u6597\u3002 \u5982\u679c\u654c\u4eba\u57285\u5206\u949f\u524d\u5df2\u7ecf\u88ab\u98de\u6765\u7684arrow\u5c04\u6b7b\uff0c\u90a3\u4e48\u4ecd\u7136\u89c6\u4e3a\u53d1\u751f\u4e86\u4e00\u573a\u6218\u6597\uff0c\u800c\u4e14\u5b58\u6d3b\u8005\u89c6\u4e3a\u83b7\u5f97\u4e86\u6218\u6597\u7684\u80dc\u5229\u3002\u6b64\u60c5\u51b5\u4e0b\u4e0d\u4f1a\u6709\u201c\u6b66\u58eb\u4e3b\u52a8\u653b\u51fb\u201d\uff0c\u201c\u6b66\u58eb\u53cd\u51fb\u201d\uff0c\u201c\u6b66\u58eb\u6218\u6b7b\u201d\u7684\u4e8b\u4ef6\u53d1\u751f\uff0c\u4f46\u6218\u6597\u80dc\u5229\u540e\u5e94\u8be5\u53d1\u751f\u7684\u4e8b\u60c5\u90fd\u4f1a\u53d1\u751f\u3002\u5982Wolf\u4e00\u6837\u80fd\u7f34\u83b7\u6b66\u5668\uff0c\u65d7\u5e1c\u4e5f\u53ef\u80fd\u66f4\u6362\uff0c\u7b49\u7b49\u3002\u5728\u6b64\u60c5\u51b5\u4e0b,Dragon\u540c\u6837\u4f1a\u901a\u8fc7\u5224\u65ad\u662f\u5426\u5e94\u8be5\u8f6e\u5230\u81ea\u5df1\u4e3b\u52a8\u653b\u51fb\u6765\u51b3\u5b9a\u662f\u5426\u6b22\u547c\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c50\u5206\uff0c\u53f8\u4ee4\u90e8\u62a5\u544a\u5b83\u62e5\u6709\u7684\u751f\u547d\u5143\u6570\u91cf\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c55\u5206\uff0c\u6bcf\u4e2a\u6b66\u58eb\u62a5\u544a\u5176\u62e5\u6709\u7684\u6b66\u5668\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u6b66\u58eb\u5230\u8fbe\u5bf9\u65b9\u53f8\u4ee4\u90e8\u540e\u5c31\u7b97\u5b8c\u6210\u4efb\u52a1\u4e86\uff0c\u4ece\u6b64\u5c31\u5446\u5728\u90a3\u91cc\u65e0\u6240\u4e8b\u4e8b\u3002<\/p>\n\n\n\n<p>\u4efb\u4f55\u4e00\u65b9\u7684\u53f8\u4ee4\u90e8\u91cc\u82e5\u662f\u51fa\u73b0\u4e862\u4e2a\u654c\u4eba\uff0c\u5219\u8ba4\u4e3a\u8be5\u53f8\u4ee4\u90e8\u5df2\u88ab\u654c\u4eba\u5360\u9886\u3002<\/p>\n\n\n\n<p>\u4efb\u4f55\u4e00\u65b9\u7684\u53f8\u4ee4\u90e8\u88ab\u654c\u4eba\u5360\u9886\uff0c\u5219\u6218\u4e89\u7ed3\u675f\u3002\u6218\u4e89\u7ed3\u675f\u4e4b\u540e\u5c31\u4e0d\u4f1a\u53d1\u751f\u4efb\u4f55\u4e8b\u60c5\u4e86\u3002<\/p>\n\n\n\n<p>\u7ed9\u5b9a\u4e00\u4e2a\u65f6\u95f4\uff0c\u8981\u6c42\u4f60\u5c06\u4ece0\u70b90\u5206\u5f00\u59cb\u5230\u6b64\u65f6\u95f4\u4e3a\u6b62\u7684\u6240\u6709\u4e8b\u4ef6\u6309\u987a\u5e8f\u8f93\u51fa\u3002\u4e8b\u4ef6\u53ca\u5176\u5bf9\u5e94\u7684\u8f93\u51fa\u6837\u4f8b\u5982\u4e0b\uff1a1) \u6b66\u58eb\u964d\u751f<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a 000:00 blue lion 1 born<\/p>\n\n\n\n<p>\u8868\u793a\u5728 0\u70b90\u5206\uff0c\u7f16\u53f7\u4e3a1\u7684\u84dd\u9b54lion\u6b66\u58eb\u964d\u751f<br>\u5982\u679c\u9020\u51fa\u7684\u662fdragon\uff0c\u90a3\u4e48\u8fd8\u8981\u591a\u8f93\u51fa\u4e00\u884c\uff0c\u4f8b\uff1a<\/p>\n\n\n\n<p>000:00 blue dragon 1 born<br>Its morale is 23.34<br><br>\u8868\u793a\u8be5\u8be5dragon\u964d\u751f\u65f6\u58eb\u6c14\u662f23. 34(\u56db\u820d\u4e94\u5165\u5230\u5c0f\u6570\u70b9\u540e\u4e24\u4f4d)<\/p>\n\n\n\n<p>\u5982\u679c\u9020\u51fa\u7684\u662flion\uff0c\u90a3\u4e48\u8fd8\u8981\u591a\u8f93\u51fa\u4e00\u884c\uff0c\u4f8b:<br>000:00 blue lion 1 born<br>Its loyalty is 24<br><br>\u8868\u793a\u8be5lion\u964d\u751f\u65f6\u7684\u5fe0\u8bda\u5ea6\u662f242) lion\u9003\u8dd1<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a 000:05 blue lion 1 ran away<br>\u8868\u793a\u5728 0\u70b95\u5206\uff0c\u7f16\u53f7\u4e3a1\u7684\u84dd\u9b54lion\u6b66\u58eb\u9003\u8d703) \u6b66\u58eb\u524d\u8fdb\u5230\u67d0\u4e00\u57ce\u5e02<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a 000:10 red iceman 1 marched to city 1 with 20 elements and force 30<br>\u8868\u793a\u5728 0\u70b910\u5206\uff0c\u7ea2\u9b541\u53f7\u6b66\u58ebiceman\u524d\u8fdb\u52301\u53f7\u57ce\u5e02\uff0c\u6b64\u65f6\u4ed6\u751f\u547d\u503c\u4e3a20,\u653b\u51fb\u529b\u4e3a30<br>\u5bf9\u4e8eiceman,\u8f93\u51fa\u7684\u751f\u547d\u503c\u548c\u653b\u51fb\u529b\u5e94\u8be5\u662f\u53d8\u5316\u540e\u7684\u6570\u503c4)\u6b66\u58eb\u653e\u7bad<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a 000:35 blue dragon 1 shot<br>\u8868\u793a\u5728 0\u70b935\u5206\uff0c\u7f16\u53f7\u4e3a1\u7684\u84dd\u9b54dragon\u6b66\u58eb\u5c04\u51fa\u4e00\u652f\u7bad\u3002\u5982\u679c\u5c04\u51fa\u7684\u7bad\u6740\u6b7b\u4e86\u654c\u4eba\uff0c\u5219\u5e94\u5982\u4e0b\u8f93\u51fa\uff1a<br>000:35 blue dragon 1 shot and killed red lion 4<br>\u8868\u793a\u5728 0\u70b935\u5206\uff0c\u7f16\u53f7\u4e3a1\u7684\u84dd\u9b54dragon\u6b66\u58eb\u5c04\u51fa\u4e00\u652f\u7bad\uff0c\u6740\u6b7b\u4e86\u7f16\u53f7\u4e3a4\u7684\u7ea2\u9b54lion\u30025)\u6b66\u58eb\u4f7f\u7528bomb<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a 000:38 blue dragon 1 used a bomb and killed red lion 7<br>\u8868\u793a\u5728 0\u70b938\u5206\uff0c\u7f16\u53f7\u4e3a1\u7684\u84dd\u9b54dragon\u6b66\u58eb\u7528\u70b8\u5f39\u548c\u7f16\u53f7\u4e3a7\u7684\u7ea2\u9b54lion\u540c\u5f52\u4e8e\u5c3d\u30026) \u6b66\u58eb\u4e3b\u52a8\u8fdb\u653b<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a000:40 red iceman 1 attacked blue lion 1 in city 1 with 20 elements and force 30<br>\u8868\u793a\u57280\u70b940\u5206\uff0c1\u53f7\u57ce\u5e02\u4e2d\uff0c\u7ea2\u9b541\u53f7\u6b66\u58ebiceman \u8fdb\u653b\u84dd\u9b541\u53f7\u6b66\u58eblion,\u5728\u53d1\u8d77\u8fdb\u653b\u524d\uff0c\u7ea2\u9b541\u53f7\u6b66\u58ebiceman\u751f\u547d\u503c\u4e3a20\uff0c\u653b\u51fb\u529b\u4e3a 307) \u6b66\u58eb\u53cd\u51fb<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a001:40 blue dragon 2 fought back against red lion 2 in city 1<br>\u8868\u793a\u57281\u70b940\u5206\uff0c1\u53f7\u57ce\u5e02\u4e2d\uff0c\u84dd\u9b542\u53f7\u6b66\u58ebdragon\u53cd\u51fb\u7ea2\u9b542\u53f7\u6b66\u58eblion8) \u6b66\u58eb\u6218\u6b7b<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a001:40 red lion 2 was killed in city 1<br>\u88ab\u7bad\u5c04\u6b7b\u7684\u6b66\u58eb\u5c31\u4e0d\u4f1a\u6709\u8fd9\u4e00\u6761\u8f93\u51fa\u30029) \u6b66\u58eb\u6b22\u547c<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a003:40 blue dragon 2 yelled in city 410) \u6b66\u58eb\u83b7\u53d6\u751f\u547d\u5143( elements )<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a001:40 blue dragon 2 earned 10 elements for his headquarter<\/p>\n\n\n\n<p>\u8f93\u51fa\u4e0d\u5305\u62ec\u572830\u5206\u4e0d\u662f\u901a\u8fc7\u6218\u6597\u83b7\u53d6\u7684elements11) \u65d7\u5e1c\u5347\u8d77<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a004:40 blue flag raised in city 412) \u6b66\u58eb\u62b5\u8fbe\u654c\u519b\u53f8\u4ee4\u90e8<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a001:10 red iceman 1 reached blue headquarter with 20 elements and force 30<br>(\u6b64\u65f6\u4ed6\u751f\u547d\u503c\u4e3a20,\u653b\u51fb\u529b\u4e3a30\uff09\u5bf9\u4e8eiceman,\u8f93\u51fa\u7684\u751f\u547d\u503c\u548c\u653b\u51fb\u529b\u5e94\u8be5\u662f\u53d8\u5316\u540e\u7684\u6570\u503c13) \u53f8\u4ee4\u90e8\u88ab\u5360\u9886<\/p>\n\n\n\n<p>\u8f93\u51fa\u6837\u4f8b\uff1a003:10 blue headquarter was taken14)\u53f8\u4ee4\u90e8\u62a5\u544a\u751f\u547d\u5143\u6570\u91cf<\/p>\n\n\n\n<p>000:50 100 elements in red headquarter<br>000:50 120 elements in blue headquarter<br>\u8868\u793a\u57280\u70b950\u5206\uff0c\u7ea2\u65b9\u53f8\u4ee4\u90e8\u6709100\u4e2a\u751f\u547d\u5143\uff0c\u84dd\u65b9\u6709120\u4e2a15)\u6b66\u58eb\u62a5\u544a\u6b66\u5668\u60c5\u51b5<\/p>\n\n\n\n<p>000:55 blue wolf 2 has arrow(2),bomb,sword(23)<br>000:55 blue wolf 4 has no weapon<br>000:55 blue wolf 5 has sword(20)<br>\u8868\u793a\u57280\u70b955\u5206\uff0c\u84dd\u9b542\u53f7\u6b66\u58ebwolf\u6709\u4e00\u652farrow\uff08\u8fd9\u652farrow\u8fd8\u53ef\u4ee5\u75282\u6b21\uff09\uff0c\u4e00\u4e2abomb\uff0c\u8fd8\u6709\u4e00\u652f\u653b\u51fb\u529b\u4e3a23\u7684sword\u3002<br>\u84dd\u9b544\u53f7\u6b66\u58ebwolf\u6ca1\u6b66\u5668\u3002<br>\u84dd\u9b545\u53f7\u6b66\u58ebwolf\u6709\u4e00\u652f\u653b\u51fb\u529b\u4e3a20\u7684sword\u3002<br>\u4ea4\u4ee3\u6b66\u5668\u60c5\u51b5\u65f6\uff0c\u6b21\u5e8f\u4f9d\u6b21\u662f\uff1aarrow,bomb,sword\u3002\u5982\u679c\u6ca1\u6709\u67d0\u79cd\u6b66\u5668\uff0c\u67d0\u79cd\u6b66\u5668\u5c31\u4e0d\u7528\u63d0\u3002\u62a5\u544a\u65f6\uff0c\u5148\u6309\u4ece\u897f\u5411\u4e1c\u7684\u987a\u5e8f\u6240\u6709\u7684\u7ea2\u6b66\u58eb\u62a5\u544a\uff0c\u7136\u540e\u518d\u4ece\u897f\u5411\u4e1c\u6240\u6709\u7684\u84dd\u6b66\u58eb\u62a5\u544a\u3002<\/p>\n\n\n\n<p>\u8f93\u51fa\u4e8b\u4ef6\u65f6\uff1a<\/p>\n\n\n\n<p>\u9996\u5148\u6309\u65f6\u95f4\u987a\u5e8f\u8f93\u51fa\uff1b<\/p>\n\n\n\n<p>\u540c\u4e00\u65f6\u95f4\u53d1\u751f\u7684\u4e8b\u4ef6\uff0c\u6309\u53d1\u751f\u5730\u70b9\u4ece\u897f\u5411\u4e1c\u4f9d\u6b21\u8f93\u51fa. \u6b66\u58eb\u524d\u8fdb\u7684\u4e8b\u4ef6, \u7b97\u662f\u53d1\u751f\u5728\u76ee\u7684\u5730\u3002<\/p>\n\n\n\n<p>\u5728\u4e00\u6b21\u6218\u6597\u4e2d\u6709\u53ef\u80fd\u53d1\u751f\u4e0a\u9762\u7684 6 \u81f3 11 \u53f7\u4e8b\u4ef6\u3002\u8fd9\u4e9b\u4e8b\u4ef6\u90fd\u7b97\u540c\u65f6\u53d1\u751f\uff0c\u5176\u65f6\u95f4\u5c31\u662f\u6218\u6597\u5f00\u59cb\u65f6\u95f4\u3002\u4e00\u6b21\u6218\u6597\u4e2d\u7684\u8fd9\u4e9b\u4e8b\u4ef6\uff0c\u5e8f\u53f7\u5c0f\u7684\u5e94\u8be5\u5148\u8f93\u51fa\u3002<\/p>\n\n\n\n<p>\u4e24\u4e2a\u6b66\u58eb\u540c\u65f6\u62b5\u8fbe\u540c\u4e00\u57ce\u5e02\uff0c\u5219\u5148\u8f93\u51fa\u7ea2\u6b66\u58eb\u7684\u524d\u8fdb\u4e8b\u4ef6\uff0c\u540e\u8f93\u51fa\u84dd\u6b66\u58eb\u7684\u3002<\/p>\n\n\n\n<p>\u663e\u7136\uff0c13\u53f7\u4e8b\u4ef6\u53d1\u751f\u4e4b\u524d\u7684\u4e00\u77ac\u95f4\u4e00\u5b9a\u53d1\u751f\u4e8612\u53f7\u4e8b\u4ef6\u3002\u8f93\u51fa\u65f6\uff0c\u8fd9\u4e24\u4ef6\u4e8b\u7b97\u540c\u4e00\u65f6\u95f4\u53d1\u751f\uff0c\u4f46\u662f\u5e94\u5148\u8f93\u51fa12\u53f7\u4e8b\u4ef6<\/p>\n\n\n\n<p>\u867d\u7136\u4efb\u4f55\u4e00\u65b9\u7684\u53f8\u4ee4\u90e8\u88ab\u5360\u9886\u4e4b\u540e\uff0c\u5c31\u4e0d\u4f1a\u6709\u4efb\u4f55\u4e8b\u60c5\u53d1\u751f\u4e86\u3002\u4f46\u548c\u53f8\u4ee4\u90e8\u88ab\u5360\u9886\u540c\u65f6\u53d1\u751f\u7684\u4e8b\u4ef6\uff0c\u5168\u90fd\u8981\u8f93\u51fa\u3002<\/p>\n\n\n\n<p>\u8f93\u5165<\/p>\n\n\n\n<p>\u7b2c\u4e00\u884c\u662ft,\u4ee3\u8868\u6d4b\u8bd5\u6570\u636e\u7ec4\u6570<br>\u6bcf\u7ec4\u6837\u4f8b\u5171\u4e09\u884c\u3002<br>\u7b2c\u4e00\u884c\uff0c\u4e94\u4e2a\u6574\u6570 M,N,R,K, T\u3002\u5176\u542b\u4e49\u4e3a\uff1a<br><br>\u6bcf\u4e2a\u53f8\u4ee4\u90e8\u4e00\u5f00\u59cb\u90fd\u6709M\u4e2a\u751f\u547d\u5143( 1 &lt;= M &lt;= 10000)<br>\u4e24\u4e2a\u53f8\u4ee4\u90e8\u4e4b\u95f4\u4e00\u5171\u6709N\u4e2a\u57ce\u5e02( 1 &lt;= N &lt;= 20 )<br>arrow\u7684\u653b\u51fb\u529b\u662fR<br>lion\u6bcf\u7ecf\u8fc7\u4e00\u573a\u672a\u80fd\u6740\u6b7b\u654c\u4eba\u7684\u6218\u6597\uff0c\u5fe0\u8bda\u5ea6\u5c31\u964d\u4f4eK\u3002<br>\u8981\u6c42\u8f93\u51fa\u4ece0\u65f60\u5206\u5f00\u59cb\uff0c\u5230\u65f6\u95f4T\u4e3a\u6b62(\u5305\u62ecT) \u7684\u6240\u6709\u4e8b\u4ef6\u3002T\u4ee5\u5206\u949f\u4e3a\u5355\u4f4d\uff0c0 &lt;= T &lt;= 5000<br><br>\u7b2c\u4e8c\u884c\uff1a\u4e94\u4e2a\u6574\u6570\uff0c\u4f9d\u6b21\u662f dragon \u3001ninja\u3001iceman\u3001lion\u3001wolf \u7684\u521d\u59cb\u751f\u547d\u503c\u3002\u5b83\u4eec\u90fd\u5927\u4e8e0\u5c0f\u4e8e\u7b49\u4e8e10000<br><br>\u7b2c\u4e09\u884c\uff1a\u4e94\u4e2a\u6574\u6570\uff0c\u4f9d\u6b21\u662f dragon \u3001ninja\u3001iceman\u3001lion\u3001wolf \u7684\u653b\u51fb\u529b\u3002\u5b83\u4eec\u90fd\u5927\u4e8e0\u5c0f\u4e8e\u7b49\u4e8e10000<\/p>\n\n\n\n<p>\u8f93\u51fa<\/p>\n\n\n\n<p>\u5bf9\u6bcf\u7ec4\u6570\u636e\uff0c\u5148\u8f93\u51fa\u4e00\u884c\uff1a<br>Case n:<br>\u5982\u5bf9\u7b2c\u4e00\u7ec4\u6570\u636e\u5c31\u8f93\u51fa Case1:<br>\u7136\u540e\u6309\u6070\u5f53\u7684\u987a\u5e8f\u548c\u683c\u5f0f\u8f93\u51fa\u5230\u65f6\u95f4T\u4e3a\u6b62\u53d1\u751f\u7684\u6240\u6709\u4e8b\u4ef6\u3002\u6bcf\u4e2a\u4e8b\u4ef6\u90fd\u4ee5\u4e8b\u4ef6\u53d1\u751f\u7684\u65f6\u95f4\u5f00\u5934\uff0c\u65f6\u95f4\u683c\u5f0f\u662f\u201c\u65f6: \u5206\u201d\uff0c\u201c\u65f6\u201d\u6709\u4e09\u4f4d\uff0c\u201c\u5206\u201d\u6709\u4e24\u4f4d\u3002<\/p>\n\n\n\n<p>\u6837\u4f8b\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1\n20 1 10 10 1000\n20 20 30 10 20\n5 5 5 5 5<\/pre>\n\n\n\n<p>\u6837\u4f8b\u8f93\u51fa<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Case 1:\n000:00 blue lion 1 born\nIts loyalty is 10\n000:10 blue lion 1 marched to city 1 with 10 elements and force 5\n000:30 blue lion 1 earned 10 elements for his headquarter\n000:50 20 elements in red headquarter\n000:50 20 elements in blue headquarter\n000:55 blue lion 1 has no weapon\n001:00 blue dragon 2 born\nIts morale is 0.00\n001:10 blue lion 1 reached red headquarter with 10 elements and force 5\n001:10 blue dragon 2 marched to city 1 with 20 elements and force 5\n001:30 blue dragon 2 earned 10 elements for his headquarter\n001:50 20 elements in red headquarter\n001:50 10 elements in blue headquarter\n001:55 blue lion 1 has no weapon\n001:55 blue dragon 2 has arrow(3)\n002:10 blue dragon 2 reached red headquarter with 20 elements and force 5\n002:10 red headquarter was taken<\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u9898\u6211\u5df2\u7ecf\u65e0\u529b\u5410\u69fd\u4e86\uff0c\uff0c<br>\u4e0d\u63d0\u8fd9\u4e2a\u548c\u4e4b\u524d\u7248\u672c\u5404\u79cd\u6539\u6761\u4ef6\u548c\u89c4\u5219<\/p>\n\n\n\n<p>\u8fd9\u4e2aflag raise\u771f\u662f\u9700\u8981\u6781\u5f3a\u7684\u9605\u8bfb\u7406\u89e3\u80fd\u529b\uff0c\u57fa\u672c\u6240\u6709debug\u65f6\u95f4\u90fd\u5728\u6539\u8fd9\u91cc\uff0c\u6700\u540e\u4ee3\u7801\u5b9e\u73b0\u5199\u7684\u4e00\u56e2\u7cdf\uff08\u5404\u79cd\u6253\u8865\u4e01\uff08\u9003<\/p>\n\n\n\n<p>\u8fd9\u53ef\u771f\u662f\u7f16\u7a0b5\u5206\u949f\uff0c\u8bfb\u9898\u4e24\u5c0f\u65f6\uff0cdebug\u4e00\u6574\u5929<\/p>\n\n\n\n<p>\uff08\u53cd\u601d\u4e00\u4e0b\uff0c\u5176\u5b9e\u8fd8\u662f\u4e0d\u4e60\u60ef\u5199\u5de5\u7a0b\u4ee3\u7801\uff0c\u5e94\u8be5\u5bf9\u4e8e\u6240\u6709\u6240\u9700\u6761\u4ef6\u548c\u4fee\u6539\u51fd\u6570\u5316\/\u7559\u4e0b\u63a5\u53e3\uff0c\u4e0d\u5e94\u8be5\u5077\u61d2\u76f4\u63a5if\u4e00\u957f\u4e32\uff0c\u8fd9\u6837\u624d\u80fd\u4e0d\u201c\u7275\u4e00\u53d1\u800c\u52a8\u5168\u8eab\u201d\uff0c\u4ece\u800c\u65b9\u4fbfdebug\u548cupdate<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;map>\n#include&lt;cmath>\n#include&lt;queue>\n#include&lt;cstdio>\n#include&lt;string>\n#include&lt;vector>\n#include&lt;cstring>\n#include&lt;iostream>\n#include&lt;algorithm>\nusing namespace std;\n#define inf 1000000007\n#define ll long long\n#define N 100010\n#define db double\ninline int rd(){\n\tint x=0,f=1;char ch=getchar();\n\twhile(ch&lt;'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}\n\twhile(ch>='0'&amp;&amp;ch&lt;='9'){x=x*10+ch-'0';ch=getchar();}\n\treturn x*f;\n}\nchar name[5][10]={\"dragon\",\"ninja\",\"iceman\",\"lion\",\"wolf\"};\nchar wp_name[3][6]={\"sword\",\"bomb\",\"arrow\"};\nint ord[2][5]={{2,3,4,1,0},{3,0,1,2,4}};\nint Case,M,v[10],n,k,T,w[10],R;\nint Tim,s[2][10];\nint len[22];\nchar pout[22][1010];\nvoid out_fresh(){\n\tfor(int i=1;i&lt;=n;++i)\n\t\tmemset(pout[i],0,len[i]+1);\n\tmemset(len,0,sizeof(len));\n}\nclass weapons{\n\tint id;\n\tint rem,atk;\npublic:\n\tvoid Init(int _id,int _atk){\n\t\tid=_id;\n\t\tif(id==0){\n\t\t\tatk=_atk\/5;\n\t\t\tif(!atk) id=-1;\n\t\t}\n\t\telse if(id==2) atk=R;\n\t\trem=3;\n\t}\n\tfriend class warriors;\n\tvoid del(){id=-1;}\n\tchar* getname(){return wp_name[id];}\n\tvoid OUT(){\n\t\tprintf(\"%s\",wp_name[id]);\n\t\tif(id==2) printf(\"(%d)\",rem);\n\t\tif(id==0) printf(\"(%d)\",atk);\n\t}\n};\nclass warriors{\n\t#define COL (color?\"blue\":\"red\")\n\t#define COL_T (color?\"red\":\"blue\")\n\t#define WP weapons\n\tint ID; \/\/realID\n\tint id,hp;\/\/nameID\n\tint loyalty,atk;\n\tbool color;\n\tint city;\n\tdb morale;\n    bool iceman_step;\npublic:\n\tWP wp[3];\n\twarriors(){}\n\twarriors(int _ID,int _id,bool _col,int rm):ID(_ID),id(_id),color(_col){\n\t\tloyalty=0;morale=0;hp=v[_id];atk=w[_id];\n\t\tcity=_col?n+1:0;\n\t\tfor(int i=0;i&lt;3;++i) wp[i].Init(-1,0);\n\t\tswitch(_id){\n\t\tcase 0:\n\t\t\twp[(_ID)%3].Init((_ID)%3,atk);\n\t\t\tmorale=rm*1.0\/hp;\n\t\t\tprintf(\"Its morale is %.2lf\\n\",morale);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\twp[(_ID)%3].Init((_ID)%3,atk);\n\t\t\twp[(_ID+1)%3].Init((_ID+1)%3,atk);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\twp[(_ID)%3].Init((_ID)%3,atk);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tloyalty=rm;\n\t\t\tprintf(\"Its loyalty is %d\\n\",rm);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\tvoid upd(int x){city=x;}\n\tint getID(){return ID;}\n\tchar* getname(){return name[id];}\n\tint getHP(){return hp;}\n\tbool runaway(){\n\t\tif(id==3&amp;&amp;loyalty&lt;=0){\n\t\t\tprintf(\"%03d:05 %s lion %d ran away\\n\",Tim,COL,ID);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tbool move(){\n\t\tif(id==2){\n\t\t\tif(iceman_step){\n\t\t\t\thp=max(hp-9,1);\n\t\t\t\tatk+=20;\n\t\t\t}\n\t\t\ticeman_step^=1;\n\t\t}\n\t\tif(!color){\n\t\t\tif(city==n+1){\n\t\t\t\tprintf(\"%03d:10 %s %s %d reached %s headquarter with %d elements and force %d\\n\",Tim,COL,name[id],ID,COL_T,hp,atk);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tprintf(\"%03d:10 %s %s %d marched to city %d with %d elements and force %d\\n\",Tim,COL,name[id],ID,city,hp,atk);\n\t\t\treturn false;\n\t\t}else{\n\t\t\tif(!city){\n\t\t\t\tprintf(\"%03d:10 %s %s %d reached %s headquarter with %d elements and force %d\\n\",Tim,COL,name[id],ID,COL_T,hp,atk);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tprintf(\"%03d:10 %s %s %d marched to city %d with %d elements and force %d\\n\",Tim,COL,name[id],ID,city,hp,atk);\n\t\t\treturn false;\n\t\t}\n\t}\n\tbool is_wolf(){return id==4;}\n\tbool is_lion(){return id==3;}\n\tbool is_dragon(){return id==0;}\n\tbool is_dead(){return hp&lt;=0;}\n\tbool not_ninja(){return id!=1;}\n\tbool have_arrow(){return wp[2].id!=-1;}\n\tbool have_bomb(){return wp[1].id!=-1;}\n\tvoid shot(){if(!(--wp[2].rem)) wp[2].del();}\n\tvoid dead(){hp=0;}\n\tvoid beat(warriors &amp;a,bool out=false){\n\t\ta.hp-=atk;\n\t\tif(out) len[city]+=sprintf(pout[city]+len[city],\"%03d:40 %s %s %d attacked %s %s %d in city %d with %d elements and force %d\\n\",Tim,COL,name[id],ID,COL_T,a.getname(),a.ID,city,hp,atk);\n\t\tif(~wp[0].id){\n\t\t\ta.hp-=wp[0].atk;\n\t\t\twp[0].atk=wp[0].atk*8\/10;\n\t\t\tif(!wp[0].atk) wp[0].del();\n\t\t}\n\t}\n\tvoid beatback(warriors &amp;a,bool out=false){\n\t\ta.hp-=atk\/2;\n\t\tif(out) len[city]+=sprintf(pout[city]+len[city],\"%03d:40 %s %s %d fought back against %s %s %d in city %d\\n\",Tim,COL,name[id],ID,COL_T,a.getname(),a.ID,city);\n\t\tif(~wp[0].id){\n\t\t\ta.hp-=wp[0].atk;\n\t\t\twp[0].atk=wp[0].atk*8\/10;\n\t\t\tif(!wp[0].atk) wp[0].del();\n\t\t}\n\t}\n\tvoid cheer(){\n\t\tif(morale>0.8)\n\t\t\tlen[city]+=sprintf(pout[city]+len[city],\"%03d:40 %s dragon %d yelled in city %d\\n\",Tim,COL,ID,city);\n\t}\n\tvoid change_morale(bool w){morale+=w?0.2:-0.2;}\n\tvoid add_hp(int x){hp+=x;}\n\tvoid lion_loy(){if(id==3) loyalty-=k;}\n\tvoid rob(const warriors &amp;a){\n\t\tif(id!=4) return;\n\t\tfor(int i=0;i&lt;3;++i) if(!(~wp[i].id)) wp[i]=a.wp[i];\n\t}\n\tvoid report(){\n\t\tprintf(\"%s %d has \",name[id],ID);\n\t\tbool tp=0;\n\t\tfor(int i=2;~i;--i){\n\t\t\tif(wp[i].id==-1) continue;\n\t\t\tif(tp) putchar(',');\n\t\t\twp[i].OUT();tp=1;\n\t\t}\n\t\tif(!tp) printf(\"no weapon\");\n\t\tputs(\"\");\n\t}\n};\nclass citys{\nprotected:\n\tint id,rem_hp;\n\twarriors wr[2],tp_wr[2];\n\tbool R,B,tR,tB,is_war;\n\tint flag,rf;\npublic:\n\tvoid Init(int _id){\n\t\tid=_id;\n\t\trf=flag=rem_hp=0;\n\t\tis_war=tR=R=tB=B=0;\n\t}\n\tbool update(){\n\t\tR=tR;B=tB;\n\t\tif(R){\n\t\t\twr[0]=tp_wr[0];\n\t\t\twr[0].upd(id);\n\t\t\tif(wr[0].move()) ++flag;\n\t\t}else wr[0].dead();\n\t\tif(B){\n\t\t\twr[1]=tp_wr[1];\n\t\t\twr[1].upd(id);\n\t\t\tif(wr[1].move()) ++flag;\n\t\t}else wr[1].dead();\n\t\ttR=tB=0;\n\t\treturn flag==2&amp;&amp;(id==0||id==n+1);\n\t}\n\tvoid qaz_cg(const citys &amp;a){\n\t\tflag=a.flag;\n\t\twr[0]=a.wr[0];wr[1]=a.wr[1];\n\t}\n\tvoid ck_lion(){\n\t\tif(R&amp;&amp;wr[0].runaway()) R=0;\n\t\tif(B&amp;&amp;wr[1].runaway()) B=0;\n\t}\n\tvoid move_upd(const warriors &amp;a,bool col){\n\t\tif(col) tp_wr[1]=a,tB=1;\n\t\telse tp_wr[0]=a,tR=1;\n\t}\n\tvoid add_hp(int x){rem_hp+=x;}\n\tint get_hp_R(){\n\t\tint tp=rem_hp;\n\t\tif(R&amp;&amp;!B){\n\t\t\trem_hp=0;\n\t\t\tif(tp) printf(\"%03d:30 red %s %d earned %d elements for his headquarter\\n\",Tim,wr[0].getname(),wr[0].getID(),tp);\n\t\t\treturn tp;\n\t\t}\n\t\treturn 0;\n\t}\n\tint get_hp_B(){\n\t\tint tp=rem_hp;\n\t\tif(B&amp;&amp;!R){\n\t\t\trem_hp=0;\n\t\t\tif(tp) printf(\"%03d:30 blue %s %d earned %d elements for his headquarter\\n\",Tim,wr[1].getname(),wr[1].getID(),tp);\n\t\t\treturn tp;\n\t\t}\n\t\treturn 0;\n\t}\n\tfriend void move(const citys &amp;a,int id);\n\tvoid change_morale(){\n\t\twr[0].change_morale(wr[1].is_dead());\n\t\twr[1].change_morale(wr[0].is_dead());\n\t}\n\tvoid fight(){\n\t\tif(!is_war)return;\n\t\ttp_wr[0]=wr[0];tp_wr[1]=wr[1];\n\t\tif(B&amp;&amp;R){\n\t\t\tif(rf>=2||(abs(rf)&lt;2&amp;&amp;(id&amp;1))){\n\t\t\t\twr[0].beat(wr[1],true);\n\t\t\t\tif(!wr[1].is_dead()&amp;&amp;wr[1].not_ninja()) wr[1].beatback(wr[0],true);\n\t\t\t}else{\n\t\t\t\twr[1].beat(wr[0],true);\n\t\t\t\tif(!wr[0].is_dead()&amp;&amp;wr[0].not_ninja()) wr[0].beatback(wr[1],true);\n\t\t\t}\n\t\t\tif(wr[0].is_dead()) len[id]+=sprintf(pout[id]+len[id],\"%03d:40 red %s %d was killed in city %d\\n\",Tim,wr[0].getname(),wr[0].getID(),id);\n\t\t\tif(wr[1].is_dead()) len[id]+=sprintf(pout[id]+len[id],\"%03d:40 blue %s %d was killed in city %d\\n\",Tim,wr[1].getname(),wr[1].getID(),id);\n\t\t\tR=(!wr[0].is_dead());\n\t\t\tB=(!wr[1].is_dead());\n\t\t}\n\t\tchange_morale();\n\t\tif(rf>=2||(abs(rf)&lt;2&amp;&amp;(id&amp;1))){\n\t\t\tif(R&amp;&amp;wr[0].is_dragon()) wr[0].cheer();\n\t\t}else if(B&amp;&amp;wr[1].is_dragon()) wr[1].cheer();\n\t\tif(B) wr[0].lion_loy();\n\t\telse if(wr[1].is_lion()) wr[0].add_hp(max(0,tp_wr[1].getHP()));\n\t\tif(R) wr[1].lion_loy();\n\t\telse if(wr[0].is_lion()) wr[1].add_hp(max(0,tp_wr[0].getHP()));\n\t\tif(R&amp;&amp;!B){\n\t\t\twr[0].rob(wr[1]);\n\t\t\tflag=max(flag+1,1);\n\t\t}else if(B&amp;&amp;!R){\n\t\t\twr[1].rob(wr[0]);\n\t\t\tflag=min(flag-1,-1);\n\t\t}else if(B&amp;&amp;R) flag=0;\n\t\telse is_war=0;\n\t}\n\tfriend void shot_arrow(int id);\n\tbool reward_R(bool tp){\n\t\tif(!is_war||!R||B) return false;\n\t\tif(tp) wr[0].add_hp(8);\n\t\treturn true;\n\t}\n\tbool reward_B(bool tp){\n\t\tif(!is_war||!B||R) return false;\n\t\tif(tp) wr[1].add_hp(8);\n\t\treturn true;\n\t}\n\tvoid ck_bomb(){\n\t\tif(!R||!B) return;\n\t\ttp_wr[0]=wr[0];tp_wr[1]=wr[1];\n\t\ttB=B;tR=R;\n\t\tif(wr[0].is_dead()||wr[1].is_dead()) return;\n\t\tif(rf>=2||(abs(rf)&lt;2&amp;&amp;(id&amp;1))){\n\t\t\ttp_wr[0].beat(tp_wr[1]);\n\t\t\tif(!tp_wr[1].is_dead()&amp;&amp;tp_wr[1].not_ninja()) tp_wr[1].beatback(tp_wr[0]);\n\t\t}else{\n\t\t\ttp_wr[1].beat(tp_wr[0]);\n\t\t\tif(!tp_wr[0].is_dead()&amp;&amp;tp_wr[0].not_ninja()) tp_wr[0].beatback(tp_wr[1]);\n\t\t}\n\t\ttR=(!tp_wr[0].is_dead());\n\t\ttB=(!tp_wr[1].is_dead());\n\t\tif(!tR&amp;&amp;tp_wr[0].have_bomb()){\n\t\t\tB=0;R=0;wr[0].dead();wr[1].dead();\n\t\t\tprintf(\"%03d:38 red %s %d used a bomb and killed blue %s %d\\n\",Tim,wr[0].getname(),wr[0].getID(),wr[1].getname(),wr[1].getID());\n\t\t}else if(!tB&amp;&amp;wr[1].have_bomb()){\n\t\t\tR=0;B=0;wr[0].dead();wr[1].dead();\n\t\t\tprintf(\"%03d:38 blue %s %d used a bomb and killed red %s %d\\n\",Tim,wr[1].getname(),wr[1].getID(),wr[0].getname(),wr[0].getID());\n\t\t}else{\n\t\t\tis_war=1;\n\t\t}\n\t\ttR=tB=0;\n\t}\n\tint collect(bool col){\n\t\tint tp=rem_hp;\n\t\tif((B^R)&amp;&amp;(col^R)){\n\t\t\trem_hp=0;\n\t\t\tif(tp) len[id]+=sprintf(pout[id]+len[id],\"%03d:40 %s %s %d earned %d elements for his headquarter\\n\",Tim,col?\"blue\":\"red\",wr[col].getname(),wr[col].getID(),tp);\n\t\t\treturn tp;\n\t\t}\n\t\treturn 0;\n\t}\n\tvoid raise_flag(){\n\t\tif(abs(flag)==2&amp;&amp;is_war){\n\t\t\tif(rf*flag>0){is_war=0;return;}\n\t\t\trf=flag;\n\t\t\tlen[id]+=sprintf(pout[id]+len[id],\"%03d:40 %s flag raised in city %d\\n\",Tim,flag>0?\"red\":\"blue\",id);\n\t\t}\n\t\tis_war=0;\n\t}\n\tvoid report_R(){\n\t\tif(R) printf(\"%03d:55 red \",Tim),wr[0].report();\n\t}\n\tvoid report_B(){\n\t\tif(B) printf(\"%03d:55 blue \",Tim),wr[1].report();\n\t}\n}C[22];\nvoid move(const citys &amp;a,int id){\n\tif(a.R) C[id+1].move_upd(a.wr[0],0);\n\tif(a.B) C[id-1].move_upd(a.wr[1],1);\n}\nvoid shot_arrow(int id){\n\tif(C[id].R&amp;&amp;C[id+1].B&amp;&amp;C[id].wr[0].have_arrow()){\n\t\tprintf(\"%03d:35 red %s %d shot\",Tim,C[id].wr[0].getname(),C[id].wr[0].getID());\n\t\tC[id].wr[0].shot();\n\t\tC[id+1].wr[1].add_hp(-R);\n\t\tif(C[id+1].wr[1].is_dead()){\n\t\t\tC[id+1].is_war=1;C[id+1].B=0;\n\t\t\tprintf(\" and killed blue %s %d\",C[id+1].wr[1].getname(),C[id+1].wr[1].getID());\n\t\t}\n\t\tputs(\"\");\n\t}\n\tif((C[id].B||C[id].is_war)&amp;&amp;C[id-1].R&amp;&amp;C[id].wr[1].have_arrow()){\n\t\tprintf(\"%03d:35 blue %s %d shot\",Tim,C[id].wr[1].getname(),C[id].wr[1].getID());\n\t\tC[id].wr[1].shot();\n\t\tC[id-1].wr[0].add_hp(-R);\n\t\tif(C[id-1].wr[0].is_dead()){\n\t\t\tC[id-1].is_war=1;C[id-1].R=0;\n\t\t\tprintf(\" and killed red %s %d\",C[id-1].wr[0].getname(),C[id-1].wr[0].getID());\n\t\t}\n\t\tputs(\"\");\n\t}\n\t\n}\nclass qaz:public citys{\n\tbool avl;\n\tchar nam[5];\n\tint ID;\n\tint tp,wr_sz[5],tot;\n\t\/\/vector&lt;warriors>wrs;\npublic:\n\tqaz(int M,const char *s,int _id){\n\t\tInit(_id?n+1:0);\n\t\trem_hp=M;avl=1;tot=tp=0;ID=_id;\n\t\tmemcpy(nam,s,5);\n\t\tmemset(wr_sz,0,sizeof(wr_sz));\n\t}\n\tbool if_avl(){return avl;}\n\tvoid ck(){\n\t\tR=B=0;tp%=5;\n\t\tif(v[ord[ID][tp]]&lt;=rem_hp){\n\t\t\t++wr_sz[tp];++tot;\n\t\t\trem_hp-=v[ord[ID][tp]];\n\t\t\tprintf(\"%03d:00 %s %s %d born\\n\",Tim,nam,name[ord[ID][tp]],tot);\n\t\t\twarriors tmp(tot,ord[ID][tp],ID,rem_hp);\n\t\t\tif(ID) B=1,wr[1]=tmp;\n\t\t\telse R=1,wr[0]=tmp;\n\t\t\t++tp;\n\t\t\treturn;\n\t\t}\n\t}\n\tbool ck_hp(){return rem_hp>=8;}\n\tvoid report(){\n\t\tprintf(\"%03d:50 %d elements in %s headquarter\\n\",Tim,rem_hp,nam);\n\t}\n\tvoid report_wr(){\n\t\tif(!flag) return;\n\t\tprintf(\"%03d:55 %s \",Tim,ID?\"red\":\"blue\");wr[ID^1].report();\n\t}\n};\nvoid Init(){\n\tTim=0;\n}\nvoid work(){\n\tbool End=0;\n\tqaz A(M,\"red\",0);\n\tqaz B(M,\"blue\",1);\n\tfor(int i=1;i&lt;=n;i++) C[i].Init(i);\n\twhile(Tim*60&lt;=T){\n\t\tA.ck();\n\t\tB.ck();\n\t\tC[0]=A;C[n+1]=B;\n\t\tif(Tim*60+5&lt;=T)\n\t\t\tfor(int i=0;i&lt;=n+1;++i) C[i].ck_lion();\n\t\tif(Tim*60+10&lt;=T){\n\t\t\tfor(int i=0;i&lt;=n+1;++i) move(C[i],i);\n\t\t\tfor(int i=0;i&lt;=n+1;++i)\n\t\t\t\tif(C[i].update()){\n\t\t\t\t\tif(i) printf(\"%03d:10 blue headquarter was taken\\n\",Tim);\n\t\t\t\t\telse printf(\"%03d:10 red headquarter was taken\\n\",Tim);\n\t\t\t\t\tEnd=1;\n\t\t\t\t}\n\t\t\tif(End) break;\n\t\t\tA.qaz_cg(C[0]);B.qaz_cg(C[n+1]);\n\t\t}\n\t\tif(Tim*60+20&lt;=T)\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].add_hp(10);\n\t\tif(Tim*60+30&lt;=T)\n\t\t\tfor(int i=1;i&lt;=n;++i){\n\t\t\t\tA.add_hp(C[i].get_hp_R());\n\t\t\t\tB.add_hp(C[i].get_hp_B());\n\t\t\t}\n\t\tif(Tim*60+35&lt;=T)\n\t\t\tfor(int i=1;i&lt;=n;++i) shot_arrow(i);\n\t\tif(Tim*60+38&lt;=T)\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].ck_bomb();\n\t\tif(Tim*60+40&lt;=T){\n\t\t\tout_fresh();\n\t\t\tint tp;\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].fight();\n\t\t\tfor(int i=1;i&lt;=n;++i)\n\t\t\t\tif(C[i].reward_R(A.ck_hp())) A.add_hp(-8);\n\t\t\tfor(int i=n;i;--i)\n\t\t\t\tif(C[i].reward_B(B.ck_hp())) B.add_hp(-8);\n\t\t\tfor(int i=1;i&lt;=n;++i){\n\t\t\t\tA.add_hp(C[i].collect(0));\n\t\t\t\tB.add_hp(C[i].collect(1));\n\t\t\t}\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].raise_flag();\n\t\t\tfor(int i=1;i&lt;=n;++i) printf(\"%s\",pout[i]);\n\t\t}\n\t\tif(Tim*60+50&lt;=T){\n\t\t\tA.report();\n\t\t\tB.report();\n\t\t}\n\t\tif(Tim*60+55&lt;=T){\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].report_R();\n\t\t\tB.report_wr();\n\t\t\tA.report_wr();\n\t\t\tfor(int i=1;i&lt;=n;++i) C[i].report_B();\n\t\t}\n\t\t++Tim;\n\t}\n}\nint main(){\n\tCase=rd();\n\tfor(int _c=1;_c&lt;=Case;_c++){\n\t\tprintf(\"Case %d:\\n\",_c);\n\t\tM=rd();n=rd();R=rd();k=rd();T=rd();\n\t\tfor(int i=0;i&lt;5;i++) v[i]=rd();\n\t\tfor(int i=0;i&lt;5;i++) w[i]=rd();\n\t\tInit();\n\t\twork();\n\t}\n\treturn 0;\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A:\u9b54\u517d\u4e16\u754c\u7ec8\u6781\u7248 \u603b\u65f6\u95f4\u9650\u5236:&nbsp;6000ms&nbsp;\u5185\u5b58\u9650\u5236:&nbsp;65536kB \u63cf\u8ff0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-698","post","type-post","status-publish","format-standard","hentry","category-70"],"_links":{"self":[{"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/posts\/698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=698"}],"version-history":[{"count":2,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/posts\/698\/revisions"}],"predecessor-version":[{"id":700,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=\/wp\/v2\/posts\/698\/revisions\/700"}],"wp:attachment":[{"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kylelv.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}