結果

問題 No.182 新規性の虜
ユーザー rainyrainy
提出日時 2021-07-26 16:48:22
言語 C
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 418 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 28,448 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-29 13:31:51
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>
#define same 1000000001

int main(void) {
	int N, count = 0;
	int A[10001];
	int check;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		scanf("%d", &A[i]);
	}
	for (int i = 0; i < N; i++) {
		if (A[i] == same) {
			continue;
		}
		check = 1;
		for (int j = i+1; j < N; j++) {
			if (A[i] == A[j]) {
				A[j] = same;
				check = 0;
			}
		}
		if (check) {
			count++;
		}
	}
	printf("%d", count);
}
0