結果

問題 No.2737 Compound Word
ユーザー Alric
提出日時 2024-05-30 22:50:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 414 bytes
コンパイル時間 1,987 ms
コンパイル使用メモリ 199,916 KB
最終ジャッジ日時 2025-02-21 17:09:54
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define pt printf(">>>")
#define mid (((l)+(r))/2)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll N=1e6+10,inf=1e18+10,mod=1e9+7;
ll n;
string s[60];
set<string> ss;
int main(){
	cin >> n;
	for(ll i=1;i<=n;i++)cin >> s[i];
	for(ll i=1;i<=n;i++){
		for(ll j=1;j<=n;j++){
			if(s[i]==s[j])continue;
			ss.insert(s[i]+s[j]);
		}
	}
	cout << ss.size();
	return 0;
}
0