Redian新闻
>
以前的同事被公司穿小鞋和我有关吗
avatar
以前的同事被公司穿小鞋和我有关吗# Working - 上班一族
m*i
1
A man has 3 kids. The product of the ages of the three kids is 36. How will
you systematically list out all of the possible combination for the ages of
the 3 kids without repetition?
这个在loop里面怎么remove其中的repetition呢?
avatar
a*a
2
我爸妈他们上上次延期了,所以上次代签的时候交了延期证明。
上一次来美国是按时回去的。
这次代签还用交上上一次的延期证明吗?他们材料都已经交了,没交这个延期的材料。
我又打电话去中信,他们说他们也不清楚,要问使馆。
唉!bless顺利签过!
avatar
t*9
3
我半年前从之前工作的公司离职,走的时候挺不舍的,毕竟平日里老板待我好,公
司待遇不错身份也给办得挺利索。但是因为新的机会很好,还是下定决心一走了之,做
了一半的项目进度可能也收到一些影响,而且看得出来老板很遗憾。

几天前和之前同一个组的同事(也是华人)聊天,得知她最近绩效考评分数不好。
毕竟一起共事过,以我对同事的了解,论业务能力不至于这样。 我之前和这个同事走
的蛮近,感觉同事这次是被老板给穿了小鞋压低评分。同事性格低调,可能属于那种会
做不会说, 也不怎么social,但无论如何我感觉考评不至于拿这么低
分。现在就是担心,同事受到这待遇,不会是我离职导致的吧? 我感觉老板心眼应该
没这么小,但是又担心我的离职导致老板对华人同事有了成见,影响到了同事。离职跳
槽应该是蛮普遍的事,但是我之前那公司比较小,好多老美一干就是大半辈子,可能对
跳槽的事接受度没那么高。想看看大家怎么评论?
avatar
p*e
4
for (int i = 1;i <=36; i++)
for (int j = i; j <=36; j++)
for (k = j; k <= 36; k++)
大致这个框架,中间可以优化的。

will
of

【在 m*******i 的大作中提到】
: A man has 3 kids. The product of the ages of the three kids is 36. How will
: you systematically list out all of the possible combination for the ages of
: the 3 kids without repetition?
: 这个在loop里面怎么remove其中的repetition呢?

avatar
h*k
5
你没那么重要
大人物走的多了、也没啥影响
avatar
p*e
6
或者两重循环,求第三个,然后判断要>=j
写法挺多的,关键是要排序搜

【在 p*****e 的大作中提到】
: for (int i = 1;i <=36; i++)
: for (int j = i; j <=36; j++)
: for (k = j; k <= 36; k++)
: 大致这个框架,中间可以优化的。
:
: will
: of

avatar
m*i
7
这样,很多repetion, 比如 1 9 4 和 4 9 1

【在 p*****e 的大作中提到】
: for (int i = 1;i <=36; i++)
: for (int j = i; j <=36; j++)
: for (k = j; k <= 36; k++)
: 大致这个框架,中间可以优化的。
:
: will
: of

avatar
p*e
8
不会,k一定要比j大

【在 m*******i 的大作中提到】
: 这样,很多repetion, 比如 1 9 4 和 4 9 1
avatar
s*t
9
可以因式分解么?
我刚才的帖子没看懂题目。我删掉了
avatar
s*t
10
36 ==
2 2 3 3 然后可以组合来组合去的
1可以作为特殊情况考虑,还可以有两个1
avatar
p*e
11
这题可以扩展成n个孩子的乘积是m
写个递归就可以,同样注意要排序搜

【在 s******t 的大作中提到】
: 36 ==
: 2 2 3 3 然后可以组合来组合去的
: 1可以作为特殊情况考虑,还可以有两个1

avatar
m*i
12
我理解错了,多谢!

【在 p*****e 的大作中提到】
: 不会,k一定要比j大
avatar
c*d
13
36 = 2^2*3^2
两个2分给三个人,有C(4,2)种分法
C(4,2)*C(4,2) = 36种情况
所以程序可以这么写:
#include
#include
using namespace std;
int main()
{
unsigned int k1, k2, k3, s1, s2, s3, n1, n2, n3;
unsigned int count = 0;
unsigned int i, j, p, q;
for(i=1;i<=4;i++) {
for(j=i+1;j<=4; j++) {
k1 = i-1;
k2 = j-(i+1);
k3 = 4-j;
for(p=1; p<=4; p++) {
for(q=p+1; q<=4; q++) {
s1 = p-1;
s2 = q-(p+1);
s3 = 4-q;
n1 = pow(2,k1)*pow(3,s1

【在 m*******i 的大作中提到】
: A man has 3 kids. The product of the ages of the three kids is 36. How will
: you systematically list out all of the possible combination for the ages of
: the 3 kids without repetition?
: 这个在loop里面怎么remove其中的repetition呢?

avatar
c*d
14
这个解法是假定给了这家三个小孩的名字,然后猜每个名字对应的年龄是多少
如果问题是“列出这家三个小孩,老大,老二,老三年龄分别是多少?”
则上述解法有很多重复。我一下还没想到怎样去除其中的重复。

【在 c*******d 的大作中提到】
: 36 = 2^2*3^2
: 两个2分给三个人,有C(4,2)种分法
: C(4,2)*C(4,2) = 36种情况
: 所以程序可以这么写:
: #include
: #include
: using namespace std;
: int main()
: {
: unsigned int k1, k2, k3, s1, s2, s3, n1, n2, n3;

avatar
s*t
15
我知道为啥。我看晕了。

【在 c*******d 的大作中提到】
: 36 = 2^2*3^2
: 两个2分给三个人,有C(4,2)种分法
: C(4,2)*C(4,2) = 36种情况
: 所以程序可以这么写:
: #include
: #include
: using namespace std;
: int main()
: {
: unsigned int k1, k2, k3, s1, s2, s3, n1, n2, n3;

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