Submission #8542730


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define ALL(c) (c).begin(), (c).end()
#define sz(v) (int)v.size()
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;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
const char EOL = '\n';
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}
 

void solve() {
    string s;
    cin >> s;

    vector<bool> b(8, true);
    deque<char> q;
    REPR(i, sz(s)) if (b[(int)(s[i] - 'A')]) {
        q.emplace_front(s[i]);
        b[(int)(s[i] - 'A')] = false;
    }
    REP(i, 8) if (b[i]) q.emplace_front((char)('A' + i));
    for (char c : q) cout << c; cout << EOL;
}

Submission Info

Submission Time
Task B - 残像に口紅を
User mdstoy
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1216 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Easy All
Score / Max Score 50 / 50 50 / 50
Status
AC × 15
AC × 46
Set Name Test Cases
Easy easy-000.txt, easy-001.txt, easy-002.txt, easy-003.txt, easy-004.txt, easy-005.txt, easy-006.txt, easy-007.txt, easy-008.txt, easy-009.txt, easy-010.txt, easy-011.txt, easy-012.txt, easy-013.txt, easy-014.txt
All easy-000.txt, easy-001.txt, easy-002.txt, easy-003.txt, easy-004.txt, easy-005.txt, easy-006.txt, easy-007.txt, easy-008.txt, easy-009.txt, easy-010.txt, easy-011.txt, easy-012.txt, easy-013.txt, easy-014.txt, hard-000.txt, hard-001.txt, hard-002.txt, hard-003.txt, hard-004.txt, hard-005.txt, hard-006.txt, hard-007.txt, hard-008.txt, hard-009.txt, hard-010.txt, hard-011.txt, hard-012.txt, hard-013.txt, hard-014.txt, hard-015.txt, hard-016.txt, hard-017.txt, hard-018.txt, hard-019.txt, hard-020.txt, hard-021.txt, hard-022.txt, hard-023.txt, hard-024.txt, hard-025.txt, hard-026.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt
Case Name Status Exec Time Memory
easy-000.txt AC 1 ms 256 KB
easy-001.txt AC 1 ms 256 KB
easy-002.txt AC 1 ms 256 KB
easy-003.txt AC 1 ms 256 KB
easy-004.txt AC 1 ms 256 KB
easy-005.txt AC 1 ms 256 KB
easy-006.txt AC 1 ms 256 KB
easy-007.txt AC 1 ms 256 KB
easy-008.txt AC 1 ms 256 KB
easy-009.txt AC 1 ms 256 KB
easy-010.txt AC 1 ms 256 KB
easy-011.txt AC 1 ms 256 KB
easy-012.txt AC 1 ms 256 KB
easy-013.txt AC 1 ms 256 KB
easy-014.txt AC 1 ms 256 KB
hard-000.txt AC 1 ms 256 KB
hard-001.txt AC 1 ms 256 KB
hard-002.txt AC 1 ms 256 KB
hard-003.txt AC 1 ms 256 KB
hard-004.txt AC 1 ms 256 KB
hard-005.txt AC 1 ms 256 KB
hard-006.txt AC 1 ms 256 KB
hard-007.txt AC 1 ms 256 KB
hard-008.txt AC 1 ms 256 KB
hard-009.txt AC 1 ms 256 KB
hard-010.txt AC 1 ms 256 KB
hard-011.txt AC 1 ms 256 KB
hard-012.txt AC 1 ms 256 KB
hard-013.txt AC 1 ms 256 KB
hard-014.txt AC 1 ms 256 KB
hard-015.txt AC 1 ms 256 KB
hard-016.txt AC 1 ms 256 KB
hard-017.txt AC 1 ms 256 KB
hard-018.txt AC 1 ms 256 KB
hard-019.txt AC 1 ms 256 KB
hard-020.txt AC 1 ms 256 KB
hard-021.txt AC 1 ms 256 KB
hard-022.txt AC 1 ms 256 KB
hard-023.txt AC 1 ms 256 KB
hard-024.txt AC 1 ms 256 KB
hard-025.txt AC 1 ms 256 KB
hard-026.txt AC 1 ms 256 KB
sample1.txt AC 1 ms 256 KB
sample2.txt AC 1 ms 256 KB
sample3.txt AC 1 ms 256 KB
sample4.txt AC 1 ms 256 KB