print maximum first k pair of product in combinator of two array
Difference between en1 and en2, changed 10 character(s)
We have two arrays of integer with n elements ( n <= 10^5 ) , consider:↵

a1 a2 a3 ... an↵

b1 b2 b3 ... bn↵

( abs(a[i],b[i]) <= 10^9 )↵

print maximum first k element c=(a[i] * b[j]) ( 1<=i,j<=n)↵


For example:↵
input:↵
n=3 k=3↵

a={1,2,3}↵

b={4,5,6}↵



Correct output: 
4 5 66 12 18↵




I'm trying to solve problem like this , but i don't have any idea for getting "AC" , so i need some helps , thank everybody.↵



History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Tboros_kylie 2024-01-27 04:53:39 10 Tiny change: 't output: 4 5 6\n\n\n\nI'' -> 't output: 6 12 18\n\n\n\n\nI''
en1 English Tboros_kylie 2024-01-26 15:01:54 495 Initial revision (published)