Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#2 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#3 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#4 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#5 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#6 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#7 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#8 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#9 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#10 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#11 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#12 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#13 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#14 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#15 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#16 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#17 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#18 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#19 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
||
#20 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import java.io.BufferedReader; ^ main.c:1:12: error: expected ';' after top level declarator import java.io.BufferedReader; ^ ; main.c:2:1: error: unknown type name 'import' import java.io.InputStreamReader; ^ main.c:2:12: error: expected ';' after top level declarator import java.io.InputStreamReader; ^ ; main.c:3:1: error: unknown type name 'import' import java.util.StringTokenizer; ^ main.c:3:12: error: expected ';' after top level declarator import java.util.StringTokenizer; ^ ; main.c:5:1: error: unknown type name 'public' public class Main { ^ main.c:5:13: error: expected ';' after top level declarator public class Main { ^ ; 8 errors generated. |
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { // O(n) public static void main(String[] args) throws Throwable { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; for(String ln; (ln=in.readLine())!=null;) { int N = Integer.parseInt(ln); st = new StringTokenizer(in.readLine()); int[] values = new int[N]; int left =0, total =0, right = 0; for(int i=0;i<N;i++) { right+= values[i] = Integer.parseInt(st.nextToken()); } for( int p=0; p<N; p++){ if(left>0 && right<0){ System.out.println(p); return; } right -=values[p]; left+=values[p]; } System.out.println("Impossible"); } } }