Submission
Status:
PPPPPPPTPTPPPPPPPPPP
Subtask/Task Score:
90/100
Score: 90
User: NANO..
Problemset: สุ่มสลับ
Language: cpp
Time: 0.197 second
Submitted On: 2026-11-15 19:41:43
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
string s,str="";
cin >> n >> s;
for (int i = 0; i < n; i++)
{
str+='A'+i;
}
// cout << str;
int cnt=1;
do
{
if(str==s){
cout << cnt;
return 0;
}
cnt++;
} while (next_permutation(str.begin(),str.end()));
return 0;
}