Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: cyblox_boi
Problemset: สุ่มสลับ
Language: cpp
Time: 0.000 second
Submitted On: 2025-12-27 21:52:17
#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
string text;
cin >> n >> text;
string textToFind = text;
int count = 0;
sort(text.begin(), text.end());
do
{
count++;
if (text == textToFind)
{
cout << count << '\n';
break;
}
} while (next_permutation(text.begin(), text.end()));
return 0;
}