Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#2 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#3 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#4 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#5 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#6 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#7 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#8 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#9 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#10 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#11 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#12 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#13 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#14 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#15 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#16 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#17 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#18 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#19 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#20 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#21 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#22 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#23 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#24 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#25 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#26 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
||
#27 |
Error de compilación
Main.java:15: error: cannot find symbol sort(numbers, 0, n -1); ^ symbol: method sort(int[],int,int) location: class Main 1 error |
import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); int n = Integer.parseInt(input.nextLine()); String nn = input.nextLine(); input.close(); String arr[] = nn.split(" "); int numbers[] = new int[n]; for (int i = 0; i < n; i++){ numbers[i] = Integer.parseInt(arr[i]); } sort(numbers, 0, n -1); String result = Arrays.toString(numbers); result = result.toString(); result = result.replace(",", " "); result = result.replace("[", ""); result = result.replace("]", ""); System.out.println(result); } public static void sorting(int arr[], int left, int right){ if (left < right){ int start = section_sort(arr, left, right); sorting(arr, left, start -1); sorting(arr, start +1, right); } } public static int section_sort(int arr[], int left, int right){ int pivot = arr[right]; int element = (left -1); for (int i = left; i < right; i++){ if (arr[i] < pivot){ element++; int buffer = arr[element]; arr[element] = arr[i]; arr[i] = buffer; } } element++; int buffer = arr[element]; arr[element] = arr[right]; arr[right] = buffer; return element; } }