#include using namespace std; int read() { int x=0,f=1;char ch=getchar(); while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();} while (ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int n,T,ans; map mp; int main() { T=read(); while (T--) { n=read(); mp.clear(); ans=1,mp[read()]=true; for (int i=2;i<=n;i++) { int x=read(); if (!mp[x]) mp[x]=true; else { mp.clear(); mp[x]=true; ++ans; } } cout<