OpenJudge

215:Circle

总时间限制:
1000ms
内存限制:
65536kB
描述

Everybody love circles!

Now,you are given an N*N square,the coordinates of the center of the circle X,Y(meaning the Xth row and Yth column of the square),also the radius R.

Can you figure out within the square,which of the points are inside the circle,and which are not?

For the points that are inside the circle,output the capital letter ‘O’,for those that are not,output the small letter ‘x’.

输入
The first line contains an integer T,meaning the number of the cases.
For each test case:
Four integers,N,X,Y,R.(1<=N<=10,1<=X,Y,R<=N)
输出
For each test case,output the required image.
样例输入
2
5 5 1 4
1 1 1 1
样例输出
Oxxxx
OOOxx
OOOOx
OOOOx
OOOOO
O
来源
2014 吉林省ACM省赛

专题系列题标含义:
目前已推出的题目:
DG:递归,LB:链表,DZ :队列和栈,TR:二叉树
下面的题目将在集训后再推出:
DF:深搜,BF:广搜
DI:单源最短路径,FL:多源最短路径
DP:动态规划

全局题号
8018
添加于
2016-12-24
提交次数
8
尝试人数
6
通过人数
6