My issue
i have solved this same problem on another account with the same code without any errors, but when i run it on this account it doesn’t work.
My code
#include <stdio.h>
int solve()
{
int N, i;
scanf("%d", &N);
int A[N];
for (i = 0; i < N; i++)
{
scanf("%d", &A[i]);
}
for (i = 1; i < N; i++);
{
if (A[i] < A[i - 1])
{
printf("no\n");
return;
}
}
printf("yes\n");
}
int main()
{
int T;
scanf("%d", &T);
while(T--)
{
solve();
}
return 0;
}
Learning course: Arrays using C
Problem Link: CodeChef: Practical coding for everyone