結果
| 問題 | 
                            No.1692 Expectations
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-10-02 00:07:29 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 764 bytes | 
| コンパイル時間 | 1,435 ms | 
| コンパイル使用メモリ | 171,084 KB | 
| 実行使用メモリ | 12,672 KB | 
| 最終ジャッジ日時 | 2024-07-19 17:34:43 | 
| 合計ジャッジ時間 | 3,017 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 19 WA * 1 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define sz(x) int(v.size())
typedef long long ll;
typedef pair<int,int> P;
const int inf=1000000007;
const int mod=1e9 + 7;
const double PI=3.14159265358979323846;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
int cans(bool f){
    if(f) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}
int main() {
    int N,M;
    cin >> N >> M;
    set<int> s; 
    int unicnt = 0;
    int all = 0;
    int ans = 1;
    rep(i,N) {
	int a;
	cin >> a;
	if(i == 0) all = a;
	if(all != a) ans= 0;
	if(s.find(a) == s.end()) {
	    s.insert(a);
	    unicnt++;
	}	
    }
    if(ans ==1) {
	if(M >= 2*N) ans = 0;
    }
    cout << unicnt << " " <<  ans<<  endl;
}