Submission #1355814

#TimeUsernameProblemLanguageResultExecution timeMemory
1355814gry3125Monster-Go (EGOI25_monstergo)C++20
12 / 100
1 ms344 KiB
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
using namespace std;

int main() {
    int n; cin >> n;
    if (n > 39) {
        cout << "meow"; return 0;
    }
    for (int i = 1; i <= min(n,13); i++) {
        for (int j = 1; j <= 12; j++) {
            cout << (14-i == j ? 13 : j) << " ";
        }
        cout << "\n";
    }
    if (n <= 13) return 0; 
    n -= 13;
    for (int i = 1; i <= min(n,13); i++) {
        for (int j = 1; j <= 12; j++) {
            cout << (14-i == j ? 26 : j+13) << " ";
        }
        cout << "\n";
    }
    if (n <= 13) return 0;
    n -= 13;
    for (int i = 1; i <= min(n,13); i++) {
        for (int j = 1; j <= 12; j++) {
            cout << (14-i == j ? 39 : j+26) << " ";
        }
        cout << "\n";
    }
    if (n <= 39) return 0;
    return 0;
}
#Result Execution timeMemoryGrader output
Fetching results...