Submission #67297880


Source Code Expand

#include <iostream>
#include <vector>
#include <stack>
#include <set>
#include <algorithm>
#include <queue>
#include <map>
#include <string>
#include <cmath>
using namespace std;

typedef long long ll;

#define FAST_IO std::cin.tie(NULL); std::cout.tie(NULL); std::ios_base::sync_with_stdio(false);
#define SIZE 100005
#define INF 123456789012345
#define MOD 1000000007
#define FLAG 500000

set<string> s;
int n;
vector<string> v;

int main() {
    FAST_IO
    cin >> n;
    for (int i = 0; i < n; i++) {
        string tmp;
        cin >> tmp;
        v.push_back(tmp);
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (i == j) continue;
            string tmp = v[i] + v[j];
            s.insert(tmp);
        }
    }

    cout << s.size();
}

Submission Info

Submission Time
Task B - cat 2
User firework72
Language C++ 17 (gcc 12.2)
Score 200
Code Size 830 Byte
Status AC
Exec Time 4 ms
Memory 4580 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 24
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3452 KiB
00_sample_01.txt AC 1 ms 3580 KiB
00_sample_02.txt AC 1 ms 3412 KiB
01_random_03.txt AC 2 ms 3764 KiB
01_random_04.txt AC 3 ms 4368 KiB
01_random_05.txt AC 1 ms 3548 KiB
01_random_06.txt AC 3 ms 3852 KiB
01_random_07.txt AC 1 ms 3516 KiB
01_random_08.txt AC 3 ms 4136 KiB
01_random_09.txt AC 3 ms 4320 KiB
01_random_10.txt AC 3 ms 4256 KiB
01_random_11.txt AC 3 ms 4236 KiB
01_random_12.txt AC 3 ms 4256 KiB
01_random_13.txt AC 4 ms 4496 KiB
01_random_14.txt AC 4 ms 4580 KiB
01_random_15.txt AC 3 ms 4508 KiB
01_random_16.txt AC 2 ms 3516 KiB
01_random_17.txt AC 1 ms 3412 KiB
01_random_18.txt AC 4 ms 4508 KiB
01_random_19.txt AC 4 ms 4540 KiB
01_random_20.txt AC 3 ms 4468 KiB
01_random_21.txt AC 4 ms 4204 KiB
01_random_22.txt AC 3 ms 4176 KiB
01_random_23.txt AC 3 ms 4196 KiB