Problem description

Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he organized a New Year party at his place and invited n his friends there.

If there's one thing Petya likes more that receiving gifts, that's watching others giving gifts to somebody else. Thus, he safely hid the laptop until the next New Year and made up his mind to watch his friends exchanging gifts while he does not participate in the process. He numbered all his friends with integers from 1 to n. Petya remembered that a friend number i gave a gift to a friend number pi. He also remembered that each of his friends received exactly one gift.

Now Petya wants to know for each friend i the number of a friend who has given him a gift.

Input

The first line contains one integer n (1 ≤ n ≤ 100) — the quantity of friends Petya invited to the party. The second line contains n space-separated integers: the i-th number is pi — the number of a friend who gave a gift to friend number i. It is guaranteed that each friend received exactly one gift. It is possible that some friends do not share Petya's ideas of giving gifts to somebody else. Those friends gave the gifts to themselves.

Output

Print n space-separated integers: the i-th number should equal the number of the friend who gave a gift to friend number i.

Examples

Input

4
2 3 4 1

Output

4 1 2 3

Input

3
1 3 2

Output

1 3 2

Input

2
1 2

Output

1 2
解题思路:输入n(n表示编号从1到n的学生总数)个数,第i个数表示编号为i的学生送礼物给编号为j的学生,要求输出编号为j的学生收到那个送他礼物的学生编号i,水过!
AC代码:
 #include<bits/stdc++.h>
using namespace std;
int main(){
int n,x,t[];
cin>>n;
for(int i=;i<=n;++i){cin>>x;t[x]=i;}
for(int i=;i<=n;++i)
cout<<t[i]<<(i==n?"\n":" ");
return ;
}
 

A - Presents的更多相关文章

  1. CodeForces 483B Friends and Presents

     Friends and Presents Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I ...

  2. B. Friends and Presents(Codeforces Round #275(div2)

    B. Friends and Presents time limit per test 1 second memory limit per test 256 megabytes input stand ...

  3. Codeforces483B. Friends and Presents(二分+容斥原理)

    题目链接:传送门 题目: B. Friends and Presents time limit per test second memory limit per test megabytes inpu ...

  4. Codeforces 483B - Friends and Presents(二分+容斥)

    483B - Friends and Presents 思路:这个博客写的不错:http://www.cnblogs.com/windysai/p/4058235.html 代码: #include& ...

  5. CF 483B. Friends and Presents 数学 (二分) 难度:1

    B. Friends and Presents time limit per test 1 second memory limit per test 256 megabytes input stand ...

  6. Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) A. Little Artem and Presents 水题

    A. Little Artem and Presents 题目连接: http://www.codeforces.com/contest/669/problem/A Description Littl ...

  7. codefoeces B. Friends and Presents

    B. Friends and Presents time limit per test 1 second memory limit per test 256 megabytes input stand ...

  8. codeforces 669A A. Little Artem and Presents(水题)

    题目链接: A. Little Artem and Presents time limit per test 2 seconds memory limit per test 256 megabytes ...

  9. Codeforces Round #275 (Div. 2) B. Friends and Presents 二分+数学

    8493833                 2014-10-31 08:41:26     njczy2010     B - Friends and Presents             G ...

  10. A - Alice and the List of Presents (排列组合+快速幂取模)

    https://codeforces.com/contest/1236/problem/B Alice got many presents these days. So she decided to ...

随机推荐

  1. Percona Xtrabackup对数据库进行部分备份

    Xtrabackup也可以实现部分备份,即只备份某个或某些指定的数据库或某数据库中的某个或某些表.但要使用此功能,必须启用innodb_file_per_table选项,即每张表保存为一个独立的文件. ...

  2. OpenCV中的模板匹配/Filter2d

    1.模板匹配 模板匹配是在图像中寻找目标的方法之一.Come On, Boy.我们一起来看看模板匹配到底是怎么回事. 参考链接:http://www.opencv.org.cn/opencvdoc/2 ...

  3. 【sqli-labs】 less21 Cookie Injection- Error Based- complex - string ( 基于错误的复杂的字符型Cookie注入)

    这个和less20是一样的,唯一的不同在于添加了括号和使用了base64对cookie进行了编码(因为使用了base64_decode解码函数) admin被编码成了YWRtaW4=但是执行的SQL语 ...

  4. html 底部虚线

    <div style="width: 100%; font-size: 14px; color: #666; border-bottom: 1px dashed #666;" ...

  5. 关于vuex

    希望初学者可以初步理解vuex的日志: 示意图: 一.图例: 1.Vue Components:Vue组件.HTML页面上,负责接收用户操作等交互行为,执行dispatch方法触发对应action进行 ...

  6. Commons IO

    Common IO 是一个工具库,用来帮助开发IO功能 它包括6个主要部分 Utility classes – 包括一些静态方法来执行常用任务 Input – InputStream 和 Reader ...

  7. PAT_A1134#Vertex Cover

    Source: PAT A1134 Vertex Cover (25 分) Description: A vertex cover of a graph is a set of vertices su ...

  8. Tost元素识别

    在日常使用App过程中,经常会看到App界面有一些弹窗提示(如下图所示)这些提示元素出现后等待3秒左右就会自动消失,那么我们该如何获取这些元素文字内容呢? Toast简介 Android中的Toast ...

  9. 【剑指Offer】8、跳台阶

      题目描述:   一只青蛙一次可以跳上1级台阶,也可以跳上2级.求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果).   解题思路:   首先考虑最简单的情况,如果只有1级台阶, ...

  10. 1016 部分A+B (15 分)

    正整数 AAA 的“DAD_AD​A​​(为 1 位整数)部分”定义为由 AAA 中所有 DAD_AD​A​​ 组成的新整数 PAP_AP​A​​.例如:给定 A=3862767A = 3862767 ...