代码: #include<bits/stdc++.h> using namespace std; typedef long long ll; ll a[1000010]; int main() { ll n