Submission #1295976

#TimeUsernameProblemLanguageResultExecution timeMemory
1295976exoworldgdHiring (IOI09_hiring)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,w,s,q,mx=-1,sum=0; tuple<double,int,int> a[500005]; signed main(void) { exoworldgd; cin >> n >> w; for (int i = 0; i < n; i++) cin >> s >> q, a[i] = {s*1.0/q,s,q}; sort(a,a+n); priority_queue<int> pq; for (int i = 0; i < n; i++) { pq.push(get<2>(a[i])),sum += get<2>(a[i]); while (!pq.empty() && get<1>(a[i])*sum > w*get<2>(a[i])) sum -= pq.top(), pq.pop(); mx = max(mx,(int)pq.size()); } cout << mx; }

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 hiring.cpp:3:
/usr/include/c++/13/bits/allocator.h: In destructor 'constexpr std::_Vector_base<long long int, std::allocator<long long 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 = long long 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
      |              ^~~~~~~~~~~~