結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-11-04 18:09:28 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 5,000 ms |
| コード長 | 446 bytes |
| コンパイル時間 | 2,317 ms |
| コンパイル使用メモリ | 203,052 KB |
| 最終ジャッジ日時 | 2025-02-17 19:15:39 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
string s;
cin >> s;
sort(s.begin(), s.end());
set<string> st;
do{
st.insert(s);
}while(next_permutation(s.begin(), s.end()));
cout << st.size() - 1 << endl;
}
kpinkcat