diff --git a/Beautifularrays_makrand.c b/Beautifularrays_makrand.c new file mode 100644 index 0000000..3fdadc7 --- /dev/null +++ b/Beautifularrays_makrand.c @@ -0,0 +1,39 @@ +#include + +int main(void) { + // your code goes here + int T=0; + scanf("%d",&T); + while(T--){ + int n=0,ones=0,zeroes=0,minus_ones=0,other=0; + scanf("%d",&n); + int arr[n]; + for(int i=0;i1) + printf("no\n"); + else if(other==1) + { + if(minus_ones!=0) + printf("no\n"); + else + printf("yes\n"); + } + else + { + if(other==0&&minus_ones>1&&ones==0) + printf("no\n"); + else + printf("yes\n"); + } + + } + + return 0; +}