听说灌水区高手多
  • 板块灌水区
  • 楼主zhz_2013
  • 当前回复6
  • 已保存回复6
  • 发布时间2024/6/7 16:48
  • 上次更新2024/6/7 20:06:46
查看原帖
听说灌水区高手多
980236
zhz_2013楼主2024/6/7 16:48

CF903B
code:

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d,e,i;
    cin>>a>>b>>c>>d>>e;
    string ans="";
    while(1){
        i++;
        if(d<=b){
            ans+="STRIKE\n";
            break;
        }else if(a<=e){
            ans+="HEAL\n";
            a+=c;
            a-=e;
        }else{
            ans+="STRIKE\n";
            d-=b;
            a-=e;
        }
    }
    cout<<i<<endl;
    for(int i=0;i<ans.size();i++)cout<<ans[i];
    cout<<endl;
}



2024/6/7 16:48
加载中...