#include<cstdio>#include<algorithm>usingnamespace std;constint maxn =1010;int N;typedef pair<int,int> P;
P a[maxn];intmain(){
scanf("%d",&N);for(int i =0; i < N; i++){
scanf("%d",&a[i].first);
a[i].second = i +1;}sort(a, a + N);double res =0, ans =0;for(int i =0; i < N; i++){
printf("%d%c", a[i].second, i +1== N ?'\n':' ');
ans += res;
res += a[i].first;}printf("%.2f\n", ans / N);return0;}
#include<cstdio>#include<cstring>usingnamespace std;constint maxn =110;int N, M;char field[maxn][maxn];voiddfs(int x,int y){
field[x][y]='*';for(int dx =-1; dx <=1; dx++){
for(int dy =-1; dy <=1; dy++){
int nx = x + dx, ny = y + dy;if(nx <0|| nx >= N || ny <0|| ny >= M || field[nx][ny]=='*')continue;dfs(nx, ny);}}}intmain(){
while(scanf("%d%d",&N,&M), N && M){
for(int i =0; i < N; i++)scanf("%s", field[i]);int ans =0;for(int i =0; i < N; i++){
for(int j =0; j < M; j++){
if(field[i][j]=='@'){
ans++;dfs(i, j);}}}printf("%d\n", ans);}return0;}
#include<cstdio>typedefunsignedlonglong ll;
ll N, K;intmain(){
scanf("%llu%llu",&N,&K);printf("%llu",(K >>(N -1))&1);for(int i = N -2; i >=0; i--){
printf("%llu",(K >> i &1)^(K >>(i +1)&1));}printf("\n");return0;}