 AtCoder
            AtCoder    [AtCoder]ABC127 D-Integer Cards
        
【問題】
問題キャプチャ
【方針】\(C_j\)を大きい順に\(B_j\)個並べたリストを作る。このリストと\(A\)を結合し、大きい方から順に\(N\)個取れば良い。
【解答】
#input
n, m =...      
                  
     AtCoder
            AtCoder     math
            math     memo
            memo     math
            math     statistics
            statistics     fishing
            fishing     fishing
            fishing     math
            math     math
            math     math
            math