fork download
  1. import java.util.Scanner;
  2.  
  3. /*
  4.  * Jan 28, 2015 6:39:30 PM
  5.  * mohamed265
  6.  */
  7.  
  8. public class Round247_B_Shower_Line {
  9. public static void next_permutation(long[] arr, int l) {
  10. if (l == arr.length) {
  11. // System.out.println(arr.toString());
  12. return;
  13. }
  14. long num = arr[l];
  15. for (int i = l; i < arr.length; i++) {
  16. long temp = arr[i];
  17. arr[l] = temp;
  18. arr[i] = num;
  19. next_permutation(arr, l + 1);
  20. arr[i] = temp;
  21. }
  22. arr[l] = num;
  23. }
  24.  
  25. public static void main(String[] args) {
  26. Scanner x = new Scanner(System.in);
  27. long[] arr = { 1, 2, 3, 4, 5 };
  28. next_permutation(arr, 0);
  29.  
  30. }
  31. }
  32.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:8: error: class Round247_B_Shower_Line is public, should be declared in a file named Round247_B_Shower_Line.java
public class Round247_B_Shower_Line {
       ^
1 error
stdout
Standard output is empty