Submission #75053021


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0)->sync_with_stdio(0);

    int n, m;
    cin >> n >> m;
    map<int, int> clothes;
    // n人穿的衣服种类
    int cntc = 0, flag = 1;
    for (int i = 0; i < n; i++)
    {
        int id;
        cin >> id;
        if (clothes[id] == 0)
        {
            cntc++;
        }
        else
        {
            flag = 0; // 重复
        }
        clothes[id]++;
    }
    if (flag)
    {
        cout << "Yes\n";
    }
    else
    {
        cout << "No\n";
    }
    if (cntc == m)
    {
        cout << "Yes\n";
    }
    else
    {
        cout << "No\n";
    }

    return 0;
}

Submission Info

Submission Time
Task B - Mapping
User RageLog
Language C++23 (GCC 15.2.0)
Score 200
Code Size 709 Byte
Status AC
Exec Time 1 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 19
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_1_00.txt, 01_random_1_01.txt, 01_random_1_02.txt, 02_random_2_00.txt, 02_random_2_01.txt, 02_random_2_02.txt, 03_random_3_00.txt, 03_random_3_01.txt, 03_random_3_02.txt, 04_random_4_00.txt, 04_random_4_01.txt, 04_random_4_02.txt, 04_random_4_03.txt, 04_random_4_04.txt, 04_random_4_05.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3564 KiB
00_sample_01.txt AC 1 ms 3616 KiB
00_sample_02.txt AC 1 ms 3592 KiB
00_sample_03.txt AC 1 ms 3484 KiB
01_random_1_00.txt AC 1 ms 3564 KiB
01_random_1_01.txt AC 1 ms 3424 KiB
01_random_1_02.txt AC 1 ms 3480 KiB
02_random_2_00.txt AC 1 ms 3596 KiB
02_random_2_01.txt AC 1 ms 3636 KiB
02_random_2_02.txt AC 1 ms 3596 KiB
03_random_3_00.txt AC 1 ms 3480 KiB
03_random_3_01.txt AC 1 ms 3416 KiB
03_random_3_02.txt AC 1 ms 3636 KiB
04_random_4_00.txt AC 1 ms 3584 KiB
04_random_4_01.txt AC 1 ms 3596 KiB
04_random_4_02.txt AC 1 ms 3564 KiB
04_random_4_03.txt AC 1 ms 3592 KiB
04_random_4_04.txt AC 1 ms 3636 KiB
04_random_4_05.txt AC 1 ms 3616 KiB