Submission #502137

#TimeUsernameProblemLanguageResultExecution timeMemory
502137bigoCostinland (info1cup19_costinland)C++14
0 / 100
0 ms204 KiB
#include <iostream>
#include <cmath>
#include <math.h>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#define M 1000000007
#define pii pair<int, int>
typedef long long ll;
using namespace std;
int main() {
    int k;
    cin >> k;
    if (k == 1) {
        cout << 2 << " " << 2 << endl;
        cout << "rd" << endl << "r.";
    }
    if (k == 2) {
        cout << 2 << " " << 2 << endl;
        cout << "Xd" << endl << "r.";
    }
    if (k == 3) {
        cout << 2 << " " << 3 << endl;
        cout << "XXd" << endl << "rr.";
    }
    if (k == 4) {
        cout << 2 << " " << 4 << endl;
        cout << "XXXd" << endl << "rrr.";
    }
    if (k == 5) {
        cout << 2 << " " << 5 << endl;
        cout << "XXXXd" << endl << "rrrr.";
    }
    if (k == 6) {
        cout << 3 << " " << 3 << endl;
        cout << "XXd" << endl << "XXd." << endl << "rr.";
    }
    if (k == 7) {
        cout << 3 << " " << 4 << endl;
        cout << "XXXd" << endl << "XXdd" << endl << "rrr.";
    }
    if (k == 8) {
        cout << 3 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXddd" << endl << "rrrr.";
    }
    if (k == 9) {
        cout << 4 << " " << 4 << endl;
        cout << "XXrd" << endl << "XXXd" << endl <<"Xddd"<< endl << "rrr.";
    }
    if (k == 10) {
        cout << 5 << " " << 4 << endl;
        cout << "XXrd" << endl << "XXXd" << endl << "Xddd" << endl << "Xddd" << endl << "rrr.";
    }
    if (k == 11) {
        cout << 4 << " " << 4 << endl;
        cout << "XXXd" << endl << "XXXd" << endl << "Xddd" << endl << "rrr.";
    }
    if (k == 12) {
        cout << 5 << " " << 4 << endl;
        cout << "XXXd" << endl << "XXXd" << endl << "Xddd" << endl << "Xddd" << endl << "rrr.";
    }
    if (k == 13) {
        cout << 5 << " " << 5 << endl;
        cout << "XXrrd" << endl << "XXXdd" << endl << "ddXdd" << endl << "XdXdd" << endl << "rrrr.";
    }
    if (k == 14) {
        cout << 5 << " " << 5 << endl;
        cout << "XXrrd" << endl << "XXXdd" << endl << "XdXdd" << endl << "XdXdd" << endl << "rrrr.";
    }
    if (k == 15) {
        cout << 5 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXXrd" << endl << "XdXrd" << endl << "dddrd" << endl << "rrrr.";
    }
    if (k == 16) {
        cout << 5 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXXXd" << endl << "Xdddd" << endl << "ddddd" << endl << "rrrr.";
    }
    if (k == 17) {
        cout << 5 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXXXd" << endl << "Xdddd" << endl << "ddddd" << endl << "rrrr.";
    }
    if (k == 18) {
        cout << 5 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXXXd" << endl << "ddXrd" << endl << "ddddd" << endl << "rrrr.";
    }
    if (k == 19) {
        cout << 5 << " " << 5 << endl;
        cout << "XXXXd" << endl << "XXXXd" << endl << "dddXd" << endl << "ddddd" << endl << "rrrr.";
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...