提出 #25561191
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false), cin.tie(nullptr);
int n;
cin >> n;
vector<int> a(n);
for(int i = 0; i < n; i++){
int x;
cin >> x;
x--;
a[x] = i;
}
for(int i = 0; i < n; i++){
cout << (a[i] + 1) << " \n"[i == (n-1)];
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Inverse of Permutation |
| ユーザ | ksun48 |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 300 |
| コード長 | 315 Byte |
| 結果 | AC |
| 実行時間 | 42 ms |
| メモリ | 3948 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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_n_eq_3_00.txt, 01_n_eq_3_01.txt, 01_n_eq_3_02.txt, 01_n_eq_3_03.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 03_max_00.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 7 ms | 3572 KiB |
| 00_sample_01.txt | AC | 2 ms | 3640 KiB |
| 00_sample_02.txt | AC | 2 ms | 3596 KiB |
| 01_n_eq_3_00.txt | AC | 2 ms | 3608 KiB |
| 01_n_eq_3_01.txt | AC | 2 ms | 3608 KiB |
| 01_n_eq_3_02.txt | AC | 3 ms | 3492 KiB |
| 01_n_eq_3_03.txt | AC | 2 ms | 3500 KiB |
| 02_random_00.txt | AC | 23 ms | 3620 KiB |
| 02_random_01.txt | AC | 11 ms | 3552 KiB |
| 02_random_02.txt | AC | 42 ms | 3816 KiB |
| 03_max_00.txt | AC | 39 ms | 3948 KiB |