Submission #2234593


Source Code Expand

#!/usr/bin/env perl

use strict;
use warnings;

my $input = <STDIN>;
chomp $input;
my ($n, $yoko_lines, $joint) = split(/\s/, $input);

$input = <STDIN>;
chomp $input;
my @branches = split(/\s/, $input);

my @numbers = (1..$n);
for my $branch (reverse(@branches)){
    my $tmp = $numbers[$branch - 1];
    $numbers[$branch - 1] = $numbers[$branch];
    $numbers[$branch] = $tmp;
}
for my $initial_line_no (1..$n){
    my $now_line_no = $initial_line_no;
    for (1..$joint){
        $now_line_no = $numbers[$now_line_no - 1];
    }
    print "$now_line_no\n";
}

Submission Info

Submission Time
Task D - 阿弥陀
User tomcha
Language Perl (v5.18.2)
Score 30
Code Size 588 Byte
Status TLE
Exec Time 4206 ms
Memory 36132 KB

Compile Error

./Main.pl syntax OK

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 10 / 10 20 / 20 0 / 20 0 / 50
Status
AC × 9
AC × 18
AC × 2
TLE × 16
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 220 ms 34596 KB
01_random01.txt AC 4 ms 640 KB
01_random02.txt AC 4 ms 640 KB
01_random03.txt AC 4 ms 640 KB
01_random04.txt AC 13 ms 2304 KB
01_random05.txt AC 98 ms 12032 KB
01_random06.txt AC 183 ms 27684 KB
01_random07.txt AC 218 ms 34596 KB
02_i.txt AC 88 ms 896 KB
02_p.txt AC 85 ms 768 KB
02_random01.txt AC 4 ms 640 KB
02_random02.txt AC 4 ms 640 KB
02_random03.txt AC 13 ms 1280 KB
02_random04.txt AC 109 ms 768 KB
02_random05.txt AC 36 ms 3840 KB
02_random06.txt AC 76 ms 16804 KB
02_random07.txt AC 253 ms 32932 KB
02_random08.txt AC 253 ms 32932 KB
02_rp01.txt AC 52 ms 768 KB
02_rp02.txt AC 58 ms 768 KB
02_rp03.txt AC 15 ms 768 KB
02_rp04.txt AC 54 ms 768 KB
02_rp05.txt AC 64 ms 768 KB
03_i.txt TLE 4203 ms 640 KB
03_random01.txt TLE 4203 ms 3456 KB
03_random02.txt TLE 4205 ms 31268 KB
03_random03.txt TLE 4204 ms 28068 KB
03_random04.txt TLE 4204 ms 27812 KB
03_random05.txt TLE 4204 ms 5632 KB
03_random06.txt TLE 4203 ms 7040 KB
03_random07.txt TLE 4204 ms 7808 KB
03_random08.txt TLE 4203 ms 1024 KB
03_random09.txt TLE 4204 ms 9856 KB
03_random10.txt TLE 4204 ms 17280 KB
03_random11.txt TLE 4204 ms 31908 KB
03_random12.txt TLE 4205 ms 31012 KB
03_random13.txt TLE 4204 ms 26148 KB
03_random14.txt TLE 4204 ms 19364 KB
03_random15.txt TLE 4204 ms 7808 KB
04_i.txt TLE 4205 ms 36132 KB
04_p1.txt TLE 4205 ms 20004 KB
04_p2.txt TLE 4204 ms 16036 KB
04_random01.txt TLE 4205 ms 18212 KB
04_random02.txt TLE 4204 ms 9508 KB
04_random03.txt TLE 4204 ms 19620 KB
04_random04.txt TLE 4205 ms 31396 KB
04_random05.txt TLE 4204 ms 27556 KB
04_random06.txt TLE 4204 ms 15908 KB
04_random07.txt TLE 4205 ms 32676 KB
04_random08.txt TLE 4204 ms 29860 KB
04_random09.txt TLE 4205 ms 33316 KB
04_random10.txt TLE 4204 ms 12068 KB
04_random11.txt TLE 4205 ms 34084 KB
04_random12.txt TLE 4206 ms 34084 KB
04_random13.txt TLE 4205 ms 36132 KB
04_rp01.txt TLE 4204 ms 20132 KB
04_rp02.txt TLE 4205 ms 20132 KB
04_rp03.txt TLE 4205 ms 20132 KB
04_rp04.txt TLE 4205 ms 20132 KB
04_rp05.txt TLE 4204 ms 22184 KB
04_rp06.txt TLE 4205 ms 20132 KB
04_rp07.txt TLE 4205 ms 20132 KB
04_rp08.txt TLE 4205 ms 20132 KB
04_rp09.txt TLE 4205 ms 20132 KB
04_rp10.txt TLE 4204 ms 22180 KB
sample_1.txt AC 4 ms 640 KB
sample_2.txt AC 4 ms 640 KB
sample_3.txt AC 4 ms 640 KB