寄托天下
查看: 1881|回复: 1

A question [复制链接]

Rank: 3Rank: 3

声望
0
寄托币
630
注册时间
2004-8-7
精华
1
帖子
10
发表于 2005-5-1 11:29:26 |显示全部楼层
Set X has x members and y has y members.Set Z consists of all members that are in either set x or set y with the exception of the k common numbers(k>0).which of the following represents the number of member in set Z?
7 y) Z% @: c3 J$ n我算的是 x+y-k' I8 e; Y# z: v0 c  W6 f: w$ _
Answer: x+y-2k

使用道具 举报

Rank: 3Rank: 3

声望
0
寄托币
510
注册时间
2004-11-5
精华
0
帖子
1
发表于 2005-5-1 12:59:50 |显示全部楼层
k common numbers...就是两个sets里面都有德阿...所以要 - 两遍嘛% T$ A4 `/ z$ N: c2 X$ Z
* A4 a' v( Y: X4 }. Y9 j
比如x里面有 1 2 3 4   四个数字! N7 N# M9 M* q0 d0 s8 H/ T* Y
9 d$ n9 i$ ]* g2 Y
y里面有  3 4 6 7 8 9 六个数字
  ^2 p2 E. y6 c" p, h. ~9 o% n' {6 y% ?
common numbers are : 3, 4
1 C! Q& k% p) T" n- b  I# O+ p$ V# w. I8 a5 o
那么z里面要就有 4+6-2*2 =6 个数字~  就是 1 2 6 7 8 9

使用道具 举报

RE: A question [修改]

问答
Offer
投票
面经
最新
精华
转发
转发该帖子
A question
https://bbs.gter.net/thread-269633-1-1.html
复制链接
发送
回顶部