Submission #1295978

#TimeUsernameProblemLanguageResultExecution timeMemory
1295978exoworldgdGarage (IOI09_garage)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("O5,unroll-loops,inline,fast-math") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #include <bits/stdc++.h> #define exoworldgd cin.tie(0)->sync_with_stdio(0),cout.tie(0) #define int long long using namespace std; int n,m,r[105],w[2005],p[2005],x,s=0,c,yes; bitset<105> t; signed main(void) { exoworldgd; queue<int> q; cin >> n >> m; for (int i = 0; i < n; i++) cin >> r[i]; for (int i = 1; i <= m; i++) cin >> w[i]; for (int i = 0; i < 2*m; i++) { cin >> x,yes=0; if (x>0) { for (int j = 0; j < n; j++) if (!t[j]) {t[j]=1, p[x]=j, s += r[j]*w[x], yes=1; break;} if(!yes) q.push(x); } else { x = -x, t[p[x]]=0; if (!q.empty()) c = q.front(), q.pop(), t[p[x]]=1, p[c]=p[x], s += r[p[c]]*w[c]; } } cout << s; }

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 garage.cpp:3:
/usr/include/c++/13/bits/allocator.h: In destructor 'constexpr std::_Deque_base<long long int, std::allocator<long long int> >::_Deque_impl::~_Deque_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 = long long int]': target specific option mismatch
  184 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/13/deque:66,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:139:
/usr/include/c++/13/bits/stl_deque.h:542:14: note: called from here
  542 |       struct _Deque_impl
      |              ^~~~~~~~~~~