Submission #1009631

#TimeUsernameProblemLanguageResultExecution timeMemory
1009631giorgi_pkhaladzeCostinland (info1cup19_costinland)C++17
0 / 100
1035 ms344 KiB
#include <bits/stdc++.h> #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> using namespace std; int n,m,k,i,j,ans,x,y; char a[60][60]; int main() { cin>>m; i=1; while(i*6<=m){ i*=6; n++; } n*=2; n+=3; int p=m%6; for(i = 1; i <= n; i++) for(j = 1; j <= n; j++)a[i][j]='.'; for(i=1; i<=n; i++){a[i][n]='r'; a[n][i]='d';} if(n) for(i=1;i<n-3;i++){ a[i][i]=a[i+1][i]=a[i+1][i+1]=a[i][i+1]='X'; a[i+2][i]=a[i+2][i+1]='R'; a[i][i+2]=a[i+1][i+2]='D'; if(p==1)a[i+2][i]='X'; if(p==2)a[i+2][i]=a[i][i+2]='X'; if(p==3)a[i+2][i+1]='X'; if(p==4)a[i+2][i+1]=a[i+2][i]='X'; if(p==5)a[i+2][i+1]=a[i+2][i]=a[i][i+2]='X'; p=0; } cout<< n <<" "<< n <<"\n"; for(i = 1; i <= n; i++){ for(j = 1; j <= n; j++){ cout<< a[i][j]; } cout<<"\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...