Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.152 s | 15 KBi |
#2 |
Incorrecto
|
0.195 s | 12 KBi |
#3 |
Incorrecto
|
0.171 s | 15 KBi |
#4 |
Correcto
|
0.18 s | 16 KBi |
#5 |
Incorrecto
|
0.164 s | 16 KBi |
#6 |
Correcto
|
0.172 s | 16 KBi |
#7 |
Correcto
|
0.186 s | 12 KBi |
#8 |
Correcto
|
0.182 s | 15 KBi |
#9 |
Correcto
|
0.192 s | 12 KBi |
#10 |
Incorrecto
|
0.175 s | 16 KBi |
#11 |
Incorrecto
|
0.172 s | 15 KBi |
#12 |
Incorrecto
|
0.235 s | 18 KBi |
#13 |
Incorrecto
|
0.294 s | 14 KBi |
#14 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.99 s | 125 KBi |
#15 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.963 s | 125 KBi |
#16 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.963 s | 125 KBi |
#17 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.867 s | 125 KBi |
#18 |
Error en tiempo de ejecución (NZEC)
Exited with error status 137 run: line 1: 3 Killed /usr/local/openjdk13/bin/java Main |
0.916 s | 125 KBi |
#19 |
Tiempo límite excedido
|
1.005 s | 125 KBi |
#20 |
Tiempo límite excedido
|
1.092 s | 114 KBi |
import java.util.Scanner; public class Main { public static void main(String[] args) { Data data = readNumsFromStdin(); // long totalSum = calculateTotalSum(data.numbers); // long leftSum = 0; // long rightSum = totalSum; // // for (int i = 0; i < data.totalNumbers - 1; i++) { // leftSum += data.numbers[i]; // rightSum -= data.numbers[i]; // // if (leftSum > 0 && rightSum < 0) { // System.out.println(i + 1); // return; // } // } System.out.println("Impossible"); } private static long calculateTotalSum(int[] numbers) { long sum = 0; for (int num : numbers) { sum += num; } return sum; } private static Data readNumsFromStdin() { Data data = new Data(); Scanner in = new Scanner(System.in); data.totalNumbers = in.nextInt(); data.numbers = new int[data.totalNumbers]; readArrayFromStdin(data.numbers, data.totalNumbers, in); return data; } private static void readArrayFromStdin(int[] array, int count, Scanner in) { for (int i = 0; i < count; i++) { array[i] = in.nextInt(); } } private static class Data { int totalNumbers; int[] numbers; } }