#include<bits/stdc++.h>
      using namespace std;
      int main()
       {
       {
      	int T;
      	cin>>T;
      	while(T--){
      	    int N;
      	    cin>>N;
      	    long long int ele;
      	    unordered_set<unsigned long int>us;
      	    for(int i=0;i<N;i++){
      	        cin>>ele;
      	        us.insert(abs(ele));
      	    }
      	    cout<<us.size()<<endl;
      	}
      	return 0;
      }
      
      Cpp language logo

      Distinct_absolute_array

      0

      0

      avatar
      virendrakgarg

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.