fork(1) download
  1. d,i,w;char s[1<<24];m(){v(w,13);}p(){puts(s+1);}
  2. v(i,j){s[w-i]=".|]\\#/"[j%7];s[w+i]=".|[/#\\"[j%7];
  3. while(i--)s[w-i]=s[w+i]="# _-"[j/7];}
  4. main(l){scanf("%d",&l);d=l>3?3:l;m(w=l*2+6);p(v(0,0));
  5. for(v(0,1);i++<=l;v(i*2+2,17))p(),v(i*2+3,7),m(p(v(i,2)));v(l+2,2);p(v(d,21));
  6. for(m(i=w-3);i>d+1;i-=3)v(i,15);p(v(d,8));p(v(d,15));
  7. v(w-3,4);m(p(v(d,19)));p(v(d+1,15));p(v(d+2,19));}
Success #stdin #stdout 0s 18440KB
stdin
3
stdout
           .           
           |           
      .   ]#[   .      
       \_______/       
    .    ]###[    .    
     \___________/     
  .     ]#####[     .  
   \_______________/   
.      ]#######[      .
 \____]#.-----.#[____/ 
  |__|__|     |__|__|  
  |__|__|_____|__|__|  
  ######/_____\######  
       |_______|       
      /_________\