結果
問題 | No.2737 Compound Word |
ユーザー |
|
提出日時 | 2024-04-23 07:38:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 1,655 ms |
コンパイル使用メモリ | 173,112 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-15 07:28:21 |
合計ジャッジ時間 | 2,770 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; vector<string> S(N); rep(i, N) cin >> S[i]; vector<string> T; rep(i, N) rep(j, N) { if (i == j) continue; string tmp = S[i] + S[j]; if (find(T.begin(), T.end(), tmp) == T.end()) T.push_back(tmp); } cout << (int)T.size() << endl; return 0; }