The Saratov State University Olympiad Programmers Training Center (SSU OPTC) has n students. For each student you know the number of times he/she has participated in the ACM ICPC world programming championship. According to the ACM ICPC rules, each person can participate in the world championship at most 5 times.
The head of the SSU OPTC is recently gathering teams to participate in the world championship. Each team must consist of exactly three people, at that, any person cannot be a member of two or more teams. What maximum number of teams can the head make if he wants each team to participate in the world championship with the same members at least k times?
萨拉托夫国立大学奥林匹克程序员培训中心(SSU OPTC)有 n 名学生。对于每个学生,你知道他/她参加ACM ICPC世界编程锦标赛的次数。根据 ACM ICPC 的规则,每个人最多可以参加 5 次世界锦标赛。
SSU OPTC负责人最近正在召集参加世界锦标赛的队伍。每支队伍必须由恰好三个人组成,任何人都不能同时是两个或两个以上队伍的成员。如果一个人希望每个队伍都以相同的队员参加世界锦标赛至少 k 次,那么他最多可以组成多少支队伍?