提出 #75042759


ソースコード 拡げる

// Date: 2026-04-18
#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
    bool debug_mode = 1;
#else
    bool debug_mode = 0;
#endif

using ll = long long;
#define cerr if(debug_mode) cerr

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

    vector<int> cnt(m + 1);
    for (int i = 0; i < n; i++) {
        int ai; cin >> ai;
        cnt[ai]++;
    }

    bool onlyOne = 1;
    bool everyType = 1;
    for (int i = 1; i <= m; i++) {
        if (cnt[i] > 1) onlyOne = 0;
        if (cnt[i] == 0) everyType = 0;
    }

    cout << (onlyOne ? "Yes" : "No") << '\n' << (everyType ? "Yes" : "No");
}

提出情報

提出日時
問題 B - Mapping
ユーザ Emmetthor
言語 C++ IOI-Style(GNU++20) (GCC 14.2.0)
得点 200
コード長 675 Byte
結果 AC
実行時間 1 ms
メモリ 1604 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 19
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 1580 KiB
00_sample_01.txt AC 0 ms 1580 KiB
00_sample_02.txt AC 0 ms 1580 KiB
00_sample_03.txt AC 0 ms 1580 KiB
01_random_1_00.txt AC 0 ms 1580 KiB
01_random_1_01.txt AC 0 ms 1580 KiB
01_random_1_02.txt AC 0 ms 1580 KiB
02_random_2_00.txt AC 0 ms 1580 KiB
02_random_2_01.txt AC 0 ms 1580 KiB
02_random_2_02.txt AC 0 ms 1580 KiB
03_random_3_00.txt AC 0 ms 1580 KiB
03_random_3_01.txt AC 0 ms 1580 KiB
03_random_3_02.txt AC 0 ms 1604 KiB
04_random_4_00.txt AC 0 ms 1604 KiB
04_random_4_01.txt AC 0 ms 1580 KiB
04_random_4_02.txt AC 0 ms 1580 KiB
04_random_4_03.txt AC 0 ms 1580 KiB
04_random_4_04.txt AC 0 ms 1580 KiB
04_random_4_05.txt AC 0 ms 1580 KiB