Coderforces Presents
2017-06-15 11:11
274 查看
http://codeforces.com/problemset/problem/136/A
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Presents {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
Map<Integer, Integer> map = new HashMap<>();
for(int i = 1; i <= n; i++) {
int temp = scanner.nextInt();
map.put(temp, i);
}
for(int i = 1; i < n; i++) {
int temp = map.get(i);
System.out.print(temp+" ");
}
System.out.println(map.get(n));
}
}
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Presents {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
Map<Integer, Integer> map = new HashMap<>();
for(int i = 1; i <= n; i++) {
int temp = scanner.nextInt();
map.put(temp, i);
}
for(int i = 1; i < n; i++) {
int temp = map.get(i);
System.out.print(temp+" ");
}
System.out.println(map.get(n));
}
}
相关文章推荐
- coderforces 846D Monitor
- 文章标题 Coderforces 343D : Water Tree(dfs序+线段树)
- 文章标题 CoderForces 298A: Snow Footprints(水)
- Coderforces Helpful Maths
- Coderforces George and Accommodation
- coderforces round 19D线段树+离散化处理
- coderforces 335B--Palindrome [字符串好题]
- 文章标题 CoderForces 298B : Sail(分类)
- 【CoderForces】#296 Div2 C(线段树+set)
- Coderforces Tram
- Coderforces Soldier and Bananas
- Coderforces 617C Watering Flowers 【暴力】
- coderforces 348A Mafia(二分)
- Coderforces 348A
- CoderForces 632B Alice, Bob, Two Teams
- New Year Transportation(CoderForces A)
- 文章标题 CoderForces 450D : Jzzhu and Cities(最短路---spfa)
- Coderforces 85 D. Sum of Medians(线段树单点修改)
- coderforces--418div2 B. An express train to reveries
- Coderforces cAPS lOCK