Advertisement

联合国大楼(Building for UN)

阅读量:

题目要求
构建一座符合特定条件的联合国大楼结构,确保楼层之间满足以下两种相邻关系中的一种:楼层之间相互毗邻,或同一楼层内部空间相互连接。
例如当n等于3时

复制代码
    2 3 3
    AAA
    BBB
    CCC
    
    ABC
    ABC
    ABC
    这样第一层的A和第二层的B和C相邻 可以发现两两都是相邻的。
    
    
复制代码
    #include<bits/stdc++.h>
    #define LL long long
    #define ms(s) memset(s, 0, sizeof(s))
    using namespace std;
    const string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    
    int main() {
    // freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    int kase = 0;
    while(cin >> n) {

全部评论 (0)

还没有任何评论哟~