#include #include #include typedef long long TYPE; inline TYPE input() { static int c,t; static TYPE k;k=0;t=1; do c=getchar(); while((c<'0'||c>'9')&&c!='-'); if(c=='-')c=getchar(),t=-1; do k=k*10+c-'0',c=getchar(); while(c>='0'&&c<='9'); return k*t; } int main() { int T=input(); for(int i=1;i<=T;++i) { int N=input(),cnt=1; std::setse; for(int i=1;i<=N;++i) { TYPE x=input(); if(se.count(x)!=0) { ++cnt; std::set().swap(se); }se.insert(x); }printf("%d\n",cnt); } return 0; }