Submission #1361267

#TimeUsernameProblemLanguageResultExecution timeMemory
1361267uranhishigMonster-Go (EGOI25_monstergo)C++20
2 / 100
1 ms344 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N;
    cin >> N;

    srand(time(0));

    for (int i = 0; i < N; i++) {
        vector<int> v;

        for (int j = 0; j < 12; j++) {
            v.push_back((i + j) % 50);
        }

        random_shuffle(v.begin(), v.end());

        for (int j = 0; j < 12; j++) {
            cout << v[j] << (j + 1 < 12 ? ' ' : '\n');
        }
    }

    return 0;
}

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:20:23: warning: 'void std::random_shuffle(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]' is deprecated: use 'std::shuffle' instead [-Wdeprecated-declarations]
   20 |         random_shuffle(v.begin(), v.end());
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from Main.cpp:1:
/usr/include/c++/13/bits/stl_algo.h:4581:5: note: declared here
 4581 |     random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~~~~~~~~~~~
#Result Execution timeMemoryGrader output
Fetching results...