atcoder#KEYENCE2021A. Two Sequences 2
Two Sequences 2
Score : points
Problem Statement
Snuke has two number sequences and , each of length . The -th number of is , and that of is .
Using these sequences, he has decided to make a new sequence of length . For each such that , , the -th number of , is the maximum value of for a pair such that . Formally, we have .
Find .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Print lines. The -th line from the top should contain .
3
3 2 20
1 4 1
3
12
20
We have:
- ;
- $c_{2} = \max(a_{1}b_{1}, a_{1}b_{2},a_{2}b_{2}) = 12$;
- $c_{3} = \max(a_{1}b_{1}, a_{1}b_{2}, a_{1}b_{3}, a_{2}b_{2},a_{2}b_{3},a_{3}b_{3}) = 20$.
20
715806713 926832846 890153850 433619693 890169631 501757984 778692206 816865414 50442173 522507343 546693304 851035714 299040991 474850872 133255173 905287070 763360978 327459319 193289538 140803416
974365976 488724815 821047998 371238977 256373343 218153590 546189624 322430037 131351929 768434809 253508808 935670831 251537597 834352123 337485668 272645651 61421502 439773410 621070911 578006919
697457706539596888
697457706539596888
760974252688942308
760974252688942308
760974252688942308
760974252688942308
760974252688942308
760974252688942308
760974252688942308
760974252688942308
760974252688942308
867210459214915026
867210459214915026
867210459214915026
867210459214915026
867210459214915026
867210459214915026
867210459214915026
867210459214915026
867210459214915026