Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

47 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4bd1000cf542c50ffcf
title: 问题336Maximix安排
challengeType: 5
videoUrl: ''
dashedName: problem-336-maximix-arrangements
---
# --description--
一列火车用于按顺序运输四辆车ABCD。然而有时当火车到达收集车厢时它们的顺序不正确。为了重新安排车厢他们都被分流到一个大型旋转转盘上。在车厢在特定点处脱开之后列车从转盘上移开拉动仍与其连接的托架。其余的车厢旋转180度。然后重新加入所有托架并且根据需要重复该过程以便获得转盘的最少使用次数。一些布置例如ADCB可以很容易地解决托架在A和D之间分开并且在DCB旋转之后已经实现了正确的顺序。
然而火车司机简单西蒙并不知道他的效率所以他总是通过最初将马车A放在正确的位置然后是马车B等来解决问题。
使用四个车厢西蒙的最坏可能安排是DACB和DBAC我们称之为maximix安排。每个都需要他五次旋转尽管使用最有效的方法他们可以使用三次旋转来解决。他用于DACB的过程如下所示。
可以证实对于六个车厢存在24个最大值布置其中第十个词典最大化布置是DFAECB。
查找11种车厢的第11版词典格式。
# --hints--
`euler336()`应该返回CAGBIHEFJDK。
```js
assert.strictEqual(euler336(), CAGBIHEFJDK);
```
# --seed--
## --seed-contents--
```js
function euler336() {
return true;
}
euler336();
```
# --solutions--
```js
// solution required
```