Submission #10348529


Source Code Expand

Copy
N,C=map(x->parse(Int,x),split(readline()))
A=sort(map(x->parse(Int,x),readlines()))
ans=0
j=N
i=1
while i<=N
	while i<j&&A[i]+A[j]>=c
		j-=1
		ans+=1
	end
	j-=1
	ans+=1
	i+=1
end
println(ans)

Submission Info

Submission Time
Task C - 収納
User kotatsugame
Language Julia (0.5.0)
Score 0
Code Size 207 Byte
Status
Exec Time 878 ms
Memory 160640 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
× 3
× 16
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
01.txt 878 ms 160640 KB
02.txt 753 ms 145892 KB
03.txt 752 ms 142940 KB
04.txt 757 ms 146688 KB
05.txt 777 ms 143292 KB
06.txt 756 ms 145800 KB
07.txt 747 ms 146344 KB
08.txt 751 ms 146832 KB
09.txt 753 ms 145800 KB
10.txt 747 ms 145408 KB
11.txt 759 ms 144852 KB
12.txt 759 ms 144972 KB
13.txt 751 ms 145744 KB
sample_01.txt 717 ms 130592 KB
sample_02.txt 716 ms 132064 KB
sample_03.txt 720 ms 131720 KB