Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#2 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#3 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#4 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#5 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#6 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#7 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#8 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#9 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#10 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#11 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
||
#12 |
Error de compilación
main.c:1:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const readline = require("readline"); ~~~~~ ^ main.c:1:18: warning: implicit declaration of function 'require' is invalid in C99 [-Wimplicit-function-declaration] const readline = require("readline"); ^ main.c:1:18: error: initializer element is not a compile-time constant const readline = require("readline"); ^~~~~~~~~~~~~~~~~~~ main.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const rl = readline.createInterface({ ~~~~~ ^ main.c:2:20: error: member reference base type 'const int' is not a structure or union const rl = readline.createInterface({ ~~~~~~~~^~~~~~~~~~~~~~~~ main.c:2:37: error: expected expression const rl = readline.createInterface({ ^ main.c:8:1: error: unknown type name 'function' function getNumbers(n) { ^ main.c:9:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const parts = line.split(" ").slice(0, n); ~~~~~ ^ main.c:9:19: error: use of undeclared identifier 'line' const parts = line.split(" ").slice(0, n); ^ main.c:10:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ~~~~~ ^ main.c:10:25: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:31: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:33: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:48: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:60: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:63: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:67: error: expected expression const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:69: error: use of undeclared identifier 'a' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:73: error: use of undeclared identifier 'b' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:10:50: error: use of undeclared identifier 'arr' const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); ^ main.c:11:11: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~ ^ main.c:11:30: error: called object type 'int' is not a function or function pointer const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; ~~~~~~~~~~^ main.c:12:5: error: use of undeclared identifier 'console' console.log(estado); ^ main.c:15:1: error: unknown type name 'rl' rl.once("line", (line) => { ^ main.c:15:3: error: expected identifier or '(' rl.once("line", (line) => { ^ 6 warnings and 19 errors generated. |
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); function getNumbers(n) { const parts = line.split(" ").slice(0, n); const inAscOrder = (arr) => arr.join("") === arr.sort((a, b) => a - b).join(""); const estado = inAscOrder(parts) ? "Ordenado" : "Desordenado"; console.log(estado); } rl.once("line", (line) => { const numberOfEntries = line.split(" ").slice(0, 1)[0]; const numberOfEntriesInt = parseInt(numberOfEntries, 10); getNumbers(numberOfEntries) });