이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |