fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.util.ArrayList;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. int[][] array = {
  14. {100, 12 , 0, 3},
  15. {100, 177, 0, 3},
  16. {100, 233, 0, 3},
  17. {100, 144242, 0, 3},
  18. {100, 14, 0, 4},
  19. {100, 12234, 0, 4},
  20. {100, 134, 1, 4},
  21. {2, 15, 0, 3},
  22. {23, 1533, 0, 3},
  23. {23, 1322, 1, 4},
  24. {23, 13, 1, 4},
  25. {23, 122, 1, 4},
  26. {1321, 142, 1, 4},
  27. {1321, 133,1, 4},
  28. {3, 16, 0, 5},
  29. {55, 1003, 0,3},
  30. {553, 1002, 2, 6},
  31. {31, 162, 0, 5},
  32. {7, 1626, 0, 5},
  33. {7, 2336, 0,5}
  34. };
  35. ArrayList<Integer> list = new ArrayList<>();
  36. for(int i = 0 ; i < array.length ;i++ ){
  37.  
  38. if(!list.contains(array[i][0])){
  39. list.add(array[i][0]);
  40. }
  41. }
  42. for(int i = 0 ; i < list.size() ;i++){
  43. System.out.println(list.get(i));
  44. }
  45. }
  46. }
Success #stdin #stdout 0.1s 320512KB
stdin
Standard input is empty
stdout
100
2
23
1321
3
55
553
31
7