/ SeriousOJ /

Record Detail

Accepted


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

Code

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int m;cin>>m;
	set<string>st,vis;
	for(int i=0;i<m;i++){
		string s;cin>>s;
		st.insert(s);
	}
	int q;cin>>q;
	while(q--){
		string s;cin>>s;
		if(!st.count(s))cout<<"Sorry, not on the list."<<endl;
		else{
			if(vis.count(s))cout<<"Already inside!"<<endl;
			else cout<<"Welcome!"<<endl,vis.insert(s);
		}
	}
}

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