acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 题解(单for循环)

    #include<iostream> using namespace std; int h,w,x,y,z,d; int main() { cin>>h>>w>>x>>y>>z>>d; int u=1,v=0,cnt=0; for(int i=1;i<=h*w;i++,u++){ if(u>w)u=1; if(u1){ v++; } char c; cin>>c; if(v>=x && v<=y && u>=z && u<=d){ cout<<c; if(ud)cout<<endl; } 通过变量记录行列坐标,判断满足条件去输出和换行

    userId_undefined

    ༺ཌༀalgorithmༀད༻

    出道萌新时间刺客空间掌握者时空双修者倔强青铜字符串·魔法使
    0阅读
    0回复
    0点赞
首页