Wrong Answer
Code
#include <stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int a;
scanf("%d", &a);
int arr[a];
int check[a];
for (int i = 0; i < a; i++)
{
scanf("%d", &arr[i]);
check[arr[i] - 1] = 1;
}
int yes = 1;
for (int i = 0; i < a; i++)
{
if (check[i] != 1)
{
yes = 0;
break;
}
}
if (yes == 1)
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1055 Array Permutation
- Contest
- Brain Booster #3
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-05-06 15:16:04
- Judged At
- 2024-11-11 03:34:50
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 516.0 KiB