結果
| 問題 |
No.1692 Expectations
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-01 21:38:21 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| コード長 | 867 bytes |
| コンパイル時間 | 1,163 ms |
| コンパイル使用メモリ | 107,256 KB |
| 最終ジャッジ日時 | 2025-01-24 19:02:33 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
#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;
}