Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.061 s | 6 KBi |
#2 |
Incorrecto
|
0.063 s | 7 KBi |
#3 |
Incorrecto
|
0.057 s | 7 KBi |
#4 |
Incorrecto
|
0.084 s | 7 KBi |
#5 |
Incorrecto
|
0.066 s | 7 KBi |
#6 |
Incorrecto
|
0.036 s | 6 KBi |
#7 |
Incorrecto
|
0.037 s | 6 KBi |
#8 |
Incorrecto
|
0.048 s | 7 KBi |
#9 |
Incorrecto
|
0.084 s | 7 KBi |
#10 |
Incorrecto
|
0.035 s | 7 KBi |
#11 |
Incorrecto
|
0.037 s | 6 KBi |
#12 |
Incorrecto
|
0.063 s | 7 KBi |
let firstLine = ""; let secondLine = ""; let listVerify = []; process.stdin.on("data", async (line) => { if (!firstLine) { firstLine = line.toString(); } else if (!secondLine) { secondLine = line.toString().trim(); } if (firstLine && secondLine) { let listLengthInput = Number(firstLine); let numbersList = secondLine.split(/\s+/); if (listLengthInput === numbersList.length) { for (let index = 0; index < listLengthInput - 1; index++) { let num = numbersList[index]; let numi = numbersList[index + 1]; listVerify.push(num >= numi); } if (listVerify.some((bool) => bool === false)) { console.log("Desordenado"); } else { console.log("Ordenado"); } } } });