/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 3ms 532.0 KiB
#2 Accepted 3ms 532.0 KiB
#3 Accepted 3ms 532.0 KiB
#4 Accepted 3ms 532.0 KiB

Code

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template <typename T>
using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define v vector
#define int long long
#define vin vector <int>
#define pii pair <int, int>
#define all(a) a.begin(), a.end()
#define yes cout << "YES\n"
#define Yes cout << "Yes\n"
#define no cout << "NO\n"
#define No cout << "No\n"
#define rep(i, a, b) for(int i = a; i < b; i++)
#define repn(i, a, b) for(int i = a; i <= b; i++)
#define rev(i, a, b) for(int i = a; i >= b; i--)
int mod = 998244353;

void fastIO(){
   ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
}

void pk() {
    int n; cin >> n;
    map<string, int> s;
    rep(i, 0, n) {
        string x; cin >> x;
        s[x]=-1;
    }
    cin >> n;
    rep(i, 0, n) {
        string x; cin >> x;
        if(s[x] == -1){
            cout <<"Welcome!\n";
            s[x] = 1;
        }
        else if(s[x] == 1){
            cout <<"Already inside!\n";
        } else cout << "Sorry, not on the list.\n";
    }
}

int32_t main(){
    fastIO();
    int t = 1;
    // cin >> t;
    while(t--) pk();
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1227 LUCC Party Check-in
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-02 15:55:13
Judged At
2025-09-02 15:55:13
Judged By
Score
100
Total Time
3ms
Peak Memory
532.0 KiB