結果

問題 No.2737 Compound Word
ユーザー Kak1_n0_tane
提出日時 2024-04-20 12:56:03
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 2,577 bytes
コンパイル時間 4,565 ms
コンパイル使用メモリ 257,480 KB
最終ジャッジ日時 2025-02-21 06:23:26
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long double ld;
typedef long long ll;
typedef vector<vector<int>> Graph;
const ld pi = acos(-1.0);
const ld tau = 2*pi;
const ll MOD = 998244353;
using mint = modint998244353;
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string abc = "abcdefghijklmnopqrstuvwxyz";
const int dx[8] = {0, -1, 1, 0, -1, 1, -1, 1};
const int dy[8] = {-1, 0, 0, 1, -1, -1, 1, 1};
struct{
constexpr operator int(){return int(1e9)+1;}
constexpr operator ll(){return ll(1e18)+1;}
constexpr auto operator-(){
struct{
constexpr operator int(){return -int(1e9)-1;}
constexpr operator ll(){return -ll(1e18)-1;}
}_ret;
return _ret;
}
}inf;
istream &operator>>(istream &is, modint998244353 &a) { long long v; is >> v; a = v; return is; }
ostream &operator<<(ostream &os, const modint998244353 &a) { return os << a.val(); }
istream &operator>>(istream &is, modint1000000007 &a) { long long v; is >> v; a = v; return is; }
ostream &operator<<(ostream &os, const modint1000000007 &a) { return os << a.val(); }
template<int m> istream &operator>>(istream &is, static_modint<m> &a) { long long v; is >> v; a = v; return is; }
template<int m> istream &operator>>(istream &is, dynamic_modint<m> &a) { long long v; is >> v; a = v; return is; }
template<int m> ostream &operator<<(ostream &os, const static_modint<m> &a) { return os << a.val(); }
template<int m> ostream &operator<<(ostream &os, const dynamic_modint<m> &a) { return os << a.val(); }
template<class T> istream &operator>>(istream &is, vector<T> &v) { for (auto &e : v) is >> e; return is; }
template<class T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
#define Rep(parameter, start, end) for(int parameter = start; parameter < (int)(end); parameter++)
#define rep(parameter, end) Rep(parameter, 0, end)
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}
template<typename T>
// O(|Vec|)
void declare(T Vec){
for(auto x : Vec) cout << x << endl;
return;
}
int main() {
int N;
cin >> N;
vector<string> S(N);
rep(i, N) cin >> S[i];
set<string> st;
for (auto s : S) {
for (auto t : S) {
if (s == t) continue;
st.insert(s+t);
}
}
cout << st.size() << endl;
}
/*
*/
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0