Thanks for that, but i sent it again but got WA again. What happens when there is a negative number or greater than 16? Should I count them as a blank case?
Like this:
I have corrected some mistakes in my initial code, but I still get WA. What I'm missing?
#include <stdio.h> #include <stdlib.h> #define MAX 16 int visitados[MAX]; int primos[33]={0,0,1,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0}; int prim[MAX][MAX]; void primInit(int prim[MAX][MAX ...
I have tried different inputs for the problem and it gives the right answer, but i get WA all the times. Is there anything wrong? or there is a special input for the problem, because what if i read a character that is different to '.' or 'X'? Do i have to consider them as a block or a free space ...
I keep getting wrong answer, what i am doing wrong?
#include <stdio.h> #include <stdlib.h> int proceso(long num){ int cont = 1; while( num != 1){ if (num % 2 == 1) num = 3*num+1; else num = num/2; cont++; } return cont; } void ciclo3n(int n1,int n2, int *max){ int i; int maximo = proceso ...
I tried solving this problem using double linked list but i get WA :( . The procedures "anadirDerecha" and "anadirIzquierda" means adding elements at the end and beginning of the list respectively. The process "suma" means adding elements from two list and saving it in the list listaSum and it uses ...