#include using namespace std; typedef long long ll; int a[1000001],b[100001]; int main() { int t,n,i,ans; int flag=0; scanf("%d",&n); for(i=0;i