結果
問題 | No.2737 Compound Word |
ユーザー |
|
提出日時 | 2024-04-20 19:36:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 1,657 ms |
コンパイル使用メモリ | 172,876 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 17:26:23 |
合計ジャッジ時間 | 2,558 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <iostream>#include <bits/stdc++.h>using namespace std;#define rep(i,n) for(int i = 0; i < (n); i++)int main(void){int n;set<string> st;cin >> n;vector<string> s(n);rep(i,n) {cin >> s[i];}rep(i,n) {rep(j,n) {if (i == j) continue;st.insert(s[i]+s[j]);}}cout << st.size() << endl;}