fork download
  1. #define m(a)t[a/9%9][a%9]=r[a/729][a/81%9];
  2. #define z(a,b)m((b+a*738))
  3. #define n(a)bcopy(r,t,54);z(a,2)z(a,86)z(a,170)z(a,244)z(a,412)z(a,486)z(a,570)z(a,654)
  4. #define w bcopy(t,r,54);
  5. typedef char R[6][9];R t;F(R r){n(0)m(3411)m(3495)m(3579)m(774)m(1018)m(1262)m(3674)m(3758)m(3842)m(2391)m(2635)m(2879)w}B(R r){n(2)m(927)m(1171)m(1415)m(2238)m(2482)m(2726)m(2949)m(3027)m(3105)m(4148)m(4226)m(4304)w}L(R r){n(3)m(45)m(291)m(537)m(1662
  6. )m(1902)m(2142)m(2916)m(3162)m(3408)m(3671)m(3911)m(4151)w}E(R r){n(1)m(200)m(446)m(692)m(3809)m(4055)m(4301)m(3102)m(3342)m(3582)m(1511)m(1751)m(1991)w}U(R r){n(4)m(27)m(109)m(191)m(729)m(811)m(893)m(1467)m(1549)m(1631)m(2205)m(2287)m(2369)w}D(R r){n(5)m(501)m(583)m(665)m(1239)m(1321)m(1403)m(1977)m(2059)m(2141)m(2679)m(2761)m(2843)w}b,c,d,o,p;f(char*z,R s){for(;b<7;)memset(s[b++],"RGOBYW"[b],10);for(b=strlen(z);b--;)if((d=*z++)-32)for(o=*z-50?*z-39?1:3:2,z+=z[1]-32?3:2,p=0;p++<o;)d-70?d-66?d-76?d-82?d-85?D(s):U(s):E(s):L(s):B(s):F(s);}
  7.  
  8. i,j,k,m;main(){R s;char x[]="U2 L' D";f(x,s);
  9. for(i=0;i<=8;i++)if(i%3>1)printf("%c\n",s[4][i]);else if(i%3<1)printf(" %c",s[4][i]);else putchar(s[4][i]);
  10. for(k=0;k<=2;k++){for(j=3;j<=6;j++)for(i=0;i<=2;)putchar(s[j%4][k*3+i++]);puts("");}
  11. for(i=0;i<=8;i++)if(i%3>1)printf("%c\n",s[5][i]);else if(i%3<1)printf(" %c",s[5][i]);else putchar(s[5][i]);}
Success #stdin #stdout 0s 4560KB
stdin
Standard input is empty
stdout
   OYY
   RYY
   RYY
GBBWOOBBBRRY
GBBWRRGGGOOY
OOYGBBWRRGGG
   ROO
   WWW
   WWW