#include<iostream> using namespace std; void draw1(unsigned n){ cout<<"+"; for(int i=0;i<n;++i) cout<<"-"; cout<<"+"<<endl; } void draw2(unsigned n){ cout<<"|"; while(n) { cout<<" "; --n; } cout<<"|"<<endl; } void main(){ unsigned n,m; while(cin>>n>>m){ draw1(n); while(m){ draw2(n); --m; } draw1(n); cout<<endl; } }
杭电ACM 第2052题
最新推荐文章于 2018-10-21 09:40:07 发布