/ SeriousOJ /

Record Detail

Wrong Answer


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

Code

#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main(){
    ll n;
    cin >> n;

    vector<string>a,b;

    for(int i=0; i<n; i++){
        string x;
        cin >> x;
        a.push_back(x);
    }

    ll m;
    cin >> m;




    for(int i=0; i<m; i++){
        string y;
        cin >> y;
        ll count=0;


        for(int i=0; i<n; i++){
            if(a[i] ==y){
                    ll cnt=0;
                    for(int j=0; j<b.size(); j++){
                        if(b[j]==y){
                            cnt++;
                        }
                        else{
                            b.push_back(y);
                        }
                    }

                    if(cnt==0){
                        cout<< "Welcome!"<<endl;
                    }
                    else{
                        cout<< "Already inside!"<<endl;
                    }
            }
            else{
                count++;
            }

        }
        if(count == n){
            cout<< "Sorry, not on the list."<<endl;
        }
    }

}

Information

Submit By
Type
Submission
Problem
P1227 LUCC Party Check-in
Contest
LUCC Presents Kick & Code Intra LU Programming Contest
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-01 06:58:44
Judged At
2025-09-01 06:58:44
Judged By
Score
0
Total Time
1ms
Peak Memory
532.0 KiB