Accepted
Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;cin>>a;
map<string,int>cnt;
for(int i=1;i<=a;i++){
string s;
cin>>s;
cnt[s]++;
}
cin>>b;
for(int i=1;i<=b;i++){
string s;
cin>>s;
if(cnt[s]==0){
cout<<"Sorry, not on the list."<<endl;
}
else if(cnt[s]==-1){
cout<<"Already inside!"<<endl;
}
else{
cout<<"Welcome!"<<endl;
cnt[s]=-1;
}
}
}
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:53:19
- Judged At
- 2025-09-02 15:53:19
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 532.0 KiB