/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 320.0 KiB
#2 Wrong Answer 1ms 532.0 KiB

Code

#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include<unordered_set>
#define ll long long
using namespace std;

int main() {
    ll m, i;
    cin>>m;
    string s;
    unordered_set<string> invited;
    for(i=0; i<m; i++){
        cin>>s;
        invited.insert(s);
    }
    ll n;
    cin>>n;
    string sn;
    unordered_set<string> inside;
    for(i=0; i<n; i++){
        cin>>sn;
        if(invited.find(sn) == invited.end()){
            cout<<"Sorry, not on the list."<<endl;
        }else if(invited.find(sn) != inside.end()){
            cout<<"Already inside!"<<endl;
        }else{
            inside.insert(sn);
            cout<<"Welcome"<<endl;
        }
    }
}

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:41:45
Judged At
2025-09-02 16:41:45
Judged By
Score
0
Total Time
1ms
Peak Memory
532.0 KiB