結果

問題 No.1692 Expectations
ユーザー chacoder1
提出日時 2021-12-31 10:16:24
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 198,636 KB
最終ジャッジ日時 2025-01-27 08:02:26
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

signed main(){
  int n,m;cin>>n>>m;
  int a[n];
  map<int,int>mp;
  rep(i,n){
    cin>>a[i];
    mp[a[i]]++;
    
  }
  int ans1=mp.size();
  int ans2=0;
  if(mp.size()==1 && n==m) ans2=1;
  else ans2=0;

  cout<<ans1<<" "<<ans2<<endl;
  return 0;
}
0