結果
問題 |
No.2737 Compound Word
|
ユーザー |
|
提出日時 | 2024-04-20 10:41:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 353 bytes |
コンパイル時間 | 2,044 ms |
コンパイル使用メモリ | 182,812 KB |
実行使用メモリ | 623,652 KB |
最終ジャッジ日時 | 2024-10-12 06:15:47 |
合計ジャッジ時間 | 6,299 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 WA * 1 MLE * 1 -- * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ int N; cin >> N; vector<string> S(N); for(int i=0; i<N; i++){ cin >> S[i]; } sort(S.begin(), S.end()); set<string> st; do{ string s = ""; for(auto str: S){ s = s+str; } st.insert(s); }while(next_permutation(S.begin(), S.end())); cout << st.size(); }