Submission #214491


Source Code Expand

Copy
//#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
//#include <stdlib.h>
//#include <math.h>

int main(void){

	int i, N, M, D, A[100000], result[100000], trans;
	
	

	scanf("%d %d %d", &N, &M, &D);
	for (i = 0; i < N; i++){
		result[i] = i + 1;
	}
	for (i = 0; i < M; i++){
		scanf("%d", &A[i]);
	}

	for (i = M-1; i >= 0; i--){
		trans = result[A[i] - 1];
		result[A[i] - 1] = result[A[i]];
		result[A[i]] = trans;
	}

	for (i = 0; i < N; i++){
		printf("%d\n", result[i]);
	}

	return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User letter
Language C (GCC 4.6.4)
Score 0
Code Size 551 Byte
Status WA
Exec Time 69 ms
Memory 2080 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:13:7: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
./Main.c:18:8: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 0 / 10 0 / 20 0 / 20 0 / 50
Status
AC × 6
WA × 3
AC × 4
WA × 14
AC × 5
WA × 13
AC × 1
WA × 28
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 WA 69 ms 1952 KB
01_random01.txt AC 18 ms 692 KB
01_random02.txt AC 26 ms 800 KB
01_random03.txt AC 19 ms 796 KB
01_random04.txt AC 22 ms 664 KB
01_random05.txt AC 40 ms 1696 KB
01_random06.txt WA 62 ms 1956 KB
01_random07.txt WA 69 ms 2080 KB
02_i.txt AC 21 ms 688 KB
02_p.txt WA 19 ms 692 KB
02_random01.txt AC 19 ms 700 KB
02_random02.txt WA 20 ms 796 KB
02_random03.txt WA 19 ms 672 KB
02_random04.txt AC 20 ms 696 KB
02_random05.txt WA 22 ms 928 KB
02_random06.txt WA 33 ms 1056 KB
02_random07.txt WA 46 ms 1432 KB
02_random08.txt WA 48 ms 1444 KB
02_rp01.txt WA 20 ms 692 KB
02_rp02.txt WA 19 ms 804 KB
02_rp03.txt WA 19 ms 804 KB
02_rp04.txt WA 19 ms 800 KB
02_rp05.txt WA 20 ms 672 KB
03_i.txt AC 19 ms 804 KB
03_random01.txt AC 21 ms 804 KB
03_random02.txt WA 43 ms 1436 KB
03_random03.txt WA 39 ms 1312 KB
03_random04.txt WA 39 ms 1324 KB
03_random05.txt AC 23 ms 920 KB
03_random06.txt WA 23 ms 924 KB
03_random07.txt AC 24 ms 800 KB
03_random08.txt WA 20 ms 676 KB
03_random09.txt WA 26 ms 936 KB
03_random10.txt WA 33 ms 1060 KB
03_random11.txt WA 43 ms 1448 KB
03_random12.txt WA 46 ms 1392 KB
03_random13.txt WA 37 ms 1196 KB
03_random14.txt WA 33 ms 1188 KB
03_random15.txt WA 25 ms 880 KB
04_i.txt WA 68 ms 1956 KB
04_p1.txt WA 52 ms 2016 KB
04_p2.txt WA 45 ms 1692 KB
04_random01.txt WA 44 ms 1568 KB
04_random02.txt WA 36 ms 1264 KB
04_random03.txt WA 36 ms 1188 KB
04_random04.txt WA 49 ms 1444 KB
04_random05.txt WA 47 ms 1372 KB
04_random06.txt WA 44 ms 1632 KB
04_random07.txt WA 59 ms 1632 KB
04_random08.txt WA 52 ms 1444 KB
04_random09.txt WA 54 ms 1560 KB
04_random10.txt WA 39 ms 1496 KB
04_random11.txt WA 69 ms 1952 KB
04_random12.txt WA 68 ms 1960 KB
04_random13.txt WA 68 ms 1960 KB
04_rp01.txt WA 52 ms 1964 KB
04_rp02.txt WA 52 ms 2016 KB
04_rp03.txt WA 52 ms 1960 KB
04_rp04.txt WA 51 ms 1968 KB
04_rp05.txt WA 52 ms 1960 KB
04_rp06.txt WA 51 ms 1956 KB
04_rp07.txt WA 51 ms 1956 KB
04_rp08.txt WA 50 ms 2072 KB
04_rp09.txt WA 52 ms 2012 KB
04_rp10.txt WA 52 ms 1956 KB
sample_1.txt AC 20 ms 672 KB
sample_2.txt WA 20 ms 804 KB
sample_3.txt WA 19 ms 800 KB