#include <stdio.h>
#include <stdlib.h>
//必要があれば,関数をいくつでも追加して良い
int compare(const void *a,const void*b){
return *(int*)b-*(int*)a;
}
int solve(){
int ret;
ret=0;
//ここにプログラムを書く
//ret に答えを入れてメイン関数に返す
//入力を受ける部分も自分で書いてください
//今日の分を含め過去の授業のプログラムが
//参考になるはずです
int n,q;
int m[n];
for(int i=0;i<n;i++){
}
qsort(m
,n
,sizeof(int),compare
);
while(q>0)
{
m[0]=m[0]/2;
qsort(m
,n
,sizeof(int),compare
); q--;
}
for(int i=0;i<n;i++){
ret= ret+m[i];
}
return ret;
}
//メイン関数はいじらなくて良い
int main(void){
return 0;}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCi8v5b+F6KaB44GM44GC44KM44Gw77yM6Zai5pWw44KS44GE44GP44Gk44Gn44KC6L+95Yqg44GX44Gm6Imv44GECmludCBjb21wYXJlKGNvbnN0IHZvaWQgKmEsY29uc3Qgdm9pZCpiKXsKIHJldHVybiAqKGludCopYi0qKGludCopYTsKfQoKaW50IHNvbHZlKCl7CiAgICBpbnQgcmV0OwogICAgcmV0PTA7CiAgICAvL+OBk+OBk+OBq+ODl+ODreOCsOODqeODoOOCkuabuOOBjwogICAgLy9yZXQg44Gr562U44GI44KS5YWl44KM44Gm44Oh44Kk44Oz6Zai5pWw44Gr6L+U44GZCiAgICAvL+WFpeWKm+OCkuWPl+OBkeOCi+mDqOWIhuOCguiHquWIhuOBp+abuOOBhOOBpuOBj+OBoOOBleOBhAogICAgLy/ku4rml6Xjga7liIbjgpLlkKvjgoHpgY7ljrvjga7mjojmpa3jga7jg5fjg63jgrDjg6njg6DjgYwKICAgIC8v5Y+C6ICD44Gr44Gq44KL44Gv44Ga44Gn44GZCiAgICBpbnQgbixxOwogICAgc2NhbmYoIiVkJWQiLCZuLCZxKTsKICAgIGludCBtW25dOwogICAgZm9yKGludCBpPTA7aTxuO2krKyl7CiAgICAgc2NhbmYoIiVkIiwmbVtpXSk7CiAgICB9CiAgICAKICAgIHFzb3J0KG0sbixzaXplb2YoaW50KSxjb21wYXJlKTsKICAgIAogICAgd2hpbGUocT4wKQogICAgewogICAgIG1bMF09bVswXS8yOwogICAgIHFzb3J0KG0sbixzaXplb2YoaW50KSxjb21wYXJlKTsKICAgICBxLS07CiAgICB9CiAgIAogICAgZm9yKGludCBpPTA7aTxuO2krKyl7CiAgICAgcmV0PSByZXQrbVtpXTsKICAgIH0KICAgIAogICAgCiAgICByZXR1cm4gcmV0Owp9CgovL+ODoeOCpOODs+mWouaVsOOBr+OBhOOBmOOCieOBquOBj+OBpuiJr+OBhAppbnQgbWFpbih2b2lkKXsKICAgIHByaW50ZigiJWRcbiIsc29sdmUoKSk7CiAgICByZXR1cm4gMDt9Cg==