avatar
抢盐笑话集锦 (转载)# Joke - 肚皮舞运动
c*e
1
void reversePrint(Node* head) {
if(head=NULL) {
cout << "Empty List. No node to print." << endl;
return;
}
if(head->next=NULL) {
cout << head->data << endl;
return;
} else {
Node* temp=head;
head=temp->next;
reversePrint(head);
cout << temp->data << endl;
return;
}
}
avatar
b*y
2
没拿到statement credit就unsync然后sync另一张卡,会影响第一张卡的credit back
吗?有经验的请说说。
avatar
Z*l
3
【 以下文字转载自 NewYork 讨论区 】
发信人: Glamor (出走), 信区: NewYork
标 题: 抢盐笑话集锦
发信站: BBS 未名空间站 (Thu Mar 17 12:51:53 2011, 美东)
信源:新华网
日本人地震没死,海啸没死,核辐射没死,结果当听说大洋彼岸沿海城市的中国人疯抢
食用盐后,全部笑死了。
人生最大的痛苦是什么?人活着,盐没了!人生最最痛苦的你知道是什么吗?人死了,
盐没花了。
上联:日本是大核民族;下联:中国乃盐慌子孙;横批:有碘意思
曾经有份真挚的感情在我面前,我没有珍惜,直到我明白他是卖盐的,才后悔莫及。每
一个抢盐的人,上辈子都是折翼的天使。如果你遇到了,就嫁了吧。 盐真的需要勇气
,来面对流言蜚语。只要你掏钱包来肯定,五毛党就有意义。床前明月光,把盐都抢光。
上联:大核民族五十七座核电密布意欲核威;下联:盐荒子孙五十六个民族抢盐盐面安
在 ;横批:有碘意思
上联:日本人在核辐射中等待碘盐;下联:中国人抢碘盐以等待核辐射;横批:无盐以对
今天各大超市咸鱼摊位边上增加了多位保安,以防止随意舔鱼的行为。保安气愤的说:
“昨天好好的一堆大咸鱼,今天硬是被舔成了淡水鱼。”
专业人士教你如何防辐射:全身涂满碘酒,头顶铅板,挥舞海带,边跑边吃盐,一天至
少10公斤,像螃蟹那样横着侧风疾跑,在通往美丽人生的康庄大道上!
“蒜你狠”“豆你玩”“姜你军”下一个是“盐王爷”。
CCAV24小时转播,准备看日本笑话,结果吓坏了同胞。本来吓坏同胞也没事的,结果都
跑去抢购。如果抢购汽车,家电啥的,也没关系,还拉内需哦。偏偏都去抢购盐巴。而
盐巴的价格是国家补贴的,这下干了贴钱的买卖了,CCAV应该慌了。
日前推出日本七日游,内容有:看海啸,观核爆,欣赏地震美景,体验核辐射,感受末
日风情!单程船票,费用自理---管去不管回,管死不管埋! 特惠价:2012元(注:凡
是参加了抢盐活动的,可凭超市购物小票,参加本次七日游活动,并享受7折优惠。)
世上最痛苦的是什么?辐射没来,盐没了;世上最最痛苦的是什么?辐射来了,盐不好
使;世上最最最痛苦的是什么?钱都买盐了,没钱买米了;世上最最最最痛苦的是什么
?人都咸死了,盐还没用完!
叫外卖:麻烦你给送一份卤肉饭喂。饭店:您要哪一款卤肉饭?不放盐的15,放盐的30
,双份加盐的50,我们最近还特别推出“咸死你”超值碘盐防辐射皇家尊贵卤肉饭套餐
,只需98哟,送一瓶碘酒呢。
江苏卫视《非诚勿扰》改名为《非盐勿扰》。男佳宾买够10,000斤盐,就可领走自己的
心爱女生。
本人有盐2袋,含碘,无核污染,每袋500克,欲换国贸商业中心一带140平商品房一套!
!非诚勿扰,有意私聊。
终于明白在日本如此紧急关头,奥特曼为何没有出现了。因为他在中国有个家喻户晓的
别名----“咸蛋超人”,他本要前往日本救灾,途径中国,不巧在国内遭遇食盐抢购。
因食盐紧缺,他不幸被舔失身,随后对人类产生了无限的恐惧。。。
青海湖有的是盐,柴达木盆地的公路也是用盐铺成的,四川自贡是自古以来的盐都,四
川遂宁的死海有的是盐。 中国内陆的盐足够把全世界所有的人都做成腊肉,完全没必
要抢购食盐,别再给中国丢人了!
震在日本,痛在中国。看到大家这么辛苦的传谣造谣抢碘片抢食盐,才知道真正的灾区
是在中国啊。
avatar
s*y
4
.....
did not look into detail, but the first look find that
head = NULL...

【在 c**********e 的大作中提到】
: void reversePrint(Node* head) {
: if(head=NULL) {
: cout << "Empty List. No node to print." << endl;
: return;
: }
: if(head->next=NULL) {
: cout << head->data << endl;
: return;
: } else {
: Node* temp=head;

avatar
t*7
5
多开几个facebook账号不就行了,又不是只搞一次,以后还有deal,再unsyc,sync不
嫌折腾?
avatar
c*e
6
很全啊

【在 Z*****l 的大作中提到】
: 【 以下文字转载自 NewYork 讨论区 】
: 发信人: Glamor (出走), 信区: NewYork
: 标 题: 抢盐笑话集锦
: 发信站: BBS 未名空间站 (Thu Mar 17 12:51:53 2011, 美东)
: 信源:新华网
: 日本人地震没死,海啸没死,核辐射没死,结果当听说大洋彼岸沿海城市的中国人疯抢
: 食用盐后,全部笑死了。
: 人生最大的痛苦是什么?人活着,盐没了!人生最最痛苦的你知道是什么吗?人死了,
: 盐没花了。
: 上联:日本是大核民族;下联:中国乃盐慌子孙;横批:有碘意思

avatar
c*e
7
You are right. Thanks. The old == versus = problem.

【在 s*****y 的大作中提到】
: .....
: did not look into detail, but the first look find that
: head = NULL...

avatar
b*y
8
没那么多手机。

【在 t****7 的大作中提到】
: 多开几个facebook账号不就行了,又不是只搞一次,以后还有deal,再unsyc,sync不
: 嫌折腾?

avatar
s*0
9
油菜 !! 大核民族 盐慌子孙

【在 Z*****l 的大作中提到】
: 【 以下文字转载自 NewYork 讨论区 】
: 发信人: Glamor (出走), 信区: NewYork
: 标 题: 抢盐笑话集锦
: 发信站: BBS 未名空间站 (Thu Mar 17 12:51:53 2011, 美东)
: 信源:新华网
: 日本人地震没死,海啸没死,核辐射没死,结果当听说大洋彼岸沿海城市的中国人疯抢
: 食用盐后,全部笑死了。
: 人生最大的痛苦是什么?人活着,盐没了!人生最最痛苦的你知道是什么吗?人死了,
: 盐没花了。
: 上联:日本是大核民族;下联:中国乃盐慌子孙;横批:有碘意思

avatar
c*e
10
发现不定义新节点也没问题。
void reversePrint(Node* head) {
if(head==NULL) {
cout << "Empty List. No node to print." << endl;
return;
}
if(head->next==NULL) {
cout << head->data << endl;
return;
} else {
reversePrint(head->next);
cout << head->data << endl;
return;
}
}
avatar
D*r
11
中国人干什么都喜欢一窝蜂

【在 s******0 的大作中提到】
: 油菜 !! 大核民族 盐慌子孙
avatar
c*y
12
你这Q+数字玩的是什么啊

【在 c**********e 的大作中提到】
: 发现不定义新节点也没问题。
: void reversePrint(Node* head) {
: if(head==NULL) {
: cout << "Empty List. No node to print." << endl;
: return;
: }
: if(head->next==NULL) {
: cout << head->data << endl;
: return;
: } else {

avatar
k*e
13
我看日本现在是核颜民族,中国是大慌子孙。

【在 s******0 的大作中提到】
: 油菜 !! 大核民族 盐慌子孙
avatar
c*e
14
开始是 Brainbench 的练习题。后来加的就是我自己想问的题目了,或者是面试题,或
者是我自己遇到的问题。

【在 c**y 的大作中提到】
: 你这Q+数字玩的是什么啊
avatar
S*8
15
今天各大超市咸鱼摊位边上增加了多位保安,以防止随意舔鱼的行为。保安气愤的说:
“昨天好好的一堆大咸鱼,今天硬是被舔成了淡水鱼。”
avatar
R*i
16
Only the last one will be printed.

【在 c**********e 的大作中提到】
: void reversePrint(Node* head) {
: if(head=NULL) {
: cout << "Empty List. No node to print." << endl;
: return;
: }
: if(head->next=NULL) {
: cout << head->data << endl;
: return;
: } else {
: Node* temp=head;

avatar
D*r
17
六一节有了新节目
预备唱 :“我们的祖国疯人院,院里的人们真现眼;
邻国的灾难,惊动着我们,每个人家里都十袋盐;
哇哈哈~哇哈哈~每个人家里都十袋盐;
哇哈哈~哇哈哈~吃完了碘盐就翻白眼!

【在 S********8 的大作中提到】
: 今天各大超市咸鱼摊位边上增加了多位保安,以防止随意舔鱼的行为。保安气愤的说:
: “昨天好好的一堆大咸鱼,今天硬是被舔成了淡水鱼。”

avatar
c*e
18
Did you try it? I tried it. It printed all.

【在 R****i 的大作中提到】
: Only the last one will be printed.
avatar
a*h
19
油菜
avatar
t*g
20
"Empty List. No node to print"
That will always be printed out first.
avatar
l*r
21
这个赞

【在 Z*****l 的大作中提到】
: 【 以下文字转载自 NewYork 讨论区 】
: 发信人: Glamor (出走), 信区: NewYork
: 标 题: 抢盐笑话集锦
: 发信站: BBS 未名空间站 (Thu Mar 17 12:51:53 2011, 美东)
: 信源:新华网
: 日本人地震没死,海啸没死,核辐射没死,结果当听说大洋彼岸沿海城市的中国人疯抢
: 食用盐后,全部笑死了。
: 人生最大的痛苦是什么?人活着,盐没了!人生最最痛苦的你知道是什么吗?人死了,
: 盐没花了。
: 上联:日本是大核民族;下联:中国乃盐慌子孙;横批:有碘意思

avatar
t*g
22
Actually no. This won't happen. But it's better to have this out of the
recursion.

【在 t******g 的大作中提到】
: "Empty List. No node to print"
: That will always be printed out first.

avatar
d*e
23
你发现有什么错?感觉没什么错误.
但如果说以整个code来看,其实后面两个return是多余的,可删去,另外print的message
有bug,head是空就说是empty list,但因为用了递归,head->next为null时,不代表它是
empty list
手痒写了个,但没验证...
void reversePrint(Node * head){
if(!head){
cout << "the end ..." << endl; // print some message here if needed...
return;
}
reversePrint(head->next);
cout << head->data << endl;
}

【在 c**********e 的大作中提到】
: void reversePrint(Node* head) {
: if(head=NULL) {
: cout << "Empty List. No node to print." << endl;
: return;
: }
: if(head->next=NULL) {
: cout << head->data << endl;
: return;
: } else {
: Node* temp=head;

avatar
c*e
24
use head==NULL, not head=NULL (this is always true).

【在 t******g 的大作中提到】
: "Empty List. No node to print"
: That will always be printed out first.

avatar
c*e
25

你是对的。后面那两个return语句是多余的,因为程序会自然运行。
这个message应该没错。因为只有这个list为空时,这个message才会打印。否则第二个
return处理最终状态。
验证了一下,你是对的。并且你的处理终止状态比我的简单。
...

【在 d**e 的大作中提到】
: 你发现有什么错?感觉没什么错误.
: 但如果说以整个code来看,其实后面两个return是多余的,可删去,另外print的message
: 有bug,head是空就说是empty list,但因为用了递归,head->next为null时,不代表它是
: empty list
: 手痒写了个,但没验证...
: void reversePrint(Node * head){
: if(!head){
: cout << "the end ..." << endl; // print some message here if needed...
: return;
: }

avatar
c*e
26
第二个return语句保证了message不会被打印,除非原来的list为空。

【在 t******g 的大作中提到】
: Actually no. This won't happen. But it's better to have this out of the
: recursion.

avatar
d*e
27
噢....谢谢,那你原来上面的return是有用的,我当时想的时候是把两个return去掉后才
觉得那个message有错.

【在 c**********e 的大作中提到】
: 第二个return语句保证了message不会被打印,除非原来的list为空。
avatar
c*e
28
完全不用return也是可以的。你的可以改成
void reversePrint(Node * head){
if(!head){
cout << "the end ..." << endl; // print some message here if needed...
} else {
reversePrint(head->next);
cout << head->data << endl;
}
}
我的可以改成
void reversePrint2(Node* head) {
if(head==NULL) {
cout << "Empty List. No node to print." << endl;
} else if(head->next==NULL) {
cout << head->data << " reversePrint2" << endl;
} else {
reversePrint2(head->next);
cout << head->data << " reversePrint2" << endl;
}
}

message
...

【在 d**e 的大作中提到】
: 你发现有什么错?感觉没什么错误.
: 但如果说以整个code来看,其实后面两个return是多余的,可删去,另外print的message
: 有bug,head是空就说是empty list,但因为用了递归,head->next为null时,不代表它是
: empty list
: 手痒写了个,但没验证...
: void reversePrint(Node * head){
: if(!head){
: cout << "the end ..." << endl; // print some message here if needed...
: return;
: }

avatar
s*y
29
Done's code is better.
void reversePrint(Node * head){
if(!head){
cout << "the end ..." << endl; // print some message here if needed..
.
} else {
reversePrint(head->next);
cout << head->data << endl;
}
}
Suppose you write this function and this function is very very long. Also, m
aybe there are a lot of #ifdef, #endif inside this function to support multi
ple platform. People look at this kind of code often get loss.
Then later on, another engineer jump in and modify this function by adding c
ode behind here:
} else {
reversePrint(head->next);
cout << head->data << endl;
}
/*****************/
add code here
/*****************/
}
But he did not pay attention to the code you write previously as the functio
n is so big. Normally, it should just return when the head is NULL. But now
it continue excuting without return.....Bug happens then.

...

【在 c**********e 的大作中提到】
: 完全不用return也是可以的。你的可以改成
: void reversePrint(Node * head){
: if(!head){
: cout << "the end ..." << endl; // print some message here if needed...
: } else {
: reversePrint(head->next);
: cout << head->data << endl;
: }
: }
: 我的可以改成

avatar
c*e
30
I agree. It is better to use return than to use if else.

..

【在 s*****y 的大作中提到】
: Done's code is better.
: void reversePrint(Node * head){
: if(!head){
: cout << "the end ..." << endl; // print some message here if needed..
: .
: } else {
: reversePrint(head->next);
: cout << head->data << endl;
: }
: }

avatar
l*u
31
It should work, but just is not very simple. We may be try following more
simple codes:
void reversePrint(Node *head){
if(head == NULL) return;
reversePrint(head->next);
cout << head->data << "\t";
}
avatar
c*e
32
It is the same as done's.

【在 l******u 的大作中提到】
: It should work, but just is not very simple. We may be try following more
: simple codes:
: void reversePrint(Node *head){
: if(head == NULL) return;
: reversePrint(head->next);
: cout << head->data << "\t";
: }

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。