code stringlengths 31 2.27k | tokenized_code stringlengths 30 1.69k | sexp stringlengths 115 9.43k |
|---|---|---|
public static void main ( String args [ ] ) {
Main main = new Main ( ) ;
main . start ( ) ;
}
| public static void main ( String args [ ] ) { Main main = new Main ( ) ; main . start ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_... |
public static void main ( String [ ] args ) {
new Main ( ) . compute ( ) ;
}
| public static void main ( String [ ] args ) { new Main ( ) . compute ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (method_invocation object: (object_creation_expression type: (type_identifi... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
Scanner in = new Scanner ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
D1 solver = new D1 ( ) ;
solver . solve ( 1 , in , out ) ;
out . close ( ) ;
}
| public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; Scanner in = new Scanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; D1 solver = new D1 ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] $ ) {
Scanner sc = new Scanner ( in ) ;
int n = sc . nextInt ( ) ;
out . println ( ans ( n , 0 ) ) ;
}
| public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int n = sc . nextInt ( ) ; out . println ( ans ( n , 0 ) ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
static int ans ( int n , int c ) {
if ( c == 10 ) return 0 ;
int temp = 0 ;
if ( ( 1 + n ) % power ( 10 , c + 1 ) >= 2 * power ( 10 , c ) ) {
temp = power ( 10 , c ) ;
}
else if ( ( 1 + n ) % power ( 10 , c + 1 ) > power ( 10 , c ) ) {
temp = ( n + 1 ) % power ( 10 , c + 1 ) - power ( 10 , c ) ;
}
... | static int ans ( int n , int c ) { if ( c == 10 ) return 0 ; int temp = 0 ; if ( ( 1 + n ) % power ( 10 , c + 1 ) >= 2 * power ( 10 , c ) ) { temp = power ( 10 , c ) ; } else if ( ( 1 + n ) % power ( 10 , c + 1 ) > power ( 10 , c ) ) { temp = ( n + 1 ) % power ( 10 , c + 1 ) - power ( 10 , c ) ; } return ans ( n , c + ... | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (ident... |
static int power ( int n , int m ) {
if ( m == 0 ) return 1 ;
if ( m % 2 == 1 ) return power ( n , m - 1 ) * n ;
int e = power ( n , m / 2 ) ;
return e * e ;
}
| static int power ( int n , int m ) { if ( m == 0 ) return 1 ; if ( m % 2 == 1 ) return power ( n , m - 1 ) * n ; int e = power ( n , m / 2 ) ; return e * e ; } | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
long n = sc . nextInt ( ) ;
long count = 0 ;
for ( int i = 0 ;
i < 11 ;
i ++ ) {
count += ( n / pow10 ( i + 1 ) ) * pow10 ( i ) ;
long target = ( n % pow10 ( i + 1 ) ) / pow10 ( i ) ;
if ( target > 1 ) {
... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long n = sc . nextInt ( ) ; long count = 0 ; for ( int i = 0 ; i < 11 ; i ++ ) { count += ( n / pow10 ( i + 1 ) ) * pow10 ( i ) ; long target = ( n % pow10 ( i + 1 ) ) / pow10 ( i ) ; if ( target > 1 ) { count += pow10 ( i ) ; } el... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
static long pow10 ( int n ) {
if ( n == 0 ) {
return 1 ;
}
else {
return 10 * pow10 ( n - 1 ) ;
}
}
| static long pow10 ( int n ) { if ( n == 0 ) { return 1 ; } else { return 10 * pow10 ( n - 1 ) ; } } | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (bloc... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
int souwa = 0 ;
souwa += N / 10 ;
if ( N % 10 >= 1 ) {
souwa ++ ;
}
souwa += N / 100 * 10 ;
if ( N % 100 >= 10 ) {
souwa += Math . min ( N % 100 - 9 , 10 ) ;
}
souwa += N / 100... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int souwa = 0 ; souwa += N / 10 ; if ( N % 10 >= 1 ) { souwa ++ ; } souwa += N / 100 * 10 ; if ( N % 100 >= 10 ) { souwa += Math . min ( N % 100 - 9 , 10 ) ; } souwa += N / 1000 * 100 ; if ( N % 1000 >= 1... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int [ ] a = new int [ 3 ] ;
for ( int i = 0 ;
i < 3 ;
i ++ ) a [ i ] = Integer . parseInt ( sc . next ( ) ) ;
int c = 0 ;
while ( true ) {
Arrays . sort ( a ) ;
if ( a [ 0 ] == a [ 1 ] && a [ 1 ] == a [ 2 ] ) ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int [ ] a = new int [ 3 ] ; for ( int i = 0 ; i < 3 ; i ++ ) a [ i ] = Integer . parseInt ( sc . next ( ) ) ; int c = 0 ; while ( true ) { Arrays . sort ( a ) ; if ( a [ 0 ] == a [ 1 ] && a [ 1 ] == a [ 2 ] ) break ; else if ( a [ ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws IOException {
BufferedReader r = new BufferedReader ( new InputStreamReader ( System . in ) , 1 ) ;
String [ ] sl = r . readLine ( ) . split ( "[\\s]+" ) ;
int a = Integer . parseInt ( sl [ 0 ] ) ;
int b = Integer . parseInt ( sl [ 1 ] ) ;
int c = Integer . p... | public static void main ( String [ ] args ) throws IOException { BufferedReader r = new BufferedReader ( new InputStreamReader ( System . in ) , 1 ) ; String [ ] sl = r . readLine ( ) . split ( " [ \\ s ] + " ) ; int a = Integer . parseInt ( sl [ 0 ] ) ; int b = Integer . parseInt ( sl [ 1 ] ) ; int c = Integer . parse... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
new Main ( ) . solveA ( ) ;
}
| public static void main ( String [ ] args ) { new Main ( ) . solveA ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (method_invocation object: (object_creation_expression type: (type_identifi... |
public static void main ( String [ ] args ) throws IOException {
init ( System . in ) ;
int [ ] abc = new int [ 3 ] ;
for ( int i = 0 ;
i < abc . length ;
i ++ ) abc [ i ] = nextInt ( ) ;
Arrays . sort ( abc ) ;
int diff1 = abc [ 2 ] - abc [ 0 ] ;
int diff2 = abc [ 2 ] - abc [ 1 ] ;
if ( diff1 % 2 == ... | public static void main ( String [ ] args ) throws IOException { init ( System . in ) ; int [ ] abc = new int [ 3 ] ; for ( int i = 0 ; i < abc . length ; i ++ ) abc [ i ] = nextInt ( ) ; Arrays . sort ( abc ) ; int diff1 = abc [ 2 ] - abc [ 0 ] ; int diff2 = abc [ 2 ] - abc [ 1 ] ; if ( diff1 % 2 == 0 && diff2 % 2 == ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (expression_statement (method_invocation name: (identifier) arguments:... |
private static void init ( InputStream inputStream ) {
reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ;
tokenizer = new StringTokenizer ( "" ) ;
}
| private static void init ( InputStream inputStream ) { reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; tokenizer = new StringTokenizer ( " " ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_... |
private static String next ( ) throws IOException {
String read ;
while ( ! tokenizer . hasMoreTokens ( ) ) {
read = reader . readLine ( ) ;
if ( read == null || read . equals ( "" ) ) return "-1" ;
tokenizer = new StringTokenizer ( read ) ;
}
return tokenizer . nextToken ( ) ;
}
| private static String next ( ) throws IOException { String read ; while ( ! tokenizer . hasMoreTokens ( ) ) { read = reader . readLine ( ) ; if ( read == null || read . equals ( " " ) ) return " - 1" ; tokenizer = new StringTokenizer ( read ) ; } return tokenizer . nextToken ( ) ; } | (method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (while_statement condition: (parenthesized_expression (unary_expres... |
private static int nextInt ( ) throws IOException {
return Integer . parseInt ( next ( ) ) ;
}
| private static int nextInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list))))))) |
public static void main ( String [ ] args ) {
Scanner in = new Scanner ( System . in ) ;
String [ ] tokens = in . nextLine ( ) . split ( " " ) ;
List < Integer > values = new ArrayList < > ( ) ;
for ( String token : tokens ) {
values . add ( Integer . parseInt ( token ) ) ;
}
Collections . sort ( values... | public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; String [ ] tokens = in . nextLine ( ) . split ( " ▁ " ) ; List < Integer > values = new ArrayList < > ( ) ; for ( String token : tokens ) { values . add ( Integer . parseInt ( token ) ) ; } Collections . sort ( values ) ; int resul... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static int operation ( List < Integer > values ) {
if ( values . get ( 0 ) == values . get ( 2 ) ) {
return 0 ;
}
if ( values . get ( 0 ) == values . get ( 1 ) ) {
int result = values . get ( 2 ) - values . get ( 1 ) ;
values . set ( 0 , values . get ( 2 ) ) ;
values . set ( 1 , values . ge... | public static int operation ( List < Integer > values ) { if ( values . get ( 0 ) == values . get ( 2 ) ) { return 0 ; } if ( values . get ( 0 ) == values . get ( 1 ) ) { int result = values . get ( 2 ) - values . get ( 1 ) ; values . set ( 0 , values . get ( 2 ) ) ; values . set ( 1 , values . get ( 2 ) ) ; return res... | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invoca... |
public static void main ( String [ ] args ) throws IOException {
BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
int num = Integer . parseInt ( br . readLine ( ) ) ;
int tenNum = num / 10 ;
int remainder = num % 10 ;
int answer = 0 ;
if ( remainder * 15 > 100 ) {
answe... | public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int num = Integer . parseInt ( br . readLine ( ) ) ; int tenNum = num / 10 ; int remainder = num % 10 ; int answer = 0 ; if ( remainder * 15 > 100 ) { answer = ( tenNum + 1... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] $ ) {
Scanner sc = new Scanner ( in ) ;
int n = sc . nextInt ( ) ;
out . println ( n >= 10 ? min ( ( n / 10 ) * 100 + ( n % 10 ) * 15 , ( n / 10 + 1 ) * 100 ) : min ( n * 15 , 100 ) ) ;
}
| public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int n = sc . nextInt ( ) ; out . println ( n >= 10 ? min ( ( n / 10 ) * 100 + ( n % 10 ) * 15 , ( n / 10 + 1 ) * 100 ) : min ( n * 15 , 100 ) ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
FastScanner in = new FastScanner ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
TaskA solver = new TaskA ( ) ;
solver . solve ( 1 , in , out ) ;
out . cl... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskA solver = new TaskA ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
private static boolean isSpaceChar ( int c ) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == - 1 ;
}
| private static boolean isSpaceChar ( int c ) { return c == ' ▁ ' || c == ' \n ' || c == ' \r ' || c == ' \t ' || c == - 1 ; } | (method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: ... |
public static void main ( String [ ] args ) {
SC sc = new SC ( System . in ) ;
int N = sc . nextInt ( ) ;
pl ( Math . min ( ( ( N / 10 ) * 100 + ( N % 10 ) * 15 ) , ( ( N + 9 ) / 10 ) * 100 ) ) ;
}
| public static void main ( String [ ] args ) { SC sc = new SC ( System . in ) ; int N = sc . nextInt ( ) ; pl ( Math . min ( ( ( N / 10 ) * 100 + ( N % 10 ) * 15 ) , ( ( N + 9 ) / 10 ) * 100 ) ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void pl ( Object o ) {
System . out . println ( o ) ;
}
| public static void pl ( Object o ) { System . out . println ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static void p ( Object o ) {
System . out . print ( o ) ;
}
| public static void p ( Object o ) { System . out . print ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static boolean isPrime ( int a ) {
if ( a < 4 ) {
if ( a == 2 || a == 3 ) {
return true ;
}
else {
return false ;
}
}
else {
for ( int j = 2 ;
j * j <= a ;
j ++ ) {
if ( a % j == 0 ) {
return false ;
}
if ( a % j != 0 && ( j + 1 ) * ( j + 1 ... | public static boolean isPrime ( int a ) { if ( a < 4 ) { if ( a == 2 || a == 3 ) { return true ; } else { return false ; } } else { for ( int j = 2 ; j * j <= a ; j ++ ) { if ( a % j == 0 ) { return false ; } if ( a % j != 0 && ( j + 1 ) * ( j + 1 ) > a ) { return true ; } } return true ; } } | (method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
InputReader in = new InputReader ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
Task solver = new Task ( ) ;
solver . solve ( 1 , in , out ) ;
out . clos... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Task solver = new Task ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
int L = 2 * N - 1 ;
int [ ] a = new int [ L ] ;
for ( int i = 0 ;
i < L ;
i ++ ) a [ i ] = sc . nextInt ( ) ;
int min = 1 ;
int max = L ;
boolean b [ ] = new boolean [ L ] ;
while ( ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int L = 2 * N - 1 ; int [ ] a = new int [ L ] ; for ( int i = 0 ; i < L ; i ++ ) a [ i ] = sc . nextInt ( ) ; int min = 1 ; int max = L ; boolean b [ ] = new boolean [ L ] ; while ( min + 1 < max ) { int ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
static boolean satisfy ( boolean [ ] b ) {
int L = b . length ;
int N = ( L + 1 ) / 2 ;
int l = N - 1 ;
while ( l > 0 && b [ l ] != b [ l - 1 ] ) l -- ;
int r = N - 1 ;
while ( r < L - 1 && b [ r ] != b [ r + 1 ] ) r ++ ;
if ( l > 0 ) {
if ( r < L - 1 ) {
if ( b [ l ] == b [ r ] ) return b [ l ]... | static boolean satisfy ( boolean [ ] b ) { int L = b . length ; int N = ( L + 1 ) / 2 ; int l = N - 1 ; while ( l > 0 && b [ l ] != b [ l - 1 ] ) l -- ; int r = N - 1 ; while ( r < L - 1 && b [ r ] != b [ r + 1 ] ) r ++ ; if ( l > 0 ) { if ( r < L - 1 ) { if ( b [ l ] == b [ r ] ) return b [ l ] ; else return ( l + r )... | (method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (boolean_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identif... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
int [ ] [ ] A = new int [ N ] [ N ] ;
long sum = 0 ;
for ( int i = 0 ;
i < N ;
i ++ ) for ( int j = 0 ;
j < N ;
j ++ ) {
A [ i ] [ j ] = sc . nextInt ( ) ;
sum += A [ i ] [ j ] ;... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int [ ] [ ] A = new int [ N ] [ N ] ; long sum = 0 ; for ( int i = 0 ; i < N ; i ++ ) for ( int j = 0 ; j < N ; j ++ ) { A [ i ] [ j ] = sc . nextInt ( ) ; sum += A [ i ] [ j ] ; } sum /= 2 ; for ( int i ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner scanner = new Scanner ( System . in ) ;
int n = scanner . nextInt ( ) ;
long [ ] [ ] dist = new long [ n + 1 ] [ n + 1 ] ;
for ( int i = 1 ;
i <= n ;
++ i ) {
for ( int j = 1 ;
j <= n ;
++ j ) {
long a = scanner . nextInt ( ) ;
di... | public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; long [ ] [ ] dist = new long [ n + 1 ] [ n + 1 ] ; for ( int i = 1 ; i <= n ; ++ i ) { for ( int j = 1 ; j <= n ; ++ j ) { long a = scanner . nextInt ( ) ; dist [ i ] [ j ] = a ; } } long totalL... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
N = sc . nextInt ( ) ;
A = new int [ N ] [ N ] ;
for ( int i = 0 ;
i < N ;
i ++ ) {
for ( int j = 0 ;
j < N ;
j ++ ) {
A [ i ] [ j ] = sc . nextInt ( ) ;
}
}
System . out . println ( solve ( ) ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; N = sc . nextInt ( ) ; A = new int [ N ] [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < N ; j ++ ) { A [ i ] [ j ] = sc . nextInt ( ) ; } } System . out . println ( solve ( ) ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
static long solve ( ) {
boolean [ ] [ ] indirect = new boolean [ N ] [ N ] ;
for ( int i = 0 ;
i < N - 1 ;
i ++ ) {
for ( int j = i + 1 ;
j < N ;
j ++ ) {
for ( int k = 0 ;
k < N ;
k ++ ) {
if ( k == i || k == j ) continue ;
int ikj = A [ i ] [ k ] + A [ k ] [ j ] ;... | static long solve ( ) { boolean [ ] [ ] indirect = new boolean [ N ] [ N ] ; for ( int i = 0 ; i < N - 1 ; i ++ ) { for ( int j = i + 1 ; j < N ; j ++ ) { for ( int k = 0 ; k < N ; k ++ ) { if ( k == i || k == j ) continue ; int ikj = A [ i ] [ k ] + A [ k ] [ j ] ; int ij = A [ i ] [ j ] ; if ( ikj < ij ) { return - 1... | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (array_type element: (boolean_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (boolean_type)... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
n = sc . nextInt ( ) ;
dist = new int [ n ] [ n ] ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = 0 ;
j < n ;
j ++ ) {
dist [ i ] [ j ] = sc . nextInt ( ) ;
}
}
long sum = 0 ;
for ( int i ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; n = sc . nextInt ( ) ; dist = new int [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { dist [ i ] [ j ] = sc . nextInt ( ) ; } } long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i +... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String args [ ] ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
long [ ] [ ] A = new long [ N ] [ N ] ;
long [ ] [ ] D = new long [ N ] [ N ] ;
Boolean nes [ ] [ ] = new Boolean [ N ] [ N ] ;
for ( int i = 0 ;
i < N ;
i ++ ) {
for ... | public static void main ( String args [ ] ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; long [ ] [ ] A = new long [ N ] [ N ] ; long [ ] [ ] D = new long [ N ] [ N ] ; Boolean nes [ ] [ ] = new Boolean [ N ] [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < N ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (... |
public static void main ( String [ ] args ) {
try ( Scanner sc = new Scanner ( System . in ) ;
) {
new Main ( ) . solve ( sc ) ;
}
}
| public static void main ( String [ ] args ) { try ( Scanner sc = new Scanner ( System . in ) ; ) { new Main ( ) . solve ( sc ) ; } } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (try_with_resources_statement resources: (resource_specification (resource type: (type_identifier... |
public static void main ( String args [ ] ) {
new Main ( ) . run ( ) ;
}
| public static void main ( String args [ ] ) { new Main ( ) . run ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (expression_statement (method_invocation object: (object_creation_expression type: (type_identifier) arguments: (argume... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = Integer . parseInt ( sc . next ( ) ) ;
HashMap < Long , Pair > map = new HashMap < > ( ) ;
ArrayList < Pair > l = new ArrayList < > ( ) ;
for ( int i = 0 ;
i < N ;
i ++ ) {
long c = Long . parseLong ( sc .... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = Integer . parseInt ( sc . next ( ) ) ; HashMap < Long , Pair > map = new HashMap < > ( ) ; ArrayList < Pair > l = new ArrayList < > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { long c = Long . parseLong ( sc . next ( ) ) ; if (... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] $ ) {
Scanner sc = new Scanner ( in ) ;
int n = sc . nextInt ( ) ;
long [ ] a = new long [ n ] ;
long edge1 = 0 , edge2 = 0 ;
TreeMap < Long , Long > tm = new TreeMap < > ( ) ;
for ( int i = 0 ;
i < n ;
i ++ ) {
a [ i ] = sc . nextLong ( ) ;
tm . put ( a [ i ... | public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int n = sc . nextInt ( ) ; long [ ] a = new long [ n ] ; long edge1 = 0 , edge2 = 0 ; TreeMap < Long , Long > tm = new TreeMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextLong ( ) ; tm . put ( a [ i ] , tm . getOrDefault ( ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
while ( sc . hasNextInt ( ) ) {
int N = sc . nextInt ( ) ;
Map < Long , Integer > cnt = new HashMap < > ( ) ;
Set < Long > set = new HashSet < > ( ) ;
for ( int i = 0 ;
i < N ;
i ++ ) {
long x = sc... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; while ( sc . hasNextInt ( ) ) { int N = sc . nextInt ( ) ; Map < Long , Integer > cnt = new HashMap < > ( ) ; Set < Long > set = new HashSet < > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { long x = sc . nextLong ( ) ; int nowCnt = cnt... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int n = sc . nextInt ( ) ;
String s = sc . next ( ) ;
int r = 0 ;
int g = 0 ;
int b = 0 ;
for ( char c : s . toCharArray ( ) ) {
switch ( c ) {
case 'R' : r ++ ;
break ;
case 'G' : g ++ ;
b... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ; int r = 0 ; int g = 0 ; int b = 0 ; for ( char c : s . toCharArray ( ) ) { switch ( c ) { case ' R ' : r ++ ; break ; case ' G ' : g ++ ; break ; case ' B ' : b ++ ; break ; } }... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static Color toEnum ( String string ) {
if ( string . equals ( R . name ) ) {
return R ;
}
else if ( string . equals ( B . name ) ) {
return B ;
}
else {
return G ;
}
}
| public static Color toEnum ( String string ) { if ( string . equals ( R . name ) ) { return R ; } else if ( string . equals ( B . name ) ) { return B ; } else { return G ; } } | (method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (f... |
public static void main ( String [ ] args ) {
Scanner scanner = new Scanner ( System . in ) ;
final int N = scanner . nextInt ( ) ;
final String S = scanner . next ( ) ;
Deque < Color > deque = new ArrayDeque < > ( ) ;
String [ ] strings = S . split ( "" ) ;
for ( int i = 0 ;
i < N ;
i ++ ) {
Color ... | public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; final int N = scanner . nextInt ( ) ; final String S = scanner . next ( ) ; Deque < Color > deque = new ArrayDeque < > ( ) ; String [ ] strings = S . split ( " " ) ; for ( int i = 0 ; i < N ; i ++ ) { Color ball = Color . toEn... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
char s [ ] = sc . next ( ) . toCharArray ( ) ;
int [ ] num = new int [ 3 ] ;
for ( int i = 0 ;
i < N ;
i ++ ) {
switch ( s [ i ] ) {
case 'R' : num [ 0 ] ++ ;
break ;
c... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; char s [ ] = sc . next ( ) . toCharArray ( ) ; int [ ] num = new int [ 3 ] ; for ( int i = 0 ; i < N ; i ++ ) { switch ( s [ i ] ) { case ' R ' : num [ 0 ] ++ ; break ; case ' G ' : num [ 1 ] ++ ; break ;... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
int a = sc . nextInt ( ) ;
int b = sc . nextInt ( ) ;
sc . close ( ) ;
if ( a == b ) {
System . out . println ( "Draw" ) ;
}
else if ( a == 1 ) {
System . out . println ( "Alice" ) ;
}
els... | public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; sc . close ( ) ; if ( a == b ) { System . out . println ( " Draw " ) ; } else if ( a == 1 ) { System . out . println ( " Alice " ) ; } else if ( b == 1 ) { Syst... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
InputReader in = new InputReader ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
Task solver = new Task ( ) ;
solver . solve ( 1 , in , out ) ;
out . clos... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Task solver = new Task ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int A = sc . nextInt ( ) ;
int B = sc . nextInt ( ) ;
if ( A == 1 ) {
A = 14 ;
}
if ( B == 1 ) {
B = 14 ;
}
if ( A == B ) {
System . out . println ( "Draw" ) ;
}
else if ( A > B ) {
System . out ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; if ( A == 1 ) { A = 14 ; } if ( B == 1 ) { B = 14 ; } if ( A == B ) { System . out . println ( " Draw " ) ; } else if ( A > B ) { System . out . println ( " Alice " ) ; } else {... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
int a = sc . nextInt ( ) , b = sc . nextInt ( ) ;
if ( a == b ) {
System . out . println ( "Draw" ) ;
return ;
}
if ( a == 1 ) {
a += 13 ;
}
if ( b == 1 ) {
b += 13 ;
}
System . out . println ( a > b ? "Alice" : "Bob" ) ;
}
| public static void main ( String [ ] args ) { int a = sc . nextInt ( ) , b = sc . nextInt ( ) ; if ( a == b ) { System . out . println ( " Draw " ) ; return ; } if ( a == 1 ) { a += 13 ; } if ( b == 1 ) { b += 13 ; } System . out . println ( a > b ? " Alice " : " Bob " ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identif... |
public static void main ( String [ ] args ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
int A = sc . nextInt ( ) ;
int B = sc . nextInt ( ) ;
if ( A == 1 ) A = 14 ;
if ( B == 1 ) B = 14 ;
String ans ;
if ( A > B ) {
ans = "Alice" ;
}
else if ( A < B ) {
ans = "Bob" ;
}
el... | public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; if ( A == 1 ) A = 14 ; if ( B == 1 ) B = 14 ; String ans ; if ( A > B ) { ans = " Alice " ; } else if ( A < B ) { ans = " Bob " ; } else { ans = " Draw " ; } Sy... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int n = sc . nextInt ( ) ;
int a = sc . nextInt ( ) ;
int b = sc . nextInt ( ) ;
int ans = 0 ;
if ( n >= 5 ) {
ans = 5 * b + ( n - 5 ) * a ;
}
else {
ans = n * b ;
}
System . out . println ( ans ) ;
}
| public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int ans = 0 ; if ( n >= 5 ) { ans = 5 * b + ( n - 5 ) * a ; } else { ans = n * b ; } System . out . println ( ans ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
FastScanner in = new FastScanner ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
Task solver = new Task ( ) ;
solver . solve ( 1 , in , out ) ;
out . clos... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Task solver = new Task ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
private static boolean isSpaceChar ( int c ) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == - 1 ;
}
| private static boolean isSpaceChar ( int c ) { return c == ' ▁ ' || c == ' \n ' || c == ' \r ' || c == ' \t ' || c == - 1 ; } | (method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: ... |
public static void main ( String [ ] args ) {
SC sc = new SC ( System . in ) ;
int N = sc . nextInt ( ) ;
int A = sc . nextInt ( ) ;
int B = sc . nextInt ( ) ;
if ( N <= 5 ) {
pl ( B * N ) ;
}
else if ( N > 5 ) {
pl ( ( B * 5 + ( N - 5 ) * A ) ) ;
}
}
| public static void main ( String [ ] args ) { SC sc = new SC ( System . in ) ; int N = sc . nextInt ( ) ; int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; if ( N <= 5 ) { pl ( B * N ) ; } else if ( N > 5 ) { pl ( ( B * 5 + ( N - 5 ) * A ) ) ; } } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void pl ( Object o ) {
System . out . println ( o ) ;
}
| public static void pl ( Object o ) { System . out . println ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static void p ( Object o ) {
System . out . print ( o ) ;
}
| public static void p ( Object o ) { System . out . print ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static boolean isPrime ( int a ) {
if ( a < 4 ) {
if ( a == 2 || a == 3 ) {
return true ;
}
else {
return false ;
}
}
else {
for ( int j = 2 ;
j * j <= a ;
j ++ ) {
if ( a % j == 0 ) {
return false ;
}
if ( a % j != 0 && ( j + 1 ) * ( j + 1 ... | public static boolean isPrime ( int a ) { if ( a < 4 ) { if ( a == 2 || a == 3 ) { return true ; } else { return false ; } } else { for ( int j = 2 ; j * j <= a ; j ++ ) { if ( a % j == 0 ) { return false ; } if ( a % j != 0 && ( j + 1 ) * ( j + 1 ) > a ) { return true ; } } return true ; } } | (method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block... |
static int min ( int a , int b ) {
if ( a > b ) return b ;
else return a ;
}
| static int min ( int a , int b ) { if ( a > b ) return b ; else return a ; } | (method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (ident... |
static void solve ( ) {
int n , sc , di ;
Scanner cin = new Scanner ( System . in ) ;
n = cin . nextInt ( ) ;
sc = cin . nextInt ( ) ;
di = cin . nextInt ( ) ;
System . out . println ( ( min ( n , 5 ) * di ) + ( n - min ( n , 5 ) ) * sc ) ;
}
| static void solve ( ) { int n , sc , di ; Scanner cin = new Scanner ( System . in ) ; n = cin . nextInt ( ) ; sc = cin . nextInt ( ) ; di = cin . nextInt ( ) ; System . out . println ( ( min ( n , 5 ) * di ) + ( n - min ( n , 5 ) ) * sc ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier... |
public static void main ( String args [ ] ) {
solve ( ) ;
}
| public static void main ( String args [ ] ) { solve ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list))))) |
public static void main ( String [ ] $ ) {
Scanner sc = new Scanner ( in ) ;
int n = sc . nextInt ( ) , a = sc . nextInt ( ) , b = sc . nextInt ( ) ;
int ans = 0 ;
for ( int i = 1 ;
i <= n ;
i ++ ) {
if ( i <= 5 ) ans += b ;
else ans += a ;
}
out . println ( ans ) ;
}
| public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int n = sc . nextInt ( ) , a = sc . nextInt ( ) , b = sc . nextInt ( ) ; int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( i <= 5 ) ans += b ; else ans += a ; } out . println ( ans ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner in = new Scanner ( System . in ) ;
long x = in . nextLong ( ) , y = in . nextLong ( ) ;
System . out . println ( Math . abs ( x - y ) <= 1 ? "Brown" : "Alice" ) ;
}
| public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; long x = in . nextLong ( ) , y = in . nextLong ( ) ; System . out . println ( Math . abs ( x - y ) <= 1 ? " Brown " : " Alice " ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws IOException {
new Main ( ) . run ( ) ;
}
| public static void main ( String [ ] args ) throws IOException { new Main ( ) . run ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (expression_statement (method_invocation object: (object_creation_expr... |
public static void main ( String [ ] args ) {
MyScanner sc = new MyScanner ( ) ;
out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ;
long x = sc . nextLong ( ) ;
long y = sc . nextLong ( ) ;
out . println ( Math . abs ( x - y ) <= 1 ? "Brown" : "Alice" ) ;
out . close ( ) ;
}
| public static void main ( String [ ] args ) { MyScanner sc = new MyScanner ( ) ; out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ; long x = sc . nextLong ( ) ; long y = sc . nextLong ( ) ; out . println ( Math . abs ( x - y ) <= 1 ? " Brown " : " Alice " ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
static void db ( Object ... os ) {
System . err . println ( Arrays . deepToString ( os ) ) ;
}
| static void db ( Object ... os ) { System . err . println ( Arrays . deepToString ( os ) ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (spread_parameter (type_identifier) (variable_declarator name: (identifier)))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) argu... |
private static BigInteger C ( long n , long r ) {
BigInteger res = BigInteger . ONE ;
for ( long i = n ;
i > n - r ;
-- i ) {
res = res . multiply ( BigInteger . valueOf ( i ) ) ;
}
for ( long i = r ;
i > 1 ;
-- i ) {
res = res . divide ( BigInteger . valueOf ( i ) ) ;
}
return res ;
}
| private static BigInteger C ( long n , long r ) { BigInteger res = BigInteger . ONE ; for ( long i = n ; i > n - r ; -- i ) { res = res . multiply ( BigInteger . valueOf ( i ) ) ; } for ( long i = r ; i > 1 ; -- i ) { res = res . divide ( BigInteger . valueOf ( i ) ) ; } return res ; } | (method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declar... |
private static BigInteger P ( long n , long r ) {
BigInteger res = BigInteger . ONE ;
for ( long i = n ;
i > n - r ;
-- i ) {
res = res . multiply ( BigInteger . valueOf ( i ) ) ;
}
return res ;
}
| private static BigInteger P ( long n , long r ) { BigInteger res = BigInteger . ONE ; for ( long i = n ; i > n - r ; -- i ) { res = res . multiply ( BigInteger . valueOf ( i ) ) ; } return res ; } | (method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declar... |
public static void main ( String [ ] args ) {
long S = System . currentTimeMillis ( ) ;
Scanner sc = new Scanner ( System . in ) ;
new Main ( ) . solve ( sc ) ;
_out . flush ( ) ;
long G = System . currentTimeMillis ( ) ;
if ( elapsed ) {
_err . println ( ( G - S ) + "ms" ) ;
}
_err . flush ( ) ;
}
| public static void main ( String [ ] args ) { long S = System . currentTimeMillis ( ) ; Scanner sc = new Scanner ( System . in ) ; new Main ( ) . solve ( sc ) ; _out . flush ( ) ; long G = System . currentTimeMillis ( ) ; if ( elapsed ) { _err . println ( ( G - S ) + " ms " ) ; } _err . flush ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identif... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int N = sc . nextInt ( ) ;
int total = 0 ;
for ( int i = 1 ;
i <= N ;
i ++ ) {
int count = 1 ;
count += N - i ;
total += count ;
}
System . out . println ( total ) ;
}
| public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int total = 0 ; for ( int i = 1 ; i <= N ; i ++ ) { int count = 1 ; count += N - i ; total += count ; } System . out . println ( total ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
SC sc = new SC ( System . in ) ;
int a = sc . nextInt ( ) ;
pl ( a * ( a + 1 ) / 2 ) ;
}
| public static void main ( String [ ] args ) { SC sc = new SC ( System . in ) ; int a = sc . nextInt ( ) ; pl ( a * ( a + 1 ) / 2 ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void pl ( Object o ) {
System . out . println ( o ) ;
}
| public static void pl ( Object o ) { System . out . println ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static void p ( Object o ) {
System . out . print ( o ) ;
}
| public static void p ( Object o ) { System . out . print ( o ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument... |
public static void main ( String [ ] $ ) {
Scanner sc = new Scanner ( in ) ;
int n = sc . nextInt ( ) ;
int ans = 0 ;
for ( int i = 0 ;
i < n ;
i ++ ) {
for ( int j = i ;
j < n ;
j ++ ) {
ans ++ ;
}
}
out . println ( ans ) ;
}
| public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int n = sc . nextInt ( ) ; int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i ; j < n ; j ++ ) { ans ++ ; } } out . println ( ans ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
int n = s . nextInt ( ) ;
System . out . println ( n * ( n + 1 ) / 2 ) ;
}
| public static void main ( String [ ] args ) { int n = s . nextInt ( ) ; System . out . println ( n * ( n + 1 ) / 2 ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identif... |
public static void main ( String [ ] args ) {
final Scanner sc = new Scanner ( System . in ) ;
int n = sc . nextInt ( ) ;
long ans = 0 ;
for ( int i = n ;
i >= 1 ;
i -- ) {
ans += i ;
}
System . out . println ( ans ) ;
}
| public static void main ( String [ ] args ) { final Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; long ans = 0 ; for ( int i = n ; i >= 1 ; i -- ) { ans += i ; } System . out . println ( ans ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration (modifiers) type: (type_identifier) declarator: (variable_declarator ... |
public static void main ( String [ ] args ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
final int N = sc . nextInt ( ) ;
final int K = sc . nextInt ( ) ;
System . out . println ( N % K == 0 ? 0 : 1 ) ;
}
| public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; final int N = sc . nextInt ( ) ; final int K = sc . nextInt ( ) ; System . out . println ( N % K == 0 ? 0 : 1 ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
new Main ( ) . solveA ( ) ;
}
| public static void main ( String [ ] args ) { new Main ( ) . solveA ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (method_invocation object: (object_creation_expression type: (type_identifi... |
public static void main ( String [ ] args ) {
BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
Scanner sc = new Scanner ( System . in ) ;
int n = sc . nextInt ( ) ;
int k = sc . nextInt ( ) ;
if ( n % k == 0 ) System . out . println ( 0 ) ;
else System . out . println ( 1 )... | public static void main ( String [ ] args ) { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; if ( n % k == 0 ) System . out . println ( 0 ) ; else System . out . println ( 1 ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws IOException {
Scanner scanner = new Scanner ( System . in ) ;
BufferedWriter bufferedWriter = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ;
int N = scanner . nextInt ( ) ;
int K = scanner . nextInt ( ) ;
int res ;
if ( N % K == 0 ) res = ... | public static void main ( String [ ] args ) throws IOException { Scanner scanner = new Scanner ( System . in ) ; BufferedWriter bufferedWriter = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; int N = scanner . nextInt ( ) ; int K = scanner . nextInt ( ) ; int res ; if ( N % K == 0 ) res = 0 ; else res... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
System . out . println ( scanner . nextInt ( ) % scanner . nextInt ( ) == 0 ? 0 : 1 ) ;
}
| public static void main ( String [ ] args ) { System . out . println ( scanner . nextInt ( ) % scanner . nextInt ( ) == 0 ? 0 : 1 ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (ident... |
public static void main ( String [ ] args ) {
Scanner input = new Scanner ( System . in ) ;
int a = 0 ;
int b = 0 ;
for ( int i = 0 ;
i < 3 ;
i ++ ) {
int value = input . nextInt ( ) ;
if ( value == 5 ) a ++ ;
else if ( value == 7 ) b ++ ;
}
if ( a == 2 && b == 1 ) System . out . println ( "... | public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int a = 0 ; int b = 0 ; for ( int i = 0 ; i < 3 ; i ++ ) { int value = input . nextInt ( ) ; if ( value == 5 ) a ++ ; else if ( value == 7 ) b ++ ; } if ( a == 2 && b == 1 ) System . out . println ( " YES " ) ; else System . out... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
InputReader in = new InputReader ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
IrohaAndHaikuABCEdition solver = new IrohaAndHaikuABCEdition ( ) ;
solver .... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; IrohaAndHaikuABCEdition solver = new IrohaAndHaikuABCEdition ( ) ; solver . solve ( 1 ,... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner scanner = new Scanner ( System . in ) ;
Map < Integer , Integer > seen = new HashMap < > ( ) ;
for ( int ix = 0 ;
ix < 3 ;
ix ++ ) {
int value = scanner . nextInt ( ) ;
seen . put ( value , seen . getOrDefault ( value , 0 ) + 1 ) ;
}
boolean re... | public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; Map < Integer , Integer > seen = new HashMap < > ( ) ; for ( int ix = 0 ; ix < 3 ; ix ++ ) { int value = scanner . nextInt ( ) ; seen . put ( value , seen . getOrDefault ( value , 0 ) + 1 ) ; } boolean result = seen . contains... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner keyboard = new Scanner ( System . in ) ;
int SideA = keyboard . nextInt ( ) ;
int SideB = keyboard . nextInt ( ) ;
int SideC = keyboard . nextInt ( ) ;
int [ ] arr = new int [ ] {
SideA , SideB , SideC };
Arrays . sort ( arr ) ;
if ( arr [ 0 ] ... | public static void main ( String [ ] args ) { Scanner keyboard = new Scanner ( System . in ) ; int SideA = keyboard . nextInt ( ) ; int SideB = keyboard . nextInt ( ) ; int SideC = keyboard . nextInt ( ) ; int [ ] arr = new int [ ] { SideA , SideB , SideC } ; Arrays . sort ( arr ) ; if ( arr [ 0 ] == 5 && arr [ 1 ] == ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String args [ ] ) {
Scanner sc = new Scanner ( System . in ) ;
int [ ] input = new int [ 3 ] ;
int fiveCount = 0 ;
int sevenCount = 0 ;
for ( int i = 0 ;
i < 3 ;
i ++ ) {
input [ i ] = sc . nextInt ( ) ;
if ( input [ i ] == 5 && fiveCount < 2 ) {
fiveCount ++ ;
... | public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int [ ] input = new int [ 3 ] ; int fiveCount = 0 ; int sevenCount = 0 ; for ( int i = 0 ; i < 3 ; i ++ ) { input [ i ] = sc . nextInt ( ) ; if ( input [ i ] == 5 && fiveCount < 2 ) { fiveCount ++ ; } else if ( input [ i ] == 7 && ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
String po = sc . nextLine ( ) ;
String popo = sc . nextLine ( ) ;
for ( int i = 0 ;
i < popo . length ( ) ;
i ++ ) {
System . out . print ( po . substring ( i , i + 1 ) + popo . substring ( i , i + 1 ) ) ;
}
Sys... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String po = sc . nextLine ( ) ; String popo = sc . nextLine ( ) ; for ( int i = 0 ; i < popo . length ( ) ; i ++ ) { System . out . print ( po . substring ( i , i + 1 ) + popo . substring ( i , i + 1 ) ) ; } System . out . println ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
InputStream inputStream = System . in ;
OutputStream outputStream = System . out ;
InputReader in = new InputReader ( inputStream ) ;
PrintWriter out = new PrintWriter ( outputStream ) ;
Task solver = new Task ( ) ;
solver . solve ( 1 , in , out ) ;
out . clos... | public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Task solver = new Task ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws Exception {
BufferedReader input = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
String o = input . readLine ( ) ;
String e = input . readLine ( ) ;
StringBuilder out = new StringBuilder ( ) ;
for ( int i = 0 ;
i < Math . max ( o . length (... | public static void main ( String [ ] args ) throws Exception { BufferedReader input = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String o = input . readLine ( ) ; String e = input . readLine ( ) ; StringBuilder out = new StringBuilder ( ) ; for ( int i = 0 ; i < Math . max ( o . length ( ) , e . len... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
String O = sc . next ( ) ;
String E = sc . next ( ) ;
int Olen = O . length ( ) ;
int Elen = E . length ( ) ;
for ( int i = 0 ;
i < Elen ;
i ++ ) {
System . out . print ( O . charAt ( i ) ) ;
... | public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; String O = sc . next ( ) ; String E = sc . next ( ) ; int Olen = O . length ( ) ; int Elen = E . length ( ) ; for ( int i = 0 ; i < Elen ; i ++ ) { System . out . print ( O . charAt ( i ) ) ; System . out . print (... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
String a = sc . next ( ) , b = sc . next ( ) ;
StringBuilder sb = new StringBuilder ( ) ;
for ( int i = 0 ;
i < a . length ( ) ;
i ++ ) {
sb . append ( a . charAt ( i ) ) ;
if ( b . length ( ) > i ) {
sb . append ( b . charAt ( i ) ) ;
}
}
Sy... | public static void main ( String [ ] args ) { String a = sc . next ( ) , b = sc . next ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < a . length ( ) ; i ++ ) { sb . append ( a . charAt ( i ) ) ; if ( b . length ( ) > i ) { sb . append ( b . charAt ( i ) ) ; } } System . out . println ( sb ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int a = sc . nextInt ( ) ;
int b = sc . nextInt ( ) ;
int c = sc . nextInt ( ) ;
int d = sc . nextInt ( ) ;
if ( a + b > c + d ) {
System . out . println ( "Left" ) ;
}
else if ( a + b < c + d ) {
System . o... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; if ( a + b > c + d ) { System . out . println ( " Left " ) ; } else if ( a + b < c + d ) { System . out . println ( " Right... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
PrintWriter out = new PrintWriter ( System . out ) ;
InputStreamScanner in = new InputStreamScanner ( System . in ) ;
new Main ( ) . solve ( in , out ) ;
out . flush ( ) ;
}
| public static void main ( String [ ] args ) { PrintWriter out = new PrintWriter ( System . out ) ; InputStreamScanner in = new InputStreamScanner ( System . in ) ; new Main ( ) . solve ( in , out ) ; out . flush ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int a , b , c , d ;
a = Integer . parseInt ( sc . next ( ) ) ;
b = Integer . parseInt ( sc . next ( ) ) ;
c = Integer . parseInt ( sc . next ( ) ) ;
d = Integer . parseInt ( sc . next ( ) ) ;
int left = a + b ;
int ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a , b , c , d ; a = Integer . parseInt ( sc . next ( ) ) ; b = Integer . parseInt ( sc . next ( ) ) ; c = Integer . parseInt ( sc . next ( ) ) ; d = Integer . parseInt ( sc . next ( ) ) ; int left = a + b ; int right = c + d ; ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws Exception {
Scanner sc = new Scanner ( System . in ) ;
int A = sc . nextInt ( ) ;
int B = sc . nextInt ( ) ;
int C = sc . nextInt ( ) ;
int D = sc . nextInt ( ) ;
int L = A + B ;
int R = C + D ;
if ( L > R ) {
System . out . println ( "Left" ) ;
}... | public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; int C = sc . nextInt ( ) ; int D = sc . nextInt ( ) ; int L = A + B ; int R = C + D ; if ( L > R ) { System . out . println ( " Left " ) ; } else if ( L == R ) ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int a = sc . nextInt ( ) ;
int b = sc . nextInt ( ) ;
int c = sc . nextInt ( ) ;
int d = sc . nextInt ( ) ;
String ans = ( a + b > c + d ) ? "Left" : ( a + b == c + d ) ? "Balanced" : "Right" ;
System . out . println ... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; String ans = ( a + b > c + d ) ? " Left " : ( a + b == c + d ) ? " Balanced " : " Right " ; System . out . println ( ans ) ... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) throws Exception {
BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
int N = Integer . parseInt ( br . readLine ( ) ) ;
boolean [ ] rainTimes = new boolean [ 24 * 12 + 1 ] ;
for ( int i = 0 ;
i < N ;
i ++ ) {
String [ ] rainTim... | public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int N = Integer . parseInt ( br . readLine ( ) ) ; boolean [ ] rainTimes = new boolean [ 24 * 12 + 1 ] ; for ( int i = 0 ; i < N ; i ++ ) { String [ ] rainTime = br . readLin... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (varia... |
public static void main ( String [ ] args ) {
new Main ( ) . run ( ) ;
}
| public static void main ( String [ ] args ) { new Main ( ) . run ( ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (method_invocation object: (object_creation_expression type: (type_identifi... |
public static void main ( String [ ] args ) {
int timeData = 0 ;
int [ ] [ ] times = new int [ 289 ] [ 2 ] ;
for ( int i = 0 ;
i < 289 ;
i ++ ) {
times [ i ] [ 0 ] = timeData ;
timeData += 5 ;
if ( i != 0 && ( times [ i ] [ 0 ] % 100 ) == 55 ) timeData = ( timeData / 100 + 1 ) * 100 ;
}
Scanne... | public static void main ( String [ ] args ) { int timeData = 0 ; int [ ] [ ] times = new int [ 289 ] [ 2 ] ; for ( int i = 0 ; i < 289 ; i ++ ) { times [ i ] [ 0 ] = timeData ; timeData += 5 ; if ( i != 0 && ( times [ i ] [ 0 ] % 100 ) == 55 ) timeData = ( timeData / 100 + 1 ) * 100 ; } Scanner sc = new Scanner ( Syste... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identif... |
static public void main ( String [ ] args ) {
Scanner scan = new Scanner ( System . in ) ;
int size = scan . nextInt ( ) ;
List < String > list = new ArrayList < > ( size ) ;
for ( int i = 0 ;
i < size ;
i ++ ) {
list . add ( scan . next ( ) ) ;
}
list . sort ( naturalOrder ( ) ) ;
int start = 999... | static public void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int size = scan . nextInt ( ) ; List < String > list = new ArrayList < > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list . add ( scan . next ( ) ) ; } list . sort ( naturalOrder ( ) ) ; int start = 9999 ; int end = - 1 ; fo... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int n = sc . nextInt ( ) ;
int plot [ ] = new int [ 1000 ] ;
for ( int i = 0 ;
i < plot . length ;
i ++ ) {
plot [ i ] = 0 ;
}
for ( int i = 0 ;
i < n ;
i ++ ) {
String baseTime = sc . next ( ) ;
Str... | public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int plot [ ] = new int [ 1000 ] ; for ( int i = 0 ; i < plot . length ; i ++ ) { plot [ i ] = 0 ; } for ( int i = 0 ; i < n ; i ++ ) { String baseTime = sc . next ( ) ; String times [ ] = baseTime . split... | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
public static void main ( String [ ] args ) {
Scanner sc = new Scanner ( System . in ) ;
int a = sc . nextInt ( ) ;
int b = sc . nextInt ( ) ;
int n = sc . nextInt ( ) ;
System . out . println ( ( a + b == n ) ? ( a - b == n ) ? "?" : "+" : ( a - b == n ) ? "-" : "!" ) ;
}
| public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; System . out . println ( ( a + b == n ) ? ( a - b == n ) ? " ? " : " + " : ( a - b == n ) ? " - " : " ! " ) ; } | (method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (ident... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.