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

checkerboard Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

checkerboard.html

Problem Description

A checkerboard of size n is depicted as below:

n = 1
o

n = 2
ox
xo
 
n = 3
oxo
xox
oxo

n = 4
oxox
xoxo
oxox
xoxo

n = 5
oxoxo
xoxox
oxoxo
xoxox
oxoxo

Your task is to print the checkerboard given the size of the checkboard, n

Input

A single integer, n, where n will not exceed 50.

Output

The checkboard, refer to example above

Sample Input

7

Sample Output

oxoxoxo
xoxoxox
oxoxoxo
xoxoxox
oxoxoxo
xoxoxox
oxoxoxo

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

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