woj-server/resource/runner/problem/book/ch3/3. surface/description.md

31 lines
454 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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.

# 平面分割
## Tags
- C++一本通
- 递推
## Description
同一平面内有$n$$n\le 500$)条直线,已知其中$p$$p\le 2$)条直线相交于同一点,则这$n$条直线最多能将平面分割成多少个不同的区域?
输入两个整数$n$$n\le 500$)和$p$$2\le p\le n$
输出一个正整数,代表最多分割成的区域数目
## Example Cases
### Case 1
#### Input
```
12 5
```
#### Output
```
73
```