javaPAT甲级1002

import java.util.Scanner;
import java.util.HashMap;
public class Main {

	private static Scanner in;
	public static void swap(int[] arr,int m,int n)
	{
		int tmp=arr[m];
		arr[m]=arr[n];
		arr[n]=tmp;
	}
	public static void buddle_sort(int[] arr)
	{
		int n=arr.length;
		for(int i=0;iarr[j+1])
					swap(arr,j,j+1);
			}
	}
	public static void main(String[] args) {
		in = new Scanner(System.in);
		int n=in.nextInt();
		HashMap map=new HashMap();
		for(int i=0;i=0;i--)
		{
			System.out.print(arr3[i]+" "+map.get(arr3[i])+" ");
		}
	}

}

你可能感兴趣的:(java,PAT)