/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 344.0 KiB
#4 Wrong Answer 1ms 576.0 KiB

Code

/*
 * Author: Md. Mahfuzur Rahman
 * Purpose: Competitive Programming
 */

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <array>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <utility>
#include <tuple>
#include <limits>
#include <functional>
#include <chrono>
#include <random>
#include <bitset>
#include <iomanip>
using namespace std;

#define ll long long
 #define pb push_back
 #define endl '\n'
 #define nl cout << endl
 #define ff first
 #define ss second
 #define all(v) v.begin(), v.end()
 #define rall(v) v.rbegin(), v.rend()
 #define srt(v) sort(v.begin(),v.end())
 #define vii vector<int>
 #define vll vector<long long>
 #define pii pair<int, int>
 #define pll pair<long,long>
 #define FAST_IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
 #define minheap priority_queue<long long, vector<long long>, greater<long long>>
 #define maxheap priority_queue<long long, vector<long long>>
const int MAX = 1e6;
const ll MOD = 1e9+7;
 
 void solve()
 {  
   
    ll n,m;
    cin>>n;
    vector<string>a(n);
    set<string>list;
    for(auto &x:a)
    {
        cin>>x;
        list.insert(x);
    }
    cin>>m;
    vector<string>b(m);
    set<string>checked;
    for(auto &x:b)
    {
        cin>>x;
        if(list.find(x)==list.end())
        {
            cout<<"Sorry, not on the list."<<endl;
        }
        else{
            if(checked.find(x)!=checked.end())
            {
                cout<<"Already inside!"<<endl;
            }
            else{
                cout<<"Welcome!"<<endl;
                checked.insert(x);
            }
        }
    }
   
 }

int main()
{
    ios::sync_with_stdio(0); cin.tie(0);  
    
    ll t=1;          
    //cin>>t;
    while(t--)
    {
      solve();
    }    
    
    
}

Information

Submit By
Type
Submission
Problem
P1227 LUCC Party Check-in
Contest
Testing - Intra LU Programming contest 25
Language
C++17 (G++ 13.2.0)
Submit At
2025-08-29 20:17:48
Judged At
2025-08-29 20:17:48
Judged By
Score
60
Total Time
1ms
Peak Memory
576.0 KiB