結果
問題 | No.2737 Compound Word |
ユーザー |
|
提出日時 | 2024-04-21 02:26:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 1,637 ms |
コンパイル使用メモリ | 174,528 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 00:57:15 |
合計ジャッジ時間 | 2,525 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; string a[N]; rep(i, N) cin >> a[i]; set<string> s; rep(i, N) { rep(j, N) { if (i == j) continue; string t = a[i] + a[j]; s.insert(t); } } cout << s.size() << endl; }