結果

問題 No.182 新規性の虜
コンテスト
ユーザー r.suzuki
提出日時 2015-12-28 22:38:25
言語 Java
(openjdk 26.0.2.1)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
TLE  
実行時間 -
コード長 503 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,257 ms
コンパイル使用メモリ 84,724 KB
実行使用メモリ 60,112 KB
最終ジャッジ日時 2026-08-30 22:18:36
合計ジャッジ時間 14,884 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 TLE * 1 -- * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

public class No_182 {

	public static void main(String[] args) {
		java.util.LinkedList<Integer> list = new java.util.LinkedList<Integer>();
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;

		for (int i = 0; i < n; i++) {
			list.add(sc.nextInt());
		}

		while (!list.isEmpty()) {
			Integer x = list.poll();
			if (!list.contains(x)) {
				count++;
			} else {
				while (list.remove(x)) {}
			}
		}
		System.out.println(count);
		sc.close();

	}

}
0