Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.065 s | 6 KBi |
#2 |
Incorrecto
|
0.049 s | 6 KBi |
#3 |
Incorrecto
|
0.048 s | 7 KBi |
#4 |
Incorrecto
|
0.062 s | 6 KBi |
#5 |
Incorrecto
|
0.056 s | 7 KBi |
#6 |
Incorrecto
|
0.156 s | 25 KBi |
#7 |
Incorrecto
|
0.065 s | 7 KBi |
#8 |
Incorrecto
|
0.057 s | 7 KBi |
#9 |
Incorrecto
|
0.056 s | 7 KBi |
#10 |
Incorrecto
|
0.059 s | 7 KBi |
#11 |
Incorrecto
|
0.06 s | 6 KBi |
#12 |
Incorrecto
|
0.064 s | 6 KBi |
var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); function lineCounter(line = 0) { return ++line } function isSorted(arr) { let sorted = true for (let i = 1; i < arr.length; i++) { if (arr[i] < arr[i - 1]) { sorted = false; break; } } return sorted } rl.on("line", function(line, lineNum = lineCounter()) { var parts = line.split(" ").map(Number); console.log(isSorted(parts) ? "Ordenado" : "Desordenado") });