結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2022-03-04 11:09:18 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 496 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 29,312 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 08:24:29 |
合計ジャッジ時間 | 3,664 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 RE * 15 |
ソースコード
#include <stdio.h>#include <stdlib.h>int main(void) {int i, j, n, f, c, a[10001];scanf("%d", &n);for (i = 0; i < n; i++)scanf("%d", &a[i]);c = 0;for (i = 0; i < n - 1; i++) {f = 0;if (a[i] != 0) {for (j = i + 1; j < n; j++) {if (a[i] == a[j]) {a[j] = 0;f = 1;}}if (f > 0)a[i] = 0;elsec++;}}if (a[n-1] != 0) c++;printf("%d\n", c);return EXIT_SUCCESS;}