結果

問題 No.2737 Compound Word
ユーザー QroQro
提出日時 2024-04-20 11:54:43
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 1,280 bytes
コンパイル時間 2,316 ms
コンパイル使用メモリ 204,688 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 11:54:47
合計ジャッジ時間 3,568 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <vector>
using namespace std;
int inf=100000000;
using ll=long long;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
using pque_int=priority_queue<int>;
#define rep(i,n) for (int i=0; i < (int) n; i++)
#define _GLIBCXX_DEBUG
template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }
int VecMax(vector<int> &v) {
    int output=-inf;
    rep(i,v.size()) chmax(output,v[i]);
    return output;
}
int VecMin(vector<ll> &v) {
    ll output=inf;
    rep(i,v.size()) chmin(output,v[i]);
    return output;
}
ll VecSum(vector<int> &v) {
    ll output=0;
    rep(i,v.size()) output+=v[i];
    return output;
}
ll pow(ll a,ll n) {
    ll output=1;
    while (n>0) output*=a;
    return output;
}
int dir(char c) {
    if (c=='L') return 3;
    else if (c=='R') return 1;
    else if (c=='U') return 2;
    else return 0;
}

int main() {
    int N;
    cin >> N;
    vector<string> s(N);
    rep(i,N) cin >> s[i];

    set<string> t;
    rep(i,N) {
        rep(j,N) {
            if (s[i]!=s[j]){
            string ns=s[i]+s[j];
            t.insert(ns);
            }
        }
    }
    cout << t.size() << endl;
}
0