結果

問題 No.182 新規性の虜
コンテスト
ユーザー michonz4
提出日時 2019-12-09 20:34:57
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 146 ms
コンパイル使用メモリ 39,904 KB
最終ジャッジ日時 2026-02-22 04:57:43
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other AC * 2 WA * 4 RE * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <stdlib.h>

int main(void) {
  int n;
  scanf("%d", &n);

  int *arr=(int*)malloc(n*sizeof(int));
  for (int i=0; i<n; i++) {
    arr[i]=0;
  }

  for (int i=0; i<n; i++) {
    int t;
    scanf("%d", &t);
    arr[t-1]++;
  }

  int cnt=0;
  for (int i=0; i<100000; i++) {
    if (arr[i]==1) cnt++;
  }

  printf("%d\n", cnt);
  free(arr);
  return 0;
}
0