Submission #214395


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, 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);
		trans = result[A - 1];
		result[A - 1] = result[A];
		result[A] = 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 494 Byte
Status WA
Exec Time 81 ms
Memory 1648 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:19: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 × 3
WA × 6
AC × 5
WA × 13
AC × 6
WA × 12
AC × 2
WA × 27
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 AC 72 ms 1568 KB
01_random01.txt AC 81 ms 664 KB
01_random02.txt AC 19 ms 796 KB
01_random03.txt WA 18 ms 700 KB
01_random04.txt WA 21 ms 800 KB
01_random05.txt WA 40 ms 1568 KB
01_random06.txt WA 61 ms 1564 KB
01_random07.txt WA 81 ms 1576 KB
02_i.txt AC 20 ms 704 KB
02_p.txt WA 19 ms 784 KB
02_random01.txt AC 18 ms 792 KB
02_random02.txt AC 19 ms 696 KB
02_random03.txt WA 20 ms 800 KB
02_random04.txt AC 19 ms 796 KB
02_random05.txt WA 43 ms 784 KB
02_random06.txt WA 33 ms 800 KB
02_random07.txt WA 47 ms 800 KB
02_random08.txt WA 47 ms 796 KB
02_rp01.txt WA 19 ms 796 KB
02_rp02.txt WA 19 ms 792 KB
02_rp03.txt WA 19 ms 804 KB
02_rp04.txt WA 19 ms 796 KB
02_rp05.txt WA 20 ms 796 KB
03_i.txt AC 19 ms 700 KB
03_random01.txt AC 43 ms 800 KB
03_random02.txt AC 42 ms 676 KB
03_random03.txt AC 49 ms 804 KB
03_random04.txt WA 39 ms 704 KB
03_random05.txt AC 23 ms 796 KB
03_random06.txt WA 22 ms 792 KB
03_random07.txt WA 24 ms 796 KB
03_random08.txt WA 20 ms 800 KB
03_random09.txt WA 25 ms 796 KB
03_random10.txt AC 32 ms 800 KB
03_random11.txt WA 40 ms 668 KB
03_random12.txt WA 41 ms 668 KB
03_random13.txt WA 37 ms 804 KB
03_random14.txt WA 34 ms 796 KB
03_random15.txt WA 24 ms 672 KB
04_i.txt AC 69 ms 1648 KB
04_p1.txt WA 50 ms 1580 KB
04_p2.txt WA 43 ms 1436 KB
04_random01.txt WA 46 ms 1188 KB
04_random02.txt WA 34 ms 1056 KB
04_random03.txt WA 39 ms 804 KB
04_random04.txt WA 49 ms 672 KB
04_random05.txt WA 45 ms 804 KB
04_random06.txt WA 44 ms 1188 KB
04_random07.txt WA 60 ms 1052 KB
04_random08.txt WA 51 ms 932 KB
04_random09.txt WA 55 ms 800 KB
04_random10.txt WA 38 ms 1268 KB
04_random11.txt WA 69 ms 1560 KB
04_random12.txt WA 67 ms 1564 KB
04_random13.txt WA 73 ms 1576 KB
04_rp01.txt WA 50 ms 1580 KB
04_rp02.txt WA 50 ms 1576 KB
04_rp03.txt WA 50 ms 1568 KB
04_rp04.txt WA 51 ms 1576 KB
04_rp05.txt WA 51 ms 1572 KB
04_rp06.txt WA 52 ms 1556 KB
04_rp07.txt WA 52 ms 1568 KB
04_rp08.txt WA 51 ms 1564 KB
04_rp09.txt WA 52 ms 1632 KB
04_rp10.txt WA 51 ms 1576 KB
sample_1.txt WA 20 ms 800 KB
sample_2.txt WA 19 ms 704 KB
sample_3.txt AC 20 ms 796 KB