#include<iostream>
#include<cmath>
#include<algorithm>
#include<iomanip>
#include<string>
#include<cstring>
usingnamespacestd;
classRole
{
protected:
inthp,ce,de,fa;
intflag;
stringnn;
public:
Role(stringn,inth,intc,intd,intf):nn(n),hp(h),ce(c),de(d),fa(f){}
~Role(){}
voidcombat(Role&an)
{
if(fa>an.fa)
{
flag=1;
loop2:
cout<<nn<<"attacks"<<an.nn<<":";
if(an.de>=ce)
{
an.hp--;
an.de--;
}
else
{
an.hp=an.hp-ce+an.de;
an.de--;
}
if(an.hp<0)
{
an.hp=0;
}
if(an.de<0)
{
an.de=0;
}
cout<<an.nn<<"hp="&