Redian新闻
>
求助:机器好像中毒了,不能运行.exe程序
avatar
求助:机器好像中毒了,不能运行.exe程序# Hardware - 计算机硬件
f*h
1
假设一共100名小朋友参加足球比赛。每个小朋友都有自己最要好的15个好朋友。现在
要求从这100名小朋友中组成10支队伍进行比赛。要求每个小朋友都和自己的好朋友在
一个队中。请问,有什么数据结构和算法来完成此任务。
avatar
l*r
2
【 以下文字转载自 Automobile 讨论区 】
发信人: woshixiaozhu (我是小猪), 信区: Automobile
标 题: 前几天老板吃饭时闲聊
发信站: BBS 未名空间站 (Sun Apr 25 01:58:07 2010, 美东)
问我有木有车,我说还没,积蓄有限,老板说年轻人一开始都是要慢慢来的,可以考虑
买些
ford一类的便宜的二手美国车。后来谈到日本车美国车的差别的时候,老板说你们现在
赶上
好时候了,没开过真正的烂车。他当年读研究生的时候攒钱买了一辆很新的南斯拉夫产
的车
,结果有一次去参加一个重要会议,准备出发的时候。用力一关车门,后视镜掉下来了
。。
avatar
g*w
3
搞得很郁闷,随便运行啥,问你用哪个program打开。有说是.exe关联出问题,但是在
safe mode下看注册表是好的。这是啥病毒?
avatar
P*l
4
general idea: Greedy
data structure:
adjacent matrix.
1. each line is for a child, content is a link to one of his friends.
2. an array keeps the number of friends not having a team for a child.
algorithm:
//all child has 15 friends free.
currentChild = any one.
do{
organize 10 children around him to be a team //children update their free links.
currentChild = one free child with lest free links.
}while( currentChild != null )
note1: can pick 10 children with the lest free links
avatar
c*o
5
是不是一款叫什么“yougo”的车。。。好像有过一个漫画模仿车的语气说:you go,I
dont go。。。
avatar
l*e
6
可能不是病毒,而是exe的关联出错了。下载一个程序,叫做金山文件关联修复。可以
baidu一下。
avatar
c*y
7
This problem might have no solution.
For example, the 100 children can be divided into two groups such that there
is no link between the two groups. A link represents a friend relationship
between two children. If the numbers of children in the above two groups are
49 and 51, respectively. There is no way to construct such 10 groups, each
containing 10 children.
So any algorithm leading to the final solution should be cable to determine whether
or not there exists a solution to a given collectio
avatar
r*9
8
yugo

,I

【在 c****o 的大作中提到】
: 是不是一款叫什么“yougo”的车。。。好像有过一个漫画模仿车的语气说:you go,I
: dont go。。。

avatar
g*w
9
多谢,确实还是exe关联的问题。有两个地方可以设,HK_CLASSES_ROOT和HKCU下

【在 l*****e 的大作中提到】
: 可能不是病毒,而是exe的关联出错了。下载一个程序,叫做金山文件关联修复。可以
: baidu一下。

avatar
f*h
10
面试的人明确的和我说不是Greedy Algorithm。
avatar
g*a
11
I think the requirement is every kid at least have one good friend in the
group. Not all other 9 kids need to be his good friends.

there
relationship
are
determine whether

【在 c**y 的大作中提到】
: This problem might have no solution.
: For example, the 100 children can be divided into two groups such that there
: is no link between the two groups. A link represents a friend relationship
: between two children. If the numbers of children in the above two groups are
: 49 and 51, respectively. There is no way to construct such 10 groups, each
: containing 10 children.
: So any algorithm leading to the final solution should be cable to determine whether
: or not there exists a solution to a given collectio

avatar
l*c
12
there might be a solution or not
we can try.
1. sort the children with number of friends,
2, sort each child friends list based on 1
3 . process starting with the child with least friend based on 1, by
selecting the 9 kids with most friends based 2
4 if every kid is put in a group, done;
otherwise, backtrack, ie. change the last selection in 3
when back to the first selection and enum all the posibility for the first
selection, and fail, no solution

【在 f*******h 的大作中提到】
: 面试的人明确的和我说不是Greedy Algorithm。
avatar
l*c
13
if do not require optimization, backtrack is enough, no need sort.

first

【在 l******c 的大作中提到】
: there might be a solution or not
: we can try.
: 1. sort the children with number of friends,
: 2, sort each child friends list based on 1
: 3 . process starting with the child with least friend based on 1, by
: selecting the 9 kids with most friends based 2
: 4 if every kid is put in a group, done;
: otherwise, backtrack, ie. change the last selection in 3
: when back to the first selection and enum all the posibility for the first
: selection, and fail, no solution

avatar
s*e
14
Can we construct a undirected graph and then find a Hamilton path of length
10?
avatar
m*g
15
求高手解答
这题应该不会有那么难把
avatar
a*s
16
我想这个问题可以分解
假设我们有一种算法可以找n个小朋友中size为10的clique,
那么,就是先找出100个小朋友中,所有size为10的clique,
然后,对应于每个clique,相对应的子问题是在90个小朋友中找size为10的clique,
有点像用recursive列出所有的permutation

【在 f*******h 的大作中提到】
: 假设一共100名小朋友参加足球比赛。每个小朋友都有自己最要好的15个好朋友。现在
: 要求从这100名小朋友中组成10支队伍进行比赛。要求每个小朋友都和自己的好朋友在
: 一个队中。请问,有什么数据结构和算法来完成此任务。

avatar
f*h
17
感觉没那么复杂。当时面试的人说我的Greedy Algorithm不行,给我五分钟的时间想其
他方法(包括写pseudocode)。所以应该是比较简单的题。
avatar
l*c
18
normal backtrack recursive, like maze problem

【在 f*******h 的大作中提到】
: 感觉没那么复杂。当时面试的人说我的Greedy Algorithm不行,给我五分钟的时间想其
: 他方法(包括写pseudocode)。所以应该是比较简单的题。

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