結果
問題 | No.2737 Compound Word |
ユーザー | rerurenai |
提出日時 | 2024-04-20 14:27:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 896 ms |
コンパイル使用メモリ | 78,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 10:00:26 |
合計ジャッジ時間 | 1,938 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <iostream> #include<vector> #include <set> using namespace std; int main(void){ int n; cin >> n; vector<string> s (n); for(int i = 0; i < n; i++){ cin >> s[i]; } set<string> st; for(int i = 0; i < n; i++){ for(int j = i+1; j < n; j++){ string t = s[i]+s[j]; st.insert(t); string r = s[j]+s[i]; st.insert(r); } } cout << st.size() << endl; }