Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdbool.h>
- #include <stdio.h>
- #include <math.h>
- #include <string.h>
- #include <ctype.h>
- void main()
- {
- int n, a[150];
- bool x = false;
- scanf("%d", &n);
- for (int i = 0; i < n; i++)
- {
- scanf("%d", &a[i]);
- }
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- if (a[i] == a[j] && j != i)
- x = true;
- }
- }
- x ? printf("NO") : printf("YES");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement