40分能正常运行哪有问题???

B2083 画矩形

@[zero02](/user/1178278) ``` #include<bits/stdc++.h> using namespace std; int main(){ int a,b,f; char c; cin>>a>>b>>c>>f; if(f==0){ for(int i=0;i<b;i++)cout<<c; cout<<endl; for(int i=1;i<=a-2;i++){ cout<<c; for(int j=1;j<=b-2;j++)cout<<" "; cout<<c<<endl; } for(int i=0;i<b;i++)cout<<c; cout<<endl; } else { for(int i=1;i<=a;i++){ for(int j=1;j<=b;j++)cout<<c; cout<<endl; } } } ``` 自己深思去
by yejingzhi @ 2023-11-16 07:00:11


全if时间复杂度什么样了自己没点数吗。。。 像上面那老哥for循环就可以
by liverxiwo @ 2023-11-21 12:47:05


|