手机专卖店
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
Description
他去了好几个专卖店,其中有几个专卖店之间有路,有几个则没有。现给出几条路径,再给出几组数,求与间有没有路。
Input
第一行三个数字,代表店数、路径数、询问数。 接下来行,每行两个数字,代表之间互通(双向皆可)。 接下来行,每行两个数,询问之间是否互通。
Output
行,每行一个数,代表对应的两个专卖店互通为,不互通则是
Samples
3 2 1
1 2
1 3
2 3
0
3 2 2
1 2
1 3
1 3
2 3
1
0
Limitation
[Rated]2025/07/19 新生课前测
- Status
- Done
- Rule
- Ledo
- Problem
- 5
- Start at
- 2025-7-19 7:42
- End at
- 2025-7-19 9:00
- Duration
- 1.3 hour(s)
- Host
- Partic.
- 22