QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 256 MB Points totaux : 100

#7817. 病毒学

Statistiques

一位病毒学家对 $K$ 种病毒株进行了实验,并记录了导致病毒株死亡的温度值。每种病毒株的实验次数可能不同。我们将所有病毒株死亡的温度范围的大小定义为包含至少一个能使每种病毒株死亡的温度的区间的长度。请帮助病毒学家确定该范围的最小可能大小。

输入格式

第一行包含一个正整数 $K$ —— 病毒株的数量,$1 \leqslant K \leqslant 10^5$。 接下来 $K$ 行,每行包含以空格分隔的整数。第 $i$ 行的第一个数字是第 $i$ 种病毒株的实验次数 $M_i$($1 \leqslant M_i \leqslant 10^5$),随后是 $M_i$ 个导致病毒株死亡的温度值,所有温度值均在 $-10^7$ 到 $10^7$ 之间。所有病毒株的实验总次数不超过 $10^5$。

输出格式

输出一个整数 —— 能够使所有病毒株死亡的温度范围的最小可能大小。

样例

样例输入 1

3
5 3 9 15 24 20
4 1 9 13 14
4 5 15 12 11

样例输出 1

1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.