結果

問題 No.182 新規性の虜
ユーザー shinwisteriashinwisteria
提出日時 2018-02-21 22:39:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 783 ms / 5,000 ms
コード長 448 bytes
コンパイル時間 4,624 ms
コンパイル使用メモリ 76,552 KB
実行使用メモリ 68,780 KB
最終ジャッジ日時 2023-10-20 00:09:32
合計ジャッジ時間 15,917 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,000 KB
testcase_01 AC 127 ms
57,328 KB
testcase_02 AC 127 ms
57,476 KB
testcase_03 AC 131 ms
57,288 KB
testcase_04 AC 119 ms
56,320 KB
testcase_05 AC 132 ms
55,228 KB
testcase_06 AC 131 ms
57,244 KB
testcase_07 AC 123 ms
56,216 KB
testcase_08 AC 587 ms
63,960 KB
testcase_09 AC 783 ms
68,588 KB
testcase_10 AC 717 ms
68,780 KB
testcase_11 AC 663 ms
64,152 KB
testcase_12 AC 471 ms
62,064 KB
testcase_13 AC 130 ms
57,060 KB
testcase_14 AC 133 ms
57,496 KB
testcase_15 AC 130 ms
57,556 KB
testcase_16 AC 130 ms
57,040 KB
testcase_17 AC 125 ms
56,224 KB
testcase_18 AC 630 ms
64,984 KB
testcase_19 AC 566 ms
62,416 KB
testcase_20 AC 473 ms
62,100 KB
testcase_21 AC 700 ms
66,368 KB
testcase_22 AC 501 ms
62,188 KB
testcase_23 AC 139 ms
57,512 KB
testcase_24 AC 657 ms
68,528 KB
testcase_25 AC 536 ms
61,824 KB
testcase_26 AC 325 ms
61,768 KB
testcase_27 AC 134 ms
57,324 KB
evil01.txt AC 689 ms
69,256 KB
evil02.txt AC 692 ms
68,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
import java.util.TreeSet;
public class Con182 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		TreeSet<Integer> a = new TreeSet<>();
		TreeSet<Integer> b = new TreeSet<>();
		for(int i = 0;i < N;i++){
			int t = s.nextInt();
			if(a.contains(t)){
				b.add(t);
			}
			a.add(t);
		}
		s.close();
		System.out.println((a.size() - b.size()));
	}

}
0