Submission #214693


Source Code Expand

Copy
chomp(my $l1 = <>);
chomp(my $l2 = <>);
my ($N, $M, $D) = split(/\s/, $l1);
my @A = split(/\s/, $l2);

my @S = (0..($N-1));
for(my $n = 0; $n < $N; ++$n) {
    $S[$n] = $n;
}

foreach my $k (@A) {
    ($S[$k], $S[$k-1]) = ($S[$k-1], $S[$k]);
}

my @R = (0..($N-1));
for(my $d = 0; $d < ($D % ($M + 1)); ++$d) {
    @R = map{$S[$_]}@R;
}

my @I;
foreach my $r (@R) {
    $I[$R[$r]] = $r;
}

my @O = map{$I[$_]+1}(0..($N-1));

printf "%s\n", join("\n", @O);

Submission Info

Submission Time
Task D - 阿弥陀
User ktnyt
Language Perl (5.14.2)
Score 10
Code Size 483 Byte
Status WA
Exec Time 4037 ms
Memory 53664 KB

Compile Error

./Main.pl syntax OK

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 10 / 10 0 / 20 0 / 20 0 / 50
Status
AC × 9
AC × 17
WA × 1
AC × 11
WA × 7
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 AC 577 ms 53664 KB
01_random01.txt AC 28 ms 932 KB
01_random02.txt AC 26 ms 932 KB
01_random03.txt AC 23 ms 1048 KB
01_random04.txt AC 44 ms 3108 KB
01_random05.txt AC 272 ms 31796 KB
01_random06.txt AC 502 ms 47096 KB
01_random07.txt AC 581 ms 53640 KB
02_i.txt AC 352 ms 1436 KB
02_p.txt WA 45 ms 1316 KB
02_random01.txt AC 25 ms 1052 KB
02_random02.txt AC 22 ms 1012 KB
02_random03.txt AC 56 ms 1688 KB
02_random04.txt AC 25 ms 1192 KB
02_random05.txt AC 123 ms 4256 KB
02_random06.txt AC 182 ms 17140 KB
02_random07.txt AC 656 ms 33260 KB
02_random08.txt AC 657 ms 33252 KB
02_rp01.txt AC 207 ms 1316 KB
02_rp02.txt AC 190 ms 1308 KB
02_rp03.txt AC 67 ms 1324 KB
02_rp04.txt AC 193 ms 1372 KB
02_rp05.txt AC 204 ms 1320 KB
03_i.txt AC 23 ms 984 KB
03_random01.txt AC 63 ms 3748 KB
03_random02.txt AC 451 ms 31608 KB
03_random03.txt AC 430 ms 26352 KB
03_random04.txt AC 466 ms 26024 KB
03_random05.txt AC 121 ms 5920 KB
03_random06.txt WA 98 ms 5276 KB
03_random07.txt AC 165 ms 8096 KB
03_random08.txt WA 32 ms 1444 KB
03_random09.txt WA 261 ms 10144 KB
03_random10.txt AC 453 ms 17648 KB
03_random11.txt WA 415 ms 30196 KB
03_random12.txt WA 525 ms 31296 KB
03_random13.txt WA 607 ms 24440 KB
03_random14.txt WA 396 ms 19696 KB
03_random15.txt AC 107 ms 8112 KB
04_i.txt TLE 4035 ms 40056 KB
04_p1.txt TLE 4033 ms 26724 KB
04_p2.txt TLE 4032 ms 21492 KB
04_random01.txt TLE 4033 ms 21752 KB
04_random02.txt TLE 4031 ms 12648 KB
04_random03.txt TLE 4032 ms 18036 KB
04_random04.txt TLE 4034 ms 31992 KB
04_random05.txt TLE 4033 ms 26096 KB
04_random06.txt TLE 4031 ms 19956 KB
04_random07.txt TLE 4034 ms 33340 KB
04_random08.txt TLE 4033 ms 28520 KB
04_random09.txt TLE 4033 ms 33856 KB
04_random10.txt TLE 4032 ms 16364 KB
04_random11.txt TLE 4034 ms 40040 KB
04_random12.txt TLE 4034 ms 39948 KB
04_random13.txt TLE 4035 ms 39976 KB
04_rp01.txt TLE 4037 ms 26816 KB
04_rp02.txt TLE 4032 ms 26856 KB
04_rp03.txt TLE 4033 ms 26796 KB
04_rp04.txt TLE 4034 ms 26784 KB
04_rp05.txt TLE 4032 ms 26860 KB
04_rp06.txt TLE 4033 ms 26856 KB
04_rp07.txt TLE 4033 ms 26848 KB
04_rp08.txt TLE 4031 ms 26868 KB
04_rp09.txt TLE 4034 ms 26860 KB
04_rp10.txt TLE 4032 ms 26864 KB
sample_1.txt AC 23 ms 936 KB
sample_2.txt AC 24 ms 1008 KB
sample_3.txt AC 24 ms 1060 KB