# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
687199 | smartmonky | Costinland (info1cup19_costinland) | C++14 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define int long long
using namespace std;
const int N = 1e6 + 1;
int dp[6][6], vis[6][6], mx[6][6];
int k;
char a[6][6];
main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> k;
cout <<"5 5" << endl;
for(int i = 1; i <= 5; i++){
a[i][5] = 'd';
a[5][i] = 'r';
vis[5][i] = vis[i][5] = 1;
}
for(int i = 1; i <= 4; i++){
for(int j = 1; j <= 4; j++){
a[i][j] = '.';
}
}
k -= 2;
a[1][1] = 'X';
int l = 2;
while(k){
if(k >=4){
k -= 4;
a[l][1] = 'X';
a[1][l] = 'X';
a[l][l] = 'X';
}else if(k >= 2){
k -=2;
a[l][1] = 'X';
a[1][l] = 'X';
}else if(k > 0){
a[l][1] = 'X';
k--;
}
l++;
}
a[5][5] = '.';
for(int i = 1; i <= 5; i++){
for(int j = 1; j <= 5; j++){
cout << a[i][j];
}
cout << endl;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |