Submission #1241630
Source Code Expand
import java.util.Arrays; import java.util.HashSet; import java.util.Scanner; public class Main { static Scanner s = new Scanner(System.in); public static void main(String[] args) { int n=s.nextInt(),in[]=new int[n],res; HashSet<Integer> set=new HashSet<>(); for(int i=0;i<n;i++) { in[i]=s.nextInt(); set.add(in[i]); } Integer[]v=set.toArray(new Integer[set.size()]); Arrays.parallelSort(v); for(int i:in) System.out.println(Arrays.binarySearch(v, i)); } }
Submission Info
Submission Time | |
---|---|
Task | C - 座圧 |
User | fal_rnd |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 504 Byte |
Status | AC |
Exec Time | 1297 ms |
Memory | 74804 KB |
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 | 96 ms | 21460 KB |
001.txt | AC | 172 ms | 24228 KB |
002.txt | AC | 176 ms | 23764 KB |
003.txt | AC | 171 ms | 26796 KB |
004.txt | AC | 174 ms | 26720 KB |
005.txt | AC | 172 ms | 24748 KB |
006.txt | AC | 172 ms | 26604 KB |
007.txt | AC | 188 ms | 26764 KB |
008.txt | AC | 170 ms | 26092 KB |
009.txt | AC | 183 ms | 24144 KB |
010.txt | AC | 1032 ms | 63968 KB |
011.txt | AC | 956 ms | 58076 KB |
012.txt | AC | 1067 ms | 63064 KB |
013.txt | AC | 1039 ms | 63760 KB |
014.txt | AC | 1067 ms | 65760 KB |
015.txt | AC | 1040 ms | 63548 KB |
016.txt | AC | 1012 ms | 61312 KB |
017.txt | AC | 1151 ms | 74804 KB |
018.txt | AC | 1016 ms | 61284 KB |
019.txt | AC | 1022 ms | 61748 KB |
020.txt | AC | 1201 ms | 67768 KB |
021.txt | AC | 1138 ms | 64944 KB |
022.txt | AC | 1192 ms | 72688 KB |
023.txt | AC | 1297 ms | 72548 KB |
024.txt | AC | 1245 ms | 69560 KB |
025.txt | AC | 1046 ms | 63176 KB |
026.txt | AC | 1082 ms | 63820 KB |
027.txt | AC | 1144 ms | 65720 KB |
028.txt | AC | 1043 ms | 61056 KB |
029.txt | AC | 1209 ms | 68708 KB |