#include<bits/stdc++.h> using namespace std; int n,m,b; char c; int main(){ scanf("%d %d %c %d",&n,&m,&c,&b); for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ if(i1||j1||in||jm){ printf("%c",c); }else{ if(b==1){ printf("%c",c); }else{ printf(" "); } } } printf("\n"); } return 0; }

2 comments

  • @ 2025-1-14 14:14:54

    #include<bits/stdc++.h> using namespace std; int n,m,b; char c; int main(){ scanf("%d %d %c %d",&n,&m,&c,&b); for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ if(i1||j1||in||jm){ printf("%c",c); }else{ if(b==1){ printf("%c",c);n }else{ printf(" "); } } } printf("\n"); } return 0; }

    • @ 2025-1-14 14:14:47

      #include<bits/stdc++.h> using namespace std; int n,m,b; char c; int main(){ scanf("%d %d %c %d",&n,&m,&c,&b); for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ if(i1||j1||in||jm){ printf("%c",c); }else{ if(b==1){ printf("%c",c);n }else{ printf(" "); } } } printf("\n"); } return 0; }

      • 1

      Information

      ID
      143
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      9
      Tags
      # Submissions
      97
      Accepted
      8
      Uploaded By