一个C++程序,秒杀一切程序员.

由本社区发起的开源项目
zxc_123
帖子: 3
注册时间: 2010-04-18 10:59

Re: 一个C++程序,秒杀一切程序员.

#16

帖子 zxc_123 » 2010-05-31 18:04

代码: 全选

# include <iostream>
using std::cout;
using std::endl;

int haha=0;

int main(){
     cout << "haha" << endl;
     return haha;
}
头像
麻辣丝瓜
帖子: 5
注册时间: 2009-04-02 13:00

Re: 一个C++程序,秒杀一切程序员.

#17

帖子 麻辣丝瓜 » 2010-06-12 13:39

LZ想表达什么呢?
头像
it32767
帖子: 34
注册时间: 2009-10-14 8:59

Re: 一个C++程序,秒杀一切程序员.

#18

帖子 it32767 » 2010-06-12 16:35

不明真相的围观群众
dorasir
帖子: 1
注册时间: 2010-06-20 23:39

Re: 一个C++程序,秒杀一切程序员.

#19

帖子 dorasir » 2010-06-21 22:43

学C的都看得出来有问题……
头像
ptpt52
帖子: 717
注册时间: 2008-07-27 8:51
系统: Ubuntu/Windows
来自: 广西玉林|广东深圳
联系:

Re: 一个C++程序,秒杀一切程序员.

#20

帖子 ptpt52 » 2010-06-21 23:44

嗯,牛人,写了这么好的一个程序
走过去了也便有了路
http://www.ptpt52.com/
头像
nmsfan
帖子: 18958
注册时间: 2009-10-16 22:46
来自: finland

Re: 一个C++程序,秒杀一切程序员.

#21

帖子 nmsfan » 2010-06-22 13:05

不懂编程的路过
>>>>推Ubuntu 桌面培训~~<<<<
>>>>想加入/了解gimp汉化吗,点我吧~<<<<
——————————————————————
不推荐wubi,也不推荐你给别人推荐wubi…………
随心而为的感觉真好……
强推mayhem!!
强推ensiferum
bpns
帖子: 79
注册时间: 2009-10-31 18:14

Re: 一个C++程序,秒杀一切程序员.

#22

帖子 bpns » 2010-06-25 21:30

楼主20年前来地球后又回火星然后再又来的吧,
#include<iostrem>
int main()
int haha=0
{
cout<<"haha"<<endl;
retrun haha;
}

这是老式的c语形参表式法,相当于:
#include<iostrem>
int main(int haha=0)
{
cout<<"haha"<<endl;
retrun haha;
}

看你那“秒杀”字眼就觉得你好可爱!!!
dshbusiness
帖子: 1831
注册时间: 2009-04-03 15:10

Re: 一个C++程序,秒杀一切程序员.

#23

帖子 dshbusiness » 2010-06-26 0:58

没觉得有什么神奇的地方,难道我c语言不到家?
ofan
帖子: 64
注册时间: 2008-09-15 11:55

Re: 一个C++程序,秒杀一切程序员.

#24

帖子 ofan » 2010-06-29 21:10

24 楼正解..
很老的写法,现在都基本不用了
第一次见的时候也比较奇怪
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 一个C++程序,秒杀一切程序员.

#25

帖子 速腾1994 » 2010-06-29 21:38

这是巴基斯坦文么?
头像
gyteng
帖子: 762
注册时间: 2009-07-02 11:24
来自: SCUT

Re: 一个C++程序,秒杀一切程序员.

#26

帖子 gyteng » 2010-06-29 21:57

很显然楼主少分号了 :em04
头像
manb
帖子: 16
注册时间: 2010-06-27 17:55

Re: 一个C++程序,秒杀一切程序员.

#27

帖子 manb » 2010-06-29 22:07

:em20
头像
icykiss
帖子: 97
注册时间: 2009-10-25 8:52
联系:

Re: 一个C++程序,秒杀一切程序员.

#28

帖子 icykiss » 2010-06-30 20:32

这才是神一样的代码,来自“http://luy.li/2009/09/29/quinerelay/
“这段ruby代码,相当牛,如作者所说,运行这段ruby,生成一段python代码,再运行python代码,生成一段perl代码,再运行 perl代码,生成一段lua代码。。。这样一直下去,经过11种语言,最后。。。居然又能重新得到之前的ruby代码。。
这11种语言是:ruby 1.8.7-p72、Python 2.5.2、perl v5.10.0、Lua 5.0.3、OCaml 3.10.2、ghc-6.8.2、gcc 4.3.2、java “1.5.0_17″、beef 0.0.6-2、whitespace 0.3-2、unlambda 2.0.0-5。
在est这里看到了介绍,实在忍不住,把所有解释器都装上验证了一把,果然是可以的。彻底无语了,特此把中间结果都打包放上来,供大家瞻仰。
ubuntu下也想自己试试的话,得确保有这些包: ruby lunar lua50 ocaml-interp ghc6 sun-java5-jdk beef whitespace unlambda
PS: 我以为 brainfuck 就已经很BT了,没想到还有更BT的 whitespace ,彻底无语了。“

以上以下文字转载自 bones7456 的博客“http://luy.li/

代码: 全选

# ruby
l=92.chr;eval s="s=s.dump[r=1..-2].gsub(/("+l*4+"){4,}(?!\")/){|t|'\"+l*%d+\"'%(t
.size/2)};5.times{s=s.dump[r]};puts\"# python\\nprint(\\\"# perl\\\\nprint(\\\\\\
\"# lua"+l*4+"nprint("+l*7+"\"(* ocaml *)"+l*8+"nprint_endline"+l*15+"\"-- haskel
l"+l*16+"nimport Data.List;import Data.Bits;import Data.Char;main=putStrLn("+l*31
+"\"/* C */"+l*32+"n#include<stdio.h>"+l*32+"nint main(void){char*s[501]={"+l*31+
"\"++intercalate"+l*31+"\","+l*31+"\"(c(tail(init(show("+l*31+"\"/* Java */"+l*32
+"npublic class QuineRelay{public static void main(String[]a){String[]s={"+l*31+"
\"++intercalate"+l*31+"\","+l*31+"\"(c("+l*31+"\"brainfuck"+l*64+"n++++++++[>++++
<-]+++++++++>>++++++++++"+l*31+"\"++(concat(snd(mapAccumL h 2("+l*31+"\"110"+l*31
+"\"++g(length s)++"+l*31+"\"22111211100111112021111102011112120012"+l*31+"\"++co
ncatMap("+l*32+"c->let d=ord c in if d<11then"+l*31+"\"21002"+l*31+"\"else"+l*31+
"\"111"+l*31+"\"++g d++"+l*31+"\"22102"+l*31+"\")s++"+l*31+"\"2100211101012021122
2211211101000120211021120221102111000110120211202"+l*31+"\"))))))++"+l*31+"\","+l
*63+"\""+l*64+"n"+l*63+"\"};int i=0;for(;i<94;i++)System.out.print(s[i]);}}"+l*31
+"\")))))++"+l*31+"\",0};int i=0;for(;s[i];i++)printf("+l*63+"\"%s"+l*63+"\",s[i]
);puts("+l*63+"\""+l*63+"\");return 0;}"+l*31+"\");c s=map("+l*32+"s->"+l*31+"\""
+l*63+"\""+l*31+"\"++s++"+l*31+"\""+l*63+"\""+l*31+"\")(unfoldr t s);t[]=Nothing;
t s=Just(splitAt(if length s>w&&s!!w=='"+l*31+"\"'then 501else w)s);w=500;f 0=Not
hing;f x=Just((if x`mod`2>0then '0'else '1'),x`div`2);g x= reverse (unfoldr f x);
h p c=let d=ord c-48in(d,replicate(abs(p-d))(if d<p then '<'else '>')++"+l*31+"\"
."+l*31+"\");s="+l*31+"\"# ruby"+l*32+"n"+l*31+"\"++"+l*31+"\"l=92.chr;eval s=\"+
(z=l*31)+\"\\\"\"+s+z+\"\\\""+l*31+"\"++"+l*31+"\""+l*32+"n"+l*31+"\""+l*15+"\""+
l*7+"\")"+l*4+"n\\\\\\\")\\\")\"########### (c) Yusuke Endoh, 2009 ###########\n"
  • 你有什么不开心的事情,说出来让大家开心一下。
头像
louis_lui
帖子: 4
注册时间: 2009-12-31 23:21

Re: 一个C++程序,秒杀一切程序员.

#29

帖子 louis_lui » 2010-07-03 23:32

为什么我编译不能通过呢?
头像
wtry
帖子: 923
注册时间: 2009-03-18 9:26

Re: 一个C++程序,秒杀一切程序员.

#30

帖子 wtry » 2010-07-04 9:57

看不懂

:em06
回复