Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int m;cin>>m;
set<string>st,vis;
for(int i=0;i<m;i++){
string s;cin>>s;
st.insert(s);
}
int q;cin>>q;
while(q--){
string s;cin>>s;
if(!st.count(s))cout<<"Sorry, not on the list."<<endl;
else{
if(vis.count(s))cout<<"Already inside!"<<endl;
else cout<<"Welcome!"<<endl,vis.insert(s);
}
}
}
Information
- Submit By
- Type
- Pretest
- Problem
- P1227 LUCC Party Check-in
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-09-02 16:55:14
- Judged At
- 2025-09-02 16:55:14
- Judged By
- Score
- 10
- Total Time
- 4ms
- Peak Memory
- 320.0 KiB