Can somebody tell me why i am getting runtime error for this C program ?(i have the same error with my other programs as well).Its working fine in my compiler.
printf("not ambiguous \n");
Your program will not end if there is no 0 in input, you should try
if (n==0) break;
The first line of each test case
contains an integer n (1 ? n ?
100000). Then a permutation of the
integers 1 to n follows in the next
line. There is exactly one space
character between consecutive
integers. You can assume that every
integer between 1 and n appears
exactly once in the permutation.
it says “100000”. have a look at your a and b arrays …
i tried it…but its not working…besides the the program is supposed to end only when there is a 0.