Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.069 s | 10 KBi |
#2 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.074 s | 11 KBi |
#3 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.045 s | 14 KBi |
#4 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.043 s | 14 KBi |
#5 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.074 s | 10 KBi |
#6 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.046 s | 14 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.039 s | 14 KBi |
#8 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.041 s | 13 KBi |
#9 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.068 s | 10 KBi |
#10 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.045 s | 14 KBi |
#11 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.043 s | 14 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at Main.main(Main.java:14) |
0.043 s | 14 KBi |
import java.io.*; import java.util.StringTokenizer; class Main { public static void main(String[] args) throws IOException{ BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(bf.readLine()); long cantidad = Long.parseLong(st.nextToken()); if(cantidad == 1){ System.out.println("Ordenado"); }else{ long menor = Long.parseLong(st.nextToken());; long contador = 1; while(st.hasMoreTokens()){ long mayor = Long.parseLong(st.nextToken()); if(mayor>=menor){ menor=mayor; contador++; } } if(contador==cantidad){ System.out.println("Ordenado"); }else{ System.out.println("Desordenado"); } } } }