Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.062 s | 6 KBi |
#2 |
Incorrecto
|
0.058 s | 7 KBi |
#3 |
Incorrecto
|
0.059 s | 7 KBi |
#4 |
Incorrecto
|
0.065 s | 6 KBi |
#5 |
Incorrecto
|
0.06 s | 6 KBi |
#6 |
Incorrecto
|
0.057 s | 7 KBi |
#7 |
Incorrecto
|
0.066 s | 6 KBi |
#8 |
Incorrecto
|
0.053 s | 7 KBi |
#9 |
Incorrecto
|
0.056 s | 6 KBi |
#10 |
Incorrecto
|
0.059 s | 7 KBi |
#11 |
Incorrecto
|
0.064 s | 6 KBi |
#12 |
Incorrecto
|
0.059 s | 7 KBi |
var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); function isSorted(arr) { let previousItem = Number.POSITIVE_INFINITY return arr.some((item, index) => { const sorted = item > previousItem previousItem = item return sorted }) } rl.on("line", function(line) { var parts = line.split(" ").map(Number); console.log(isSorted(parts) ? "Ordenado" : "Desordenado") });