#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pint; typedef vector vint; typedef vector vpint; #define mp make_pair #define fi first #define se second #define all(v) (v).begin(),(v).end() #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) int a[101]; int n; void sort(void){ bool zerof = 1; bool flag = 1; for (int i = 0; flag; ++i){ flag = 0; for (int j = n - 1; j >= i ; --j){ if(a[j] < a[j - 1]){ swap(a[j], a[j - 1]); printf("%d %d\n", j - 1, j); flag = 1; zerof = 0; } } } if(zerof) printf("0\n"); return; } int main(void){ cin >> n; rep(i, n) cin >> a[i]; sort(); int d; cin >> d; return 0; }