Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 2014-01-13 00:38:43.
Submit | All submissions | Best solutions | Back to list |
PCROSS1 - Cross Pattern (Act 1) |
Print a cross pattern using the * (asterisk) and . (dot) characters.
Input
The first line contains an integer t, the number of test cases. The next t lines contain four integers separated by spaces: m, n, ci, cj.
Output
For each test case print a cross on an m-by-n grid centered at row ci and column cj, as shown in the example.
Constraints
1 ≤ t ≤ 100
1 ≤ m,n ≤ 100
1 ≤ ci ≤ m
1 ≤ cj ≤ n
Example
Input:
3 1 1 1 1 5 5 3 3 8 13 3 5
Output:
* ..*.. ..*.. ***** ..*.. ..*.. ....*........ ....*........ ************* ....*........ ....*........ ....*........ ....*........ ....*........
Added by: | Mitch Schwartz |
Date: | 2014-01-11 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Public source code since: | 2014-01-13 00:38:43 |
hide comments
2014-05-14 16:17:10 pvkcse
Running correct in my system but here it is NZEC...i don't know what's the wrong in it... tried the test cases given here and it produced the correct one... |