結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
daradara_sanma
|
| 提出日時 | 2017-07-07 22:46:10 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 522 ms |
| コンパイル使用メモリ | 59,740 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-06 10:07:35 |
| 合計ジャッジ時間 | 3,599 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
ソースコード
#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
int main() {
int n, a[100001] = {};
scanf("%d", &n);
vector<int> b(n);
for (int i = 0; i < n; i++)
{
cin >> b[i];
a[b[i]] += 1;
}
int ans = 0;
for (auto i = b.begin(); i != b.end(); i++)
{
if (a[*i] == 1)
{
ans++;
}
}
cout << ans << endl;
return 0;
}
daradara_sanma