Submission #1294282

#TimeUsernameProblemLanguageResultExecution timeMemory
1294282vuqar_bazarov1캥거루 (CEOI16_kangaroo)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("Ofast,unroll-loops,O3,02,01") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("O3,unroll-loops,no-stack-protector") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt,tune=native") #pragma GCC optimize("Ofast") #pragma GCC optimize("fast-math") #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 73 #endif using int64 = int64_t; using ld = long double; using uint64 = uint64_t; using int128 = __int128_t; #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() const int md = 1e9 + 7; const int64 inf = 1e18; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cerr.tie(nullptr); int n, cs, cf; cin >> n >> cs >> cf; vector<int> a(n); for (int i = 0; i < n; i++) { a[i] = i + 1; } int cnt = 0; do { if (a[0] == cs && a.back() == cf) { bool can = true; for (int i = 1; i < n - 1; i++) { if (a[i + 1] > a[i] && a[i] > a[i - 1]) { can = false; break; } } for (int i = 1; i < n - 1; i++) { if (a[i + 1] < a[i] && a[i] < a[i - 1]) { can = false; break; } } cnt += int(can); } } while (next_permutation(all(a))); cout << cnt << '\n'; return 0; }

Compilation message (stderr)

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,
                 from kangaroo.cpp:7:
/usr/include/c++/13/bits/allocator.h: In destructor 'constexpr std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to 'always_inline' 'constexpr std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  184 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/bits/stl_vector.h:133:14: note: called from here
  133 |       struct _Vector_impl
      |              ^~~~~~~~~~~~