結果

問題 No.1692 Expectations
ユーザー chacoder1chacoder1
提出日時 2021-12-31 10:16:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 1,904 ms
コンパイル使用メモリ 200,824 KB
実行使用メモリ 13,696 KB
最終ジャッジ日時 2024-04-16 21:02:17
合計ジャッジ時間 3,566 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 54 ms
5,376 KB
testcase_11 AC 51 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 11 ms
5,376 KB
testcase_15 AC 105 ms
9,344 KB
testcase_16 AC 12 ms
5,376 KB
testcase_17 AC 52 ms
6,944 KB
testcase_18 AC 21 ms
5,376 KB
testcase_19 AC 122 ms
10,368 KB
testcase_20 AC 87 ms
12,288 KB
testcase_21 AC 111 ms
13,696 KB
権限があれば一括ダウンロードができます

ソースコード

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