結果

問題 No.1692 Expectations
ユーザー planesplanes
提出日時 2021-10-01 21:24:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 1,942 ms
コンパイル使用メモリ 174,136 KB
実行使用メモリ 17,036 KB
最終ジャッジ日時 2023-09-26 16:21:04
合計ジャッジ時間 3,631 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 53 ms
4,500 KB
testcase_11 AC 52 ms
4,456 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 12 ms
4,428 KB
testcase_15 AC 141 ms
11,232 KB
testcase_16 AC 12 ms
4,380 KB
testcase_17 AC 64 ms
8,092 KB
testcase_18 AC 23 ms
5,552 KB
testcase_19 AC 176 ms
12,540 KB
testcase_20 AC 100 ms
14,928 KB
testcase_21 AC 120 ms
17,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h> 
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 #define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)

int main() {
    ll N,M;cin>>N>>M;
    vector<ll> A(N);  
    map<ll,ll> S;
    for(ll i=0;i<N;i++) {
        cin>>A[i];
        S[A[i]]++;
    }
    cout<<S.size()<<" ";
    if(S.size()==1) {
        cout<<1<<endl;
    }
    else {
        cout<<0<<endl;
    }
}


  
0