Submission #1157149
Source Code Expand
N=int(input()) A=[int(i) for i in input().split()] ans=0 sum=0 A.sort() for i in range(N-1): sum+=A[i] if A[i+1]>2*sum: ans=i+1 print(N-ans)
Submission Info
Submission Time | |
---|---|
Task | B - Colorful Creatures |
User | toma25 |
Language | Python (3.4.3) |
Score | 400 |
Code Size | 153 Byte |
Status | AC |
Exec Time | 111 ms |
Memory | 14308 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | 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 | AC | 107 ms | 14252 KB |
in10.txt | AC | 51 ms | 7424 KB |
in11.txt | AC | 106 ms | 13552 KB |
in12.txt | AC | 75 ms | 14020 KB |
in13.txt | AC | 74 ms | 14276 KB |
in2.txt | AC | 110 ms | 13980 KB |
in3.txt | AC | 111 ms | 14224 KB |
in4.txt | AC | 108 ms | 14224 KB |
in5.txt | AC | 49 ms | 7184 KB |
in6.txt | AC | 104 ms | 13892 KB |
in7.txt | AC | 108 ms | 13924 KB |
in8.txt | AC | 102 ms | 14308 KB |
in9.txt | AC | 26 ms | 4340 KB |
sample1.txt | AC | 16 ms | 3060 KB |
sample2.txt | AC | 17 ms | 3060 KB |
sample3.txt | AC | 17 ms | 2940 KB |