結果

問題 No.1692 Expectations
ユーザー gotetengoteten
提出日時 2021-10-01 21:23:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 2,055 ms
コンパイル使用メモリ 168,944 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-26 16:19:01
合計ジャッジ時間 2,739 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 WA -
testcase_10 AC 2 ms
4,380 KB
testcase_11 WA -
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
次のファイルから読み込み:  /usr/local/gcc7/include/c++/12.2.0/map:60,
         次から読み込み:  /usr/local/gcc7/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:81,
         次から読み込み:  main.cpp:1:
メンバ関数 ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>]’ 内,
    inlined from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = const long long int&; _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>]’ at /usr/local/gcc7/include/c++/12.2.0/bits/stl_tree.h:2170:28,
    inlined from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>]’ at /usr/local/gcc7/include/c++/12.2.0/bits/stl_set.h:512:25,
    inlined from ‘int main()’ at main.cpp:18:14:
/usr/local/gcc7/include/c++/12.2.0/bits/stl_tree.h:2118:24: 警告: ‘a’ may be used uninitialized [-Wmaybe-uninitialized]
 2118 |           __x = __comp ? _S_left(__x) : _S_right(__x);
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: 関数 ‘int main()’ 内:
main.cpp:17:8: 備考: ‘a’ はここで定義されています
   17 |     ll a;
      |        ^

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
const int mod = 1000000007;
const long long INF = 1LL << 60;
using ll = long long;

int main()
{
  ll N,M;
  cin >> N >> M;

  set<ll> se;
  rep(i,N){
    ll a;
    se.insert(a);
  }

  ll ans=se.size();
  cout << ans << " ";

  if(ans==1&&N==M){
    cout << 1 << endl;
  }
  else{
    cout << 0 << endl;
  }
}
0