Submission #69837009


Source Code Expand

// PriashisG
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

    // Typedef
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> ordered_set;
/*
    greater<int> for large to small
    less_equal for not unique
    finding sz-th element --> os.find_by_order(sz);                           // O(log n)
    finding the number of elements smaller than x --> os.order_by_szey(x);   // O(log n)
    os.erase(x);
*/

    // Macros
#define PB push_back
#define IN insert
#define all(x) x.begin(), x.end()
#define trav(i, a) for (auto &i : a)
#define GCD __gcd
#define F first
#define S second
#define endl '\n'
#define LB lower_bound
#define UB upper_bound
#define DEBUG(i) cout << "DEBUG " << i << "\n";
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define GT(x) greater<x>()
#define setpre(n) fixed << setprecision(n)
#define SZ(x) x.size()

    // Functions
template <typename T> void pv(vector<T> &a){
    for (T u : a) cout << u << ' ';
    cout << '\n';
}

template <typename T> void pv2(vector<vector<T>> &a){
    trav(aa, a) pv(aa);
}

template <typename T, typename U> void pvp( vector<pair<T, U>> &a){
    trav(p, a) cout << "(" << p.F << ", " << p.S << ") ";
    cout << '\n';
}

    // Constants
const ll MOD7 = 1e9 + 7;
const ll MOD9 = 998244353;
const ll INF = 1e18;

    // Custom Functions
void fast(){
    ios::sync_with_stdio(false); cin.tie(0);
}

ll LCM(ll a, ll b){
   return (a * b) / GCD(a, b);
}

    // Custom Comparator
bool cmp(const pair<ll, ll>& x, const pair<ll, ll>& y){
    if (x.F == y.F) return x.S > y.S;
    else return x.F < y.F;
}

    // Global Variables


void solve(ll tc){

    string s;
    cin >> s;

    int n = SZ(s);
    map<char, int> m;
    for (int i = 0; i < n; i++){
        m[s[i]]++;
    }

    trav(u, m){
        if (u.S == 1) cout << char(u.F) << '\n';
    }

}




int main(void){

    fast(); 
    // precal();

    // freopen("fenceplan.in", "r", stdin);
    // freopen("fenceplan.out", "w", stdout);

    ll t = 1;
    int i = 1;
    // cin >> t;
    // for (ll i = 1; i <= t; i++) 
        solve(i);

}






Submission Info

Submission Time
Task B - The Odd One Out
User priashisg
Language C++ 17 (gcc 12.2)
Score 200
Code Size 2453 Byte
Status AC
Exec Time 1 ms
Memory 3576 KiB

Compile Error

Main.cpp: In function ‘void solve(ll)’:
Main.cpp:80:15: warning: unused parameter ‘tc’ [-Wunused-parameter]
   80 | void solve(ll tc){
      |            ~~~^~
Main.cpp: In function ‘int main()’:
Main.cpp:108:8: warning: unused variable ‘t’ [-Wunused-variable]
  108 |     ll t = 1;
      |        ^

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 3468 KiB
sample_02.txt AC 1 ms 3416 KiB
sample_03.txt AC 1 ms 3392 KiB
test_01.txt AC 1 ms 3412 KiB
test_02.txt AC 1 ms 3456 KiB
test_03.txt AC 1 ms 3452 KiB
test_04.txt AC 1 ms 3436 KiB
test_05.txt AC 1 ms 3404 KiB
test_06.txt AC 1 ms 3324 KiB
test_07.txt AC 1 ms 3464 KiB
test_08.txt AC 1 ms 3416 KiB
test_09.txt AC 1 ms 3460 KiB
test_10.txt AC 1 ms 3484 KiB
test_11.txt AC 1 ms 3324 KiB
test_12.txt AC 1 ms 3472 KiB
test_13.txt AC 1 ms 3440 KiB
test_14.txt AC 1 ms 3472 KiB
test_15.txt AC 1 ms 3396 KiB
test_16.txt AC 1 ms 3412 KiB
test_17.txt AC 1 ms 3576 KiB
test_18.txt AC 1 ms 3460 KiB
test_19.txt AC 1 ms 3464 KiB
test_20.txt AC 1 ms 3396 KiB
test_21.txt AC 1 ms 3472 KiB
test_22.txt AC 1 ms 3480 KiB
test_23.txt AC 1 ms 3484 KiB
test_24.txt AC 1 ms 3468 KiB