3 条题解
-
0
#include<bits/stdc++.h> using namespace std; class pai{ public: int fight; int hp; int real_hp; bool have; string jibie; int ji; string name; void fight(pai somebody){ if(this.ji>somebody.ji){ somebody.hp-=this.fight*2; cout<<"对方血量-"<<this.fight*2<<"\n"; this.hp-=somebody.fight/2; cout<<"我方血量-"<<somebody.fight/2<<"\n"; }else if(this.ji==somebody.ji){ somebody.hp-=this.fight; cout<<"对方血量-"<<this.fight<<"\n"; this.hp-=somebody.fight; cout<<"我方血量-"<<somebody.fight<<"\n"; }else{ somebody.hp-=this.fight/2; cout<<"对方血量-"<<this.fight/2<<"\n"; this.hp-=somebody.fight*2; cout<<"我方血量-"<<somebody.fight*2<<"\n"; } } void cy(){ this.hp=this.real_hp } }; int main(){ }
信息
- ID
- 13834
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者