APP下载

围观大神第25届国际C语言混乱代码大赛获奖作品公布

消息来源:baojiabao.com 作者: 发布时间:2026-07-08

报价宝综合消息围观大神第25届国际C语言混乱代码大赛获奖作品公布

第 25 届国际 C 语言混乱代码大赛日前已成功举办,并公布获奖作品名单和代码。国际 C 语言混乱代码大赛(IOCCC, The International Obfuscated C Code Contest)是一项国际编程赛事,目的是写出最有创意的最让人难以理解的 C 语言代码,并限制在 4 kilobytes 以内。

之前常在该比赛中拿奖的浙大教授侯启明和 Google 的 Don Yang 再次获奖。侯启明这次写了一个 JSON转 SVG 饼状图的转换器,这也是他第五次获奖。Don Yang 则已经是第 8 次拿奖,这次写的是一个文本翻转和移位器(Text rotator and shifter)。

此外,著名开源项目 FFmpeg 和 QEMU 的作者 Fabrice Bellard 也参加了比赛并获奖,他的作品是一个图像压缩 demo 。

获奖名单一览:

一些有意思的代码如下:

anderson

#includeint a = 256;int main{for(char b[a+a+a], *c=b ,*d=b+ a ,*e=b+a+a,*f,*g=fgets(e,(b[ a]=b [a+a] =a- a,a) , stdin);c[0]=a-a,f=c ,c=d ,d=e ,e=f, f= g,g =0,g = fgets(e,a+a -a+ a -a+a -a+ a- +a,stdin ),f +a-a ; pu tchar(+10)) { for( int h= 1,i=1,j, k=0 ,l =e[0]==32,m,n=0,o=c [ 0]== 32, p, q=0;d[q ];j=k,k=l,m=n,n=o,p=(j)+(k* 2 )+(l =(i = e[ q]&&i ) &&e[q +1 ]== 32,l*4)+(m* 8 )+(16* n )+( o =(h =c[ q]&&h)&&c[q+1]== 32,o* (16+16) )+0-0 +0, putchar(" ......"/* ( ||| ) |/|/ / */".")|)\"""" "|||" "|||" "|"" ")|)\"/|/(/""(/"/|/||"/|/(/(/"/|/||"[d[q++]==32?p:0]));}}/* typographic tributaries */

vokes

#include #include #include typedef unsigned long W; static W*i,t,c,h,e,r,y,**a,*b,*o,*u,*n,*d,*s;enum _ {F=6 , I=7,N= 5 , D = 3 ,M=14 ,Y=0 , C=8,L = 1 , U = 9 , E=4}; static void (* _ ) ; static void*(*B),*T; static char m[0x3543],*Z;void *meltdown(void *p,size_t sz){ void *z=realloc(p,sz);if(!z||!sz)exit(n?y!=*n:I-F); return z;}void magic(W*p){W j;for(j=0;j*v)I[p]=*v;}}void cast(void){B(i,Y);}void spell(W G,W H){ _ ; _ (H); _ (H, G); _ (H); _ (G);}void witch( void){e=n[--E[b]];a[e][D]=0;if(b[C]>=U[b]){c=2*(b[C+L]?b[U]:1);o=B (d,c *sizeof*o);u=B(s,c*sizeof*o);b[M-N]=c;d=o;s=u;}d[b[N+D]++]=e;if (e>y)y=e;}void*brew(void*g,size_t l){puts(l?"":"Out of range.");exit (g?1:1);}void newt(W *p){F[p]=0;N[p]=I[p]=~F[p];}void bubble(W H){for (t=0;t011){ return;} _ =toad ;i[c]=( W)atoi( Z);if(i[c]>t){t=i[c];}c++;if(c==h){i=B(i,2*h*sizeof*i);h*=2;}y=i[c-1];if((Z=strtok(T," t"))){if(U>=(W)*Z-I*I+L) _ =spectre;}}int main(int argv,char**argc){h++;if(argc){T=argc[argv];} _:_ =O;i=(B=meltdown)(T,h*sizeof*i);while(*argc||Z){c=0;*argc=fgets(m,sizeof(m),stdin); _ =spectre;if(!* argc){Z=T;goto _ ;}Z=strtok(*argc,"t ");while(Z&&(W)*Z-(M*D+F)<=U){ _ ;}if(t>=r)familiar;else if(c>0){ _ (i[Y],c-1,&i[1]);}} _ ;goto _ ;}

Yang

#include/*nui*///;70/*#}r[3]op;f(p;ok})i[;k-r*?(rc&(o}nr**s*2)!}-mpi##extern int n0;typedef int x;x//i/eu2->uuo0uo=;nXfdx+1e8uOeh&k-x[e1(i)>{=eqa,niin,u,k,o,_,i=1;static char//[X]/f/t]:n=t-rxt+0f[=(-=+;t)*,aa!>1=dt0pzrpi(l)idtnnd[1125][0x401];x main{if(//]* nu]O[nc-(ac=;odxx1k]}u)2ulr(=00+u2=ee&fos{n,*cci){for(n=0;1024>n;n++)//]Tkhng[0ur)[u[h>u)h1or];>]-=Or):=l*Ou);+r4poa&(=ep(qnllfor(u=0x0;u<1025;)d[n][u++]=64//[n;o]ua0=)a,<(=}X;no[n{8uo)=&{i]n)?fl!!g{u)=,uu/2;for(u=n=0////////]_#p^#onui[/u+}+?+r;d{r/X////////////c/(&if=-)p(l(xewt{1udd/4;EOF!=(o=////////////]#ebdl#ah[0}n/1()////////////////////1f(k1)*ion)thsO;,eegetchar())// //////]u#oh[,;/////////// //////;;)2nc={ci(=ck<<&&u<1024;// ///////////////// ////}{:t((ihl"Nh,ss)u+=o-10// ///////// ///2)nifaeYUaott?n<1024// ////,n(r(uLr,dd?d[n++// @@@ ///td(EuL*Xli][u]=o// @ @ ///+)Or;O,io,k=k:!(n// //;0t/>/=0);// //!/|//for(// 5 //=/*/% ;k--// 12 =q tni;)d[k// //))u//01][u// //1Ni//1]/*n/// //(Ui; >*/=!/*N// //=K~/ h*/1,/*UN/// //nqO~* .*/puts/*n//// //[/?,] o*/(d[k])/*u////// /////// //1*q[u i*/;}else{//t///////////// /////////// //,stup;d[0][0]++;puts(/*f///////// //]====[//////// //(N tni ti&/N/////.///s/It]]_bz8[// ///SHOUJOvv/////////// //;}"jvo" su /U/////N///t}Ue]~J#phi[// //SHUUMATSU|]_[//////// ///,"/utf" ->IOCCC// //]^#dbi#`h#anuok^u#[// ///"S","/ttfm" d/eit{i(rl/r-s-"/e/]o[^^^^^!/////]hfhu[Qj:FfT]uhp)~[[// ///"iuspx!fsb!tho" unn;n)h=a({aIl0onnt//"jiu!fmcjefoJ","/zsbdt!fsb!tobnvI!" "///","~<1!osvufs<*2" lriqi(w!hf)h=e1trin//".;2;1;1+*432&25*3,o)_6)92xsbiduvq@1=v@2:.o@4:.o),v,1/>" cef ;n{Fci2cl}-iufi//"v*1?**)sbidufh>o))fmjix|*)ojbn!uojh.oidts

所有获奖名单的源代码可。




2018-05-08 10:32:00

相关文章