using namespace std;
int main()
{
int n, ans = 0;
int count[129] = { 0 };
cin >> n;
int *arr = new int[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (arr[j] == arr[i])
count[arr[j]]++;
if (count[arr[j]] > 1)
{
ans = 1;
break;
}
}
if (ans == 1)
break;
}
if (ans == 0)
cout << "1" << endl;
else
cout << "0" << endl;
return 0;
}
沒有留言:
張貼留言