Submission #49457290


Source Code Expand

// #include <atcoder/all>
#include <bits/stdc++.h>

using namespace std;
// using namespace atcoder;

int main() {
    int n;
    cin >> n;

    map<int, int> s_map;

    for(int i = 0; i < n; i++) {
        int a;
        cin >> a;
        s_map[a] = i + 1;
    }

    int next = -1;
    for(int i = 0; i < n; i++) {
        next = s_map[next];
        cout << next << ((i < n - 1) ? " " : "\n");
    }

    return 0;
}

Submission Info

Submission Time
Task C - Lining Up 2
User nnth_y
Language C++ 20 (gcc 12.2)
Score 300
Code Size 447 Byte
Status AC
Exec Time 254 ms
Memory 17624 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 32
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 01_handmade_07.txt, 01_handmade_08.txt, 01_handmade_09.txt, 01_handmade_10.txt, 01_handmade_11.txt, 01_handmade_12.txt, 01_handmade_13.txt, 01_handmade_14.txt, 01_handmade_15.txt, 02_random_16.txt, 02_random_17.txt, 02_random_18.txt, 02_random_19.txt, 02_random_20.txt, 02_random_21.txt, 02_random_22.txt, 02_random_23.txt, 02_random_24.txt, 02_random_25.txt, 02_random_26.txt, 02_random_27.txt, 02_random_28.txt, 02_random_29.txt, 02_random_30.txt, 02_random_31.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3460 KiB
00_sample_01.txt AC 1 ms 3432 KiB
00_sample_02.txt AC 1 ms 3456 KiB
01_handmade_03.txt AC 147 ms 17516 KiB
01_handmade_04.txt AC 148 ms 17624 KiB
01_handmade_05.txt AC 145 ms 17500 KiB
01_handmade_06.txt AC 153 ms 17420 KiB
01_handmade_07.txt AC 1 ms 3456 KiB
01_handmade_08.txt AC 1 ms 3492 KiB
01_handmade_09.txt AC 1 ms 3640 KiB
01_handmade_10.txt AC 1 ms 3460 KiB
01_handmade_11.txt AC 1 ms 3424 KiB
01_handmade_12.txt AC 1 ms 3448 KiB
01_handmade_13.txt AC 1 ms 3440 KiB
01_handmade_14.txt AC 1 ms 3552 KiB
01_handmade_15.txt AC 1 ms 3648 KiB
02_random_16.txt AC 250 ms 17512 KiB
02_random_17.txt AC 246 ms 17616 KiB
02_random_18.txt AC 254 ms 17492 KiB
02_random_19.txt AC 245 ms 17516 KiB
02_random_20.txt AC 247 ms 17556 KiB
02_random_21.txt AC 250 ms 17556 KiB
02_random_22.txt AC 248 ms 17428 KiB
02_random_23.txt AC 251 ms 17544 KiB
02_random_24.txt AC 78 ms 8892 KiB
02_random_25.txt AC 60 ms 7840 KiB
02_random_26.txt AC 14 ms 4712 KiB
02_random_27.txt AC 128 ms 11756 KiB
02_random_28.txt AC 107 ms 10720 KiB
02_random_29.txt AC 124 ms 11408 KiB
02_random_30.txt AC 249 ms 17444 KiB
02_random_31.txt AC 141 ms 12260 KiB