結果

問題 No.1692 Expectations
ユーザー harurun
提出日時 2021-10-01 22:28:05
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 1,023 ms
コンパイル使用メモリ 78,448 KB
最終ジャッジ日時 2025-01-24 19:15:12
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;

int main(){
  int N,M,ans=1;
  cin>>N>>M;
  vector<int>A(N);
  for(int i=0;i<N;i++){
    cin>>A.at(i);
  }
  sort(A.begin(),A.end());
  for(int i=1;i<N;i++){
    if(A.at(i-1)!=A.at(i)){
      ans++;
    }
  }
  cout<<ans<<" ";
  if(N==1 && M==1){
    cout<<1<<endl;
  }else{
    cout<<"0\n";
  }
  return 0;
}
0