Accepted
Code
/*
* Copyright (c) 2025 Emon Thakur
* All rights reserved.
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n; cin >> n;
set<string> st;
for(int i=1;i<=n;i++)
{
string s; cin >> s;
st.insert(s);
}
set<string> st2;
int m; cin >> m;
while(m--)
{
string s; cin >> s;
if(st2.find(s) != st2.end())
{
cout<<"Already inside!"<<endl;
}
else if(st.find(s) != st.end())
{
cout<<"Welcome!"<<endl;
st2.insert(s);
}
else cout<<"Sorry, not on the list."<<endl;
}
}
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-30 19:47:08
- Judged At
- 2025-08-30 19:47:08
- Judged By
- Score
- 100
- Total Time
- 5ms
- Peak Memory
- 532.0 KiB