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

potatoplanting Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

potatoplanting.html

Problem Description

Jiahai is planting potatoes in his field of height H and width W. Currently, he has N potatoes. Jiahai would start planting his potatoes from the top-left corner onwards and move towards the right on the first row. After the first row is filled, he will move on to the second row and fill up the fields from the left, etc.

Given H, W and N, draw out the configuration of Jiahai Potato Farm, denoting a plot with a potato as 'X' and an empty plot with 'O'.

Input

The first line of input will contain three integers, H, W and N.

Output

Your output should contain the configuration of Jiahai Potato Farm as described above.

Limits

Subtask 1 (15%): H = 1, 1 ≤ W ≤ 1000, 0 ≤ N ≤ H*W
Subtask 2 (15%): 1 ≤ H, W ≤ 1000, N = 0
Subtask 3 (70%): 1 ≤ H, W ≤ 1000, 0 ≤ N ≤ H*W

Sample Input 1

3 4 7

Sample Output 1

XXXX
XXXO
OOOO

Sample Input 2

1 7 6

Sample Output 2

XXXXXXO

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
115101s32MBMinimum
215101s32MBMinimum
370201s32MBMinimum
4021s32MBMinimum

Judge Compile Command

g++-8 ans.cpp -o potatoplanting -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.