|
@@ -0,0 +1,29 @@
|
|
1
|
+import numpy as np
|
|
2
|
+
|
|
3
|
+def solve(N, W):
|
|
4
|
+ W=sorted(W)
|
|
5
|
+ res=0
|
|
6
|
+ #print("Start:", W)
|
|
7
|
+ while len(W) > 0:
|
|
8
|
+ last=W[-1]
|
|
9
|
+ del W[-1]
|
|
10
|
+ #print("Removed last:", W)
|
|
11
|
+ div=int(np.ceil(50/last))
|
|
12
|
+ #print("50/{0}={1}".format(last,div))
|
|
13
|
+ if len(W) < div-1:
|
|
14
|
+ return res
|
|
15
|
+ del W[:div-1]
|
|
16
|
+ #print("Removed", div-1, "first")
|
|
17
|
+ res+=1
|
|
18
|
+ return res
|
|
19
|
+
|
|
20
|
+if __name__ == "__main__":
|
|
21
|
+ import fileinput
|
|
22
|
+ f = fileinput.input()
|
|
23
|
+
|
|
24
|
+ T = int(f.readline())
|
|
25
|
+ for case in range(1, T+1):
|
|
26
|
+ N = int(f.readline())
|
|
27
|
+ W = [int(f.readline()) for x in range(N)]
|
|
28
|
+ solution = solve(N, W)
|
|
29
|
+ print("Case #{0}: {1}".format(case, solution))
|