oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

arrow Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

arrow.html

Poe the Penguin likes drawing arrows. All his arrows have some height H and some width W. For example, consider the arrows below:

***  
 *** 
  ***
 *** 
***  

**** 
 ****
**** 

The first arrow has height 5 and width 5. The second arrow has height 3 and width 5.

Given the height H and width W of the arrow, Poe the Penguin wonders what the arrow looks like

Input

The first line contains 2 integers, H and W, denoting the height and width of the arrow respectively. You can assume that H is odd and W ≥ ceil((H+1)/2).

Output

Output H rows of characters. Each row should have exactly W characters.

Sample Input 1

5 5

Sample Output 1

***  
 *** 
  ***
 *** 
***  

Sample Input 2

3 5

Sample Output 2

**** 
 ****
**** 

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2021s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o arrow -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.