結果

問題 No.2593 Reorder and Mod 120
ユーザー ldsybldsyb
提出日時 2023-12-24 20:01:36
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 689 bytes
コンパイル時間 4,750 ms
コンパイル使用メモリ 270,008 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-12-24 20:01:54
合計ジャッジ時間 17,935 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,901 ms
6,548 KB
testcase_01 RE -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1,902 ms
6,548 KB
testcase_06 WA -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 1,903 ms
6,548 KB
testcase_25 AC 1,904 ms
6,548 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif

int main()
{
    const auto start = steady_clock::now();

    random_device rnd;
    mt19937 engine(rnd());

    int64_t n;
    string s;
    cin >> n >> s;

    set<int64_t> st;

    while (duration_cast<milliseconds>(steady_clock::now() - start).count() < 1900)
    {
        if (st.size() == 10)
        {
            break;
        }

        // ranges::shuffle(s, engine);
        shuffle(s.begin(), s.end(), engine);

        st.insert(stoll(s.substr(n - 3, 3)) % 40);
    }

    cout << st.size() << endl;

    return 0;
}
0