結果

問題 No.182 新規性の虜
ユーザー h1guchh1guch
提出日時 2020-02-28 21:37:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 727 bytes
コンパイル時間 1,773 ms
コンパイル使用メモリ 168,440 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-04-21 18:06:37
合計ジャッジ時間 3,642 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 42 ms
5,888 KB
testcase_09 AC 71 ms
7,552 KB
testcase_10 AC 60 ms
6,912 KB
testcase_11 AC 52 ms
6,272 KB
testcase_12 AC 21 ms
5,376 KB
testcase_13 AC 3 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 31 ms
5,376 KB
testcase_19 AC 23 ms
5,376 KB
testcase_20 AC 16 ms
5,376 KB
testcase_21 AC 35 ms
5,376 KB
testcase_22 AC 19 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 57 ms
8,192 KB
testcase_25 AC 17 ms
5,376 KB
testcase_26 AC 9 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
evil01.txt AC 70 ms
8,192 KB
evil02.txt AC 71 ms
8,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:21:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   21 | main()
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define each(it,v) for(auto &it : v)
#define all(v) (v).begin(),(v).end()

using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using Pii = pair<int,int>;
using Pll = pair<ll,ll>;
using vpii = vector<Pii>;
using vpll = vector<Pll>;

const ll mod=1e9+7;
const int intINF=INT_MAX;
const ll  longINF=LONG_LONG_MAX;

main()
{
        int n; cin>>n;

        map<int,int> m;
        rep(i,n)
        {
                int a; cin>>a;
                m[a]++;
        }

        int ans=0;
        each(it,m)
        {
                if(it.second==1)ans++;
        }
        cout<<ans<<endl;
}
0