/ SeriousOJ /

Record Detail

Accepted


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

Code

#include<bits/stdc++.h>
#include <climits>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ui = unsigned int;
const ll INF = 1e17+7;
/*
//      _   __  ___  __   __ _______ _______
//     / | / / / _ \ \ \__\ \\__  __\\  __  \ 
//    /  |/ / / /_\ \ \  ___ \  \ \   \ \ \  \ 
//   / /|  / / ____  \ \ \  \ \ _\ \___\ \/  /
//  /_/ |_/ /_/    \__\ \_\  \_\\______\\___/

ID: mdnahidibnaharun
LANG: C++
TASK: practice 
*/

void solve(){
int m;cin>>m;
unordered_set<string>gl;
for(int i=0;i<m;i++){
    string n;cin>>n;
    gl.insert(n);
}
int n;cin>>n;
unordered_set<string>in;
for(int i=0;i<n;i++){
    string ar;cin>>ar;
    if(gl.count(ar)==0){
        cout<<"Sorry, not on the list."<<endl;
    }
    else if(in.count(ar))cout<<"Already inside!"<<endl;
    else {cout<<"Welcome!"<<endl;
    in.insert(ar);}
}
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    // int t;cin>>t;
    // while(t--){
        solve();
    //     cout<<endl;
    // }
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 15:41:30
Judged At
2025-09-02 15:41:30
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB