#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t;
  int n, i, j, ele, count;
  scanf("%d", &t);
  while (t--) {
    count = 0;
    scanf("%d", &n);
    int arr[102] = {0};
    for (i = 0; i < n; ++i) {
      scanf("%d", &ele);
      arr[ele] = 1;
    }
    for (i = 1; i <= 100; i++)
      if (arr[i] != 0)
        count++;
    printf("%d\n", count);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1223 <main+0xf3>
movl   $0x0,-0x1c(%rbp)
lea    0xe8c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x198,%edx
call   1040 <memset@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11d0 <main+0xa0>
lea    0xe56(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0x18(%rbp),%rax
movl   $0x1,-0x1c0(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1197 <main+0x67>
movl   $0x1,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jg     120f <main+0xdf>
movslq -0x10(%rbp),%rax
cmpl   $0x0,-0x1c0(%rbp,%rax,4)
je     11fc <main+0xcc>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1201 <main+0xd1>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11d7 <main+0xa7>
mov    -0x1c(%rbp),%esi
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <main+0x22>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xec8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
subl   $0x1,0x8(%rsp)
jae    116d <main+0x3d>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe9c(%rip),%rbx
lea    0x4(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0xe89(%rip),%r13
jmp    11b5 <main+0x85>
nopl   0x0(%rax)
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%esi
mov    %r13,%rdi
call   1030 <printf@plt>
subl   $0x1,0x8(%rsp)
jb     1159 <main+0x29>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
mov    $0x198,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
cmpl   $0x0,0x4(%rsp)
jle    1201 <main+0xd1>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     11e0 <main+0xb0>
pxor   %xmm0,%xmm0
mov    $0xd,%eax
pxor   %xmm4,%xmm4
pcmpeqd %xmm5,%xmm5
movdqa 0xde6(%rip),%xmm6
nopw   0x0(%rax,%rax,1)
movdqu -0x20(%rsp,%rax,4),%xmm1
pcmpeqd %xmm4,%xmm1
paddd  %xmm0,%xmm1
psubd  %xmm5,%xmm1
cmp    $0x6d,%rax
je     1190 <main+0x60>
movdqu -0x10(%rsp,%rax,4),%xmm2
movdqu (%rsp,%rax,4),%xmm3
movdqu 0x10(%rsp,%rax,4),%xmm0
pcmpeqd %xmm4,%xmm2
paddd  %xmm2,%xmm1
pcmpeqd %xmm4,%xmm3
pcmpeqd %xmm4,%xmm0
paddd  %xmm3,%xmm0
paddd  %xmm1,%xmm0
paddd  %xmm6,%xmm0
add    $0x10,%rax
jmp    1220 <main+0xf0>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [102 x i32]
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %10
10: ; preds = %46, %0
%11 = load i32, i32* %2
%12 = add nsw i32 %11, -1
store i32 %12, i32* %2
%13 = icmp ne i32 %11, 0
br i1 %13, label %14, label %49
14: ; preds = %10
store i32 0, i32* %7
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%16 = bitcast [102 x i32]* %8 to i8*
store i32 0, i32* %4
br label %17
17: ; preds = %26, %14
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [102 x i32], [102 x i32]* %8, i64 0, i64 %24
store i32 1, i32* %25
br label %26
26: ; preds = %21
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %17
29: ; preds = %17
store i32 1, i32* %4
br label %30
30: ; preds = %43, %29
%31 = load i32, i32* %4
%32 = icmp sle i32 %31, 100
br i1 %32, label %33, label %46
33: ; preds = %30
%34 = load i32, i32* %4
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [102 x i32], [102 x i32]* %8, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %33
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %42
42: ; preds = %39, %33
br label %43
43: ; preds = %42
%44 = load i32, i32* %4
%45 = add nsw i32 %44, 1
store i32 %45, i32* %4
br label %30
46: ; preds = %30
%47 = load i32, i32* %7
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %47)
br label %10
49: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [102 x i32]
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = add nsw i32 %9, -1
store i32 %10, i32* %1
%11 = icmp eq i32 %9, 0
br i1 %11, label %68, label %12
12: ; preds = %0
%13 = bitcast [102 x i32]* %4 to i8*
br label %14
14: ; preds = %12, %53
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 0
br i1 %17, label %59, label %18
18: ; preds = %59, %14
br label %19
19: ; preds = %30, %18
%20 = phi i64 [ 0, %18 ], [ %52, %30 ]
%21 = phi <4 x i32> [ zeroinitializer, %18 ], [ %51, %30 ]
%22 = or i64 %20, 1
%23 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 %22
%24 = bitcast i32* %23 to <4 x i32>*
%25 = load <4 x i32>, <4 x i32>* %24
%26 = icmp ne <4 x i32> %25, zeroinitializer
%27 = zext <4 x i1> %26 to <4 x i32>
%28 = add <4 x i32> %21, %27
%29 = icmp eq i64 %20, 96
br i1 %29, label %53, label %30
30: ; preds = %19
%31 = or i64 %20, 5
%32 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 %31
%33 = bitcast i32* %32 to <4 x i32>*
%34 = load <4 x i32>, <4 x i32>* %33
%35 = icmp ne <4 x i32> %34, zeroinitializer
%36 = zext <4 x i1> %35 to <4 x i32>
%37 = add <4 x i32> %28, %36
%38 = or i64 %20, 9
%39 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 %38
%40 = bitcast i32* %39 to <4 x i32>*
%41 = load <4 x i32>, <4 x i32>* %40
%42 = icmp ne <4 x i32> %41, zeroinitializer
%43 = zext <4 x i1> %42 to <4 x i32>
%44 = add <4 x i32> %37, %43
%45 = or i64 %20, 13
%46 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 %45
%47 = bitcast i32* %46 to <4 x i32>*
%48 = load <4 x i32>, <4 x i32>* %47
%49 = icmp ne <4 x i32> %48, zeroinitializer
%50 = zext <4 x i1> %49 to <4 x i32>
%51 = add <4 x i32> %44, %50
%52 = add nuw nsw i64 %20, 16
br label %19
53: ; preds = %19
%54 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %28)
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %1
%57 = add nsw i32 %56, -1
store i32 %57, i32* %1
%58 = icmp eq i32 %56, 0
br i1 %58, label %68, label %14
59: ; preds = %14, %59
%60 = phi i32 [ %65, %59 ], [ 0, %14 ]
%61 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 %63
store i32 1, i32* %64
%65 = add nuw nsw i32 %60, 1
%66 = load i32, i32* %2
%67 = icmp slt i32 %65, %66
br i1 %67, label %59, label %18
68: ; preds = %53, %0
ret i32 0
}