有没有办法降低该程序的复杂性?
问题如下: 考虑一个具有1列的表:
- A,B
- B,C
- A,C
- A,B,D
- ...
我必须找到一个元素的列表,以便该列表中的每个元素都存在于表的每一行中。
我唯一能想到创建每个可能子集的唯一方法,并检查子集的1是否满足条件
the problem is as follows:
Consider a table with 1 column as follows:
- a,b
- b,c
- a,c
- a,b,d
- ...
I have to find a list of elements such that exactly 1 element of the list is present in every row of the table.
The only way I can think of a creating every possible subset and check if 1 of the subset satisfies the condition
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论