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

Submission #214675

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, j, N, M, D, A[200000], result[100000], trans, mainresult[100000];

scanf("%d %d %d", &N, &M, &D);
for (i = 0; i < N; i++){
result[i] = i + 1;
//mainresult[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 < D; i++){
j = 0;
do{
mainresult[j] = mainresult[result[j]];
j = result[j];
}while (j != 0);
}

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

return 0;
}```

#### Submission Info

Submission Time 2014-08-16 22:41:52+0900 D - 阿弥陀 letter C (GCC 4.6.4) 10 741 Byte WA 4030 ms 2348 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

Score / Max Score 10 / 10 0 / 20 0 / 20 0 / 50
Status
 AC × 9
 AC × 4 WA × 14
 AC × 6 WA × 6 TLE × 6
 AC × 1 WA × 6 TLE × 19 RE × 3
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 2344 KB
01_random01.txt AC 18 ms 796 KB
01_random02.txt AC 20 ms 732 KB
01_random03.txt AC 20 ms 736 KB
01_random04.txt AC 22 ms 924 KB
01_random05.txt AC 41 ms 1760 KB
01_random06.txt AC 60 ms 2216 KB
01_random07.txt AC 70 ms 2348 KB
02_i.txt AC 23 ms 700 KB
02_p.txt WA 20 ms 732 KB
02_random01.txt AC 20 ms 740 KB
02_random02.txt WA 19 ms 792 KB
02_random03.txt WA 21 ms 688 KB
02_random04.txt AC 22 ms 800 KB
02_random05.txt WA 23 ms 816 KB
02_random06.txt WA 34 ms 1068 KB
02_random07.txt WA 50 ms 1444 KB
02_random08.txt WA 51 ms 1396 KB
02_rp01.txt WA 20 ms 804 KB
02_rp02.txt WA 20 ms 732 KB
02_rp03.txt WA 20 ms 796 KB
02_rp04.txt WA 22 ms 800 KB
02_rp05.txt WA 20 ms 796 KB
03_i.txt TLE 4029 ms 804 KB
03_random01.txt AC 420 ms 808 KB
03_random02.txt AC 1478 ms 1448 KB
03_random03.txt AC 1786 ms 1316 KB
03_random04.txt AC 1351 ms 1308 KB
03_random05.txt TLE 4029 ms 940 KB
03_random06.txt TLE 4029 ms 940 KB
03_random07.txt TLE 4030 ms 940 KB
03_random08.txt WA 439 ms 796 KB
03_random09.txt WA 814 ms 856 KB
03_random10.txt WA 3447 ms 1140 KB
03_random11.txt TLE 4029 ms 1500 KB
03_random12.txt TLE 4030 ms 1572 KB
03_random13.txt AC 2127 ms 1248 KB
03_random14.txt WA 352 ms 1188 KB
03_random15.txt WA 3768 ms 800 KB
04_i.txt TLE 4029 ms 1960 KB
04_p1.txt TLE 4030 ms 1576 KB
04_p2.txt TLE 4029 ms 1444 KB
04_random01.txt TLE 4029 ms 1448 KB
04_random02.txt TLE 4029 ms 1200 KB
04_random03.txt TLE 4029 ms 1192 KB
04_random04.txt TLE 4030 ms 1500 KB
04_random05.txt TLE 4029 ms 1440 KB
04_random06.txt TLE 4030 ms 1376 KB
04_random07.txt TLE 4030 ms 1708 KB
04_random08.txt TLE 4029 ms 1576 KB
04_random09.txt TLE 4029 ms 1568 KB
04_random10.txt TLE 4030 ms 1196 KB
04_random11.txt TLE 4030 ms 1956 KB
04_random12.txt TLE 4030 ms 1960 KB
04_random13.txt TLE 4030 ms 1956 KB
04_rp01.txt WA 3491 ms 1964 KB
04_rp02.txt RE 272 ms 1452 KB
04_rp03.txt RE 271 ms 1440 KB
04_rp04.txt RE 276 ms 1448 KB
04_rp05.txt WA 2265 ms 1952 KB
04_rp06.txt WA 2524 ms 2012 KB
04_rp07.txt WA 2025 ms 1956 KB
04_rp08.txt TLE 4030 ms 1448 KB
04_rp09.txt TLE 4029 ms 1572 KB
04_rp10.txt TLE 4029 ms 1576 KB
sample_1.txt AC 19 ms 696 KB
sample_2.txt WA 21 ms 712 KB
sample_3.txt WA 21 ms 796 KB