結果
| 問題 |
No.2593 Reorder and Mod 120
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2023-12-24 20:01:36 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 689 bytes |
| コンパイル時間 | 3,900 ms |
| コンパイル使用メモリ | 256,356 KB |
| 最終ジャッジ日時 | 2025-02-18 14:16:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 18 RE * 5 |
ソースコード
#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;
}
ldsyb