1 条题解

  • 0
    @ 2022-11-26 13:05:31

    #include<iostream> #include<algorithm> using namespace std;

    int main(){ int n,x,a,b; cin>>n>>x>>a>>b; int p; while(n--){ cin>>p; if(p1){ x=x+a; } if(p0){ x=x-b; } if(x>0){ cout<<"dance!!!"<<endl; }else{ cout<<"***"<<endl; } } }

    • 1

    信息

    ID
    158
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    412
    已通过
    49
    上传者