/ 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;

int main() {
    int m;
    cin >> m;
    cin.ignore(); 

    vector<string> names(m);
    for (int i = 0; i < m; i++) {
        getline(cin, names[i]);
    }

    int n;
    cin >> n;
    cin.ignore();

    vector<string> inside;

    for (int i = 0; i < n; i++) {
        string person;
        getline(cin, person);
        if (find(names.begin(), names.end(), person) == names.end()) {
            cout << "Sorry, not on the list." << endl;
        }
        else if (find(inside.begin(), inside.end(), person) != inside.end()) {
            cout << "Already inside!" << endl;
        }
        else {
            cout << "Welcome!" << endl;
            inside.push_back(person);
        }
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1227 LUCC Party Check-in
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++11 (G++ 13.2.0)
Submit At
2025-09-02 16:05:54
Judged At
2025-09-02 16:05:54
Judged By
Score
0
Total Time
1ms
Peak Memory
532.0 KiB