Language: C++

// https://atcoder.jp/contests/arc068/tasks/arc068_b
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()

#define isvisiblechar(c) (0x21 <= (c) && (c) <= 0x7E)
#define cin scanner
#define cout printer
namespace {
class MaiScanner {
  public:
    template <typename T> void input_integer(T &var) {
        var = 0;
        T sign = 1;
        int cc = getchar_unlocked();
        for (; cc < '0' || '9' < cc; cc = getchar_unlocked())
            if (cc == '-')
                sign = -1;
        for (; '0' <= cc && cc <= '9'; cc = getchar_unlocked())
            var = (var << 3) + (var << 1) + cc - '0';
        var = var * sign;
    }
    inline int c() { return getchar_unlocked(); }
    inline MaiScanner &operator>>(int &var) {
        input_integer<int>(var);
        return *this;
    }
    inline MaiScanner &operator>>(long long &var) {
        input_integer<long long>(var);
        return *this;
    }
    inline MaiScanner &operator>>(string &var) {
        int cc = getchar_unlocked();
        for (; !isvisiblechar(cc); cc = getchar_unlocked())
            ;
        for (; isvisiblechar(cc); cc = getchar_unlocked())
            var.push_back(cc);
        return *this;
    }
    template <typename IT> void in(IT begin, IT end) {
        for (auto it = begin; it != end; ++it)
            *this >> *it;
    }
};
class MaiPrinter {
  public:
    template <typename T> void output_integer(T var) {
        if (var == 0) {
            putchar_unlocked('0');
            return;
        }
        if (var < 0)
            putchar_unlocked('-'), var = -var;
        char stack[32];
        int stack_p = 0;
        while (var)
            stack[stack_p++] = '0' + (var % 10), var /= 10;
        while (stack_p)
            putchar_unlocked(stack[--stack_p]);
    }
    inline MaiPrinter &operator<<(char c) {
        putchar_unlocked(c);
        return *this;
    }
    inline MaiPrinter &operator<<(int var) {
        output_integer<int>(var);
        return *this;
    }
    inline MaiPrinter &operator<<(long long var) {
        output_integer<long long>(var);
        return *this;
    }
    inline MaiPrinter &operator<<(char *str_p) {
        while (*str_p)
            putchar_unlocked(*(str_p++));
        return *this;
    }
    inline MaiPrinter &operator<<(const string &str) {
        const char *p = str.c_str();
        const char *l = p + str.size();
        while (p < l)
            putchar_unlocked(*p++);
        return *this;
    }
    template <typename IT> void join(IT begin, IT end, char sep = ' ') {
        for (bool b = 0; begin != end; ++begin, b = 1)
            b ? *this << sep << *begin : *this << *begin;
    }
};
} // namespace
MaiScanner scanner;
MaiPrinter printer;

int main() {
    int n, t, sz = 0;
    cin >> n;
    bitset<100001> bt;
    REP(i, n) {
        cin >> t;
        if (!bt[t]) {
            sz++;
            bt.set(t);
        }
    }
    cout << sz - (sz % 2 == 0) << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:109:32: error: no match for 'operator<<' (operand types are '{anonymous}::MaiPrinter' and '<unresolved overloaded function type>')
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                ^
a.cc:65:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(char)'
   65 |     inline MaiPrinter &operator<<(char c) {
      |                        ^~~~~~~~
a.cc:65:40: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'char'
   65 |     inline MaiPrinter &operator<<(char c) {
      |                                   ~~~~~^
a.cc:69:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(int)'
   69 |     inline MaiPrinter &operator<<(int var) {
      |                        ^~~~~~~~
a.cc:69:39: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
   69 |     inline MaiPrinter &operator<<(int var) {
      |                                   ~~~~^~~
a.cc:73:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(long long int)'
   73 |     inline MaiPrinter &operator<<(long long var) {
      |                        ^~~~~~~~
a.cc:73:45: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
   73 |     inline MaiPrinter &operator<<(long long var) {
      |                                   ~~~~~~~~~~^~~
a.cc:77:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(char*)'
   77 |     inline MaiPrinter &operator<<(char *str_p) {
      |                        ^~~~~~~~
a.cc:77:41: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'char*'
   77 |     inline MaiPrinter &operator<<(char *str_p) {
      |                                   ~~~~~~^~~~~
a.cc:82:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(const std::string&)'
   82 |     inline MaiPrinter &operator<<(const string &str) {
      |                        ^~~~~~~~
a.cc:82:49: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
   82 |     inline MaiPrinter &operator<<(const string &str) {
      |                                   ~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
                 from a.cc:2:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
 1715 |     operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
  125 |     operator<<(byte __b, _IntegerType __shift) noexcept
      |     ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   couldn't deduce template parameter '_IntegerType'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
  763 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4077 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
 1687 |     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
  339 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
In file included from /usr/include/c++/14/memory:80,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
   70 |     operator<<(std::basic_ostream<_Ch, _Tr>& __os,
      |     ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
  563 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
  573 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
  579 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<char, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
  590 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note:   template argument deduction/substitution failed:
a.cc:109:35: note:   '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<char, _Traits>'
  109 |     cout << sz - (sz % 2 == 0) << endl;
      |                                   ^~~~
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>&