Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class Varietasdelectat2 {
- public static void main(String[] args) throws IOException {
- BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
- String line;
- String[] st;
- Boolean flag = false;
- while ( !"0".equals(line= br.readLine())) {
- st = line.split(" ");
- flag = false;
- for ( int i = 1; i < st.length ; i++)
- for ( int j = i; j < st.length-1; j++)
- if ( Integer.parseInt(st[i]) == Integer.parseInt(st[j+1]))
- flag = true;
- if ( flag ) System.out.println("no");
- else System.out.println("yes");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement