ImageVerifierCode 换一换
格式:DOCX , 页数:21 ,大小:28.35KB ,
资源ID:18459318      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18459318.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(魔兽世界Word文档格式.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

魔兽世界Word文档格式.docx

1、如果司令部的生命元不足以奖励所有的武士,则优先奖励距离敌方司令部近的武士。 如果某武士在某城市的战斗中杀死了敌人,则该武士的司令部立即取得该城市中所有的生命元。注意,司令部总是先奖励武士,然后再收回打了胜仗的城市的生命元。对于因司令部生命元不足而领不到奖励的武士,司令部也不会在取得战利品生命元后为其补发奖励。 每次战斗都只有一方主动进攻一次。战斗并非是你死我活的,可能是双方都幸存。如果双方都幸存,则双方都不能拿走发生战斗的城市的生命元 在插红旗的城市,以及编号为奇数的无旗城市,由红武士主动发起进攻。 在插蓝旗的城市,以及编号为偶数的无旗城市,由蓝武士主动发起进攻。 一开始所有的城市都是无旗的。

2、当某个城市有连续两场战斗都是同一方的武士杀死敌人(两场战斗中间如果有若干个战斗时刻并没有发生战斗,则这两场战斗仍然算是连续的) ,那么该城市就会插上胜方的旗帜,若原来插着败方的旗帜,则败方旗帜落下。旗帜一旦插上,就一直插着,直到被敌人更换。一个城市最多只能插一面旗帜,旗帜没被敌人更换前,也不会再次插同颜色的旗。 不同的武士各有其特点: dragon 在一次在它主动进攻的战斗结束后,如果还没有战死,就会欢呼。 ninja 挨打了也从不反击敌人。 iceman 每前进两步,在第2步完成的时候,生命值会减少9,攻击力会增加20。但是若生命值减9后会小于等于0,则生命值不减9,而是变为1。即icema

3、n不会因走多了而死。 lion 若是战死,则其战斗前的生命值就会转移到对手身上。 在一个 wolf 通过主动攻击杀死敌人的次数达到偶数的时刻(次数从1开始算),在战斗完成后,该 wolf 生命值和攻击力都增加1倍。如果其杀死的敌人是lion,则攻击力和生命值先加倍,然后才吸取lion的生命值。获取总部的生命元奖励,发生在加倍之后。只有在主动攻击杀死敌人时才能有加倍的事情,反击杀死敌人则不不会发生加倍。 武士到达对方司令部后就算完成任务了,从此就呆在那里无所事事。 任何一方的司令部里若是出现了2个敌人,则认为该司令部已被敌人占领。 任何一方的司令部被敌人占领,则战争结束。战争结束之后就不会发生任

4、何事情了。 给定一个时间,要求你将从0点0分开始到此时间为止的所有事件按顺序输出。事件及其对应的输出样例如下:1) 武士降生 输出样例: 000:00 blue lion 1 born 表示在 0点0分,编号为1的蓝魔lion武士降生 2) 武士前进到某一城市 10 red iceman 1 marched to city 1 with 20 elements and force 30 表示在 0点10分,红魔1号武士iceman前进到1号城市,此时他生命值为20,攻击力为30 对于iceman,输出的生命值和攻击力应该是变化后的数值 3) 武士主动进攻 000:40 red iceman 1

5、 attacked blue lion 1 in city 1 with 20 elements and force 30 表示在0点40分,1号城市中,红魔1号武士iceman 进攻蓝魔1号武士lion,在发起进攻前,红魔1号武士iceman生命值为20,攻击力为 30 4) 武士反击 001:40 blue dragon 2 fought back against red lion 2 in city 1 表示在1点40分,1号城市中,蓝魔2号武士dragon反击红魔2号武士lion 5) 武士战死 40 red lion 2 was killed in city 1 6) 武士欢呼 00

6、3:40 blue dragon 2 yelled in city 4 7) 武士获取生命元( elements ) 40 blue dragon 2 earned 10 elements for his headquarter 8) 旗帜升起 004:40 blue flag raised in city 4 9) 武士抵达敌军司令部 10 red iceman 1 reached blue headquarter with 20 elements and force 30 (此时他生命值为20,攻击力为30)对于iceman,输出的生命值和攻击力应该是变化后的数值 10) 司令部被占领 1

7、0 blue headquarter was taken 11)司令部报告生命元数量 50 100 elements in red headquarter 50 120 elements in blue headquarter 表示在0点50分,红方司令部有100个生命元,蓝方有120个 输出事件时:首先按时间顺序输出;同一时间发生的事件,按发生地点从西向东依次输出. 武士前进的事件, 算是发生在目的地。在一次战斗中有可能发生上面的 3 至 8 号事件。这些事件都算同时发生,其时间就是战斗开始时间。一次战斗中的这些事件,序号小的应该先输出。两个武士同时抵达同一城市,则先输出红武士的前进事件,后

8、输出蓝武士的。显然,10号事件发生之前的一瞬间一定发生了9号事件。输出时,这两件事算同一时间发生,但是应先输出9号事件 虽然任何一方的司令部被占领之后,就不会有任何事情发生了。但和司令部被占领同时发生的事件,全都要输出。输入:第一行是一个整数,代表测试数据组数 每组测试数据共三行。第一行,三个整数 M,N,T。其含义为:每个司令部一开始都有M个生命元两个司令部之间一共有N个城市要求输出从0时0分开始,到时间T为止(包括T) 的所有事件。T以分钟为单位,0 = T = 1000 第二行:五个整数,依次是 dragon 、ninja、iceman、lion、wolf 的初始生命值。它们都大于0小于

9、等于100 第三行:五个整数,依次是 dragon 、ninja、iceman、lion、wolf 的攻击力。输出:对每组测试数据,首先输出“Case:n n是测试数据的编号,从1开始 接下来按恰当的顺序和格式输出到时间T为止发生的所有事件。每个事件都以事件发生的时间开头,时间格式是“时: 分”,“时”有三位,“分”有两位。Sample Input299 2 100010 20 50 50 3020 50 50 50 5040 1 100020 20 20 20 20Sample OutputCase:100 red iceman 1 born00 blue lion 1 born10 red

10、 iceman 1 marched to city 1 with 50 elements and force 5010 blue lion 1 marched to city 2 with 50 elements and force 5030 red iceman 1 earned 10 elements for his headquarter30 blue lion 1 earned 10 elements for his headquarter50 59 elements in red headquarter50 59 elements in blue headquarter00 red

11、lion 2 born00 blue dragon 2 born10 red lion 2 marched to city 1 with 50 elements and force 5010 blue lion 1 marched to city 1 with 50 elements and force 5010 red iceman 1 marched to city 2 with 41 elements and force 7010 blue dragon 2 marched to city 2 with 10 elements and force 2040 red lion 2 atta

12、cked blue lion 1 in city 1 with 50 elements and force 5040 blue lion 1 was killed in city 140 red lion 2 earned 10 elements for his headquarter40 blue dragon 2 attacked red iceman 1 in city 2 with 10 elements and force 2040 red iceman 1 fought back against blue dragon 2 in city 240 blue dragon 2 was

13、 killed in city 240 red iceman 1 earned 10 elements for his headquarter50 21 elements in red headquarter50 49 elements in blue headquarter002:00 blue ninja 3 born10 red lion 2 marched to city 2 with 100 elements and force 5010 blue ninja 3 marched to city 2 with 20 elements and force 5010 red iceman

14、 1 reached blue headquarter with 29 elements and force 7040 blue ninja 3 attacked red lion 2 in city 2 with 20 elements and force 5040 red lion 2 fought back against blue ninja 3 in city 240 blue ninja 3 was killed in city 240 red flag raised in city 250 23 elements in red headquarter50 29 elements

15、in blue headquarter10 red lion 2 reached blue headquarter with 58 elements and force 5010 blue headquarter was taken10 red iceman 1 marched to city 1 with 20 elements and force 2010 blue lion 1 marched to city 1 with 20 elements and force 2040 red iceman 1 attacked blue lion 1 in city 1 with 20 elem

16、ents and force 2050 22 elements in red headquarter50 20 elements in blue headquarter10 red lion 2 marched to city 1 with 20 elements and force 2010 blue dragon 2 marched to city 1 with 20 elements and force 2010 red iceman 1 reached blue headquarter with 39 elements and force 4040 red lion 2 attacke

17、d blue dragon 2 in city 1 with 20 elements and force 2040 blue dragon 2 was killed in city 140 red flag raised in city 150 12 elements in red headquarter50 0 elements in blue headquarter10 red lion 2 reached blue headquarter with 20 elements and force 20代码:#includefstreamstringvectorusing namespace

18、std;int dragon12;int ninja12;int iceman12;int lion12;int wolf12;int m;/生命元int m2;int n;/城市int t;/时间int a=0;int a2=0;/武士int RED=0;int BLUE=0;/胜利class Apublic: int C;/所在城市 int num;/编号 int M;/生命值 int T;/攻击力; int success; string rb;class Red_Blue:public A Red_Blue(int n,int m,int t,int c,string s) num=n

19、;M=m;T=t;C=c;rb=s; class city city(int r,int b,int ss) red2=r; blue3=b; s=ss; void sets(int ss) s+=ss; int gets() return s; void setred2(int e) red2+=e; int getred2() return red2; void setblue3(int e) blue3+=e; int getblue3() return blue3;private: int red2;/红旗 int blue3; int s;/城市生命元class red_blue v

20、oid insert(ofstream &fout,int i); int time1(ofstream & void time2(vector& Cy); void time3(ofstream &fout,int i,vector &Cy); void time4(ofstream & void time5(ofstream & void Sum(ofstream &fout,int j); vectorred;blue;void red_blue:Sum(ofstream &fout,int j) Cy; int i; for(i=0;i=n+1;i+)/0&n+1城市不用 city c

21、(0,0,0); Cy.push_back(c); foutcase:j+1endl; for( i=0;=t;i+=60) insert(fout,i); if(time1(fout,i) break; time2(Cy); time3(fout,i,Cy); time4(fout,i,Cy); time5(fout,i); RED=0; BLUE=0; Cy.clear(); red.clear(); blue.clear();time4(ofstream &Cy)/red.erase(&redt1); int i2,j; for(i2=0;i2red.size();i2+) for(j=

22、0;jblue.size();j+) if(redi2.C=bluej.C) if(Cyredi2.C.getred2()=2|(Cybluej.C.getblue3()!=2&redi2.C%2!=0)/红方进攻 bluej.M-=redi2.T; fout00i/6040 red redi2.rbredi2.num attacked blue bluej.rbbluej.num in city redi2.C with redi2.M elements and force redi2.T if(bluej.M0) foutblue was killed in city bluej.C=8) redi.M+=8; m-=8; red earned Cyredi2.C.gets()0&bluej.rb!=ninja redi2.M-=bluej

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1