結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2015-04-16 23:22:24 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 60 ms / 5,000 ms |
コード長 | 447 bytes |
コンパイル時間 | 843 ms |
コンパイル使用メモリ | 66,520 KB |
実行使用メモリ | 8,320 KB |
最終ジャッジ日時 | 2024-12-26 18:40:18 |
合計ジャッジ時間 | 2,619 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
main.cpp: In function ‘int getInt()’: main.cpp:8:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | inline int getInt(){ int s; scanf("%d", &s); return s; } | ~~~~~^~~~~~~~~~
ソースコード
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)#include <map>#include <iostream>#define REP(i,n) for(int i=0; i<(int)(n); i++)#include <cstdio>inline int getInt(){ int s; scanf("%d", &s); return s; }#include <set>using namespace std;int main(){map<int,int> m;const int n = getInt();REP(i,n) m[getInt()]++;int ans = 0;FOR(it,m) if(it->second == 1)ans++;printf("%d\n", ans);return 0;}