Submission #1157300


Source Code Expand

Copy
N = int(input())
A = [int(i) for i in input().split()]
A.sort()
accumuration = [A[0]]
for i in range(1,N):
	accumuration.append(accumuration[i-1]+A[i])
for i in range(N):
	if accumuration[N-i-2]*2 < A[N-1-i]:
		print(i+1)
		exit()
print(N)

Submission Info

Submission Time
Task B - Colorful Creatures
User TAB
Language Python3 (3.4.3)
Score 400
Code Size 249 Byte
Status
Exec Time 139 ms
Memory 14224 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt
All 400 / 400 sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
in1.txt 138 ms 14224 KB
in10.txt 54 ms 7428 KB
in11.txt 121 ms 13808 KB
in12.txt 103 ms 14020 KB
in13.txt 104 ms 14048 KB
in2.txt 135 ms 13980 KB
in3.txt 136 ms 14224 KB
in4.txt 138 ms 14224 KB
in5.txt 61 ms 7176 KB
in6.txt 108 ms 13896 KB
in7.txt 139 ms 14148 KB
in8.txt 106 ms 13764 KB
in9.txt 30 ms 4340 KB
sample1.txt 17 ms 2940 KB
sample2.txt 16 ms 3060 KB
sample3.txt 17 ms 2940 KB