Accepted
Code
#include <bits/stdc++.h>
using namespace std;
int main(){
int m;
cin >> m;
map<string,int> mp;
while(m--){
string a; cin >> a;
mp[a] = 1;
}
int n; cin >> n;
while(n--){
string a; cin >> a;
if(mp.find(a) != mp.end()) {
if(mp[a] == 1){
mp[a] = 0;
cout << "Welcome!";
}
else cout << "Already inside!";
}
else cout << "Sorry, not on the list.";
cout << "\n";
}
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 16:14:43
- Judged At
- 2025-09-02 16:14:43
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 532.0 KiB