/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 436.0 KiB
#3 Accepted 1ms 488.0 KiB
#4 Accepted 1ms 516.0 KiB

Code


/*
 *  Copyright (c) 2025 Parag Kishor Shornob
 *   All rights reserved.
 */
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector< string > vi;
typedef pair<int,int> pii;

#define yes "YES\n"
#define no "NO\n"
#define pb push_back
#define pop pop_back
#define fastin ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define input(v) for(auto &i  : v) cin>>i;
#define all(x) (x).begin(),(x).end()

char ee = '\n';
void printVec(vector<string> &a){
    for(auto pp : a) cout<<pp <<" " ;
    cout<<ee;
}
ll power(ll base , ll exp){
    ll result=1;
    while(exp>0){
       if(exp%2==1){
        result *=base;
       }
       base  *=base ;
       exp/=2;

    }
    return result;

}

void  solve(){

}

signed main() {
    fastin;
   // ll tt=1 ;
   // cin>> tt;
    //while(tt--) solve();

    ll  a , b; cin>>a;
    vi v (a);
    input(v);
    cin>>b ;
    vi vv(b) ;
    input(vv);
    vi im;
    for (int i =0;i<b;i++){
            bool ff= true;
        for(int j =0;j<i  ; j++){
            if( vv[i]==vv[j] ){
                cout<<"Already inside!"<<ee;
                ff= false;
               break;


            }
        }
        if(!ff) continue;
        bool maa= false ;
        for(int k =0;k<a ;k++){
            if(vv[i]== v[k]){
                maa= true;
                break;
            }
        }
        if(maa ) {
            cout<<"Welcome!"<<ee;
        }
        else cout<<"Sorry, not on the list."<<ee;


}
}

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:30:15
Judged At
2025-09-01 06:30:15
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB