結果

問題 No.182 新規性の虜
ユーザー monburan_0401monburan_0401
提出日時 2018-09-04 17:12:05
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 30,080 KB
実行使用メモリ 7,168 KB
最終ジャッジ日時 2024-04-22 16:37:46
合計ジャッジ時間 10,781 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
7,168 KB
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2,209 ms
5,376 KB
testcase_09 TLE -
testcase_10 AC 4,467 ms
5,376 KB
testcase_11 AC 3,117 ms
5,376 KB
testcase_12 AC 564 ms
5,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 1 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(void){
	int N;		//	number of words. N <= (10^5)
	int A[100000];		//	boxes(each number). A[i] <= (10^9)
	int same = 0;		//	number of same words
	int count = 0;		//	
	
	scanf("%d",&N);
	for(int i = 0;i < N;i++){
		scanf("%d",&A[i]);
	}
	count = N;
	
	//	printf("%d",A[0]);		//	check OK
	
	for(int j = 0;j < N;j++){
		
		for(int k = 0;k < N;k++){
			if(k == j){
				continue;
			} else if(A[j] == A[k]){
				same += 1;
			}
			count -= same;
			same = 0;
		}
	}
	
	printf("%d\n",count);
	
	return 0;
}
0