/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 532.0 KiB
#4 Accepted 2ms 320.0 KiB

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