Submission #31008099


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)

std::vector<std::string> split(const std::string& text, const char delim);

using ll = long long int;
using llu = unsigned long long int;

int main(){
    string buffer;
    getline(cin, buffer);
    map<char, int> ch_count;
    rep(i, 10){
        ch_count[static_cast<char>('0' + i)] = 0;
    }
    for (const auto& ch : buffer) {
        ch_count[ch] = 1;
    }
    for (const auto& pair : ch_count) {
        if(pair.second == 0){
            cout << pair.first << endl;
            return 0;
        }
    }

    return 0;
}

std::vector<std::string> split(const std::string& text, const char delim){
    std::vector<std::string> item_list;
    std::stringstream ss(text);
    std::string buffer;

    const size_t NUM_ITEM = std::count(text.begin(), text.end(), delim);
    item_list.reserve(NUM_ITEM + 1);

    while ( std::getline(ss, buffer, delim) ) {
        if (!buffer.empty()) {
                item_list.emplace_back(buffer);
        }
    }

    return item_list;
}

Submission Info

Submission Time
Task A - Lacked Number
User low10603
Language C++ (GCC 9.2.1)
Score 100
Code Size 1121 Byte
Status AC
Exec Time 9 ms
Memory 3588 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt
Case Name Status Exec Time Memory
example_00.txt AC 7 ms 3532 KiB
example_01.txt AC 4 ms 3408 KiB
hand_00.txt AC 2 ms 3400 KiB
hand_01.txt AC 2 ms 3588 KiB
random_00.txt AC 2 ms 3524 KiB
random_01.txt AC 2 ms 3444 KiB
random_02.txt AC 2 ms 3472 KiB
random_03.txt AC 2 ms 3444 KiB
random_04.txt AC 9 ms 3456 KiB
random_05.txt AC 2 ms 3544 KiB