import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . StringTokenizer ; import java . io . IOException ; import java . util . InputMismatchException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ; public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskD solver = new TaskD ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } static class TaskD { public void solve ( int testNumber , InputReader in , PrintWriter out ) { long k = in . nextLong ( ) ; long p = k / 50 ; long q = k % 50 ; long [ ] ans = new long [ 50 ] ; Arrays . fill ( ans , 49 + p ) ; for ( int i = 0 ; i < q ; i ++ ) { for ( int j = 0 ; j < 50 ; j ++ ) { if ( j == i ) { ans [ j ] += 50 ; } else { ans [ j ] -- ; } } } out . println ( ans . length ) ; for ( int i = 0 ; i < ans . length ; i ++ ) { if ( i > 0 ) out . print ( " ▁ " ) ; out . print ( ans [ i ] ) ; } out . println ( ) ; } } static class InputReader { BufferedReader in ; StringTokenizer tok ; public String nextString ( ) { while ( ! tok . hasMoreTokens ( ) ) { try { tok = new StringTokenizer ( in . readLine ( ) , " ▁ " ) ; } catch ( IOException e ) { throw new InputMismatchException ( ) ; } } return tok . nextToken ( ) ; } public long nextLong ( ) { return Long . parseLong ( nextString ( ) ) ; } public InputReader ( InputStream inputStream ) { in = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; tok = new StringTokenizer ( " " ) ; } } }

import java . util . * ; public class Main { private void doit ( ) { Scanner sc = new Scanner ( System . in ) ; while ( sc . hasNext ( ) ) { long k = sc . nextLong ( ) ; long n = 50 ; long base = ( k / n ) + n - 1 ; int x = ( int ) ( k % n ) ; System . out . println ( n ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < x ; i ++ ) { sb . append ( " ▁ " ) ; sb . append ( base + n - x + 1 ) ; } for ( int i = 0 ; i < n - x ; i ++ ) { sb . append ( " ▁ " ) ; sb . append ( base - x ) ; } System . out . println ( sb . substring ( 1 ) ) ; } } private void debug ( Object ... o ) { System . out . println ( " debug ▁ = ▁ " + Arrays . deepToString ( o ) ) ; } public static void main ( String [ ] args ) { new Main ( ) . doit ( ) ; } }

import java . io . * ; import java . util . * ; public class Main { public static void main ( String [ ] args ) throws IOException { Scanner sc = new Scanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; long K = sc . nextLong ( ) ; int rest = ( int ) ( K % 50 ) ; long num = K / 50 ; System . out . println ( 50 ) ; long [ ] ans = new long [ 50 ] ; for ( int i = 0 ; i < rest ; i ++ ) { ans [ i ] = num + 50 + 50 - rest ; } for ( int i = rest ; i < 50 ; i ++ ) { ans [ i ] = num + 50 - 1 - rest ; } for ( int i = 0 ; i < 49 ; i ++ ) { System . out . print ( ans [ i ] + " ▁ " ) ; } System . out . println ( ans [ 49 ] ) ; out . close ( ) ; } static class Scanner { BufferedReader br ; StringTokenizer st ; Scanner ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } Scanner ( String fileName ) throws FileNotFoundException { br = new BufferedReader ( new FileReader ( fileName ) ) ; } String next ( ) throws IOException { while ( st == null || ! st . hasMoreTokens ( ) ) st = new StringTokenizer ( br . readLine ( ) ) ; return st . nextToken ( ) ; } String nextLine ( ) throws IOException { return br . readLine ( ) ; } int nextInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) throws NumberFormatException , IOException { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) throws NumberFormatException , IOException { return Double . parseDouble ( next ( ) ) ; } } }

import java . util . * ; public class Main { public static final int MAX_N = 50 ; public static void main ( String [ ] args ) { final long K ; try ( Scanner in = new Scanner ( System . in ) ) { K = in . nextLong ( ) ; } long [ ] xs = new long [ MAX_N ] ; final int N = 50 ; for ( int i = 0 ; i < N ; i ++ ) { if ( i < K % N ) { xs [ i ] = i + ( K / N + 1 ) * ( N + 1 ) - K ; } else { xs [ i ] = i + K / N * ( N + 1 ) - K ; } } System . out . printf ( " % d \n " , N ) ; System . out . printf ( " % d " , xs [ 0 ] ) ; for ( int i = 1 ; i < N ; i ++ ) { System . out . printf ( " ▁ % d " , xs [ i ] ) ; } System . out . printf ( " \n " ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ; public class Main { long k ; public static void main ( String args [ ] ) { new Main ( ) . run ( ) ; } void run ( ) { FastReader sc = new FastReader ( ) ; k = sc . nextLong ( ) ; solve ( ) ; } void solve ( ) { long n = 50 ; long [ ] as = new long [ ( int ) n ] ; long quotient = k / n ; long remainder = k % n ; for ( int i = 0 ; i < n ; i ++ ) { as [ i ] = 49 + quotient ; } for ( int i = 0 ; i < remainder ; i ++ ) { as [ i ] += n ; for ( int j = 0 ; j < n ; j ++ ) { if ( i == j ) { continue ; } as [ j ] -= 1 ; } } System . out . println ( n ) ; for ( int i = 0 ; i < n ; i ++ ) { System . out . print ( as [ i ] ) ; if ( i < n - 1 ) { System . out . print ( " ▁ " ) ; } else { System . out . println ( ) ; } } } static class FastReader { BufferedReader br ; StringTokenizer st ; public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }

import sys NEW_LINE K = int ( input ( ) ) NEW_LINE a = K // 50 NEW_LINE b = K % 50 NEW_LINE if K == 0 : NEW_LINE INDENT print ( 2 ) NEW_LINE print ( 0 , 0 ) NEW_LINE sys . exit ( ) NEW_LINE DEDENT Ans = [ 100 + a - b ] * b + [ 49 + a - b ] * ( 50 - b ) NEW_LINE print ( 50 ) NEW_LINE print ( * Ans ) NEW_LINE

import array NEW_LINE from bisect import * NEW_LINE from collections import * NEW_LINE import fractions NEW_LINE import heapq NEW_LINE from itertools import * NEW_LINE import math NEW_LINE import random NEW_LINE import re NEW_LINE import string NEW_LINE import sys NEW_LINE import numpy as np NEW_LINE def solve_d ( k ) : NEW_LINE INDENT if k == 0 : NEW_LINE INDENT return [ 0 ] * 50 NEW_LINE DEDENT if k <= 50 : NEW_LINE INDENT arr = [ ] NEW_LINE for i in range ( k ) : NEW_LINE INDENT arr . append ( 50 - i ) NEW_LINE DEDENT for i in range ( k , 50 ) : NEW_LINE INDENT arr . append ( 0 ) NEW_LINE DEDENT return arr NEW_LINE DEDENT else : NEW_LINE INDENT arr = list ( reversed ( range ( 1 , 51 ) ) ) NEW_LINE base = ( k - 1 ) // 50 NEW_LINE for i in range ( 50 ) : NEW_LINE INDENT arr [ i ] += base - 1 NEW_LINE DEDENT for i in range ( k - base * 50 ) : NEW_LINE INDENT arr [ i ] += 1 NEW_LINE DEDENT return arr NEW_LINE DEDENT DEDENT K = int ( input ( ) ) NEW_LINE print ( 50 ) NEW_LINE print ( * solve_d ( K ) ) NEW_LINE def solve_e ( As ) : NEW_LINE INDENT ans = 0 NEW_LINE N = len ( As ) NEW_LINE As = As [ : ] NEW_LINE while True : NEW_LINE INDENT taken = [ 0 ] * N NEW_LINE for i , a in enumerate ( As ) : NEW_LINE INDENT taken [ i ] = a // N NEW_LINE As [ i ] -= taken [ i ] * N NEW_LINE DEDENT taken_sum = sum ( taken ) NEW_LINE if taken_sum == 0 : NEW_LINE INDENT break NEW_LINE DEDENT ans += taken_sum NEW_LINE for i in range ( N ) : NEW_LINE INDENT As [ i ] += ( taken_sum - taken [ i ] ) NEW_LINE DEDENT DEDENT return ans NEW_LINE NEW_LINE DEDENT

def counter ( a , n ) : NEW_LINE INDENT big = max ( a ) NEW_LINE check = True NEW_LINE counter = 0 NEW_LINE while big > n - 1 : NEW_LINE INDENT for i in range ( n ) : NEW_LINE INDENT if a [ i ] == big and check : NEW_LINE INDENT check = False NEW_LINE a [ i ] -= n NEW_LINE DEDENT else : NEW_LINE INDENT a [ i ] += 1 NEW_LINE DEDENT DEDENT counter += 1 NEW_LINE big = max ( a ) NEW_LINE check = True NEW_LINE DEDENT return counter NEW_LINE DEDENT k = int ( input ( ) ) NEW_LINE n = 50 NEW_LINE print ( n ) NEW_LINE temp = k // 50 NEW_LINE a = [ 49 + temp for i in range ( n ) ] NEW_LINE k = k - 50 * ( k // 50 ) NEW_LINE for i in range ( k ) : NEW_LINE INDENT big = min ( a ) NEW_LINE check = True NEW_LINE for j in range ( n ) : NEW_LINE INDENT if a [ j ] == big and check : NEW_LINE INDENT check = False NEW_LINE a [ j ] += 50 NEW_LINE DEDENT else : NEW_LINE INDENT a [ j ] -= 1 NEW_LINE DEDENT DEDENT DEDENT for i in range ( n ) : NEW_LINE INDENT if i != n - 1 : NEW_LINE INDENT print ( a [ i ] , end = " ▁ " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( a [ i ] ) NEW_LINE DEDENT DEDENT

import numpy as np NEW_LINE k = int ( input ( ) ) NEW_LINE n = 50 NEW_LINE res = np . array ( [ i + k // n for i in range ( 50 ) ] ) NEW_LINE k %= n NEW_LINE for i in range ( k ) : NEW_LINE INDENT res [ i ] += n + 1 NEW_LINE res -= 1 NEW_LINE DEDENT print ( n ) NEW_LINE print ( " ▁ " . join ( map ( str , res ) ) ) NEW_LINE

K = int ( input ( ) ) NEW_LINE N = 50 NEW_LINE def solve ( A , cnt ) : NEW_LINE INDENT res = len ( A ) NEW_LINE for i in range ( cnt ) : NEW_LINE INDENT A [ i ] += ( res + 1 ) NEW_LINE for j in range ( res ) : NEW_LINE INDENT A [ j ] -= 1 NEW_LINE DEDENT DEDENT return A NEW_LINE DEDENT Ans = [ 0 for x in range ( N ) ] NEW_LINE Ans [ 0 ] = 25 + ( K // 50 ) NEW_LINE for i in range ( 1 , N ) : NEW_LINE INDENT if i % 2 == 0 : NEW_LINE INDENT Ans [ i ] = Ans [ i - 1 ] + 1 NEW_LINE DEDENT else : NEW_LINE INDENT Ans [ i ] = Ans [ i - 1 ] NEW_LINE DEDENT DEDENT Ans = solve ( Ans , K % 50 ) NEW_LINE print ( N ) NEW_LINE for i in range ( N ) : NEW_LINE INDENT if i == N - 1 : NEW_LINE INDENT print ( Ans [ i ] ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( Ans [ i ] , end = " ▁ " ) NEW_LINE DEDENT DEDENT


import java . io . PrintWriter ; import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; String A = sc . next ( ) ; String B = sc . next ( ) ; String C = sc . next ( ) ; if ( A . charAt ( A . length ( ) - 1 ) == B . charAt ( 0 ) && B . charAt ( B . length ( ) - 1 ) == C . charAt ( 0 ) ) { out . println ( " YES " ) ; } else { out . println ( " NO " ) ; } out . flush ( ) ; } }

import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . InputMismatchException ; import java . io . IOException ; import java . io . InputStream ; public class Main { 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 ( ) ; } static class TaskA { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { String a = in . next ( ) ; String b = in . next ( ) ; String c = in . next ( ) ; if ( a . charAt ( a . length ( ) - 1 ) == b . charAt ( 0 ) && b . charAt ( b . length ( ) - 1 ) == c . charAt ( 0 ) ) out . println ( " YES " ) ; else out . println ( " NO " ) ; } } static class FastScanner { private InputStream in ; private byte [ ] buffer = new byte [ 1024 ] ; private int bufPointer ; private int bufLength ; public FastScanner ( InputStream in ) { this . in = in ; } private int readByte ( ) { if ( bufPointer >= bufLength ) { if ( bufLength == - 1 ) throw new InputMismatchException ( ) ; bufPointer = 0 ; try { bufLength = in . read ( buffer ) ; } catch ( IOException e ) { throw new InputMismatchException ( ) ; } if ( bufLength <= 0 ) return - 1 ; } return buffer [ bufPointer ++ ] ; } private static boolean isPrintableChar ( int c ) { return c >= 33 && c <= 126 ; } public String next ( ) { StringBuilder sb = new StringBuilder ( ) ; int b = readByte ( ) ; while ( ! isPrintableChar ( b ) ) b = readByte ( ) ; while ( isPrintableChar ( b ) ) { sb . appendCodePoint ( b ) ; b = readByte ( ) ; } return sb . toString ( ) ; } } }

import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . PriorityQueue ; import java . util . Scanner ; import java . util . TreeSet ; import org . omg . Messaging . SyncScopeHelper ; public class Main { Scanner sc = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { new Main ( ) ; } public Main ( ) { new Test_100 ( ) . doIt ( ) ; } class Test_100 { void doIt ( ) { String strA = sc . next ( ) ; String strB = sc . next ( ) ; String strC = sc . next ( ) ; int A = strA . length ( ) ; int B = strB . length ( ) ; int C = strC . length ( ) ; if ( strA . substring ( A - 1 , A ) . equals ( strB . substring ( 0 , 1 ) ) ) { if ( strB . substring ( B - 1 , B ) . equals ( strC . substring ( 0 , 1 ) ) ) { System . out . println ( " YES " ) ; } else { System . out . println ( " NO " ) ; } } else { System . out . println ( " NO " ) ; } } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; public class Main { 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 ( ) ; } static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { String A = in . next ( ) ; String B = in . next ( ) ; String C = in . next ( ) ; if ( A . charAt ( A . length ( ) - 1 ) == B . charAt ( 0 ) && B . charAt ( B . length ( ) - 1 ) == C . charAt ( 0 ) ) { out . println ( " YES " ) ; } else { out . println ( " NO " ) ; } } } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ; public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; } public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; } public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String a = sc . nextLine ( ) ; String [ ] b = a . split ( " ▁ " , 0 ) ; System . out . println ( ( b [ 0 ] . substring ( b [ 0 ] . length ( ) - 1 , b [ 0 ] . length ( ) ) . equals ( b [ 1 ] . substring ( 0 , 1 ) ) && b [ 1 ] . substring ( b [ 1 ] . length ( ) - 1 , b [ 1 ] . length ( ) ) . equals ( b [ 2 ] . substring ( 0 , 1 ) ) ) ? " YES " : " NO " ) ; } }

A , B , C = input ( ) . split ( ) NEW_LINE if A [ - 1 ] == B [ 0 ] and B [ - 1 ] == C [ 0 ] : NEW_LINE INDENT print ( " YES " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " NO " ) NEW_LINE DEDENT

a , b , c = input ( ) . split ( ' ▁ ' ) NEW_LINE print ( ' YES ' if a [ - 1 ] == b [ 0 ] and b [ - 1 ] == c [ 0 ] else ' NO ' ) NEW_LINE

import sys NEW_LINE def main ( ) : NEW_LINE INDENT input = sys . stdin . readline NEW_LINE A , B , C = map ( str , input ( ) . split ( ) ) NEW_LINE if A [ - 1 ] == B [ 0 ] and B [ - 1 ] == C [ 0 ] : NEW_LINE INDENT return ' YES ' NEW_LINE DEDENT else : NEW_LINE INDENT return ' NO ' NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT print ( main ( ) ) NEW_LINE DEDENT

from functools import reduce NEW_LINE import math NEW_LINE def main ( ) : NEW_LINE INDENT a , b , c = ( _ for _ in input ( ) . split ( ) ) NEW_LINE if a [ - 1 ] == b [ 0 ] and b [ - 1 ] == c [ 0 ] : NEW_LINE INDENT print ( ' YES ' ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ' NO ' ) NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT main ( ) NEW_LINE DEDENT

a , b , c = input ( ) . split ( ) NEW_LINE print ( " YES " if a [ - 1 ] == b [ 0 ] and b [ - 1 ] == c [ 0 ] else " NO " ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int M = sc . nextInt ( ) ; int [ ] s = new int [ 300002 ] ; int [ ] t = new int [ 300002 ] ; int [ ] x = new int [ 300002 ] ; int [ ] b = new int [ 300002 ] ; for ( int i = 0 ; i < M ; ++ i ) { s [ i ] = sc . nextInt ( ) ; t [ i ] = sc . nextInt ( ) ; int l = s [ i ] - 1 ; int r = t [ i ] - 1 ; b [ l ] ++ ; b [ r + 1 ] -- ; } for ( int i = 0 ; i < N + 1 ; ++ i ) { b [ i + 1 ] += b [ i ] ; } for ( int i = 1 ; i <= N ; i ++ ) { if ( b [ i - 1 ] == 1 ) { x [ i ] = 1 ; } else { x [ i ] = 0 ; } } for ( int i = 1 ; i < N ; i ++ ) { x [ i + 1 ] += x [ i ] ; } ArrayList < Integer > ans = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < M ; i ++ ) { if ( x [ t [ i ] ] - x [ s [ i ] - 1 ] == 0 ) { ans . add ( i + 1 ) ; } } System . out . println ( ans . size ( ) ) ; for ( int i = 0 ; i < ans . size ( ) ; i ++ ) { System . out . println ( ans . get ( i ) ) ; } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int [ ] arr = new int [ n + 1 ] ; int [ ] arrS = new int [ m + 1 ] ; int [ ] arrT = new int [ m + 1 ] ; for ( int i = 1 ; i <= m ; i ++ ) { arrS [ i ] = sc . nextInt ( ) ; arrT [ i ] = sc . nextInt ( ) ; arr [ arrS [ i ] ] ++ ; if ( arrT [ i ] != n ) { arr [ arrT [ i ] + 1 ] -- ; } } int [ ] arrX = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { arr [ i ] += arr [ i - 1 ] ; arrX [ i ] += arrX [ i - 1 ] ; if ( arr [ i ] < 2 ) { arrX [ i ] ++ ; } } int count = 0 ; ArrayList < Integer > list = new ArrayList < > ( ) ; for ( int i = 1 ; i <= m ; i ++ ) { if ( arrX [ arrT [ i ] ] - arrX [ arrS [ i ] - 1 ] == 0 ) { count ++ ; list . add ( i ) ; } } StringBuilder sb = new StringBuilder ( ) ; sb . append ( count ) . append ( " \n " ) ; for ( int x : list ) { sb . append ( x ) . append ( " \n " ) ; } System . out . print ( sb ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int [ ] wrc = new int [ n + 1 ] ; int [ ] wrn = new int [ n + 1 ] ; for ( int i = 0 ; i < m ; i ++ ) { int s = sc . nextInt ( ) ; int t = sc . nextInt ( ) ; wrc [ s - 1 ] += 1 ; wrc [ t ] -= 1 ; wrn [ s - 1 ] += i ; wrn [ t ] -= i ; } boolean [ ] brni = new boolean [ m ] ; Arrays . fill ( brni , true ) ; int linecnt = 0 ; for ( int i = 0 ; i < n ; i ++ ) { wrc [ i + 1 ] += wrc [ i ] ; wrn [ i + 1 ] += wrn [ i ] ; } for ( int i = 0 ; i < n ; i ++ ) { if ( wrc [ i ] == 1 && brni [ wrn [ i ] ] ) { brni [ wrn [ i ] ] = false ; linecnt ++ ; } } System . out . println ( m - linecnt ) ; for ( int i = 0 ; i < m ; i ++ ) { if ( brni [ i ] ) { System . out . println ( i + 1 ) ; } } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int M = sc . nextInt ( ) ; int [ ] s = new int [ 300002 ] ; int [ ] t = new int [ 300002 ] ; int [ ] x = new int [ 300002 ] ; int [ ] b = new int [ 300002 ] ; for ( int i = 0 ; i < M ; ++ i ) { s [ i ] = sc . nextInt ( ) ; t [ i ] = sc . nextInt ( ) ; int l = s [ i ] - 1 ; int r = t [ i ] - 1 ; b [ l ] ++ ; b [ r + 1 ] -- ; } for ( int i = 0 ; i < N + 1 ; ++ i ) { b [ i + 1 ] += b [ i ] ; if ( b [ i ] == 1 ) x [ i + 1 ] = x [ i ] + 1 ; else x [ i + 1 ] = x [ i ] + 0 ; } ArrayList < Integer > ans = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < M ; i ++ ) { if ( x [ t [ i ] ] - x [ s [ i ] - 1 ] == 0 ) { ans . add ( i + 1 ) ; } } System . out . println ( ans . size ( ) ) ; for ( int i = 0 ; i < ans . size ( ) ; i ++ ) { System . out . println ( ans . get ( i ) ) ; } } }

N , M = map ( int , input ( ) . split ( ) ) NEW_LINE src = [ ] NEW_LINE imos = [ 0 ] * ( N + 1 ) NEW_LINE for i in range ( M ) : NEW_LINE INDENT s , t = map ( int , input ( ) . split ( ) ) NEW_LINE src . append ( ( s , t ) ) NEW_LINE imos [ s - 1 ] += 1 NEW_LINE imos [ t ] -= 1 NEW_LINE DEDENT cum = 0 NEW_LINE must = [ 0 ] NEW_LINE for i in range ( N + 1 ) : NEW_LINE INDENT cum += imos [ i ] NEW_LINE must . append ( must [ - 1 ] + ( 1 if cum == 1 else 0 ) ) NEW_LINE DEDENT ans = [ ] NEW_LINE for i in range ( M ) : NEW_LINE INDENT s , t = src [ i ] NEW_LINE if must [ s - 1 ] == must [ t ] : NEW_LINE INDENT ans . append ( i + 1 ) NEW_LINE DEDENT DEDENT print ( len ( ans ) ) NEW_LINE for a in ans : NEW_LINE INDENT print ( a ) NEW_LINE DEDENT

def show ( a ) : NEW_LINE INDENT for i in range ( len ( a ) ) : NEW_LINE INDENT print ( a [ i ] ) NEW_LINE DEDENT print ( ) NEW_LINE DEDENT def func ( n , m , a ) : NEW_LINE INDENT table = [ 0 for _ in range ( n + 2 ) ] NEW_LINE for i in range ( m ) : NEW_LINE INDENT table [ a [ i ] [ 0 ] ] += 1 NEW_LINE table [ a [ i ] [ 1 ] + 1 ] -= 1 NEW_LINE DEDENT for i in range ( 1 , len ( table ) ) : NEW_LINE INDENT table [ i ] += table [ i - 1 ] NEW_LINE DEDENT for i in range ( 1 , len ( table ) ) : NEW_LINE INDENT if table [ i ] != 1 : NEW_LINE INDENT table [ i ] = 0 NEW_LINE DEDENT table [ i ] += table [ i - 1 ] NEW_LINE DEDENT out = [ ] NEW_LINE for i in range ( m ) : NEW_LINE INDENT if table [ a [ i ] [ 0 ] - 1 ] == table [ a [ i ] [ 1 ] ] : NEW_LINE INDENT out . append ( i ) NEW_LINE DEDENT DEDENT print ( len ( out ) ) NEW_LINE for i in range ( len ( out ) ) : NEW_LINE INDENT print ( out [ i ] + 1 ) NEW_LINE DEDENT DEDENT n , m = [ int ( i ) for i in input ( ) . split ( ) ] NEW_LINE a = [ [ 0 , 0 , 0 ] for _ in range ( m ) ] NEW_LINE for i in range ( m ) : NEW_LINE INDENT a [ i ] = [ int ( i ) for i in input ( ) . split ( ) ] NEW_LINE DEDENT func ( n , m , a ) NEW_LINE

from bisect import bisect , bisect_left NEW_LINE def inpl ( ) : return list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE N , M = inpl ( ) NEW_LINE R = [ 0 ] * ( N + 2 ) NEW_LINE Q = [ inpl ( ) for _ in range ( M ) ] NEW_LINE for s , t in Q : NEW_LINE INDENT R [ s ] += 1 NEW_LINE R [ t + 1 ] -= 1 NEW_LINE DEDENT c = 0 NEW_LINE Pf = [ ] NEW_LINE Pe = [ ] NEW_LINE rec = False NEW_LINE f = - 1 NEW_LINE for i , r in enumerate ( R ) : NEW_LINE INDENT c += r NEW_LINE if ( c >= 2 ) : NEW_LINE INDENT if rec : NEW_LINE INDENT pass NEW_LINE DEDENT else : NEW_LINE INDENT rec = True NEW_LINE f = i NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT if rec : NEW_LINE INDENT Pf . append ( f ) NEW_LINE Pe . append ( i - 1 ) NEW_LINE rec = False NEW_LINE DEDENT else : NEW_LINE INDENT pass NEW_LINE DEDENT DEDENT DEDENT if rec : NEW_LINE INDENT Pf . append ( f ) NEW_LINE Pe . append ( N ) NEW_LINE DEDENT ANS = [ ] NEW_LINE for i , ( s , t ) in enumerate ( Q , start = 1 ) : NEW_LINE INDENT j = bisect ( Pf , s ) NEW_LINE if j : NEW_LINE INDENT e = Pe [ j - 1 ] NEW_LINE if t <= e : NEW_LINE INDENT ANS . append ( i ) NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT pass NEW_LINE DEDENT DEDENT print ( len ( ANS ) ) NEW_LINE if len ( ANS ) : NEW_LINE INDENT print ( * ANS , sep = " \n " ) NEW_LINE DEDENT

from itertools import accumulate NEW_LINE import sys NEW_LINE sys . setrecursionlimit ( 10 ** 9 ) NEW_LINE input = sys . stdin . readline NEW_LINE N , M = map ( int , input ( ) . split ( ) ) NEW_LINE R = [ list ( map ( int , input ( ) . split ( ) ) ) for _ in range ( M ) ] NEW_LINE def solve ( ) : NEW_LINE INDENT imos = [ 0 ] * ( N + 2 ) NEW_LINE ans = [ ] NEW_LINE for a , b in R : NEW_LINE INDENT imos [ a ] += 1 NEW_LINE imos [ b + 1 ] -= 1 NEW_LINE DEDENT imos = list ( accumulate ( imos ) ) NEW_LINE for i in range ( N + 2 ) : NEW_LINE INDENT if imos [ i ] != 1 : NEW_LINE INDENT imos [ i ] = 0 NEW_LINE DEDENT DEDENT imos = list ( accumulate ( imos ) ) NEW_LINE for i , t in enumerate ( R ) : NEW_LINE INDENT a = t [ 0 ] NEW_LINE b = t [ 1 ] NEW_LINE if imos [ b ] - imos [ a - 1 ] == 0 : NEW_LINE INDENT ans . append ( i ) NEW_LINE DEDENT DEDENT if ans : NEW_LINE INDENT print ( len ( ans ) ) NEW_LINE print ( " \n " . join ( map ( lambda x : str ( x + 1 ) , ans ) ) ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( 0 ) NEW_LINE DEDENT DEDENT solve ( ) NEW_LINE

n , m = ( int ( i ) for i in input ( ) . split ( ) ) NEW_LINE s = [ [ int ( i ) for i in input ( ) . split ( ) ] for i in range ( m ) ] NEW_LINE x , y , ans = [ 0 for i in range ( n + 2 ) ] , [ ] , [ ] NEW_LINE for i , j in s : x [ i ] , x [ j + 1 ] = x [ i ] + 1 , x [ j + 1 ] - 1 NEW_LINE for i in range ( 1 , n + 2 ) : NEW_LINE INDENT x [ i ] += x [ i - 1 ] NEW_LINE if x [ i ] == 1 : y . append ( i ) NEW_LINE DEDENT from bisect import bisect NEW_LINE from bisect import bisect_left NEW_LINE for i in range ( m ) : NEW_LINE INDENT if bisect_left ( y , s [ i ] [ 0 ] ) == bisect ( y , s [ i ] [ 1 ] ) : ans . append ( i + 1 ) NEW_LINE DEDENT print ( len ( ans ) ) NEW_LINE for i in ans : print ( i ) NEW_LINE


import java . util . * ; public class Main { public static int [ ] dp ; public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; String s = " " + a + b ; int c = Integer . parseInt ( s ) ; System . out . println ( c * 2 ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; public class Main { 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 ( ) ; } static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { String A = in . next ( ) ; String B = in . next ( ) ; out . println ( Integer . parseInt ( A + B ) * 2 ) ; } } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ; public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; } public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; } public char nextChar ( ) { return next ( ) . charAt ( 0 ) ; } public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } public long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } public double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } } }

import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . InputMismatchException ; import java . io . IOException ; import java . io . InputStream ; public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskB solver = new TaskB ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } static class TaskB { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { out . println ( Integer . parseInt ( in . next ( ) + in . next ( ) ) * 2 ) ; } } static class FastScanner { private InputStream in ; private byte [ ] buffer = new byte [ 1024 ] ; private int bufPointer ; private int bufLength ; public FastScanner ( InputStream in ) { this . in = in ; this . bufPointer = 0 ; this . bufLength = 0 ; } private int readByte ( ) { if ( bufPointer >= bufLength ) { if ( bufLength == - 1 ) throw new InputMismatchException ( ) ; bufPointer = 0 ; try { bufLength = in . read ( buffer ) ; } catch ( IOException e ) { throw new InputMismatchException ( ) ; } if ( bufLength <= 0 ) return - 1 ; } return buffer [ bufPointer ++ ] ; } private static boolean isPrintableChar ( int c ) { return c >= 33 && c <= 126 ; } public String next ( ) { StringBuilder sb = new StringBuilder ( ) ; int b = readByte ( ) ; while ( ! isPrintableChar ( b ) ) b = readByte ( ) ; while ( isPrintableChar ( b ) ) { sb . appendCodePoint ( b ) ; b = readByte ( ) ; } return sb . toString ( ) ; } } }

import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; double A = sc . nextInt ( ) ; double B = sc . nextInt ( ) ; double b = B ; int count = 0 ; for ( int i = 0 ; i < 4 ; i ++ ) { double c = B % 10 ; B = B / 10 ; if ( c == 0 ) { count ++ ; } else if ( c >= 1 ) { count ++ ; } else { break ; } } double a = Math . pow ( 10 , count ) ; double ans = a * A + b ; System . out . println ( String . format ( " % .0f " , ans * 2 ) ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String A = sc . next ( ) ; String B = sc . next ( ) ; String tmp = A + B ; long sum = Long . parseLong ( tmp ) ; sum *= 2 ; System . out . println ( sum ) ; } }

a , b = input ( ) . split ( ) NEW_LINE print ( int ( a + b ) * 2 ) NEW_LINE

print ( int ( input ( ) . replace ( " ▁ " , " " ) ) * 2 ) NEW_LINE

a , b = map ( str , input ( ) . split ( ) ) NEW_LINE c = a + b NEW_LINE d = int ( c ) * 2 NEW_LINE print ( d ) NEW_LINE

def solve ( ) : NEW_LINE INDENT a , b = ( input ( ) . split ( ) ) NEW_LINE print ( 2 * int ( a + b ) ) NEW_LINE DEDENT solve ( ) NEW_LINE

A , B = input ( ) . split ( ) NEW_LINE As = [ i for i in A ] + [ j for j in B ] NEW_LINE print ( int ( " " . join ( As ) ) * 2 ) NEW_LINE


import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int a = scan . nextInt ( ) ; int b = scan . nextInt ( ) ; if ( a % 3 == 0 || b % 3 == 0 || ( a + b ) % 3 == 0 ) { System . out . println ( " Possible " ) ; } else { System . out . println ( " Impossible " ) ; } } }

import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . * ; public class Main { 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 ( ) ; } private void solve ( InputStreamScanner in , PrintWriter out ) { int a = in . nextInt ( ) ; int b = in . nextInt ( ) ; out . println ( ( a % 3 == 0 ) || ( b % 3 == 0 ) || ( ( a + b ) % 3 == 0 ) ? " Possible " : " Impossible " ) ; } static class InputStreamScanner { private InputStream in ; private byte [ ] buf = new byte [ 1024 ] ; private int len = 0 ; private int off = 0 ; InputStreamScanner ( InputStream in ) { this . in = in ; } String next ( ) { StringBuilder sb = new StringBuilder ( ) ; for ( int b = skip ( ) ; ! isSpace ( b ) ; ) { sb . appendCodePoint ( b ) ; b = read ( ) ; } return sb . toString ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } char nextChar ( ) { return ( char ) skip ( ) ; } int skip ( ) { for ( int b ; ( b = read ( ) ) != - 1 ; ) { if ( ! isSpace ( b ) ) { return b ; } } return - 1 ; } private boolean isSpace ( int c ) { return c < 33 || c > 126 ; } private int read ( ) { if ( len == - 1 ) { throw new InputMismatchException ( " End ▁ of ▁ Input " ) ; } if ( off >= len ) { off = 0 ; try { len = in . read ( buf ) ; } catch ( IOException e ) { throw new InputMismatchException ( e . getMessage ( ) ) ; } if ( len <= 0 ) { return - 1 ; } } return buf [ off ++ ] ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; public class Main { 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 ( ) ; } static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { int A = in . nextInt ( ) ; int B = in . nextInt ( ) ; if ( A % 3 == 0 || B % 3 == 0 || ( A + B ) % 3 == 0 ) { out . println ( " Possible " ) ; } else { out . println ( " Impossible " ) ; } } } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ; public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; } public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; } public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } } }

import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Main main = new Main ( ) ; Scanner sc = new Scanner ( System . in ) ; main . solve ( sc ) ; sc . close ( ) ; } void solve ( Scanner sc ) { int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; if ( A % 3 == 0 ) { System . out . println ( " Possible " ) ; } else if ( B % 3 == 0 ) { System . out . println ( " Possible " ) ; } else if ( ( A + B ) % 3 == 0 ) { System . out . println ( " Possible " ) ; } else { System . out . println ( " Impossible " ) ; } } }

import java . util . * ; class Main { static Scanner sc = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; System . out . println ( ( a + b ) % 3 == 0 || ( a * b ) % 3 == 0 ? " Possible " : " Impossible " ) ; } }

a , b = map ( int , input ( ) . split ( ) ) NEW_LINE print ( " Possible " if a % 3 == 0 or b % 3 == 0 or ( a + b ) % 3 == 0 else " Impossible " ) NEW_LINE

[ A , B ] = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE if A % 3 == 0 or B % 3 == 0 or ( A + B ) % 3 == 0 : NEW_LINE INDENT print ( " Possible " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Impossible " ) NEW_LINE DEDENT

a , b = [ int ( item ) for item in input ( ) . split ( ) ] NEW_LINE if a % 3 == 0 or b % 3 == 0 or ( a + b ) % 3 == 0 : NEW_LINE INDENT print ( " Possible " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Impossible " ) NEW_LINE DEDENT

a , b = map ( int , input ( ) . split ( ) ) ; print ( ( ' P ' * ( a % 3 == 0 or b % 3 == 0 or ( a + b ) % 3 == 0 ) or ' Imp ' ) + ' ossible ' ) NEW_LINE

A , B = map ( int , input ( ) . split ( ) ) NEW_LINE print ( [ " Possible " , " Impossible " ] [ bool ( A * B * ( A + B ) % 3 ) ] ) NEW_LINE


import java . util . * ; class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int res = Math . max ( Math . max ( Math . max ( ( a % 100 + 900 ) - b , a - ( b % 100 + 100 ) ) , Math . max ( ( a / 100 * 100 + a % 10 + 90 - b ) , ( a - ( b / 100 * 100 + b % 10 ) ) ) ) , Math . max ( a / 10 * 10 + 9 - b , ( a - ( b / 10 * 10 ) ) ) ) ; System . out . println ( res ) ; } }

import java . util . Arrays ; import java . util . Scanner ; import java . util . stream . IntStream ; public class Main { static final Scanner s = new Scanner ( System . in ) ; static int getInt ( ) { return Integer . parseInt ( s . next ( ) ) ; } static IntStream REPS ( int r ) { return IntStream . range ( 0 , r ) ; } static IntStream REPS ( int l , int r ) { return IntStream . rangeClosed ( l , r ) ; } static IntStream INTS ( int l ) { return REPS ( l ) . map ( i -> getInt ( ) ) ; } public static void main ( String [ ] __ ) { char [ ] a = s . next ( ) . toCharArray ( ) , aa = Arrays . copyOf ( a , a . length ) , b = s . next ( ) . toCharArray ( ) , bb = Arrays . copyOf ( b , b . length ) ; for ( int i = 0 ; i < aa . length ; i ++ ) { if ( aa [ i ] != '9' ) { aa [ i ] = '9' ; break ; } } if ( bb [ 0 ] == '1' ) { for ( int i = 1 ; i < bb . length ; i ++ ) { if ( bb [ i ] != '0' ) { bb [ i ] = '0' ; break ; } } } else { bb [ 0 ] = '1' ; } System . out . println ( Math . max ( miare ( aa ) - miare ( b ) , miare ( a ) - miare ( bb ) ) ) ; } static int miare ( char [ ] c ) { return Integer . parseInt ( String . valueOf ( c ) ) ; } }

import java . util . Scanner ; class Main { void solve ( ) { Scanner in = new Scanner ( System . in ) ; String [ ] list = in . nextLine ( ) . split ( " ▁ " ) ; String a = list [ 0 ] ; String b = list [ 1 ] ; int max = Integer . MIN_VALUE ; int v = Integer . valueOf ( "9" + a . charAt ( 1 ) + a . charAt ( 2 ) ) ; max = Math . max ( max , v - Integer . valueOf ( b ) ) ; v = Integer . valueOf ( a . charAt ( 0 ) + "9" + a . charAt ( 2 ) ) ; max = Math . max ( max , v - Integer . valueOf ( b ) ) ; v = Integer . valueOf ( " " + a . charAt ( 0 ) + a . charAt ( 1 ) + "9" ) ; max = Math . max ( max , v - Integer . valueOf ( b ) ) ; v = Integer . valueOf ( "1" + b . charAt ( 1 ) + b . charAt ( 2 ) ) ; max = Math . max ( max , Integer . valueOf ( a ) - v ) ; v = Integer . valueOf ( b . charAt ( 0 ) + "0" + b . charAt ( 2 ) ) ; max = Math . max ( max , Integer . valueOf ( a ) - v ) ; v = Integer . valueOf ( " " + b . charAt ( 0 ) + b . charAt ( 1 ) + "0" ) ; max = Math . max ( max , Integer . valueOf ( a ) - v ) ; System . out . println ( max ) ; } public static void main ( String [ ] args ) { new Main ( ) . solve ( ) ; } }

import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { final Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; String sa = String . valueOf ( a ) ; String sb = String . valueOf ( b ) ; int topa = Integer . parseInt ( sa . substring ( 0 , 1 ) ) ; int topb = Integer . parseInt ( sb . substring ( 0 , 1 ) ) ; int seca = Integer . parseInt ( String . valueOf ( a ) . substring ( 1 , 2 ) ) ; int secb = Integer . parseInt ( String . valueOf ( b ) . substring ( 1 , 2 ) ) ; int a3 = Integer . parseInt ( String . valueOf ( a ) . substring ( 2 , 3 ) ) ; int b3 = Integer . parseInt ( String . valueOf ( b ) . substring ( 2 , 3 ) ) ; long ans = a - b ; for ( int i = 1 ; i <= 9 ; i ++ ) { ans = Math . max ( 100 * i + a % 100 - b , ans ) ; ans = Math . max ( a - 100 * i - b % 100 , ans ) ; } for ( int i = 0 ; i <= 9 ; i ++ ) { ans = Math . max ( ans , 100 * topa + 10 * i + a3 - b ) ; ans = Math . max ( ans , a - 100 * topb - 10 * i - b3 ) ; ans = Math . max ( ans , 100 * topa + 10 * seca + i - b ) ; ans = Math . max ( ans , a - 100 * topb - 10 * secb - i ) ; } System . out . println ( ans ) ; } }

import java . util . * ; public class Main { private static Scanner scanner = new Scanner ( System . in ) ; public static void main ( String [ ] $ ) { int a = scanner . nextInt ( ) , b = scanner . nextInt ( ) ; System . out . println ( Math . max ( Math . max ( a - b + Math . max ( 9 - a / 100 , b / 100 - 1 ) * 100 , a - b + Math . max ( 9 - a % 100 / 10 , b % 100 / 10 ) * 10 ) , a - b + Math . max ( 9 - a % 10 , b % 10 ) ) ) ; } }

a , b = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE if 9 - int ( a / 100 ) > int ( b / 100 ) - 1 : NEW_LINE INDENT print ( a + 100 * ( 9 - int ( a / 100 ) ) - b ) NEW_LINE DEDENT elif 9 - int ( a / 100 ) < int ( b / 100 ) - 1 : NEW_LINE INDENT print ( a - b + 100 * ( int ( b / 100 ) - 1 ) ) NEW_LINE DEDENT elif int ( a / 100 ) == 9 and int ( b / 100 ) == 1 : NEW_LINE INDENT if int ( a / 10 ) == 99 and int ( b / 10 ) == 10 : NEW_LINE INDENT num = max ( 9 - a % 10 , b % 10 ) NEW_LINE print ( a - b + int ( num ) ) NEW_LINE DEDENT else : NEW_LINE INDENT num2 = max ( 9 - int ( ( a - 900 ) / 10 ) , int ( ( b - 100 ) / 10 ) ) NEW_LINE print ( a - b + int ( num2 * 10 ) ) NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT print ( a - b + 100 * ( int ( b / 100 ) - 1 ) ) NEW_LINE DEDENT

A , B = input ( ) . split ( ) NEW_LINE C = A . replace ( A [ 0 ] , '9' , 1 ) NEW_LINE D = A [ : 1 ] + '9' + A [ 2 : ] NEW_LINE E = A [ : 2 ] + '9' NEW_LINE F = B . replace ( B [ 0 ] , '1' , 1 ) NEW_LINE G = B [ : 1 ] + '0' + B [ 2 : ] NEW_LINE H = B [ : 2 ] + '0' NEW_LINE I = [ int ( A ) , int ( C ) , int ( D ) , int ( E ) ] NEW_LINE J = [ int ( B ) , int ( F ) , int ( G ) , int ( H ) ] NEW_LINE ans = - 999 NEW_LINE for i in range ( 4 ) : NEW_LINE INDENT if I [ i ] - int ( B ) >= ans : NEW_LINE INDENT ans = I [ i ] - int ( B ) NEW_LINE DEDENT DEDENT for j in range ( 4 ) : NEW_LINE INDENT if int ( A ) - J [ j ] >= ans : NEW_LINE INDENT ans = int ( A ) - J [ j ] NEW_LINE DEDENT DEDENT print ( ans ) NEW_LINE

A , B = map ( int , input ( ) . split ( ) ) NEW_LINE pA = [ int ( c ) for c in list ( str ( A ) ) ] NEW_LINE if pA [ 0 ] == 9 : NEW_LINE INDENT if pA [ 1 ] == 9 : NEW_LINE INDENT if pA [ 2 ] == 9 : NEW_LINE INDENT pass NEW_LINE DEDENT else : NEW_LINE INDENT pA [ 2 ] = 9 NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT pA [ 1 ] = 9 NEW_LINE DEDENT DEDENT else : pA [ 0 ] = 9 NEW_LINE ppA = pA [ 0 ] * 100 + pA [ 1 ] * 10 + pA [ 2 ] NEW_LINE pB = [ int ( c ) for c in list ( str ( B ) ) ] NEW_LINE if pB [ 0 ] == 1 : NEW_LINE INDENT if pB [ 1 ] > 0 : NEW_LINE INDENT pB [ 1 ] = 0 NEW_LINE DEDENT else : NEW_LINE INDENT if pB [ 2 ] > 0 : NEW_LINE INDENT pB [ 2 ] = 0 NEW_LINE DEDENT DEDENT DEDENT else : NEW_LINE INDENT pB [ 0 ] = 1 NEW_LINE DEDENT ppB = pB [ 0 ] * 100 + pB [ 1 ] * 10 + pB [ 2 ] NEW_LINE print ( max ( A - B , ppA - B , A - ppB ) ) NEW_LINE

def main ( ) : NEW_LINE INDENT a , b = input ( ) . split ( ) NEW_LINE subs = [ int ( a ) - int ( b ) , int ( "9" + a [ 1 ] + a [ 2 ] ) - int ( b ) , int ( a [ 0 ] + "9" + a [ 2 ] ) - int ( b ) , int ( a [ 0 ] + a [ 1 ] + "9" ) - int ( b ) , int ( a ) - int ( "1" + b [ 1 ] + b [ 2 ] ) , int ( a ) - int ( b [ 0 ] + "0" + b [ 2 ] ) , int ( a ) - int ( b [ 0 ] + b [ 1 ] + "0" ) , ] NEW_LINE print ( max ( subs ) ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT main ( ) NEW_LINE DEDENT


import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ; int max = 0 ; for ( int i = 1 ; i < n - 1 ; i ++ ) { int count = 0 ; for ( char c = ' a ' ; c <= ' z ' ; c ++ ) { if ( s . substring ( 0 , i ) . contains ( String . valueOf ( c ) ) && s . substring ( i ) . contains ( String . valueOf ( c ) ) ) { count ++ ; } } if ( count > max ) { max = count ; } } System . out . println ( max ) ; sc . close ( ) ; } }

import java . util . HashSet ; import java . util . Scanner ; import java . util . Set ; public class Main { public static void main ( String [ ] args ) { try ( Scanner sc = new Scanner ( System . in ) ) { new Main ( ) . solve ( sc ) ; } } void solve ( Scanner sc ) { int n = sc . nextInt ( ) ; char [ ] s = sc . next ( ) . toCharArray ( ) ; int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { Set < Character > startSet = new HashSet < > ( i ) ; for ( int j = 0 ; j < i ; j ++ ) { startSet . add ( s [ j ] ) ; } Set < Character > endSet = new HashSet < > ( n - i ) ; for ( int j = i ; j < n ; j ++ ) { endSet . add ( s [ j ] ) ; } startSet . retainAll ( endSet ) ; ans = Math . max ( ans , startSet . size ( ) ) ; } System . out . println ( ans ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String po = sc . nextLine ( ) ; po = sc . nextLine ( ) ; int count = 0 ; for ( int i = 1 ; i < po . length ( ) ; i ++ ) { int nm = 0 ; String a = po . substring ( 0 , i ) ; String b = po . substring ( i ) ; Map < String , Integer > m = new HashMap < String , Integer > ( ) ; for ( int j = 0 ; j < a . length ( ) ; j ++ ) { m . put ( a . substring ( j , j + 1 ) , 1 ) ; } for ( int j = 0 ; j < b . length ( ) ; j ++ ) { if ( m . get ( b . substring ( j , j + 1 ) ) != null ) { nm ++ ; m . put ( b . substring ( j , j + 1 ) , null ) ; } } count = Math . max ( count , nm ) ; } System . out . println ( count ) ; } }

import java . io . PrintWriter ; import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; int N = Integer . parseInt ( sc . next ( ) ) ; String S = sc . next ( ) ; int [ ] cntnum = new int [ N ] ; int cnt = 0 ; for ( int i = 1 ; i < S . length ( ) ; i ++ ) { int ans = 0 ; String s1 = S . substring ( 0 , i ) ; String s2 = S . substring ( i , N ) ; for ( char c = ' a ' ; c <= ' z ' ; c ++ ) { String d = String . valueOf ( c ) ; if ( s1 . indexOf ( d ) != - 1 && s2 . indexOf ( d ) != - 1 ) { ans ++ ; } } if ( cnt < ans ) { cnt = ans ; } } out . print ( cnt ) ; out . flush ( ) ; } }

import java . util . ArrayList ; import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; String s = sc . next ( ) ; int max = 0 ; int a , j ; ArrayList < Integer > c = new ArrayList < > ( ) ; ArrayList < Integer > cc = new ArrayList < > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { j = 0 ; a = 0 ; while ( j <= i ) { int b = s . charAt ( j ) ; c . add ( b ) ; j ++ ; } while ( j < N ) { int d = s . charAt ( j ) ; if ( c . contains ( d ) && ! cc . contains ( d ) ) { a ++ ; cc . add ( d ) ; } j ++ ; } if ( a > max ) max = a ; c . clear ( ) ; cc . clear ( ) ; } System . out . println ( max ) ; } }

n = int ( input ( ) ) NEW_LINE s = str ( input ( ) ) NEW_LINE s1 = ' ' NEW_LINE s2 = ' ' NEW_LINE max = 0 NEW_LINE for i in range ( 1 , n - 1 ) : NEW_LINE INDENT count = { } NEW_LINE s1 = s [ : i ] NEW_LINE s2 = s [ i : ] NEW_LINE for j in range ( len ( s1 ) ) : NEW_LINE INDENT if s2 . count ( s1 [ j ] ) >= 1 : NEW_LINE INDENT count [ s1 [ j ] ] = 1 NEW_LINE DEDENT DEDENT data = list ( count . keys ( ) ) NEW_LINE if len ( data ) > max : NEW_LINE INDENT max = len ( data ) NEW_LINE DEDENT DEDENT print ( max ) NEW_LINE

_ , a = open ( 0 ) ; print ( max ( len ( set ( a [ : s ] ) & set ( a [ s : ] ) ) for s in range ( 99 ) ) ) NEW_LINE

N = int ( input ( ) ) NEW_LINE s = input ( ) NEW_LINE def countCommonLetter ( X , Y ) : NEW_LINE INDENT return len ( set ( [ x for x in X if x in Y ] ) ) NEW_LINE DEDENT def solve ( ) : NEW_LINE INDENT return max ( [ countCommonLetter ( s [ : i ] , s [ i : ] ) for i in range ( 1 , N ) ] ) NEW_LINE DEDENT print ( solve ( ) ) NEW_LINE

N = int ( input ( ) ) NEW_LINE s = input ( ) NEW_LINE ans = 0 NEW_LINE for i in range ( 1 , N - 1 ) : NEW_LINE INDENT cnt = 0 NEW_LINE X = s [ : i ] NEW_LINE Y = s [ i : ] NEW_LINE alpX = [ 0 for j in range ( 26 ) ] NEW_LINE alpY = [ 0 for j in range ( 26 ) ] NEW_LINE lenX = i NEW_LINE lenY = N - i NEW_LINE for j in range ( lenX ) : NEW_LINE INDENT alpX [ ord ( X [ j ] ) - 97 ] += 1 NEW_LINE DEDENT for j in range ( lenY ) : NEW_LINE INDENT alpY [ ord ( Y [ j ] ) - 97 ] += 1 NEW_LINE DEDENT for j in range ( 26 ) : NEW_LINE INDENT if alpX [ j ] != 0 and alpY [ j ] != 0 : NEW_LINE INDENT cnt += 1 NEW_LINE DEDENT DEDENT if ans < cnt : NEW_LINE INDENT ans = cnt NEW_LINE DEDENT DEDENT print ( str ( ans ) ) NEW_LINE

N = int ( input ( ) ) NEW_LINE S = input ( ) NEW_LINE import string NEW_LINE abcs = string . ascii_lowercase NEW_LINE ans = 0 NEW_LINE for sakaime in range ( N ) : NEW_LINE INDENT cnt = 0 NEW_LINE left = S [ : sakaime ] NEW_LINE right = S [ sakaime : ] NEW_LINE for alpha in abcs : NEW_LINE INDENT if alpha in left and alpha in right : NEW_LINE INDENT cnt += 1 NEW_LINE DEDENT DEDENT ans = max ( ans , cnt ) NEW_LINE DEDENT print ( ans ) NEW_LINE


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . InputMismatchException ; import java . io . IOException ; import java . io . InputStream ; public class Main { 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 ( ) ; } static class TaskA { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { int w = in . nextInt ( ) ; int h = in . nextInt ( ) ; out . println ( w / 4 == h / 3 ? "4:3" : "16:9" ) ; } } static class FastScanner { private InputStream in ; private byte [ ] buffer = new byte [ 1024 ] ; private int bufPointer ; private int bufLength ; public FastScanner ( InputStream in ) { this . in = in ; this . bufPointer = 0 ; this . bufLength = 0 ; } private int readByte ( ) { if ( bufPointer >= bufLength ) { if ( bufLength == - 1 ) throw new InputMismatchException ( ) ; bufPointer = 0 ; try { bufLength = in . read ( buffer ) ; } catch ( IOException e ) { throw new InputMismatchException ( ) ; } if ( bufLength <= 0 ) return - 1 ; } return buffer [ bufPointer ++ ] ; } private static boolean isSpaceChar ( int c ) { return c == ' ▁ ' || c == ' \n ' || c == ' \r ' || c == ' \t ' || c == - 1 ; } public int nextInt ( ) { int n = 0 ; int b = readByte ( ) ; while ( isSpaceChar ( b ) ) b = readByte ( ) ; boolean minus = ( b == ' - ' ) ; if ( minus ) b = readByte ( ) ; while ( b >= '0' && b <= '9' ) { n *= 10 ; n += b - '0' ; b = readByte ( ) ; } if ( ! isSpaceChar ( b ) ) throw new NumberFormatException ( ) ; return minus ? - n : n ; } } }

import java . util . * ; import java . util . stream . * ; import static java . lang . System . * ; class Main { static Scanner sc = new Scanner ( System . in ) ; static int nextInt ( ) { return Integer . parseInt ( sc . next ( ) ) ; } static int [ ] nextIntArray ( int n ) { return IntStream . range ( 0 , n ) . map ( i -> nextInt ( ) ) . toArray ( ) ; } static int max ( int ... ar ) { Arrays . sort ( ar ) ; return ar [ ar . length - 1 ] ; } static int min ( int ... ar ) { Arrays . sort ( ar ) ; return ar [ 0 ] ; } static int maxInt = Integer . MAX_VALUE ; static int minInt = Integer . MIN_VALUE ; public static void main ( String [ ] args ) { int w = nextInt ( ) , h = nextInt ( ) ; out . println ( w * 3 == h * 4 ? "4:3" : "16:9" ) ; } }

import java . util . Scanner ; class Main { public static void main ( String [ ] args ) { String [ ] line = new Scanner ( System . in ) . nextLine ( ) . split ( " ▁ " , 2 ) ; int w = Integer . parseInt ( line [ 0 ] ) ; int h = Integer . parseInt ( line [ 1 ] ) ; if ( w * 3 == h * 4 ) { System . out . println ( "4:3" ) ; } else { System . out . println ( "16:9" ) ; } } }

import java . io . * ; import java . util . * ; public class Main { public static void main ( String [ ] args ) { MyScanner sc = new MyScanner ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; System . out . println ( a * 3 == b * 4 ? "4:3" : "16:9" ) ; } static int l_min ( int [ ] a ) { Arrays . sort ( a ) ; return a [ 0 ] ; } static int l_max ( int [ ] a ) { int l = a . length ; Arrays . sort ( a ) ; return a [ l - 1 ] ; } public static PrintWriter out ; public static class MyScanner { BufferedReader br ; StringTokenizer st ; public MyScanner ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; public class Main { 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 ( ) ; } static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { int W = in . nextInt ( ) ; int H = in . nextInt ( ) ; if ( W * 3 == H * 4 ) { out . println ( "4:3" ) ; } else { out . println ( "16:9" ) ; } } } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ; public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; } public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; } public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } } }

W , H = map ( int , input ( ) . split ( ) ) NEW_LINE if W / H == 4 / 3 : NEW_LINE INDENT print ( "4:3" ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( "16:9" ) NEW_LINE DEDENT

def gcd ( a : int , b : int ) -> int : NEW_LINE INDENT if a < b : NEW_LINE INDENT a , b = b , a NEW_LINE DEDENT return a if b == 0 else gcd ( b , a % b ) NEW_LINE DEDENT def tv ( H : int , W : int ) -> str : NEW_LINE INDENT g = gcd ( H , W ) NEW_LINE return ' { } : { } ' . format ( H // g , W // g ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT H , W = map ( int , input ( ) . split ( ) ) NEW_LINE ans = tv ( H , W ) NEW_LINE print ( ans ) NEW_LINE DEDENT

import fractions NEW_LINE a , b = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE x = a // ( fractions . gcd ( a , b ) ) NEW_LINE y = b // ( fractions . gcd ( a , b ) ) NEW_LINE print ( " { 0 } : {1 } " . format ( x , y ) ) NEW_LINE

x , y = map ( int , input ( ) . split ( ) ) NEW_LINE print ( '16:9' if ( x / y ) > 1.6 else '4:3' ) NEW_LINE


import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int N = scanner . nextInt ( ) ; int M = scanner . nextInt ( ) ; final long INF = - 1_000_000_000_000_000L ; long [ ] dist = new long [ N ] ; for ( int i = 1 ; i < N ; i ++ ) dist [ i ] = INF ; int [ ] [ ] edges = new int [ M ] [ 2 ] ; int [ ] costs = new int [ M ] ; for ( int i = 0 ; i < M ; i ++ ) { edges [ i ] = new int [ ] { scanner . nextInt ( ) - 1 , scanner . nextInt ( ) - 1 } ; costs [ i ] = scanner . nextInt ( ) ; } int [ ] prev = new int [ N ] ; prev [ 0 ] = - 1 ; for ( int i = 0 ; i < 2 * N ; i ++ ) { for ( int j = 0 ; j < M ; j ++ ) { int from = edges [ j ] [ 0 ] ; int to = edges [ j ] [ 1 ] ; int cost = costs [ j ] ; if ( dist [ from ] > INF ) { long newValue = dist [ from ] + cost ; if ( newValue > dist [ to ] ) { dist [ to ] = newValue ; prev [ to ] = from ; } } } } boolean [ ] visited = new boolean [ N ] ; int i = N - 1 ; while ( i != - 1 ) { if ( visited [ i ] ) { System . out . println ( " inf " ) ; return ; } visited [ i ] = true ; i = prev [ i ] ; } System . out . println ( dist [ N - 1 ] ) ; } }

import java . util . Arrays ; import java . util . Scanner ; class Main { static int n ; static int m ; static Edge [ ] e ; static long dis [ ] ; static final long inf = 1000000000000000l ; public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; n = sc . nextInt ( ) ; m = sc . nextInt ( ) ; e = new Edge [ m ] ; dis = new long [ n ] ; Arrays . fill ( dis , inf ) ; dis [ 0 ] = 0 ; for ( int i = 0 ; i < m ; i ++ ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; e [ i ] = new Edge ( a - 1 , b - 1 , - c ) ; } sc . close ( ) ; if ( bellmanFord ( ) ) { System . out . print ( " inf " ) ; } else { System . out . println ( - dis [ n - 1 ] ) ; } } public static boolean bellmanFord ( ) { for ( int i = 0 ; i < n + 1 ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( dis [ e [ j ] . from ] != inf && dis [ e [ j ] . to ] > dis [ e [ j ] . from ] + e [ j ] . cost ) { dis [ e [ j ] . to ] = dis [ e [ j ] . from ] + e [ j ] . cost ; if ( i == n && e [ j ] . to == n - 1 ) { return true ; } } } } return false ; } } class Edge { int from ; int to ; long cost ; Edge ( int from , int to , long cost ) { this . from = from ; this . to = to ; this . cost = cost ; } }

import java . util . Scanner ; import java . util . Arrays ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; Edge [ ] edge = new Edge [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { int a = sc . nextInt ( ) - 1 ; int b = sc . nextInt ( ) - 1 ; long c = sc . nextLong ( ) ; edge [ i ] = new Edge ( a , b , - c ) ; } long [ ] dist = new long [ n ] ; Arrays . fill ( dist , Long . MAX_VALUE ) ; dist [ 0 ] = 0 ; boolean flag = true ; int cnt = 0 ; long ans = 0 ; while ( flag ) { flag = false ; for ( int i = 0 ; i < m ; i ++ ) { if ( dist [ edge [ i ] . from ] != Long . MAX_VALUE && dist [ edge [ i ] . to ] > dist [ edge [ i ] . from ] + edge [ i ] . cost ) { flag = true ; dist [ edge [ i ] . to ] = dist [ edge [ i ] . from ] + edge [ i ] . cost ; } } if ( cnt == n ) { ans = - dist [ n - 1 ] ; } if ( cnt == 2 * n ) { if ( ans < - dist [ n - 1 ] ) { System . out . println ( " inf " ) ; return ; } break ; } cnt ++ ; } System . out . println ( - dist [ n - 1 ] ) ; } static class Edge { int from ; int to ; long cost ; public Edge ( int from , int to , long cost ) { this . from = from ; this . to = to ; this . cost = cost ; } } }

import java . util . Scanner ; public class Main { static final int MAX = 1000 ; static final long INF = 1000000000000000l ; static final int WHITE = 0 ; static final int GRAY = 1 ; static final int BLACK = 2 ; static int N , M ; static Edge [ ] e ; public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; N = sc . nextInt ( ) ; M = sc . nextInt ( ) ; e = new Edge [ M ] ; for ( int i = 0 ; i < M ; i ++ ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; e [ i ] = new Edge ( a - 1 , b - 1 , - c ) ; } sc . close ( ) ; if ( bellmanFord ( ) ) { System . out . println ( " inf " ) ; } else { System . out . println ( - d [ N - 1 ] ) ; } } static long [ ] d = new long [ MAX ] ; static boolean bellmanFord ( ) { for ( int i = 0 ; i < MAX ; i ++ ) { d [ i ] = INF ; } d [ 0 ] = 0 ; for ( int i = 0 ; i < 2 * N ; i ++ ) { for ( int j = 0 ; j < M ; j ++ ) { if ( d [ e [ j ] . from ] != INF && d [ e [ j ] . to ] > d [ e [ j ] . from ] + e [ j ] . cost ) { d [ e [ j ] . to ] = d [ e [ j ] . from ] + e [ j ] . cost ; if ( i >= N - 1 && e [ j ] . to == N - 1 ) return true ; } } } return false ; } static class Edge { int from , to ; long cost ; public Edge ( int from , int to , long cost ) { this . from = from ; this . to = to ; this . cost = cost ; } } }

import java . util . Arrays ; import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int [ ] [ ] edge = new int [ m ] [ 3 ] ; for ( int i = 0 ; i < m ; i ++ ) { edge [ i ] [ 0 ] = sc . nextInt ( ) - 1 ; edge [ i ] [ 1 ] = sc . nextInt ( ) - 1 ; edge [ i ] [ 2 ] = - sc . nextInt ( ) ; } long [ ] d = bellmanFord ( n , edge , 0 ) ; if ( d == null ) System . out . println ( " inf " ) ; else System . out . println ( - d [ n - 1 ] ) ; sc . close ( ) ; } public static long [ ] bellmanFord ( int n , int [ ] [ ] edge , int s ) { long d [ ] = new long [ n ] ; Arrays . fill ( d , Long . MAX_VALUE ) ; d [ s ] = 0L ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < edge . length ; j ++ ) { int [ ] e = edge [ j ] ; if ( d [ e [ 0 ] ] != Long . MAX_VALUE && d [ e [ 1 ] ] > d [ e [ 0 ] ] + e [ 2 ] ) { d [ e [ 1 ] ] = d [ e [ 0 ] ] + e [ 2 ] ; if ( i == n - 1 && e [ 1 ] == n - 1 ) { d = null ; break ; } } } } return d ; } }

INF = float ( ' inf ' ) NEW_LINE def solve ( ) : NEW_LINE INDENT lp = [ - INF ] * n NEW_LINE lp [ 0 ] = 0 NEW_LINE for i in range ( n ) : NEW_LINE INDENT for a , b , c in es : NEW_LINE INDENT if lp [ a ] != - INF and lp [ b ] < lp [ a ] + c : NEW_LINE INDENT lp [ b ] = lp [ a ] + c NEW_LINE if i == n - 1 and b == n - 1 : NEW_LINE INDENT return ' inf ' NEW_LINE DEDENT DEDENT DEDENT DEDENT return lp [ n - 1 ] NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT n , m = map ( int , input ( ) . split ( ) ) NEW_LINE es = [ ] NEW_LINE for i in range ( m ) : NEW_LINE INDENT a , b , c = map ( int , input ( ) . split ( ) ) NEW_LINE a -= 1 NEW_LINE b -= 1 NEW_LINE es . append ( ( a , b , c ) ) NEW_LINE DEDENT print ( solve ( ) ) NEW_LINE DEDENT

from functools import reduce NEW_LINE import math NEW_LINE def main ( ) : NEW_LINE INDENT INF = float ( " inf " ) NEW_LINE N , M = ( int ( _ ) for _ in input ( ) . split ( ) ) NEW_LINE a = [ ] NEW_LINE b = [ ] NEW_LINE c = [ ] NEW_LINE d = [ INF ] * N NEW_LINE for i in range ( M ) : NEW_LINE INDENT s1 , s2 , s3 = ( int ( _ ) for _ in input ( ) . split ( ) ) NEW_LINE a . append ( s1 ) NEW_LINE b . append ( s2 ) NEW_LINE c . append ( - s3 ) NEW_LINE DEDENT d [ 0 ] = 0 NEW_LINE cnt = [ 0 ] * N NEW_LINE for j in range ( N ) : NEW_LINE INDENT update = False NEW_LINE for i in range ( M ) : NEW_LINE INDENT if math . isinf ( d [ a [ i ] - 1 ] ) : NEW_LINE INDENT continue NEW_LINE DEDENT if ( d [ b [ i ] - 1 ] > d [ a [ i ] - 1 ] + c [ i ] ) : NEW_LINE INDENT d [ b [ i ] - 1 ] = d [ a [ i ] - 1 ] + c [ i ] NEW_LINE cnt [ b [ i ] - 1 ] += 1 NEW_LINE update = True NEW_LINE DEDENT DEDENT if not update : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT if cnt [ N - 1 ] < N : NEW_LINE INDENT ans = - d [ N - 1 ] NEW_LINE DEDENT else : NEW_LINE INDENT ans = ' inf ' NEW_LINE DEDENT print ( ans ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT main ( ) NEW_LINE DEDENT

def bellman_ford ( vertex_num : int , edges : list , source : int , sink : int ) -> list : NEW_LINE INDENT distances = [ float ( ' inf ' ) ] * ( vertex_num ) NEW_LINE distances [ source ] = 0 NEW_LINE for _ in range ( vertex_num ) : NEW_LINE INDENT for u , v , c in edges : NEW_LINE INDENT distances [ v ] = min ( distances [ v ] , distances [ u ] + c ) NEW_LINE DEDENT DEDENT for u , v , c in edges : NEW_LINE INDENT if distances [ u ] + c < distances [ v ] : NEW_LINE INDENT distances [ v ] = distances [ u ] + c NEW_LINE if v == sink : NEW_LINE INDENT return [ ] NEW_LINE DEDENT DEDENT DEDENT return distances NEW_LINE DEDENT def score_attack ( N : int , M : int , edges : list ) -> int : NEW_LINE INDENT distances = bellman_ford ( N , [ ( u - 1 , v - 1 , - c ) for u , v , c in edges ] , 0 , N - 1 ) NEW_LINE return - distances [ N - 1 ] if distances else float ( ' inf ' ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT M = 0 NEW_LINE N , M = map ( int , input ( ) . split ( ) ) NEW_LINE edges = [ tuple ( map ( int , input ( ) . split ( ) ) ) for _ in range ( M ) ] NEW_LINE ans = score_attack ( N , M , edges ) NEW_LINE print ( ans ) NEW_LINE DEDENT

import sys NEW_LINE sys . setrecursionlimit ( 10 ** 6 ) NEW_LINE input = sys . stdin . readline NEW_LINE N , M = map ( int , input ( ) . split ( ) ) NEW_LINE abc = [ [ int ( j ) for j in input ( ) . split ( ) ] for _ in range ( M ) ] NEW_LINE con = [ [ ] for _ in range ( N + 1 ) ] NEW_LINE inf = float ( " inf " ) NEW_LINE allcost = [ - inf ] * ( N + 1 ) NEW_LINE allcost [ 1 ] = 0 NEW_LINE for i in range ( M ) : NEW_LINE INDENT a , b , c = abc [ i ] NEW_LINE con [ a ] . append ( b ) NEW_LINE DEDENT for n in range ( 1 , N ) : NEW_LINE INDENT for edge in range ( M ) : NEW_LINE INDENT a , b , c = abc [ edge ] NEW_LINE if allcost [ b ] < allcost [ a ] + c : NEW_LINE INDENT allcost [ b ] = allcost [ a ] + c NEW_LINE DEDENT DEDENT DEDENT neg = [ False ] * ( N + 1 ) NEW_LINE for edge in range ( M ) : NEW_LINE INDENT a , b , c = abc [ edge ] NEW_LINE if allcost [ a ] + c > allcost [ b ] : NEW_LINE INDENT neg [ b ] = True NEW_LINE DEDENT if neg [ a ] == True : NEW_LINE INDENT neg [ b ] = True NEW_LINE DEDENT DEDENT if neg [ N ] : NEW_LINE INDENT print ( " inf " ) NEW_LINE exit ( 0 ) NEW_LINE DEDENT print ( allcost [ N ] ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) NEW_LINE a = [ 0 ] * m NEW_LINE b = [ 0 ] * m NEW_LINE c = [ 0 ] * m NEW_LINE for i in range ( 0 , m ) : NEW_LINE INDENT a [ i ] , b [ i ] , c [ i ] = map ( int , input ( ) . split ( ) ) NEW_LINE a [ i ] = a [ i ] - 1 NEW_LINE b [ i ] = b [ i ] - 1 NEW_LINE c [ i ] = - c [ i ] NEW_LINE DEDENT INF = ( n - 1 ) * max ( abs ( min ( c ) ) , abs ( max ( c ) ) ) NEW_LINE dist = [ INF ] * n NEW_LINE dist [ 0 ] = 0 NEW_LINE for j in range ( 0 , n - 1 ) : NEW_LINE INDENT for i in range ( 0 , m ) : NEW_LINE INDENT if dist [ a [ i ] ] == INF : NEW_LINE INDENT continue NEW_LINE DEDENT dist [ b [ i ] ] = min ( dist [ b [ i ] ] , dist [ a [ i ] ] + c [ i ] ) NEW_LINE DEDENT DEDENT ans = - dist [ n - 1 ] NEW_LINE negative = [ False ] * n NEW_LINE for j in range ( 0 , n ) : NEW_LINE INDENT for i in range ( 0 , m ) : NEW_LINE INDENT if dist [ a [ i ] ] == INF : NEW_LINE INDENT continue NEW_LINE DEDENT if negative [ a [ i ] ] : NEW_LINE INDENT negative [ b [ i ] ] = True NEW_LINE DEDENT elif dist [ a [ i ] ] + c [ i ] < dist [ b [ i ] ] : NEW_LINE INDENT dist [ b [ i ] ] = dist [ a [ i ] ] + c [ i ] NEW_LINE negative [ b [ i ] ] = True NEW_LINE DEDENT DEDENT DEDENT if negative [ n - 1 ] : NEW_LINE INDENT print ( " inf " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ans ) NEW_LINE DEDENT


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] [ ] chars = new int [ n ] [ 26 ] ; for ( int i = 0 ; i < n ; i ++ ) { String s = sc . next ( ) ; for ( int j = 0 ; j < s . length ( ) ; j ++ ) { chars [ i ] [ ( int ) ( s . charAt ( j ) - ' a ' ) ] ++ ; } } String ans = " " ; for ( int i = 0 ; i < 26 ; i ++ ) { int min = Integer . MAX_VALUE ; for ( int j = 0 ; j < n ; j ++ ) { min = Math . min ( min , chars [ j ] [ i ] ) ; } for ( int j = 0 ; j < min ; j ++ ) { ans += ( char ) ( i + ' a ' ) ; } } System . out . println ( ans ) ; return ; } }

import java . util . * ; public class Main { public static int order ( long a ) { int o = 0 ; long d = 1 ; while ( d <= a ) { o ++ ; d *= 10 ; } return o ; } public static int ABCNumber ( char a ) { int num = - 1 ; char [ ] abc = " abcdefghijklmnopqrstuvwxyz " . toCharArray ( ) ; for ( int n = 0 ; n < 26 ; n ++ ) { if ( a == abc [ n ] ) num = n ; } return num ; } public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = Integer . parseInt ( sc . next ( ) ) ; String [ ] S = new String [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { S [ i ] = sc . next ( ) ; } int [ ] xmin = new int [ 26 ] ; for ( int n = 0 ; n < 26 ; n ++ ) xmin [ n ] = 50 ; for ( int i = 0 ; i < N ; i ++ ) { int [ ] x = new int [ 26 ] ; for ( char a : S [ i ] . toCharArray ( ) ) { x [ ABCNumber ( a ) ] ++ ; } for ( int n = 0 ; n < 26 ; n ++ ) { xmin [ n ] = Math . min ( xmin [ n ] , x [ n ] ) ; } } char [ ] abc = " abcdefghijklmnopqrstuvwxyz " . toCharArray ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int n = 0 ; n < 26 ; n ++ ) { for ( int cnt = 0 ; cnt < xmin [ n ] ; cnt ++ ) sb . append ( abc [ n ] ) ; } System . out . println ( sb . toString ( ) ) ; sc . close ( ) ; } }

import java . util . * ; public class Main { int ni ( ) { return cin . nextInt ( ) ; } long nl ( ) { return cin . nextLong ( ) ; } String line ( ) { return cin . nextLine ( ) ; } void println ( String str ) { System . out . println ( str ) ; } void print ( String str ) { System . out . print ( str ) ; } static final int MOD = 1000000007 ; Scanner cin = new Scanner ( System . in ) ; String output ; public static void main ( String [ ] args ) { new Main ( ) . run ( ) ; } public void run ( ) { input ( ) ; output = solve ( ) ; println ( output ) ; } int N ; String [ ] words ; void input ( ) { N = ni ( ) ; words = new String [ N ] ; line ( ) ; for ( int i = 0 ; i < N ; i ++ ) { words [ i ] = line ( ) ; } } String solve ( ) { int [ ] cnt1 = new int [ 26 ] ; int [ ] cnt2 ; for ( char c : words [ 0 ] . toCharArray ( ) ) { cnt1 [ c - ' a ' ] ++ ; } for ( int i = 1 ; i < N ; i ++ ) { cnt2 = new int [ 26 ] ; for ( char c : words [ i ] . toCharArray ( ) ) { cnt2 [ c - ' a ' ] ++ ; } for ( int j = 0 ; j < 26 ; j ++ ) { if ( cnt1 [ j ] == 0 ) { continue ; } cnt1 [ j ] = Math . min ( cnt1 [ j ] , cnt2 [ j ] ) ; } } StringBuilder res = new StringBuilder ( ) ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( cnt1 [ i ] == 0 ) { continue ; } for ( int j = 0 ; j < cnt1 [ i ] ; j ++ ) { res . append ( ( char ) ( i + ' a ' ) ) ; } } return res . toString ( ) ; } }

import java . util . Scanner ; import java . util . Set ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . HashSet ; public final class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int arraySize = Integer . parseInt ( s . nextLine ( ) . trim ( ) ) ; ArrayList < String > words = new ArrayList ( ) ; for ( int i = 0 ; i < arraySize ; i ++ ) { words . add ( s . nextLine ( ) . trim ( ) ) ; } ArrayList < ArrayList < Character > > keeper = new ArrayList ( ) ; for ( int i = 0 ; i < arraySize ; i ++ ) { ArrayList < Character > temp = new ArrayList ( ) ; char [ ] tempArr = words . get ( i ) . toCharArray ( ) ; for ( int x = 0 ; x < tempArr . length ; x ++ ) { temp . add ( tempArr [ x ] ) ; } keeper . add ( temp ) ; } ArrayList < Character > resultWords = new ArrayList ( ) ; for ( char c : keeper . get ( 0 ) ) { boolean shouldAdd = true ; for ( int index = 1 ; index < keeper . size ( ) ; index ++ ) { ArrayList < Character > arr = keeper . get ( index ) ; if ( arr . contains ( c ) ) { arr . remove ( ( Object ) c ) ; } else { shouldAdd = false ; } } if ( shouldAdd ) { resultWords . add ( c ) ; } } String result = " " ; while ( ! resultWords . isEmpty ( ) ) { char c = findLeast ( resultWords ) ; result += c ; resultWords . remove ( ( Object ) c ) ; } System . out . println ( result ) ; } public static char findLeast ( ArrayList < Character > chars ) { char result = ' z ' ; for ( char c : chars ) { if ( c < result ) { result = c ; } } return result ; } } Note : . / Main . java uses unchecked or unsafe operations . Note : Recompile with - Xlint : unchecked for details .

import java . util . Scanner ; import java . util . ArrayList ; import java . util . Collections ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int times = Integer . valueOf ( s . nextLine ( ) ) ; ArrayList < String > list = new ArrayList < String > ( ) ; String word = s . nextLine ( ) ; for ( int x = 0 ; x < word . length ( ) ; x ++ ) { list . add ( " " + word . charAt ( x ) ) ; } for ( int x = 1 ; x < times ; x ++ ) { ArrayList < String > temp = new ArrayList < String > ( ) ; word = s . nextLine ( ) ; for ( int y = 0 ; y < word . length ( ) ; y ++ ) { String a = " " + word . charAt ( y ) ; if ( list . contains ( a ) ) { list . remove ( list . indexOf ( a ) ) ; temp . add ( a ) ; } } list = temp ; } Collections . sort ( list ) ; String build = " " ; for ( String thing : list ) build += thing ; System . out . println ( build ) ; } }

l = [ chr ( i ) for i in range ( 97 , 97 + 26 ) ] NEW_LINE s = [ ] NEW_LINE for _ in [ 0 ] * int ( input ( ) ) : NEW_LINE INDENT s . append ( input ( ) ) NEW_LINE DEDENT w = " " NEW_LINE for x in l : NEW_LINE INDENT a = [ t . count ( x ) for t in s ] NEW_LINE w += x * min ( a ) NEW_LINE DEDENT print ( w ) NEW_LINE

def getInt ( ) : return int ( input ( ) ) NEW_LINE def zeros ( n ) : return [ 0 ] * n NEW_LINE def db ( x ) : NEW_LINE INDENT global debug NEW_LINE if debug : NEW_LINE INDENT print ( x ) NEW_LINE DEDENT DEDENT debug = False NEW_LINE n = getInt ( ) NEW_LINE Str = zeros ( n ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT Str [ i ] = [ c for c in input ( ) ] NEW_LINE Str [ i ] . sort ( ) NEW_LINE Str [ i ] = ' ' . join ( Str [ i ] ) NEW_LINE DEDENT db ( ( Str , n ) ) NEW_LINE idx = zeros ( n ) NEW_LINE widx = zeros ( n ) NEW_LINE dub = ' ' NEW_LINE for i in range ( len ( Str [ 0 ] ) ) : NEW_LINE INDENT allFound = True NEW_LINE for j in range ( 1 , n ) : NEW_LINE INDENT widx [ j ] = Str [ j ] . find ( Str [ 0 ] [ i ] , idx [ j ] ) NEW_LINE if widx [ j ] == - 1 : NEW_LINE INDENT allFound = False NEW_LINE DEDENT DEDENT if allFound : NEW_LINE INDENT dub = dub + Str [ 0 ] [ i ] NEW_LINE db ( dub ) NEW_LINE for j in range ( 1 , n ) : NEW_LINE INDENT idx [ j ] = widx [ j ] + 1 NEW_LINE DEDENT DEDENT DEDENT print ( dub ) NEW_LINE

from collections import Counter NEW_LINE N = int ( input ( ) ) NEW_LINE S = [ ] NEW_LINE for _ in range ( N ) : NEW_LINE INDENT s = input ( ) NEW_LINE C = Counter ( s ) NEW_LINE S . append ( C ) NEW_LINE DEDENT dp = [ float ( ' inf ' ) ] * 26 NEW_LINE uni_a = ord ( ' a ' ) NEW_LINE for s in S : NEW_LINE INDENT for i in range ( 26 ) : NEW_LINE INDENT dp [ i ] = min ( dp [ i ] , s [ chr ( uni_a + i ) ] ) NEW_LINE DEDENT DEDENT ans = ' ' NEW_LINE for i in range ( 26 ) : NEW_LINE INDENT ans += chr ( uni_a + i ) * dp [ i ] NEW_LINE DEDENT print ( ans ) NEW_LINE

n = int ( input ( ) . strip ( ) ) NEW_LINE slis = { ' a ' : 0 , ' b ' : 0 , ' c ' : 0 , ' d ' : 0 , ' e ' : 0 , ' f ' : 0 , ' g ' : 0 , ' h ' : 0 , ' i ' : 0 , ' j ' : 0 , ' k ' : 0 , ' l ' : 0 , ' m ' : 0 , ' n ' : 0 , ' o ' : 0 , ' p ' : 0 , ' q ' : 0 , ' r ' : 0 , ' s ' : 0 , ' t ' : 0 , ' u ' : 0 , ' v ' : 0 , ' w ' : 0 , ' x ' : 0 , ' y ' : 0 , ' z ' : 0 } NEW_LINE tlis = { ' a ' : 0 , ' b ' : 0 , ' c ' : 0 , ' d ' : 0 , ' e ' : 0 , ' f ' : 0 , ' g ' : 0 , ' h ' : 0 , ' i ' : 0 , ' j ' : 0 , ' k ' : 0 , ' l ' : 0 , ' m ' : 0 , ' n ' : 0 , ' o ' : 0 , ' p ' : 0 , ' q ' : 0 , ' r ' : 0 , ' s ' : 0 , ' t ' : 0 , ' u ' : 0 , ' v ' : 0 , ' w ' : 0 , ' x ' : 0 , ' y ' : 0 , ' z ' : 0 } NEW_LINE st = ' ' NEW_LINE S = input ( ) . strip ( ) NEW_LINE for j in range ( len ( S ) ) : NEW_LINE INDENT slis [ S [ j ] ] += 1 NEW_LINE DEDENT for i in range ( n - 1 ) : NEW_LINE INDENT S = input ( ) . strip ( ) NEW_LINE for j in range ( len ( S ) ) : NEW_LINE INDENT tlis [ S [ j ] ] += 1 NEW_LINE DEDENT for j in tlis : NEW_LINE INDENT slis [ j ] = min ( tlis [ j ] , slis [ j ] ) NEW_LINE DEDENT for j in tlis : NEW_LINE INDENT tlis [ j ] = 0 NEW_LINE DEDENT DEDENT stup = [ ] NEW_LINE for i in slis : NEW_LINE INDENT stup . append ( ( i , slis [ i ] ) ) NEW_LINE DEDENT stup . sort ( ) NEW_LINE for i in range ( 26 ) : NEW_LINE INDENT st = st + stup [ i ] [ 0 ] * stup [ i ] [ 1 ] NEW_LINE DEDENT print ( st ) NEW_LINE

from collections import Counter NEW_LINE from functools import reduce NEW_LINE n = int ( input ( ) ) NEW_LINE ss = [ Counter ( input ( ) ) for _ in range ( n ) ] NEW_LINE s = ' ' NEW_LINE for c in sorted ( reduce ( lambda x , y : x & y , [ { c for c , n in s . items ( ) } for s in ss ] ) ) : NEW_LINE INDENT s += c * min ( s [ c ] for s in ss ) NEW_LINE DEDENT print ( s ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; List < String > result = new ArrayList < String > ( ) ; HashMap < Character , Character > map = new HashMap < Character , Character > ( ) ; map . put ( ' b ' , '1' ) ; map . put ( ' c ' , '1' ) ; map . put ( ' d ' , '2' ) ; map . put ( ' w ' , '2' ) ; map . put ( ' t ' , '3' ) ; map . put ( ' j ' , '3' ) ; map . put ( ' f ' , '4' ) ; map . put ( ' q ' , '4' ) ; map . put ( ' l ' , '5' ) ; map . put ( ' v ' , '5' ) ; map . put ( ' s ' , '6' ) ; map . put ( ' x ' , '6' ) ; map . put ( ' p ' , '7' ) ; map . put ( ' m ' , '7' ) ; map . put ( ' h ' , '8' ) ; map . put ( ' k ' , '8' ) ; map . put ( ' n ' , '9' ) ; map . put ( ' g ' , '9' ) ; map . put ( ' z ' , '0' ) ; map . put ( ' r ' , '0' ) ; int N = sc . nextInt ( ) ; char w [ ] [ ] = new char [ N ] [ ] ; for ( int i = 0 ; i < N ; i ++ ) { w [ i ] = sc . next ( ) . toLowerCase ( ) . toCharArray ( ) ; } for ( int i = 0 ; i < w . length ; i ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( char c : w [ i ] ) { Character num = map . get ( c ) ; if ( num != null ) { sb . append ( num ) ; } } if ( sb . length ( ) > 0 ) { result . add ( sb . toString ( ) ) ; } } System . out . println ( String . join ( " ▁ " , result ) ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; HashMap < Character , Character > map = new HashMap < Character , Character > ( ) ; map . put ( ' b ' , '1' ) ; map . put ( ' c ' , '1' ) ; map . put ( ' d ' , '2' ) ; map . put ( ' w ' , '2' ) ; map . put ( ' t ' , '3' ) ; map . put ( ' j ' , '3' ) ; map . put ( ' f ' , '4' ) ; map . put ( ' q ' , '4' ) ; map . put ( ' l ' , '5' ) ; map . put ( ' v ' , '5' ) ; map . put ( ' s ' , '6' ) ; map . put ( ' x ' , '6' ) ; map . put ( ' p ' , '7' ) ; map . put ( ' m ' , '7' ) ; map . put ( ' h ' , '8' ) ; map . put ( ' k ' , '8' ) ; map . put ( ' n ' , '9' ) ; map . put ( ' g ' , '9' ) ; map . put ( ' z ' , '0' ) ; map . put ( ' r ' , '0' ) ; int N = sc . nextInt ( ) ; List < String > result = new ArrayList < String > ( ) ; char w [ ] [ ] = new char [ N ] [ ] ; for ( int i = 0 ; i < N ; i ++ ) { w [ i ] = sc . next ( ) . toLowerCase ( ) . toCharArray ( ) ; } for ( int i = 0 ; i < w . length ; i ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( char c : w [ i ] ) { Character num = map . get ( c ) ; if ( num != null ) { sb . append ( num ) ; } } if ( sb . length ( ) > 0 ) { result . add ( sb . toString ( ) ) ; } } System . out . println ( String . join ( " ▁ " , result ) ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; List < String > result = new ArrayList < String > ( ) ; HashMap < Character , Integer > map = new HashMap < Character , Integer > ( ) ; map . put ( ' b ' , 1 ) ; map . put ( ' c ' , 1 ) ; map . put ( ' d ' , 2 ) ; map . put ( ' w ' , 2 ) ; map . put ( ' t ' , 3 ) ; map . put ( ' j ' , 3 ) ; map . put ( ' f ' , 4 ) ; map . put ( ' q ' , 4 ) ; map . put ( ' l ' , 5 ) ; map . put ( ' v ' , 5 ) ; map . put ( ' s ' , 6 ) ; map . put ( ' x ' , 6 ) ; map . put ( ' p ' , 7 ) ; map . put ( ' m ' , 7 ) ; map . put ( ' h ' , 8 ) ; map . put ( ' k ' , 8 ) ; map . put ( ' n ' , 9 ) ; map . put ( ' g ' , 9 ) ; map . put ( ' z ' , 0 ) ; map . put ( ' r ' , 0 ) ; int N = sc . nextInt ( ) ; char w [ ] [ ] = new char [ N ] [ ] ; for ( int i = 0 ; i < N ; i ++ ) { w [ i ] = sc . next ( ) . toLowerCase ( ) . toCharArray ( ) ; } for ( int i = 0 ; i < w . length ; i ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( char c : w [ i ] ) { Integer num = map . get ( c ) ; if ( num != null ) { sb . append ( num ) ; } } if ( sb . length ( ) > 0 ) { result . add ( sb . toString ( ) ) ; } } System . out . println ( String . join ( " ▁ " , result ) ) ; } }

import java . util . Scanner ; import java . util . stream . Collectors ; import java . util . stream . IntStream ; public class Main { static Scanner s = new Scanner ( System . in ) ; static IntStream REPS ( int v ) { return IntStream . range ( 0 , v ) ; } static IntStream REPS ( int l , int r ) { return IntStream . rangeClosed ( l , r ) ; } static IntStream INS ( int n ) { return REPS ( n ) . map ( i -> getInt ( ) ) ; } static int getInt ( ) { return Integer . parseInt ( s . next ( ) ) ; } public static void main ( String [ ] $ ) { System . out . println ( REPS ( getInt ( ) ) . mapToObj ( i -> s . next ( ) ) . map ( o -> o . toLowerCase ( ) . replaceAll ( " [ ^ b - df - hj - np - tv - xz ] " , " " ) . replaceAll ( " [ bc ] " , "1" ) . replaceAll ( " [ dw ] " , "2" ) . replaceAll ( " [ tj ] " , "3" ) . replaceAll ( " [ fq ] " , "4" ) . replaceAll ( " [ lv ] " , "5" ) . replaceAll ( " [ sx ] " , "6" ) . replaceAll ( " [ pm ] " , "7" ) . replaceAll ( " [ hk ] " , "8" ) . replaceAll ( " [ ng ] " , "9" ) . replaceAll ( " [ zr ] " , "0" ) ) . filter ( o -> o . length ( ) > 0 ) . collect ( Collectors . joining ( " ▁ " ) ) ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { final int [ ] TABLE = new int [ ] { - 1 , 1 , 1 , 2 , - 1 , 4 , 9 , 8 , - 1 , 3 , 8 , 5 , 7 , 9 , - 1 , 7 , 4 , 0 , 6 , 3 , - 1 , 5 , 2 , 6 , - 1 , 0 } ; Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; StringBuilder sb = new StringBuilder ( ) ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( count != 0 ) { sb . append ( " ▁ " ) ; } String s = sc . next ( ) . toLowerCase ( ) ; count = 0 ; for ( char c : s . toCharArray ( ) ) { if ( c < ' a ' || c > ' z ' ) { continue ; } int v = TABLE [ c - ' a ' ] ; if ( v == - 1 ) { continue ; } sb . append ( v ) ; count ++ ; } } System . out . println ( sb . toString ( ) . trim ( ) ) ; } }

dicts = { ' b ' : '1' , ' c ' : '1' , ' d ' : '2' , ' w ' : '2' , ' t ' : '3' , ' j ' : '3' , ' f ' : '4' , ' q ' : '4' , ' l ' : '5' , ' v ' : '5' , ' s ' : '6' , ' x ' : '6' , ' p ' : '7' , ' m ' : '7' , ' h ' : '8' , ' k ' : '8' , ' n ' : '9' , ' g ' : '9' , ' z ' : '0' , ' r ' : '0' } NEW_LINE N = int ( input ( ) ) NEW_LINE ans = ' ' NEW_LINE for i , item in enumerate ( input ( ) . split ( ) ) : NEW_LINE INDENT tmp = ' ' NEW_LINE for string in item : NEW_LINE INDENT tmp += dicts . get ( string . lower ( ) , ' ' ) NEW_LINE DEDENT if ans != ' ' and tmp != ' ' : NEW_LINE INDENT ans += ' ▁ ' + tmp NEW_LINE DEDENT else : NEW_LINE INDENT ans += tmp NEW_LINE DEDENT DEDENT print ( ans ) NEW_LINE

import re NEW_LINE n = input ( ) NEW_LINE a = input ( ) . lower ( ) NEW_LINE a = a . replace ( ' b ' , '1' ) NEW_LINE a = a . replace ( ' c ' , '1' ) NEW_LINE a = a . replace ( ' d ' , '2' ) NEW_LINE a = a . replace ( ' w ' , '2' ) NEW_LINE a = a . replace ( ' t ' , '3' ) NEW_LINE a = a . replace ( ' j ' , '3' ) NEW_LINE a = a . replace ( ' f ' , '4' ) NEW_LINE a = a . replace ( ' q ' , '4' ) NEW_LINE a = a . replace ( ' l ' , '5' ) NEW_LINE a = a . replace ( ' v ' , '5' ) NEW_LINE a = a . replace ( ' s ' , '6' ) NEW_LINE a = a . replace ( ' x ' , '6' ) NEW_LINE a = a . replace ( ' p ' , '7' ) NEW_LINE a = a . replace ( ' m ' , '7' ) NEW_LINE a = a . replace ( ' h ' , '8' ) NEW_LINE a = a . replace ( ' k ' , '8' ) NEW_LINE a = a . replace ( ' n ' , '9' ) NEW_LINE a = a . replace ( ' g ' , '9' ) NEW_LINE a = a . replace ( ' z ' , '0' ) NEW_LINE a = a . replace ( ' r ' , '0' ) NEW_LINE a = a . replace ( ' , ' , ' ' ) NEW_LINE a = a . replace ( ' . ' , ' ' ) NEW_LINE a = re . sub ( r " [ a - z ] " , " " , a ) NEW_LINE a = re . sub ( r " [ ▁ ] + " , " ▁ " , a ) NEW_LINE a = " " if a == " ▁ " else a NEW_LINE print ( a . strip ( ) ) NEW_LINE

a = int ( input ( ) ) NEW_LINE br = input ( ) . split ( " ▁ " ) NEW_LINE ar = [ ] NEW_LINE for b in br : NEW_LINE INDENT a = " " NEW_LINE for c in list ( b ) : NEW_LINE INDENT if c == " z " or c == " r " or c == " Z " or c == " R " : NEW_LINE INDENT a = a + "0" NEW_LINE DEDENT elif c == " b " or c == " c " or c == " B " or c == " C " : NEW_LINE INDENT a = a + "1" NEW_LINE DEDENT elif c == " t " or c == " j " or c == " T " or c == " J " : NEW_LINE INDENT a = a + "3" NEW_LINE DEDENT elif c == " l " or c == " v " or c == " L " or c == " V " : NEW_LINE INDENT a = a + "5" NEW_LINE DEDENT elif c == " d " or c == " w " or c == " D " or c == " W " : NEW_LINE INDENT a = a + "2" NEW_LINE DEDENT elif c == " f " or c == " q " or c == " F " or c == " Q " : NEW_LINE INDENT a = a + "4" NEW_LINE DEDENT elif c == " s " or c == " x " or c == " S " or c == " X " : NEW_LINE INDENT a = a + "6" NEW_LINE DEDENT elif c == " p " or c == " m " or c == " P " or c == " M " : NEW_LINE INDENT a = a + "7" NEW_LINE DEDENT elif c == " h " or c == " k " or c == " H " or c == " K " : NEW_LINE INDENT a = a + "8" NEW_LINE DEDENT elif c == " n " or c == " g " or c == " N " or c == " G " : NEW_LINE INDENT a = a + "9" NEW_LINE DEDENT DEDENT if a != " " : NEW_LINE INDENT ar . append ( a ) NEW_LINE DEDENT DEDENT if len ( ar ) == 0 : NEW_LINE INDENT print ( " " ) NEW_LINE DEDENT elif len ( ar ) == 1 : NEW_LINE INDENT print ( ar [ 0 ] ) NEW_LINE DEDENT else : NEW_LINE INDENT for i in range ( len ( ar ) - 1 ) : NEW_LINE INDENT print ( ar [ i ] + " ▁ " , end = " " ) NEW_LINE DEDENT print ( ar [ len ( ar ) - 1 ] ) NEW_LINE DEDENT

def b_mnemonics ( N , W ) : NEW_LINE INDENT words = W . replace ( ' . ' , ' ' ) . lower ( ) . split ( ) NEW_LINE translation_dict = { ' b ' : '1' , ' c ' : '1' , ' d ' : '2' , ' w ' : '2' , ' t ' : '3' , ' j ' : '3' , ' f ' : '4' , ' q ' : '4' , ' l ' : '5' , ' v ' : '5' , ' s ' : '6' , ' x ' : '6' , ' p ' : '7' , ' m ' : '7' , ' h ' : '8' , ' k ' : '8' , ' n ' : '9' , ' g ' : '9' , ' z ' : '0' , ' r ' : '0' , } NEW_LINE ans = [ ] NEW_LINE for w in words : NEW_LINE INDENT tmp = ' ' NEW_LINE for c in w : NEW_LINE INDENT if c not in translation_dict : NEW_LINE INDENT continue NEW_LINE DEDENT tmp += translation_dict [ c ] NEW_LINE DEDENT if tmp : NEW_LINE INDENT ans . append ( tmp ) NEW_LINE DEDENT DEDENT return ' ▁ ' . join ( ans ) NEW_LINE DEDENT N = int ( input ( ) ) NEW_LINE W = input ( ) NEW_LINE print ( b_mnemonics ( N , W ) ) NEW_LINE


import java . util . * ; import java . io . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String s = sc . next ( ) ; char c [ ] = s . toCharArray ( ) ; int ans = 700 ; for ( int i = 0 ; i < c . length ; i ++ ) { if ( c [ i ] == ' o ' ) { ans += 100 ; } } System . out . println ( ans ) ; sc . close ( ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; String S = sc . next ( ) ; int count = 0 ; for ( int i = 0 ; i < 3 ; i ++ ) { if ( S . charAt ( i ) == ' o ' ) count ++ ; } System . out . println ( 700 + count * 100 ) ; } }

import java . util . * ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . List ; import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String s = sc . next ( ) ; int money = 700 ; for ( int i = 0 ; i < 3 ; i ++ ) { if ( s . charAt ( i ) == ' o ' ) { money += 100 ; } } System . out . println ( money ) ; } }

import java . util . Scanner ; public class Main { private static Scanner sc ; public static void main ( String [ ] args ) { sc = new Scanner ( System . in ) ; String order = sc . next ( ) ; int price = 700 ; if ( " o " . equals ( order . subSequence ( 0 , 1 ) ) ) price += 100 ; if ( " o " . equals ( order . subSequence ( 1 , 2 ) ) ) price += 100 ; if ( " o " . equals ( order . subSequence ( 2 , 3 ) ) ) price += 100 ; System . out . println ( price ) ; } }

import static java . lang . System . * ; import java . util . * ; public class Main { static Scanner sc = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { String s = sc . next ( ) ; int price = 700 ; for ( int i = 0 ; i < 3 ; i ++ ) { if ( s . charAt ( i ) == ' o ' ) price += 100 ; } out . println ( price ) ; } }

n = input ( ) NEW_LINE print ( 700 + 100 * n . count ( " o " ) ) NEW_LINE

S = input ( ) NEW_LINE count = 0 NEW_LINE if ( S [ 0 ] == " o " ) : NEW_LINE INDENT count += 1 NEW_LINE DEDENT if ( S [ 1 ] == " o " ) : NEW_LINE INDENT count += 1 NEW_LINE DEDENT if ( S [ 2 ] == " o " ) : NEW_LINE INDENT count += 1 NEW_LINE DEDENT print ( 700 + 100 * count ) NEW_LINE

print ( int ( input ( ) . count ( " o " ) ) * 100 + 700 ) NEW_LINE

s = input ( ) NEW_LINE sum = 700 NEW_LINE for i in range ( 3 ) : NEW_LINE INDENT if s [ i ] == ' o ' : NEW_LINE INDENT sum += 100 NEW_LINE DEDENT DEDENT print ( sum ) NEW_LINE

s = input ( ) NEW_LINE toppings = s . count ( " o " ) NEW_LINE print ( 700 + toppings * 100 ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String s = sc . next ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { for ( int j = 0 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( i ) == s . charAt ( j ) && i != j ) { System . out . println ( " no " ) ; return ; } } } System . out . println ( " yes " ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . StringTokenizer ; public class Main { 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 ( ) ; } static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { String S = in . next ( ) ; char [ ] array = S . toCharArray ( ) ; Arrays . sort ( array ) ; String ans = " yes " ; for ( int i = 1 ; i < array . length ; i ++ ) { if ( array [ i ] == array [ i - 1 ] ) { ans = " no " ; break ; } } out . println ( ans ) ; } } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ; public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; } public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; } public char nextChar ( ) { return next ( ) . charAt ( 0 ) ; } public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } public double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } } }

import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashSet ; import java . util . List ; import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String s = sc . next ( ) ; String [ ] str = s . split ( " " ) ; List < String > listA = Arrays . asList ( str ) ; List < String > listB = new ArrayList < String > ( new HashSet < > ( listA ) ) ; if ( listA . size ( ) == listB . size ( ) ) { System . out . println ( " yes " ) ; } else { System . out . println ( " no " ) ; } } }

import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . InputMismatchException ; import java . io . IOException ; import java . io . InputStream ; public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskB solver = new TaskB ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } static class TaskB { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { int [ ] count = new int [ 26 ] ; for ( char cc : in . next ( ) . toCharArray ( ) ) { if ( count [ cc - ' a ' ] ++ > 0 ) { out . println ( " no " ) ; return ; } } out . println ( " yes " ) ; } } static class FastScanner { private InputStream in ; private byte [ ] buffer = new byte [ 1024 ] ; private int bufPointer ; private int bufLength ; public FastScanner ( InputStream in ) { this . in = in ; } private int readByte ( ) { if ( bufPointer >= bufLength ) { if ( bufLength == - 1 ) throw new InputMismatchException ( ) ; bufPointer = 0 ; try { bufLength = in . read ( buffer ) ; } catch ( IOException e ) { throw new InputMismatchException ( ) ; } if ( bufLength <= 0 ) return - 1 ; } return buffer [ bufPointer ++ ] ; } private static boolean isPrintableChar ( int c ) { return c >= 33 && c <= 126 ; } public String next ( ) { StringBuilder sb = new StringBuilder ( ) ; int b = readByte ( ) ; while ( ! isPrintableChar ( b ) ) b = readByte ( ) ; while ( isPrintableChar ( b ) ) { sb . appendCodePoint ( b ) ; b = readByte ( ) ; } return sb . toString ( ) ; } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; String S = sc . next ( ) ; int [ ] ch = new int [ 26 ] ; for ( int i = 0 ; i < 26 ; i ++ ) ch [ i ] = 0 ; for ( int i = 0 ; i < S . length ( ) ; i ++ ) { int num = S . charAt ( i ) - ' a ' ; ch [ num ] ++ ; } boolean state = true ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( ch [ i ] > 1 ) { state = false ; break ; } } System . out . println ( state ? " yes " : " no " ) ; } }

s = input ( ) NEW_LINE S = [ ] NEW_LINE for i in range ( len ( s ) ) : NEW_LINE INDENT S . append ( s [ i ] ) NEW_LINE DEDENT print ( " yes " if len ( set ( S ) ) == len ( s ) else " no " ) NEW_LINE

S = input ( ) NEW_LINE length = len ( S ) NEW_LINE set_length = len ( set ( S ) ) NEW_LINE if length == set_length : NEW_LINE INDENT print ( ' yes ' ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ' no ' ) NEW_LINE DEDENT

S = input ( ) ; print ( ' yneos ' [ len ( S ) != len ( set ( list ( S ) ) ) : : 2 ] ) NEW_LINE

import sys NEW_LINE def main ( ) : NEW_LINE INDENT input = sys . stdin . readline NEW_LINE S = input ( ) . strip ( ) NEW_LINE n = len ( S ) NEW_LINE m = len ( set ( S ) ) NEW_LINE if n == m : NEW_LINE INDENT return ' yes ' NEW_LINE DEDENT else : NEW_LINE INDENT return ' no ' NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT print ( main ( ) ) NEW_LINE DEDENT

a = input ( ) NEW_LINE b = [ 0 ] * 26 NEW_LINE for c in a : NEW_LINE INDENT b [ ord ( c ) - 97 ] += 1 NEW_LINE DEDENT for i in b : NEW_LINE INDENT if i >= 2 : NEW_LINE INDENT print ( " no " ) NEW_LINE exit ( ) NEW_LINE DEDENT DEDENT print ( " yes " ) NEW_LINE