/ SeriousOJ /

Record Detail

Accepted


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

Code

#include <bits/stdc++.h>
#define int long long
using namespace std;
/*
        OBSERVATIONS:


*/
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    set<string> st;
    for (int i = 0; i < n; i++)
    {
        string ele;
        cin >> ele;
        st.insert(ele);
    }
    int m;
    cin >> m;
    set<string> done;
    for (int i = 0; i < m; i++)
    {
        string curr;
        cin >> curr;
        if (st.count(curr))
        {
            cout << "Welcome!" << endl;
            st.erase(curr);
            done.insert(curr);
        }
        else
        {
            if (done.count(curr))
            {
                cout << "Already inside!" << endl;
            }
            else
            {
                cout << "Sorry, not on the list." << endl;
            }
        }
    }
    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:39:13
Judged At
2025-09-02 15:39:13
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB