刚开始的时候理解题目有问题,在空置房的理解上出现了错误,理解成了是低于阈值的数据需要达到规定的数目,然后就是测试点1和2过不去,之后看了看别的博主的代码,然后又去读了读题,才恍然大悟。

string_1 = input().split()
num, ceil_value, ceil_num = string_1[0], string_1[1], string_1[2]
num, ceil_num = int(num), int(ceil_num)
count_may_empty, count_empty = 0, 0
for i in range(num):
string_2 = input().split()
count = 0
if int(string_2[0]) <= ceil_num:
for num_2 in string_2[1:]:
if num_2 < ceil_value:
count += 1
if count * 2 > int(string_2[0]):
count_may_empty += 1
else:
for num_2 in string_2[1:]:
if num_2 < ceil_value:
count += 1
if count * 2 > int(string_2[0]):
count_empty += 1
#print(count_may_empty)
#print(count_empty)
print('%.1f%% %.1f%%'%(count_may_empty / float(num) * 100,count_empty / float(num) * 100))
'''
print('%.1f' % (count_may_empty / float(num) * 100), end = '')
print('% ', end = '')
print('%.1f' % (count_empty / float(num) * 100), end = '')
print('%')
'''