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