Submission #2299

rip Platinum II Find and Replace C++20 (GCC) judged by riseoj-judge-1

Memory Limit Exceeded
/380 s 0.422 s 272 MB
Compiler output
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from /box/main.cpp:1:
In member function ‘constexpr void std::vector<_Tp, _Alloc>::clear() [with _Tp = long long int; _Alloc = std::allocator<long long int>]’,
    inlined from ‘int main()’ at /box/main.cpp:59:57:
/usr/include/c++/14/bits/stl_vector.h:1608:24: warning: iteration 49999 invokes undefined behavior [-Waggressive-loop-optimizations]
 1608 |       { _M_erase_at_end(this->_M_impl._M_start); }
      |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/box/main.cpp: In function ‘int main()’:
/box/main.cpp:59:26: note: within this loop
   59 |         for (ll i = 1; i <= 100000; i++) cycles[i].clear();
      |                        ~~^~~~~~~~~
Test cases

Waiting for the judge

Time per case
Memory per case
Case details
CaseBatchVerdictTime MemoryPointsFeedback
Test case

Source is locked. Solve the problem to read other people's code for it.

Open the problem