結果
問題 | No.2737 Compound Word |
ユーザー | umezo |
提出日時 | 2024-04-20 10:02:34 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 2,974 ms |
コンパイル使用メモリ | 252,304 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 05:30:27 |
合計ジャッジ時間 | 3,825 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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++) #define ALL(v) v.begin(),v.end() typedef long long ll; template <class T> using V=vector<T>; template <class T> using VV=V<V<T>>; //B(n,V<int>(n)) int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; V<string> S(n); rep(i,n) cin>>S[i]; set<string> s; rep(i,n) rep(j,n){ if(i==j) continue; s.insert(S[i]+S[j]); } cout<<s.size()<<endl; return 0; }