You need to perform the following operation exactly. . Please notice that you can not choose one card twice ., what is the maximum sum of the card's values after you perform the operations above .
There are N N cards on the table , the value of the i i-th ( 1leq i leq N 1≤i≤N) card is a_i a i . You need to perform the following operation exactly K K times . Choose a card i i ( 1leq i leq N 1≤i≤N) , and change it's value to b_i b i . Please notice that you can not choose one card twice . We prepared Q Q questions for you , each question is : Firstly read M M , and then read M M integers id_1,id_2,...,id_M id 1 ,id 2 ,...,id M . If you can not choose cards id_1,id_2,...,id_M id 1 ,id 2 ,...,id M , what is the maximum sum of the card's values after you perform the operations above .