995
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,f; char c; cin>>a>>b>>c>>f; for(int i=0;i<a;++i){ for(int j=0;j<b;++j){ cout<<((i==0||1==a-1||j==0||j==b-1)?c:(f==0)?' ':c); } cout<<endl; } return 0; }
thanks!!!!!