Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.045 s | 6 KBi |
#2 |
Incorrecto
|
0.06 s | 7 KBi |
#3 |
Incorrecto
|
0.065 s | 7 KBi |
#4 |
Incorrecto
|
0.05 s | 7 KBi |
#5 |
Incorrecto
|
0.051 s | 7 KBi |
#6 |
Incorrecto
|
0.05 s | 7 KBi |
#7 |
Incorrecto
|
0.078 s | 32 KBi |
#8 |
Incorrecto
|
0.051 s | 6 KBi |
#9 |
Incorrecto
|
0.052 s | 6 KBi |
#10 |
Incorrecto
|
0.069 s | 7 KBi |
#11 |
Incorrecto
|
0.054 s | 6 KBi |
#12 |
Incorrecto
|
0.076 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"); } } } });