結果

問題 No.1692 Expectations
ユーザー planesplanes
提出日時 2021-10-01 21:29:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 1,597 ms
コンパイル使用メモリ 172,332 KB
実行使用メモリ 17,024 KB
最終ジャッジ日時 2023-09-26 16:27:34
合計ジャッジ時間 3,460 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 52 ms
4,640 KB
testcase_11 AC 51 ms
4,432 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 11 ms
4,396 KB
testcase_15 AC 133 ms
11,276 KB
testcase_16 AC 12 ms
4,520 KB
testcase_17 AC 60 ms
8,188 KB
testcase_18 AC 22 ms
5,296 KB
testcase_19 AC 166 ms
12,500 KB
testcase_20 AC 99 ms
14,880 KB
testcase_21 AC 118 ms
17,024 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&&M-1<N) {

        cout<<1<<endl;
    }
    else {
        cout<<0<<endl;
    }
}


  
0