QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#610756#6418. Ah, It's Yesterday Once MorestavageCompile Error//C++201.6kb2024-10-04 17:17:302024-10-04 17:18:25

Judging History

This is the latest submission verdict.

  • [2024-10-04 17:18:25]
  • Judged
  • [2024-10-04 17:17:30]
  • Submitted

answer

#pragma GCC optimize(2)
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
#define int LL
#define double LD
typedef pair<int, int> PII;
const int N = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const int inf = 0x3f3f3f3f3f3f3f3f;
const double PI = acosl(-1.0);
const double eps = 1e-8;
const int MOD = 1e9 + 7;

void solve()
{
    cout << 20 << " " << 20 << endl;
    vector<string> s(21);
    s[1] = "00000000000000000000";
    s[2] = "11111111111111111110";
    s[3] = "10000000000000000010";
    s[4] = "10111111111111111010";
    s[5] = "10100000000000001010";
    s[6] = "10101111111111101010";
    s[7] = "10101000000000101010";
    s[8] = "10101011111110101010";
    s[9] = "10101010000010101010";
    s[10] = "10101010111010101010";
    s[11] = "10101010101010101010";
    s[12] = "10101010100010101010";
    s[13] = "10101010111110101010";
    s[14] = "10101010000000101010";
    s[15] = "10101011111111101010";
    s[16] = "10101000000000001010";
    s[17] = "10101111111111111010";
    s[18] = "10100000000000000010";
    s[19] = "10111111111111111110";
    s[20] = "10000000000000000000";
    for (int i = 1; i <= 20; i++) {
        for (int j = 0; j < 20; j++) {
            if (s[i] == '0') cout << '1';
            else
                cout << '0';
        }
        cout << endl;
    }
}
signed main()
{
    ios::sync_with_stdio(false), cin.tie(0);
    cout << fixed << setprecision(15);
    int _;
    // cin >> _;
    _ = 1;
    while (_--) {
        solve();
    }
    return 0;
}

Details

answer.code: In function ‘void solve()’:
answer.code:42:22: error: no match for ‘operator==’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type’ {aka ‘std::__cxx11::basic_string<char>’} and ‘char’)
   42 |             if (s[i] == '0') cout << '1';
In file included from /usr/include/c++/13/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:181,
                 from answer.code:2:
/usr/include/c++/13/bits/regex.h:1274:5: note: candidate: ‘template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)’ (reversed)
 1274 |     operator==(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1274:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
/usr/include/c++/13/bits/regex.h:1441:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)’ (reversed)
 1441 |     operator==(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1441:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
/usr/include/c++/13/bits/regex.h:1613:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)’ (reversed)
 1613 |     operator==(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1613:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:67,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51:
/usr/include/c++/13/bits/stl_iterator.h:534:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ (reversed)
  534 |     operator==(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:534:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
/usr/include/c++/13/bits/stl_iterator.h:1678:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ (reversed)
 1678 |     operator==(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1678:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::move_iterator<_IteratorL>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
In file included from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52:
/usr/include/c++/13/bits/allocator.h:237:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)’ (reversed)
  237 |     operator==(const allocator<_T1>&, const allocator<_T2>&)
      |     ^~~~~~~~
/usr/include/c++/13/bits/allocator.h:237:5: note:   template argument deduction/substitution failed:
answer.code:42:25: note:   mismatched types ‘const std::allocator<_CharT>’ and ‘char’
   42 |             if (s[i] == '0') cout << '1';
      |                         ^~~
In file included from /usr/include/c++/13/bits/basic_string.h:47,
                 from /usr/include/c++/13/string:54:
/usr/include/c++/13/string_view:615:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits...