測資跑出來都是對的耶
但都是OLE
#include<iostream>
#define n 10000
using namespace std;
int main()
{
int s[n],a,b,holder,j;
a=1;
while(1)
{
if(cin.eof())break;
cin>>s[a];
holder=s[a];
j=a-1;
while(j>0)
{
if(holder < s[j])
{
s[j+1]=s[j];
j--;
}
else
{
break;
}
}
s[j+1]=holder;
if(a%2==1)
{
cout<<s[(a+1)/2]<<endl;
}
else
{
cout<<(s[a/2]+s[a/2+1])/2<<endl;
}
a++;
}
// return 0
;
}