結果
問題 | No.1692 Expectations |
ユーザー |
|
提出日時 | 2021-10-01 21:21:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 742 ms |
コンパイル使用メモリ | 76,624 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 10:20:31 |
合計ジャッジ時間 | 2,069 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#include<iostream>#include<algorithm>#include<vector>using namespace std;int N,M;main(){cin>>N>>M;vector<int>A(N);for(int&a:A)cin>>a;sort(A.begin(),A.end());A.erase(unique(A.begin(),A.end()),A.end());cout<<A.size()<<" "<<(A.size()==1&&N==M?1:0)<<endl;}