Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
An want to make friends with students in EIU on Facebook. Observing students on the university's Facebook group, they have few friends. Therefore, An will make friend suggestion for friends who have less than ~L~ friends. He also hope his friends too. Help him to write a program to help the user make friend find out his/her friends who have less than ~L~ friends.
Input
- The first line contains ~3~ integers ~N, M, L~, respectively, the number of students in the group (numbered from ~0~ to ~N-1~), the number of friendships, and the minimum number of friends a person should have. ~(0 < N ≤ 10^4), M (0 ≤ M ≤ 10^5), L (0 < L ≤ 10^3)~
- In the next ~M~ lines, each line is a number ~u~ and ~v~, showing that you and ~v~ are friends.
Output
- Output student in ascending order and list friends who the student should send suggestion to. The list friends in ascending order.
Example Input
5 6 3
0 3
3 1
1 2
0 1
3 4
4 2
Example Output
0
1 0 2
2 4
3 0 4
4 2
Bình luận