Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#2 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#3 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#4 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#5 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#6 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#7 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#8 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#9 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
||
#10 |
Error de compilación
main.c:30:26: error: subscripted value is not an array, pointer, or vector if (num_edificios[k] > nums_edificios[j]) ~~~~~~~~~~~~~^~ main.c:30:32: error: use of undeclared identifier 'nums_edificios' if (num_edificios[k] > nums_edificios[j]) ^ main.c:32:41: error: subscripted value is not an array, pointer, or vector printf(" %li", num_edificios[k]); ~~~~~~~~~~~~~^~ 3 errors generated. |
/* Code by Eduardo Vega */ #include <stdio.h> #include <stdlib.h> int main () { long int casos = 0, num_edificios = 0, altura = 0, mayor = 0, found = 0, i, j, k; long int *edificios = NULL; scanf("%li", &casos); for (i = 0; i < casos; i++) { scanf("%li", &num_edificios); edificios = malloc(sizeof(long int) * num_edificios); for (j = 0; j < num_edificios; j++) { scanf("%li", &altura); edificios[j] = altura; } printf("Case #%li:", i + 1); for (j = 0; j < num_edificios; j++) { found = 0; for(k = 1; k < num_edificios; k++) { if (num_edificios[k] > nums_edificios[j]) { printf(" %li", num_edificios[k]); found = 1; break; } } if (found == 0) printf(" %d", -1); } putchar('\n'); free(edificios); } return 0; }