#include<bits/stdc++.h>
using namespace std;
const int N=1e3+10;
struct node{
int a,b;
}a[N];
bool cmp(node x,node y){
if(x.a!=y.a){
return x.a<y.b;
}
if(x.b!=y.b){
return x.b<y.b;
}
}
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
int a;
cin>>a;
a[i].a=a;
a[i].b=i;
}
sort()
double cnt=0;
for(int i=1;i<=n;i++){
cout<<a[i].y<<" ";
cnt+=a[i].x*(n-i);
}
cout<<endl;
cout<<fixed<<setprecision(2)<<cnt/n;
return 0;
}Edwin0918
1510767
资料、奖项与版本
资料
- 编号
- 1510767
- 抓取
陶片放逐
- 无权限变更
个人介绍
文章
共 1 篇- 个人记录
WC2025 游记
上午上的课怎么也听不懂,到了下午啥都不会。 上课就干脆摆烂。