// A题 #include <bits/stdc++.h> using namespace std; const int N=1200; int a[N],pos[N]; int main(){ freopen("1.in","r",stdin); int n; scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&a[i]); pos[a[i]]=i; }...