結果

問題 No.182 新規性の虜
ユーザー taketake
提出日時 2016-07-10 18:27:22
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 966 bytes
コンパイル時間 2,434 ms
コンパイル使用メモリ 76,960 KB
実行使用メモリ 69,264 KB
最終ジャッジ日時 2024-04-21 12:04:20
合計ジャッジ時間 14,277 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
41,344 KB
testcase_01 AC 111 ms
41,048 KB
testcase_02 AC 109 ms
40,112 KB
testcase_03 AC 114 ms
41,036 KB
testcase_04 AC 107 ms
41,244 KB
testcase_05 AC 123 ms
40,212 KB
testcase_06 AC 110 ms
41,768 KB
testcase_07 AC 115 ms
41,508 KB
testcase_08 AC 4,404 ms
69,264 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	

	public static void main (String[] args) throws java.lang.Exception
	{
	    Scanner sc = new Scanner(System.in);

	    // N(配列数)
	    int n = sc.nextInt();
	    //System.out.println("n=" + n);
	    
	    
	    List<Integer> list = new ArrayList<Integer>();

        int index = 0;
	    while((sc.hasNext()) && (index < n + 1)){
	        int s = sc.nextInt();
	        list.add(s);
		    index++;
	    }
	    
	    // ソート
	    Collections.sort(list);
	    
	    // 新規カウント
		int c = 0 ;
        
        int ind = 0;
        while(ind < list.size()){
        	
        	int cc = Collections.frequency(list, list.get(ind));
        	if (cc == 1) {
				c++;
			}
        	ind += cc;
	    }
	    
        
		System.out.println(c);
	}
	
	
	
	
		
}
0