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