# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
685259 | heeheeheehaaw | Costinland (info1cup19_costinland) | C++17 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
char a[1005][1005];
signed main()
{
int k, n, putere = 1;
cin>>k;
int l = ceil(log2(k)) + 1;
for(int i = 1; i <= l + 1; i++)
for(int j = 1; j <= l + 1; j++)
a[i][j] = '.';
for(int i = 0; i < 100; i++)
{
if(k == 0)
break;
n = i + 1;
if((k & (putere)) != 0)
{
k -= putere;
if(k > 0)
{
a[i + 1][i + 1] = 'X';
a[i + 1][i + 2] = 'X';
a[i + 2][i + 1] = 'r';
}
putere *= 2;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |