kenqqex 发表于 2012-4-24 13:01

第20届国际C语言混乱代码大赛源代码公布

第20届国际C语言混乱代码大赛源代码公布


第20届国际C语言混乱代码大赛(IOCCC)于2月5日结束,2个半月后主办方释出了获奖作品的源代码。IOCCC要求参赛者写出最有创意的最让人难以理解的C语言代码,并限制在4 kilobytes以内,因此每位参赛者的作品都令人印象深刻。例如Don Yang的作品获得了最佳展示,他是在一个程序中包含多个程序。其它获奖作品包括文本光线跟踪器,基于X11的坦克射击游戏,ANSI代码转义序列,等等。

第一名代码:
http://uguu.org/src_akari_c.html
http://uguu.org/src_chinatsu_c.html

雅音宫羽 发表于 2012-4-24 13:13

第一个是空白页面啊

嗜睡者 发表于 2012-4-24 13:21

为什么发在漫区

清浦刹那 发表于 2012-4-24 13:29

引用第2楼嗜睡者于2012-04-24 13:21发表的:
为什么发在漫区 images/back.gif


http://i265.photobucket.com/albums/ii206/sakurafaw/for%20bbs/b536e93e.jpg

第一名

科特迪尔 发表于 2012-4-24 13:29

识别度不高的感觉,没有文件名我都不知道是谁……

akari   --> あかり --> 赤座灯里
chinatsu   --> ちなつ --> 吉川千夏

007.5 发表于 2012-4-24 13:30

为什么发在漫区+1





直到我点开看了一下。。。。。。

ramiel 发表于 2012-4-24 13:32

世界人民的\\アッカリン~/

kenqqex 发表于 2012-4-24 13:36

你们居然能打开到第一个...
除了404我什么都看不见哟

alitonz 发表于 2012-4-24 13:39

不能有业内运行一下让我们看看效果么?

月森葉子 发表于 2012-4-24 13:39

跪了....

绅士的哲学 发表于 2012-4-24 13:40

不止一个。。这人画了50多个
不过这些是能用的程序还是纯粹画画?

zs1109 发表于 2012-4-24 13:43

一眼就看出阿卡林了....
这人碉堡了

elsadesica 发表于 2012-4-24 13:50

这玩意真的能运行么...

bfogda 发表于 2012-4-24 13:51

这个代码有啥用吗?

zs1109 发表于 2012-4-24 13:53

http://i196.photobucket.com/albums/aa254/zs1109/376dc3d3.jpg
一大堆

lawsherman 发表于 2012-4-24 14:02

谁编译了运行下看看

greentie 发表于 2012-4-24 14:03

y[]="yuriyurarararayuruyuri*daijiken**akkari~n**"

你受我攻 发表于 2012-4-24 14:04

格式确实没错。。。。。虽然有一堆乱码但是大部分都是注释和字符串。。。

scl 发表于 2012-4-24 14:09

第一个真的能运行,虽然我还没明白具体是干嘛,另外由于注释,很多代码是纯用来画图的
比如第一个的那个呆毛

compiler 发表于 2012-4-24 14:13

http://img170.poco.cn/mypoco/myphoto/20120424/14/6497444520120424142317090.jpg

花剑酒 发表于 2012-4-24 14:15

能跑。无错误。没有结果。

GameTheory 发表于 2012-4-24 14:15

Akari is an image downsampling utility that accepts 3 inout formats:

* PGM (netpbm grayscale image).Akari only accept PGM files with this
header: P5 <width> <height> 255.Images with extra comments such as
the ones produced by GIMP will not be parsed properly.

* PPM (netpbm RGB image).Only PPM files with this header are
accepted: P6 <width> <height> 255.

* ASCII art (with end of lines in LF bytes only, not CR-LF)

Anything that is not parseable as PGM or PPM will be downsampled as ASCII art.

Akari is an image downsampling utility. She accepts up to 3 arguments:

First argument is the input image. If it’s “-” or unspecified, Akari will read from stdin.

Second argument is the output image. If it’s “-” or unspecified, Akari will write to stdout.

Third argument, if specified, causes Akari to keep even pixels on even scanlines. By default Akari will keep odd pixels on odd scanlines.

GameTheory 发表于 2012-4-24 14:18

当然这不是能得奖的原因...
能得奖是因为

./akari akari.c akari2.c
akari2.c is also a valid C program, and accepts up to 1 argument. By default, this second program reads text from stdin and writes expanded output to stdout. If the extra argument is specified, the output text will also pass through a rot13 filter.

Of course, we wouldn’t stop with just 2 programs, you can downsample the source again and get yet another C program:
./akari < akari.c | ./akari > akari3.c

./akari < akari.c | ./akari | ./akari > akari4.c

akari3.c and akari4.c are still (mostly valid) C programs. “gcc -Wall” will output a few warnings, but still produce output executables. The output executables each print a message to stdout.

你受我攻 发表于 2012-4-24 14:22

艹 第一个程序终于把注释和无用的字符串删的七七八八了 剩下来的玩意别问我有什么用。。。变量好乱啊

#include<stdio.h>
int main(int n,char**m){
FILE*p,*q;
int A,k,a,r,i;
char *d="P%",b,y[]="yuriyurarararayuruyuri*daijiken**akkari~n**";
int u;
for(i=0;i<101;i++)
y^="~hktrvg~dmG*eoa+%squ#l2"
p=(n>1&&(m-'-'||m!='\\0'))?fopen(m,y+298):stdin;
q=(n<3||!(m-'-'||m))?stdout :fopen(m,d+14);
if(!p||!q)
    return+printf("Can not\\x20open\\40%s\\40for\\40%sing\\n",m[!p?1:2],!p?"read":"writ");
for(a=k=u=0;y;u=2+u){
    y=y;
}
if((a=fread(b,1,1024,p))>2&& b=='P' &&4==sscanf(b,d,&k,& A,&i,&r)&&!(k-6&&k -5)&&r==255){
    u=A;
    if(n>3){u++;i++;}
    fprintf(q,d,k,u>>1,i>>1,r);u= k-5?8:4;k=3;
}
else{
    (u)=+(n+14>17)?8/4:8*5/4;
}
for(r=i=0;;){
    u*=6;u+=(n>3?1:0);
    if(y&01)fputc(1*(r),q);if(y&16)k=A;if(y&2)k--;if(i==a){
      i=a=(u)*11&255;
      if(1&&0>=(a=fread(b,1,1024,p))&&")]i>(w)-;} {                                       /i-f-(-m--M1-0.)<{"[ 8]==59)break;
      i=0;
    }
    r=b;
    u+=(+8&*(y+u))?(10-r?4:2):(y&4)?(k?2:4):2;u=y-(int)'`';
}
fclose(p);
k=+fclose( q);
returnk--1+(-0x01);
}

kenqqex 发表于 2012-4-24 14:33

回 19楼(compiler) 的帖子

我真想不到s1连这种戏服也有啊 233
就如23楼所说,处理之后的结果也是一个c程序,这才是akarin的神奇之处..

详细说明地址
http://www.ioccc.org/2011/akari/hint.html

firespace 发表于 2012-4-24 14:40

阿卡林终于有存在感了

scl 发表于 2012-4-24 14:42

死宅和死程某种意义上是不是挺相似的

你受我攻 发表于 2012-4-24 14:45

Re:回 19楼(compiler) 的帖子

引用第24楼kenqqex于2012-04-24 14:33发表的 回 19楼(compiler) 的帖子 :
我真想不到s1连这种戏服也有啊 233
就如23楼所说,处理之后的结果也是一个c程序,这才是akarin的神奇之处..

详细说明地址
http://www.ioccc.org/2011/akari/hint.html
....... images/back.gif

大概就是 A文本编译出程序X
程序X用A做参数运行出文本B
程序X用B做参数运行出文本C
程序X用C做参数运行出文本D

这尼玛的自攻自受啊

qiaogaohhb 发表于 2012-4-24 15:19

果断摘下了眼镜。

kenqqex 发表于 2012-4-24 15:23

回 27楼(你受我攻) 的帖子

顺便一提递归到了最后结果貌似是
akkari~n

真田-幸村 发表于 2012-4-24 17:36

第一个真心碉堡了
页: [1]
查看完整版本: 第20届国际C语言混乱代码大赛源代码公布