Contest Duration: - (local time) (120 minutes) Back to Home

Submission #214533

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[200000], 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 2014-08-16 22:24:51+0900 D - 阿弥陀 letter C (GCC 4.6.4) 10 551 Byte WA 72 ms 2576 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

Score / Max Score 10 / 10 0 / 20 0 / 20 0 / 50
Status
 AC × 9
 AC × 4 WA × 14
 AC × 9 WA × 9
 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 2416 KB
01_random01.txt AC 21 ms 800 KB
01_random02.txt AC 20 ms 696 KB
01_random03.txt AC 21 ms 796 KB
01_random04.txt AC 22 ms 668 KB
01_random05.txt AC 42 ms 1688 KB
01_random06.txt AC 62 ms 2220 KB
01_random07.txt AC 71 ms 2468 KB
02_i.txt AC 21 ms 696 KB
02_p.txt WA 21 ms 804 KB
02_random01.txt AC 21 ms 800 KB
02_random02.txt WA 20 ms 688 KB
02_random03.txt WA 21 ms 676 KB
02_random04.txt AC 20 ms 796 KB
02_random05.txt WA 23 ms 736 KB
02_random06.txt WA 35 ms 1064 KB
02_random07.txt WA 49 ms 1428 KB
02_random08.txt WA 49 ms 1448 KB
02_rp01.txt WA 20 ms 676 KB
02_rp02.txt WA 19 ms 684 KB
02_rp03.txt WA 20 ms 796 KB
02_rp04.txt WA 20 ms 700 KB
02_rp05.txt WA 20 ms 688 KB
03_i.txt AC 20 ms 796 KB
03_random01.txt AC 22 ms 800 KB
03_random02.txt AC 46 ms 1564 KB
03_random03.txt AC 41 ms 1320 KB
03_random04.txt AC 51 ms 1316 KB
03_random05.txt AC 24 ms 920 KB
03_random06.txt WA 26 ms 804 KB
03_random07.txt AC 27 ms 800 KB
03_random08.txt WA 28 ms 768 KB
03_random09.txt WA 29 ms 928 KB
03_random10.txt WA 35 ms 1056 KB
03_random11.txt WA 45 ms 1440 KB
03_random12.txt WA 46 ms 1440 KB
03_random13.txt AC 39 ms 1184 KB
03_random14.txt WA 37 ms 1192 KB
03_random15.txt WA 27 ms 808 KB
04_i.txt AC 70 ms 2460 KB
04_p1.txt WA 52 ms 2020 KB
04_p2.txt WA 47 ms 1704 KB
04_random01.txt WA 47 ms 1648 KB
04_random02.txt WA 37 ms 1312 KB
04_random03.txt WA 39 ms 1192 KB
04_random04.txt WA 52 ms 1440 KB
04_random05.txt WA 49 ms 1564 KB
04_random06.txt WA 45 ms 1580 KB
04_random07.txt WA 60 ms 1692 KB
04_random08.txt WA 54 ms 1648 KB
04_random09.txt WA 57 ms 1568 KB
04_random10.txt WA 41 ms 1448 KB
04_random11.txt WA 70 ms 2336 KB
04_random12.txt WA 70 ms 2472 KB
04_random13.txt WA 71 ms 2576 KB
04_rp01.txt WA 53 ms 2076 KB
04_rp02.txt WA 53 ms 2072 KB
04_rp03.txt WA 54 ms 1960 KB
04_rp04.txt WA 55 ms 1960 KB
04_rp05.txt WA 52 ms 1964 KB
04_rp06.txt WA 54 ms 1960 KB
04_rp07.txt WA 53 ms 1964 KB
04_rp08.txt WA 53 ms 1960 KB
04_rp09.txt WA 53 ms 2076 KB
04_rp10.txt WA 51 ms 2080 KB
sample_1.txt AC 19 ms 676 KB
sample_2.txt WA 20 ms 800 KB
sample_3.txt WA 21 ms 676 KB