Submission
Status:
PPPPPPPTPTPPPPPPPPPP
Subtask/Task Score:
90/100
Score: 90
User: Sense.exe
Problemset: สุ่มสลับ
Language: cpp
Time: 0.199 second
Submitted On: 2026-10-08 17:22:21
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
string alp = "";
for(int i=0; i<n; i++) {
alp += char('A'+i);
}
int count=1;
while(alp != s) {
next_permutation(alp.begin(),alp.end());
count++;
}
cout << count;
}