Contest1376 - "师创杯"烟台大学第二届ACM程序设计精英赛复现 B--Faultfinding

Description

Do you remember the game in which we find difference among several similar pictures? Now we change it into digital version. There are N digits, same or different. Please find how many different digits there are among them and output the number.

Input

Each group of the first line is N (1<=N<=10000). The second line consists N integers.

Output

The number of different digits.

Sample Input

2
1 1
3 
1 2 3

Sample Output

1
3

HINT

代码:

#include 
using namespace std;
void sort(int my[],int n){
    int temp;
    for(int i=0;imy[j+1]){
            temp=my[j];
            my[j]=my[j+1];
            my[j+1]=temp;
        }
    }
}
void fun(int my[],int n){
    int count=n;
    for(int i=0;i>n){
        int my[n];
        i=0;
        while(i>my[i++];
        }
        sort(my,n);
        fun(my,n);
        i++;
    }

    return 0;
}


运行结果:

Contest1376 -

你可能感兴趣的:(模拟只会猜题意)