結果
問題 | No.2737 Compound Word |
ユーザー |
|
提出日時 | 2024-04-21 02:33:18 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 2,620 ms |
コンパイル使用メモリ | 253,064 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-13 01:03:23 |
合計ジャッジ時間 | 3,582 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<string> s(n); for(auto &nx : s){cin >> nx;} set<string> st; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i==j){continue;} st.insert(s[i]+s[j]); } } cout << st.size() << "\n"; return 0; }