結果

問題 No.2737 Compound Word
ユーザー ユウスケユウスケ
提出日時 2024-04-20 23:54:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 880 bytes
コンパイル時間 1,047 ms
コンパイル使用メモリ 104,560 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 23:54:19
合計ジャッジ時間 1,933 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 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 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 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 1 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 2 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<vector>
#include<math.h>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<set>
#include<cmath>
#include<ctime>
#include<bitset>
#define rep(i,a,b) for(int i=a;i<=b;i++)
using namespace std;
using ll = long long;
using vec = vector<ll>;
using Graph = vector<vec>;
using Pair = pair<ll,ll>;

void debug1(vec v){
    for(auto x:v)cout << x << ' ';
    cout << endl;
}
void debug2(vector<Pair> v){
    for(auto x:v)cout << '(' << x.first << ',' << x.second << ')' << endl;
}
void debug3(Graph v){
    rep(i,0,v.size()-1)debug1(v[i]);
    cout << endl;
}
int main(){
    
    set<string>s;
    ll n;
    cin >> n;
    vector<string>a(n+1);
    rep(i,1,n){
        cin >> a[i];
    }
    rep(i,1,n)rep(j,1,n){
        if(i == j)continue;
        s.insert(a[i] + a[j]);
    }
    cout << s.size();
}
0