結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2016-03-01 05:35:17 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 40 ms / 5,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 1,426 ms |
コンパイル使用メモリ | 59,000 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-27 02:07:48 |
合計ジャッジ時間 | 2,930 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include<iostream> #include<algorithm> using namespace std; #define NMAX 100000 int main(){ int N; int A[NMAX]; int ans=0; cin>>N; for(int i=0;i<N;i++){ cin>>A[i]; } sort(A,A+N); for(int i=0;i<N;i++){ if((i==0||A[i]!=A[i-1])&&(i==N-1||A[i]!=A[i+1])) ans++; } cout<<ans<<endl; }