Submission #1686735
Source Code Expand
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); TreeSet<Integer> set = new TreeSet(); int N = sc.nextInt(); int a[] = new int[N]; for(int i = 0;i < N;i++){ a[i] = sc.nextInt(); set.add(a[i]); } HashMap<Integer,Integer> map = new HashMap<Integer,Integer>(); int count = 0; for(int b : set){ map.put(b,count++); } for(int i = 0 ;i < N;i++){ System.out.println(map.get(a[i])); } } }
Submission Info
Submission Time | |
---|---|
Task | C - 座圧 |
User | suesue |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 726 Byte |
Status | AC |
Exec Time | 1395 ms |
Memory | 83716 KB |
Compile Error
Note: ./Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Judge Result
Set Name | Testset1 | Testset2 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 30 / 30 | 30 / 30 | 40 / 40 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Testset1 | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt |
Testset2 | 000.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 106 ms | 20052 KB |
001.txt | AC | 198 ms | 23636 KB |
002.txt | AC | 209 ms | 26936 KB |
003.txt | AC | 188 ms | 26656 KB |
004.txt | AC | 205 ms | 24308 KB |
005.txt | AC | 184 ms | 25580 KB |
006.txt | AC | 200 ms | 26320 KB |
007.txt | AC | 193 ms | 22672 KB |
008.txt | AC | 186 ms | 26520 KB |
009.txt | AC | 193 ms | 24240 KB |
010.txt | AC | 1173 ms | 75780 KB |
011.txt | AC | 1054 ms | 62036 KB |
012.txt | AC | 1114 ms | 66052 KB |
013.txt | AC | 1005 ms | 62392 KB |
014.txt | AC | 1088 ms | 69816 KB |
015.txt | AC | 1080 ms | 62076 KB |
016.txt | AC | 1053 ms | 60612 KB |
017.txt | AC | 1139 ms | 72980 KB |
018.txt | AC | 1101 ms | 69916 KB |
019.txt | AC | 1118 ms | 73772 KB |
020.txt | AC | 1319 ms | 81344 KB |
021.txt | AC | 1129 ms | 67980 KB |
022.txt | AC | 1132 ms | 64684 KB |
023.txt | AC | 1395 ms | 83716 KB |
024.txt | AC | 1346 ms | 78880 KB |
025.txt | AC | 1079 ms | 65512 KB |
026.txt | AC | 1114 ms | 64528 KB |
027.txt | AC | 1164 ms | 72916 KB |
028.txt | AC | 1263 ms | 73472 KB |
029.txt | AC | 1272 ms | 78496 KB |