返回题目列表
COMP2521
24T2 Q12 — BST 某层最小绝对差
stdin:首行 N L;次行 N 个整数依次插入 BST(重复忽略)。根为第 0 层。打印第 L 层任意两值的最小绝对差;该层不足 2 个值则打印 0。
Single-file C (gcc -O0 -Wall). Self-contained reframing of the exam's ADT-completion question. From COMP2521 24T2 Sample.
样例
stdin
7 2 50 30 70 20 40 60 80
期望输出
20
c-gcc
14