結果

問題 No.1692 Expectations
ユーザー zezerozezero
提出日時 2021-10-01 21:38:21
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 867 bytes
コンパイル時間 1,005 ms
コンパイル使用メモリ 109,452 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-26 16:41:39
合計ジャッジ時間 2,562 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 52 ms
4,380 KB
testcase_11 AC 50 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 7 ms
4,380 KB
testcase_15 AC 60 ms
4,376 KB
testcase_16 AC 7 ms
4,380 KB
testcase_17 AC 30 ms
4,380 KB
testcase_18 AC 13 ms
4,376 KB
testcase_19 AC 71 ms
4,380 KB
testcase_20 AC 48 ms
4,376 KB
testcase_21 AC 58 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i=0;i < (int)(n);i++)

int main(){
    int n,m;
    cin >> n >> m;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    sort(a.begin(),a.end());
    a.erase(unique(a.begin(),a.end()),a.end());
    int MAX = a.size();
    if (n == 1 && m == 1){
        cout << "1 1" << endl;
        return 0;
    }
    else if (n == m){
        if (MAX == 1){
            cout << MAX << " " << 1 << endl;
            return 0;
        }
        else{
            cout << MAX << " " << 0 << endl;
            return 0;
        }
    }
    else{
        cout << MAX << " " << 0 << endl;
        return 0;
    }
    


 

    return 0;
}
0