Submission #214465


Source Code Expand

Copy
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int D = sc.nextInt();
		
		int[] a = new int[M];
		
		for(int i=0;i<M;i++){
			a[i] = sc.nextInt();
		}
		
		int[] n = new int[N];
		for(int i=0;i<N;i++){
			n[i] = i;
		}
		
		for(int j=0;j<D;j++){
			for(int i=0;i<M;i++){
				int d = n[a[i]-1];
				n[a[i]-1] = n[a[i]];
				n[a[i]] = d;
			}
		}
		
		for(int i=0;i<N;i++){
			for(int j=0;j<N;j++){
				if(i == n[j]){
					System.out.println(j+1);
					break;
				}
			}
		}
		
		sc.close();

	}

}

Submission Info

Submission Time
Task D - 阿弥陀
User jimjin
Language Java (OpenJDK 1.7.0)
Score 20
Code Size 672 Byte
Status TLE
Exec Time 18141 ms
Memory 39528 KB

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 0 / 10 20 / 20 0 / 20 0 / 50
Status
AC × 5
TLE × 4
AC × 18
AC × 2
TLE × 16
AC × 3
TLE × 26
Set Name Test Cases
Subtask1 sample_1.txt, 01_i.txt, 01_random01.txt, 01_random02.txt, 01_random03.txt, 01_random04.txt, 01_random05.txt, 01_random06.txt, 01_random07.txt
Subtask2 sample_1.txt, sample_2.txt, sample_3.txt, 02_i.txt, 02_p.txt, 02_random01.txt, 02_random02.txt, 02_random03.txt, 02_random04.txt, 02_random05.txt, 02_random06.txt, 02_random07.txt, 02_random08.txt, 02_rp01.txt, 02_rp02.txt, 02_rp03.txt, 02_rp04.txt, 02_rp05.txt
Subtask3 sample_1.txt, sample_2.txt, 03_i.txt, 03_random01.txt, 03_random02.txt, 03_random03.txt, 03_random04.txt, 03_random05.txt, 03_random06.txt, 03_random07.txt, 03_random08.txt, 03_random09.txt, 03_random10.txt, 03_random11.txt, 03_random12.txt, 03_random13.txt, 03_random14.txt, 03_random15.txt
Subtask4 sample_1.txt, sample_2.txt, sample_3.txt, 04_i.txt, 04_p1.txt, 04_p2.txt, 04_random01.txt, 04_random02.txt, 04_random03.txt, 04_random04.txt, 04_random05.txt, 04_random06.txt, 04_random07.txt, 04_random08.txt, 04_random09.txt, 04_random10.txt, 04_random11.txt, 04_random12.txt, 04_random13.txt, 04_rp01.txt, 04_rp02.txt, 04_rp03.txt, 04_rp04.txt, 04_rp05.txt, 04_rp06.txt, 04_rp07.txt, 04_rp08.txt, 04_rp09.txt, 04_rp10.txt
Case Name Status Exec Time Memory
01_i.txt TLE 4036 ms 39528 KB
01_random01.txt AC 468 ms 22660 KB
01_random02.txt AC 597 ms 22544 KB
01_random03.txt AC 591 ms 22696 KB
01_random04.txt AC 778 ms 35632 KB
01_random05.txt TLE 4035 ms 37788 KB
01_random06.txt TLE 4036 ms 38948 KB
01_random07.txt TLE 4035 ms 37552 KB
02_i.txt AC 560 ms 25424 KB
02_p.txt AC 584 ms 24304 KB
02_random01.txt AC 462 ms 22568 KB
02_random02.txt AC 400 ms 22692 KB
02_random03.txt AC 570 ms 27928 KB
02_random04.txt AC 557 ms 23088 KB
02_random05.txt AC 810 ms 37248 KB
02_random06.txt AC 951 ms 37964 KB
02_random07.txt AC 1782 ms 38636 KB
02_random08.txt AC 1892 ms 38460 KB
02_rp01.txt AC 612 ms 24176 KB
02_rp02.txt AC 628 ms 24176 KB
02_rp03.txt AC 766 ms 24172 KB
02_rp04.txt AC 634 ms 24304 KB
02_rp05.txt AC 623 ms 24356 KB
03_i.txt TLE 18141 ms 23328 KB
03_random01.txt TLE 16615 ms 36840 KB
03_random02.txt TLE 17659 ms 37360 KB
03_random03.txt TLE 17795 ms 37284 KB
03_random04.txt TLE 17701 ms 37096 KB
03_random05.txt TLE 17815 ms 36856 KB
03_random06.txt TLE 17878 ms 35696 KB
03_random07.txt TLE 17738 ms 37364 KB
03_random08.txt TLE 16701 ms 25708 KB
03_random09.txt TLE 17711 ms 37280 KB
03_random10.txt TLE 17676 ms 36740 KB
03_random11.txt TLE 17651 ms 37428 KB
03_random12.txt TLE 17871 ms 37516 KB
03_random13.txt TLE 17627 ms 38164 KB
03_random14.txt TLE 17699 ms 37724 KB
03_random15.txt TLE 17728 ms 37376 KB
04_i.txt TLE 17782 ms 38228 KB
04_p1.txt TLE 17784 ms 37596 KB
04_p2.txt TLE 17930 ms 37532 KB
04_random01.txt TLE 17734 ms 38116 KB
04_random02.txt TLE 17651 ms 37360 KB
04_random03.txt TLE 17738 ms 37912 KB
04_random04.txt TLE 17721 ms 38140 KB
04_random05.txt TLE 17786 ms 37140 KB
04_random06.txt TLE 17548 ms 37676 KB
04_random07.txt TLE 17814 ms 38180 KB
04_random08.txt TLE 17586 ms 38432 KB
04_random09.txt TLE 17614 ms 38216 KB
04_random10.txt TLE 17690 ms 37180 KB
04_random11.txt TLE 17736 ms 38540 KB
04_random12.txt TLE 17636 ms 38204 KB
04_random13.txt TLE 17574 ms 37444 KB
04_rp01.txt TLE 17942 ms 37992 KB
04_rp02.txt TLE 17722 ms 36848 KB
04_rp03.txt TLE 17655 ms 37372 KB
04_rp04.txt TLE 17862 ms 37300 KB
04_rp05.txt TLE 17687 ms 36880 KB
04_rp06.txt TLE 17902 ms 37476 KB
04_rp07.txt TLE 17973 ms 37328 KB
04_rp08.txt TLE 17646 ms 36960 KB
04_rp09.txt TLE 17934 ms 36960 KB
04_rp10.txt TLE 17755 ms 37956 KB
sample_1.txt AC 532 ms 22688 KB
sample_2.txt AC 451 ms 22576 KB
sample_3.txt AC 473 ms 22560 KB