给原排列 求 其前面有多少个数比他大。
给每一个数1...2..n前面有多少个数比他大,求原序列
第一个直接统计
第二个从1開始找出第inv【i】+1个空位置放进去就好
printf里的format 原来能够用if表达式 - -
#includeusing namespace std;int n;void Gao(){ int a[100],b[100]={0}; char ch; getchar(); ch=getchar(); if (ch=='P') { for (int i=0;i >n && n) Gao(); return 0;}