Submission #69833310


Source Code Expand

#include <bits/stdc++.h>

#include <atcoder/all>

using namespace std;
using namespace atcoder;

#define int long long
#define ALL(x) (x).begin(), (x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))

typedef pair<int, int> PI;
typedef pair<int, pair<int, int>> PII;
static const int INF = 1010000000000000017LL;
static const double eps = 1e-12;
static const double pi = 3.14159265358979323846;
static const int dx[4] = {1, -1, 0, 0};
static const int dy[4] = {0, 0, 1, -1};
static const int ddx[8] = {1, -1, 0, 0, 1, 1, -1, -1};
static const int ddy[8] = {0, 0, 1, -1, 1, -1, 1, -1};

template <class T>
inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

string S;

signed main() {
    cin >> S;
    map<char, int> mp;
    for (int i = 0; i < S.size(); ++i) {
        mp[S[i]]++;
    }
    for (auto [key, val] : mp) {
        if (val == 1) {
            cout << key << endl;
        }
    }
}

Submission Info

Submission Time
Task B - The Odd One Out
User tsuyosshi
Language C++ 20 (gcc 12.2)
Score 200
Code Size 1164 Byte
Status AC
Exec Time 1 ms
Memory 3588 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:45:23: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   45 |     for (int i = 0; i < S.size(); ++i) {
      |                     ~~^~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 27
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 3500 KiB
sample_02.txt AC 1 ms 3568 KiB
sample_03.txt AC 1 ms 3504 KiB
test_01.txt AC 1 ms 3556 KiB
test_02.txt AC 1 ms 3516 KiB
test_03.txt AC 1 ms 3508 KiB
test_04.txt AC 1 ms 3568 KiB
test_05.txt AC 1 ms 3520 KiB
test_06.txt AC 1 ms 3568 KiB
test_07.txt AC 1 ms 3436 KiB
test_08.txt AC 1 ms 3504 KiB
test_09.txt AC 1 ms 3512 KiB
test_10.txt AC 1 ms 3548 KiB
test_11.txt AC 1 ms 3512 KiB
test_12.txt AC 1 ms 3480 KiB
test_13.txt AC 1 ms 3556 KiB
test_14.txt AC 1 ms 3568 KiB
test_15.txt AC 1 ms 3564 KiB
test_16.txt AC 1 ms 3588 KiB
test_17.txt AC 1 ms 3568 KiB
test_18.txt AC 1 ms 3564 KiB
test_19.txt AC 1 ms 3520 KiB
test_20.txt AC 1 ms 3516 KiB
test_21.txt AC 1 ms 3504 KiB
test_22.txt AC 1 ms 3504 KiB
test_23.txt AC 1 ms 3440 KiB
test_24.txt AC 1 ms 3572 KiB