Redian新闻
>
谁能给孕妈推荐一些pp的衣服?
avatar
谁能给孕妈推荐一些pp的衣服?# Fashion - 美丽时尚
w*x
1
Print neatly
一下忘了怎么做了,花了半小时,处理下标很痛苦啊。
忽然发现没想的那么复杂。
//you have a list of words, you want to print them
//on a paper with width n. when printing, each
//word must be separated by one blank except the blanks after the last word.
Find the fewest
//possible blanks except the last line.
//f(i, j) = [1 + f(i+1, j+len(i)+1) ] || [nLen - j-len(i) + f(i+1,0)]
int GetLeastBlanks(int a[], int n, int nLen)
{
if (NULL == a || n <= 0 || nLen <= 0)
return -1;
int rec[100][100] = { 0 };
for (int i = n-2; i >= 0; i--)
{
for (int j = nLen-1; j >= 0; j--)
{
if (j + a[i] > nLen)
continue;
int nStartLine = nLen - j - a[i] + rec[i+1][0];
int nCont = INT_MAX;
if (j + a[i] + a[i+1] < nLen)
nCont = 1 + rec[i+1][j+a[i]+1];

rec[i][j] = min(nStartLine, nCont);
}
}
return rec[0][0];
}
avatar
k*s
2
有人推荐的书。 我看完了, 觉得不错,分享一下。 书中则要
- Fair does not mean equal
Armed with knowledge that parental attentions is never distributed over 100
percent parity and that parental priorities are never exactly same for each
child in any family, you should resist responding to this complaint by
trying even harder to treat your explosive child the same as you do you
other children.
--Kids do well if they can
Plan A: Imposed your will to unsolved problem
Plan C: Drop some expectation completely
Plan B: Collaborative Problem Solving (CPS) Model
1. Empathy Step 2. Define the problem step 3. Invitation Step
While CPS model has its roots in the treatment of explosive kids, it's clear
that it's not just explosive kids who benefits from identifying their
concerns, having those concern taken seriously, taking another person's
concerns into account, generating and considering alternative solutions to
problems, working toward mutually satisfactory solutions, and resolving
disputes and disagreement without conflict.
avatar
c*y
3
夏天到了,希望像我这样的孕妈也能打扮的漂漂亮亮,有没有jms给推荐些pp衣服呢?
有图片那就十万分的感谢啦~~~
avatar
H*s
4
牛啊, 这题看着很难的样子!真的是面试题吗?
你的公式里 i, j各是什么啊?

word.

【在 w****x 的大作中提到】
: Print neatly
: 一下忘了怎么做了,花了半小时,处理下标很痛苦啊。
: 忽然发现没想的那么复杂。
: //you have a list of words, you want to print them
: //on a paper with width n. when printing, each
: //word must be separated by one blank except the blanks after the last word.
: Find the fewest
: //possible blanks except the last line.
: //f(i, j) = [1 + f(i+1, j+len(i)+1) ] || [nLen - j-len(i) + f(i+1,0)]
: int GetLeastBlanks(int a[], int n, int nLen)

avatar
k*s
5
忘记写书名
The Explosive Child: A New Approach for Understanding and Parenting Easily
Frustrated, Chronically Inflexible Children
by Ross W. Greene
avatar
w*x
6

i是第几个单词,j是第几列

【在 H****s 的大作中提到】
: 牛啊, 这题看着很难的样子!真的是面试题吗?
: 你的公式里 i, j各是什么啊?
:
: word.

avatar
b*d
7
多谢推荐
找时间看一看学习学习(握拳)

100
each

【在 k******s 的大作中提到】
: 有人推荐的书。 我看完了, 觉得不错,分享一下。 书中则要
: - Fair does not mean equal
: Armed with knowledge that parental attentions is never distributed over 100
: percent parity and that parental priorities are never exactly same for each
: child in any family, you should resist responding to this complaint by
: trying even harder to treat your explosive child the same as you do you
: other children.
: --Kids do well if they can
: Plan A: Imposed your will to unsolved problem
: Plan C: Drop some expectation completely

avatar
c*t
8
是Text Justification吗?一道我做吐血的题

word.

【在 w****x 的大作中提到】
: Print neatly
: 一下忘了怎么做了,花了半小时,处理下标很痛苦啊。
: 忽然发现没想的那么复杂。
: //you have a list of words, you want to print them
: //on a paper with width n. when printing, each
: //word must be separated by one blank except the blanks after the last word.
: Find the fewest
: //possible blanks except the last line.
: //f(i, j) = [1 + f(i+1, j+len(i)+1) ] || [nLen - j-len(i) + f(i+1,0)]
: int GetLeastBlanks(int a[], int n, int nLen)

avatar
i*f
9
mark

100
each
★ 发自iPhone App: ChineseWeb 8.6

【在 k******s 的大作中提到】
: 有人推荐的书。 我看完了, 觉得不错,分享一下。 书中则要
: - Fair does not mean equal
: Armed with knowledge that parental attentions is never distributed over 100
: percent parity and that parental priorities are never exactly same for each
: child in any family, you should resist responding to this complaint by
: trying even harder to treat your explosive child the same as you do you
: other children.
: --Kids do well if they can
: Plan A: Imposed your will to unsolved problem
: Plan C: Drop some expectation completely

avatar
w*x
10

好像有这么一个同名的题

【在 c********t 的大作中提到】
: 是Text Justification吗?一道我做吐血的题
:
: word.

avatar
p*g
11
is it the same as least number of lines?

word.

【在 w****x 的大作中提到】
: Print neatly
: 一下忘了怎么做了,花了半小时,处理下标很痛苦啊。
: 忽然发现没想的那么复杂。
: //you have a list of words, you want to print them
: //on a paper with width n. when printing, each
: //word must be separated by one blank except the blanks after the last word.
: Find the fewest
: //possible blanks except the last line.
: //f(i, j) = [1 + f(i+1, j+len(i)+1) ] || [nLen - j-len(i) + f(i+1,0)]
: int GetLeastBlanks(int a[], int n, int nLen)

avatar
p*2
12

这个是不是greedy就可以了?

【在 p*g 的大作中提到】
: is it the same as least number of lines?
:
: word.

avatar
H*s
13
好像不是同一个题

【在 c********t 的大作中提到】
: 是Text Justification吗?一道我做吐血的题
:
: word.

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