Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.006 s | 7 KBi |
#2 |
Correcto
|
0.007 s | 19 KBi |
#3 |
Correcto
|
0.005 s | 6 KBi |
#4 |
Correcto
|
0.005 s | 7 KBi |
#5 |
Correcto
|
0.005 s | 6 KBi |
#6 |
Correcto
|
0.006 s | 7 KBi |
#7 |
Correcto
|
0.006 s | 13 KBi |
#8 |
Correcto
|
0.007 s | 20 KBi |
#9 |
Correcto
|
0.006 s | 6 KBi |
#10 |
Correcto
|
0.008 s | 6 KBi |
#11 |
Correcto
|
0.008 s | 16 KBi |
#12 |
Correcto
|
0.007 s | 6 KBi |
package main import "fmt" func main() { var n int fmt.Scanf("%d", &n) a := make([]int, n) for i := 0; i < n; i++ { fmt.Scanf("%d", &a[i]) } lastnumber := a[0] for i := 1; i < n; i++ { if lastnumber > a[i] { fmt.Println("Desordenado") return } lastnumber = a[i] } fmt.Println("Ordenado") }