Problem 3821 --Windows Of CCPC

3821: Windows Of CCPC

"
Time Limit $1$ 秒/Second(s) Memory Limit $128$ 兆字节/Megabyte(s)
提交总数 $4$ 正确数量 $1$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 递推

In recent years, CCPC has developed rapidly and gained a large number of competitors .One contestant designed a design called CCPC Windows .The 1-st order CCPC window is shown in the figure:


And the 2-nd order CCPC window is shown in the figure:


We can easily find that the window of CCPC of order k is generated by taking the window of CCPC of order k−1 as C of order k, and the result of inverting C/P in the window of CCPC of order k−1 as P of order k.
And now I have an order k ,please output k-order CCPC Windows , The CCPC window of order k is a 2k∗2k matrix.

The input file contains T test samples.(1<=T<=10)

The first line of input file is an integer T.

Then the T lines contains a positive integers k , (1≤k≤10
For each test case,you should output the answer .
3
1
2
3
CC
PC
CCCC
PCPC
PPCC
CPPC
CCCCCCCC
PCPCPCPC
PPCCPPCC
CPPCCPPC
PPPPCCCC
CPCPPCPC
CCPPPPCC
PCCPCPPC

推荐代码 查看3821 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$24 $ms] 月落星辰挽 846083 2022-04-21 21:09:06
内存最少[$10808 $KB] 月落星辰挽 846083 2022-04-21 21:09:06
第一AC 月落星辰挽 846083 2022-04-21 21:09:06
第一挑战 月落星辰挽 846077 2022-04-21 21:05:32

赛题来源/所属竞赛 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛