Submission #1394167


Source Code Expand

Copy
n=gets.to_i
a=gets.split.map(&:to_i)
dup=(1..n).find{|i|a.count(i)>1}
l,r=[a.index(dup),a.rindex(dup)]
puts (1..n+1).map{|i|(a.combination(i).size-(1..(l+n-r)).to_a.combination(i-1).size)%1000000007}

Submission Info

Submission Time
Task D - 11
User mayumini
Language Ruby (2.3.3)
Score 0
Code Size 203 Byte
Status

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt
All 0 / 600 1.txt, mx.txt, rnd_0.txt, rnd_1.txt, rnd_2.txt, rnd_3.txt, rnd_4.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt
mx.txt
rnd_0.txt
rnd_1.txt
rnd_2.txt
rnd_3.txt
rnd_4.txt
sample1.txt 7 ms 1788 KB
sample2.txt 7 ms 1788 KB
sample3.txt 7 ms 1788 KB