Help me in solving CAPPLE problem

My issue

tell where my code is worng and please correct it

My code

#include<iostream>
#include<string.h>
using namespace std;
int main(){
     int T;
     cin>>T;
     for(int i=0;i<T;i++){
         string N;
         cin>>N;
            int count=0;
            int n= N[n];
            for(int j=0;j<n;j++){
            if(n==n){
                cout<<"1"<<endl;
            }else{
                count++;
            }
         }
     }
     return 0;
}

Problem Link: CAPPLE Problem - CodeChef

@varshini_d543
plzz refer my c++ code for better understanding of logic .
I have done it in much simpler way. Hope u will get it.

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    int n;
	    cin>>n;
	    int a[n];
	    set<int> s;
	    for(int i=0;i<n;i++)
	    {
	        cin>>a[i];
	        s.insert(a[i]);
	    }
	    cout<<s.size()<<endl;
	}
	return 0;
}