https://codeforces.com/contest/1678A.Tokitsukaze and All Zero Sequence1234567891011121314151617181920212223242526272829303132333435intn;inta[MAXN];inlinevoidwork(signedCASE=1,boolFINAL_CASE=false){n=read();intzero=0;sets;for(inti=1;i<=n;i++){intx=read();zero+=(x==0);s.insert(x);}if(zero){printf("%d\n",n-zero);return;}intk=n-sz(s);if(k==0){printf("%d\n",n+1);}else{printf("%d\n",n);}return;}signedmain(){// ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); //freopen(".in", "r", stdin);//freopen(".out", "w", stdout);signedT=(signed)read();//scanf("%d",&T;);//cin>>T;for(signedCASE=1
...
继续阅读
(13)