------
## 最终结论
```python
def max_groups(T, test_cases):
    results = []
    for i in range(T):
        N, e = test_cases[i]
        e.sort()
        groups = 0
        current_group_size = 0

        for inexperience in e:
            current_group_size += 1
            if current_group_size >= inexperience:
                groups += 1
                current_group_size = 0
        
        results.append(groups)
    
    return results

# Reading input
import sys
input = sys.stdin.read
data = input().split()

T = int(data[0])
index = 1
test_cases = []

for _ in range(T):
    N = int(data[index])
    index += 1
    e = list(map(int, data[index:index + N]))
    index += N
    test_cases.append((N, e))

# Calculate results
results = max_groups(T, test_cases)

# Printing output
for result in results:
    print(result)
```