Team Contest

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

You are a programming coach at a university. Your university is registering several teams to participate in a programming contest. The programming contest is participated by teams of three programmers.

In your university, there are NN eligible programmers, numbered from 00 to N1N - 1. For each ii such that 0iN10 ≤ i ≤ N - 1, programmer ii has a skill level of L\[i]L\[i]. The skill level of a team consisting of programmer ii, jj, and kk is min(L\[i],L\[j],L\[k])+max(L\[i],L\[j],L\[k])\min{(L\[i],L\[j],L\[k])} + \max{(L\[i],L\[j],L\[k])}.

You want to only register teams with a skill level of strictly more than KK. Each programmer may only be assigned to at most one registered team. You want to know the maximum number of teams you can register.

제한

  • 1N100,0001 ≤ N ≤ 100\\,000
  • 1K10 1 ≤ K ≤ 10
  • 1L\[i]10 1 ≤ L\[i] ≤ 10 (for each ii such that 0iN10 ≤ i ≤ N - 1)