Update 如何选择现在吃什么.md

This commit is contained in:
Anduin Xue 2021-09-18 01:26:13 +08:00 committed by GitHub
parent 97926a1a19
commit 400b612e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,20 @@
由此得到荤菜数量和素菜数量,再在上一步的菜谱中选择即可。
#### 形式语言描述
当 有人数 `N` 时,
`素菜数``a`, `荤菜数``b`
`N`, `a`, `b`均为整数。
此时有下列不等式组:
* a + b = N + 1
* b >= a
* b <= a + 1
得到一组关于`a`, `b`的整数解即可。
### 菜的选择
* 如果人数超过8人考虑在荤菜中增加鱼类荤菜。