結果
問題 | No.2737 Compound Word |
ユーザー |
![]() |
提出日時 | 2024-04-24 21:12:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 477 bytes |
コンパイル時間 | 801 ms |
コンパイル使用メモリ | 77,760 KB |
最終ジャッジ日時 | 2025-02-21 08:48:58 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
//// Created by HakuroKawashiro on 2024/4/24.//#include <string>#include <iostream>#include <set>using namespace std;int main() {int n;cin >> n;string str[55];for (int i = 1;i <= n;i++) {cin >> str[i];}set<string> s;for (int i = 1;i <= n;i++) {for (int j = 1;j <= n;j++) {if (i != j) {s.insert(str[i] + str[j]);}}}cout << s.size() << endl;return 0;}